[
  {
    "path": ".gitignore",
    "content": "dist/\npackage-lock.json\nnode_modules/\n.DS_Store"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright {yyyy} {name of copyright owner}\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "# 微信小程序商城\n\n微信小程序商城，微信小程序微店，长期维护版本，欢迎大家踊跃提交贡献代码；\n\n使用说明和常见问题，可参阅下面的说明，如还有疑问，可访问工厂官网 [https://www.it120.cc/](https://www.it120.cc/) 寻求帮助！\n\n新增直播带货支持，具体详见使用说明\n\n# 今日头条/抖音小程序版本\n\n本项目的今日头条/抖音小程序版本，请移步至下面的地址：\n\n[https://github.com/EastWorld/tt-app-mall](https://github.com/EastWorld/tt-app-mall)\n\n## 扫码体验\n\n<img src=\"https://dcdn.it120.cc/2022/12/31/0215c085-d4d1-43e4-bd7d-0e7336eaa661.jpeg\" width=\"200px\">\n\n## 详细配置/使用教程\n\n[https://www.it120.cc/help/ikfe2k.html](https://www.it120.cc/help/ikfe2k.html)\n\n**遇到使用问题？**\n\n[点击这里找答案，可用关键词搜索](https://www.it120.cc/help/index.html)\n\n## 其他优秀开源模板推荐\n- [天使童装](https://github.com/EastWorld/wechat-app-mall)   /  [码云镜像](https://gitee.com/javazj/wechat-app-mall)  /  [GitCode镜像](https://gitcode.com/gooking2/wechat-app-mall)\n- [天使童装（uni-app版本）](https://github.com/gooking/uni-app-mall)  /   [码云镜像](https://gitee.com/javazj/uni-app-mall)  /  [GitCode镜像](https://gitcode.com/gooking2/uni-app-mall)\n- [简约精品商城（uni-app版本）](https://github.com/gooking/uni-app--mini-mall)  /   [码云镜像](https://gitee.com/javazj/uni-app--mini-mall)  /   [GitCode镜像](https://gitcode.com/gooking2/uni-app--mini-mall)\n- [舔果果小铺（升级版）](https://github.com/gooking/TianguoguoXiaopu)\n- [面馆风格小程序](https://gitee.com/javazj/noodle_shop_procedures)\n- [AI名片](https://github.com/gooking/visitingCard)  /   [码云镜像](https://gitee.com/javazj/visitingCard)  /   [GitCode镜像](https://gitcode.com/gooking2/visitingCard)\n- [仿海底捞订座排队 (uni-app)](https://github.com/gooking/dingzuopaidui)  /   [码云镜像](https://gitee.com/javazj/dingzuopaidui)  /   [GitCode镜像](https://gitcode.com/gooking2/dingzuopaidui)\n- [H5版本商城/餐饮](https://github.com/gooking/vueMinishop)  /  [码云镜像](https://gitee.com/javazj/vueMinishop) /  [GitCode镜像](https://gitcode.com/gooking2/vueMinishop)\n- [餐饮点餐](https://github.com/woniudiancang/bee)  / [码云镜像](https://gitee.com/woniudiancang/bee) / [GitCode镜像](https://gitcode.com/gooking2/bee)\n- [企业微展](https://github.com/gooking/qiyeweizan)  / [码云镜像](https://gitee.com/javazj/qiyeweizan) / [GitCode镜像](https://gitcode.com/gooking2/qiyeweizan)\n- [无人棋牌室](https://github.com/gooking/wurenqipai)  / [码云镜像](https://gitee.com/javazj/wurenqipai) / [GitCode镜像](https://gitcode.com/gooking2/wurenqipai)\n- [酒店客房服务小程序](https://github.com/gooking/hotelRoomService)  / [码云镜像](https://gitee.com/javazj/hotelRoomService) / [GitCode镜像](https://gitcode.com/gooking2/hotelRoomService)\n- [面包店风格小程序](https://github.com/gooking/bread)  / [码云镜像](https://gitee.com/javazj/bread) / [GitCode镜像](https://gitcode.com/gooking2/bread)\n- [朋友圈发圈素材小程序](https://github.com/gooking/moments)  / [码云镜像](https://gitee.com/javazj/moments) / [GitCode镜像](https://gitcode.com/gooking2/moments)\n- [小红书企业微展](https://github.com/gooking/xhs-qiyeweizan)  / [码云镜像](https://gitee.com/javazj/xhs-qiyeweizan) / [GitCode镜像](https://gitcode.com/gooking2/xhs-qiyeweizan)\n- [旧物回收、废品回收](https://github.com/gooking/recycle)  / [码云镜像](https://gitee.com/javazj/recycle) / [GitCode镜像](https://gitcode.com/gooking2/recycle)\n- [会员卡（饭卡）储值消费系统](https://github.com/gooking/mealcard)  / [码云镜像](https://gitee.com/javazj/mealcard) / [GitCode镜像](https://gitcode.com/gooking2/mealcard)\n\n## 联系作者\n\n| 微信好友 | QQ好友 |\n| :------: | :------: |\n| <img src=\"https://dcdn.it120.cc/2021/09/13/61a80363-9085-4a10-9447-e276a3d40ab3.jpeg\" width=\"200px\"> | <img src=\"https://dcdn.it120.cc/2021/09/13/08a598d8-8186-4159-9930-2e4908accc5e.png\" width=\"200px\"> |\n\n## 本项目使用了下面的组件，在此鸣谢\n\n- [接口 SDK](https://github.com/gooking/apifm-wxapi)\n\n- [api工厂](https://admin.s2m.cc)\n\n- [vant-weapp](https://youzan.github.io/vant-weapp)\n\n- [小程序富文本插件（html 渲染）](https://github.com/jin-yufeng/mp-html)\n\n- [小程序海报组件-生成朋友圈分享海报并生成图片](https://github.com/jasondu/wxa-plugin-canvas)\n\n- [Apache ECharts](https://github.com/ecomfe/echarts-for-weixin)\n\n底部ICON图标使用：\nhttps://www.iconfont.cn/collections/detail?spm=a313x.7781069.0.da5a778a4&cid=18904\n\n  \n## 如何升级到最新版\n\n- 小程序程序的修改和您后台的数据是独立的，所以不用担心您会丢失数据\n- 先把你开发工具下的现有版本程序备份\n- 下载最新版的程序，直接覆盖您本地的程序\n- 用开发工具修改域名 mall 为你自己的域名\n- 开发工具里面上传代码提交微信审核\n- 审核通过后，小程序后台去发布新版本即可\n- 用户无需重新扫码，关闭小程序重新打开就是新版本了\n"
  },
  {
    "path": "app.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst CONFIG = require('config.js')\nconst AUTH = require('utils/auth')\nApp({\n  onLaunch: function() {\n    const subDomain = wx.getExtConfigSync().subDomain\n    if (subDomain) {\n      WXAPI.init(subDomain)\n    } else {\n      WXAPI.init(CONFIG.subDomain)\n      WXAPI.setMerchantId(CONFIG.merchantId)\n    }\n    const that = this;\n    // 检测新版本\n    const updateManager = wx.getUpdateManager()\n    updateManager.onUpdateReady(function () {\n      wx.showModal({\n        title: '更新提示',\n        content: '新版本已经准备好，是否重启应用？',\n        success(res) {\n          if (res.confirm) {\n            // 新的版本已经下载好，调用 applyUpdate 应用新版本并重启\n            updateManager.applyUpdate()\n          }\n        }\n      })\n    })\n    /**\n     * 初次加载判断网络情况\n     * 无网络状态下根据实际情况进行调整\n     */\n    wx.getNetworkType({\n      success(res) {\n        const networkType = res.networkType\n        if (networkType === 'none') {\n          that.globalData.isConnected = false\n          wx.showToast({\n            title: '当前无网络',\n            icon: 'loading',\n            duration: 2000\n          })\n        }\n      }\n    });\n    /**\n     * 监听网络状态变化\n     * 可根据业务需求进行调整\n     */\n    wx.onNetworkStatusChange(function(res) {\n      if (!res.isConnected) {\n        that.globalData.isConnected = false\n        wx.showToast({\n          title: '网络已断开',\n          icon: 'loading',\n          duration: 2000\n        })\n      } else {\n        that.globalData.isConnected = true\n        wx.hideToast()\n      }\n    })\n    WXAPI.queryConfigBatch('mallName,WITHDRAW_MIN,ALLOW_SELF_COLLECTION,order_hx_uids,subscribe_ids,share_profile,adminUserIds,goodsDetailSkuShowType,shopMod,needIdCheck,balance_pay_pwd,shipping_address_gps,shipping_address_region_level,shopping_cart_vop_open,cps_open,recycle_open,categoryMod,hide_reputation,show_seller_number,show_goods_echarts,show_buy_dynamic,goods_search_show_type,show_3_seller,show_quan_exchange_score,show_score_exchange_growth,show_score_sign,fx_subscribe_ids,share_pic,orderPeriod_open,order_pay_user_balance,wxpay_api_url,sphpay_open,fx_type,invoice_subscribe_ids,zt_open_hx,withdrawal,customerServiceChatCorpId,customerServiceChatUrl,invoice_open,alipay,comment_subscribe_ids,notice_subscribe_ids,hidden_goods_index,create_order_ext,needBindMobile,invoice_share_pic,hot_search_words').then(res => {\n      if (res.code == 0) {\n        res.data.forEach(config => {\n          wx.setStorageSync(config.key, config.value)\n        })\n        if (this.configLoadOK) {\n          this.configLoadOK()\n        }\n        // wx.setStorageSync('shopMod', '1') // 测试用，不要取消注释\n      }\n    })\n    // ---------------检测navbar高度\n    let menuButtonObject = wx.getMenuButtonBoundingClientRect();\n    console.log(\"小程序胶囊信息\",menuButtonObject)\n    wx.getSystemInfo({\n      success: res => {\n        let statusBarHeight = res.statusBarHeight,\n          navTop = menuButtonObject.top,//胶囊按钮与顶部的距离\n          navHeight = statusBarHeight + menuButtonObject.height + (menuButtonObject.top - statusBarHeight)*2;//导航高度\n        this.globalData.navHeight = navHeight;\n        this.globalData.navTop = navTop;\n        this.globalData.windowHeight = res.windowHeight;\n        this.globalData.menuButtonObject = menuButtonObject;\n        console.log(\"navHeight\",navHeight);\n      },\n      fail(err) {\n        console.log(err);\n      }\n    })\n  },\n\n  onShow (e) {\n    // 保存邀请人\n    if (e && e.query && e.query.inviter_id) {\n      wx.setStorageSync('referrer', e.query.inviter_id)\n      if (e.shareTicket) {\n        wx.getShareInfo({\n          shareTicket: e.shareTicket,\n          success: res => {\n            wx.login({\n              success(loginRes) {\n                if (loginRes.code) {\n                  WXAPI.shareGroupGetScore(\n                    loginRes.code,\n                    e.query.inviter_id,\n                    res.encryptedData,\n                    res.iv\n                  ).then(_res => {\n                    console.log(_res)\n                  }).catch(err => {\n                    console.error(err)\n                  })\n                } else {\n                  console.error('登录失败！' + loginRes.errMsg)\n                }\n              }\n            })\n          }\n        })\n      }\n    }\n    // 自动登录\n    AUTH.checkHasLogined().then(isLogined => {\n      if (!isLogined) {\n        // 未登录\n        if (CONFIG.openIdAutoRegister) {\n          // 进行登陆，用户不存在则注册\n          AUTH.authorize().then( aaa => {\n            if (CONFIG.bindSeller) {\n              AUTH.bindSeller()\n            }\n            this.getUserApiInfo().then(() => {\n              if (this.loginOK) {\n                this.loginOK()\n              }\n            })\n          })\n        } else {\n          // 只是登陆\n          AUTH.login20241025().then( res => {\n            if (res.code == 0) {\n              // 登陆成功\n              if (CONFIG.bindSeller) {\n                AUTH.bindSeller()\n              }\n              this.getUserApiInfo().then(() => {\n                if (this.loginOK) {\n                  this.loginOK()\n                }\n              })\n            } else {\n              // 用户没注册\n              if (this.loginFail) {\n                this.loginFail()\n              }\n            }\n          })\n        }\n      } else {\n        // 已登录\n        if (CONFIG.bindSeller) {\n          AUTH.bindSeller()\n        }\n        this.getUserApiInfo()\n      }\n    })\n  },\n  async getUserApiInfo() {\n    const res = await WXAPI.userDetail(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      this.globalData.apiUserInfoMap = res.data\n    }\n  },\n  initNickAvatarUrlPOP(_this) {\n    setTimeout(() => {\n      if (this.globalData.apiUserInfoMap && (!this.globalData.apiUserInfoMap.base.nick || !this.globalData.apiUserInfoMap.base.avatarUrl)) {\n        _this.setData({\n          nickPopShow: true,\n          popnick: this.globalData.apiUserInfoMap.base.nick ? this.globalData.apiUserInfoMap.base.nick : '',\n          popavatarUrl: this.globalData.apiUserInfoMap.base.avatarUrl ? this.globalData.apiUserInfoMap.base.avatarUrl : '',\n        })\n      }\n    }, 3000) // 3秒后弹出\n  },\n  globalData: {\n    isConnected: true,\n    sdkAppID: CONFIG.sdkAppID,\n    apiUserInfoMap: undefined, // 当前登陆用户信息: base/ext/idcard/saleDistributionTeam\n  }\n})"
  },
  {
    "path": "app.json",
    "content": "{\n  \"pages\": [\n    \"pages/start/start\",\n    \"pages/test/wifi\",\n    \"pages/shop/select\",\n    \"pages/index/index\",\n    \"pages/notice/index\",\n    \"pages/notice/show\",\n    \"pages/category/category\",\n    \"pages/goods/list\",\n    \"pages/goods/list-vop\",\n    \"pages/goods/fav\",\n    \"pages/goods/his\",\n    \"pages/goods-details/index\",\n    \"pages/goods-details/vop\",\n    \"pages/goods-details/day\",\n    \"pages/goods-details/times01\",\n    \"pages/goods-details/times02\",\n    \"pages/shop-cart/index\",\n    \"pages/to-pay-order/index\",\n    \"pages/select-address/index\",\n    \"pages/address-add/index\",\n    \"pages/order-list/index\",\n    \"pages/order-details/index\",\n    \"pages/order-details/scan-result\",\n    \"pages/order/refundApply\",\n    \"pages/wuliu/index\",\n    \"pages/my/index\",\n    \"pages/withdraw/index\",\n    \"pages/score-excharge/index\",\n    \"pages/score-excharge/growth\",\n    \"pages/asset/index\",\n    \"pages/recharge/index\",\n    \"pages/score/index\",\n    \"pages/score/growth\",\n    \"pages/sign/index\",\n    \"pages/maidan/index\",\n    \"pages/coupons/index\",\n    \"pages/coupons/merge\",\n    \"pages/invoice/list\",\n    \"pages/invoice/apply\",\n    \"pages/deposit/pay\",\n    \"pages/live/index\",\n    \"pages/help/detail\",\n    \"pages/help/index\",\n    \"pages/cms/list\",\n    \"pages/about/index\",\n    \"pages/idCheck/index\",\n    \"pages/peisong/detail\",\n    \"pages/peisong/orders\",\n    \"pages/peisong/statistics\",\n    \"pages/pwd-pay/reset\",\n    \"pages/pwd-pay/modify\",\n    \"pages/pwd-pay/set\",\n    \"pages/my/feedback\",\n    \"pages/search/index\",\n    \"pages/my/info\",\n    \"pages/my/setting\",\n    \"pages/my/info-menu\",\n    \"pages/recycle/index\",\n    \"pages/recycle/orders\",\n    \"pages/recycle/order-detail\",\n    \"pages/card/logs\",\n    \"pages/notagree/index\",\n    \"pages/my/user-code\",\n    \"pages/raffle/index\",\n    \"pages/login/index\",\n    \"pages/vip/index\",\n    \"pages/vip/detail\",\n    \"pages/vip/history\"\n  ],\n  \"requiredPrivateInfos\": [\n    \"getLocation\",\n    \"chooseAddress\",\n    \"chooseLocation\"\n  ],\n  \"subpackages\": [\n    {\n      \"root\": \"packageStreamMedia\",\n      \"name\": \"packageStreamMedia\",\n      \"pages\": [\n        \"pages/videoCall/videoCall\",\n        \"pages/live-anchor/index\",\n        \"pages/live-anchor/list\",\n        \"pages/live-client/list\",\n        \"pages/live-client/client\"\n      ]\n    },\n    {\n      \"root\": \"packageCps\",\n      \"name\": \"packageCps\",\n      \"pages\": [\n        \"pages/goods-details/cps-jd\",\n        \"pages/goods-details/cps-pdd\",\n        \"pages/goods-details/cps-taobao\",\n        \"pages/order-list/cps\"\n      ]\n    },\n    {\n      \"root\": \"packageFx\",\n      \"name\": \"packageFx\",\n      \"pages\": [\n        \"pages/index/index\",\n        \"pages/hehuorenfenxiao/index\",\n        \"pages/hehuorenfenxiao/fxmember\",\n        \"pages/apply/index\",\n        \"pages/apply/form\",\n        \"pages/myusers/index\",\n        \"pages/commisionLog/index\",\n        \"pages/report/team\",\n        \"pages/report/city\",\n        \"pages/myusers/myusers-detail\"\n      ]\n    }\n  ],\n  \"window\": {\n    \"backgroundTextStyle\": \"light\",\n    \"navigationBarBackgroundColor\": \"#fff\",\n    \"navigationBarTitleText\": \"\",\n    \"navigationBarTextStyle\": \"black\",\n    \"onReachBottomDistance\": 50\n  },\n  \"tabBar\": {\n    \"color\": \"#6e6d6b\",\n    \"selectedColor\": \"#e64340\",\n    \"borderStyle\": \"white\",\n    \"backgroundColor\": \"#fff\",\n    \"list\": [\n      {\n        \"pagePath\": \"pages/index/index\",\n        \"iconPath\": \"images/nav/home-off.png\",\n        \"selectedIconPath\": \"images/nav/home-on.png\",\n        \"text\": \"首页\"\n      },\n      {\n        \"pagePath\": \"pages/category/category\",\n        \"iconPath\": \"images/nav/fl-off.png\",\n        \"selectedIconPath\": \"images/nav/fl-on.png\",\n        \"text\": \"分类\"\n      },\n      {\n        \"pagePath\": \"pages/coupons/index\",\n        \"iconPath\": \"images/nav/coupon-off.png\",\n        \"selectedIconPath\": \"images/nav/coupon-on.png\",\n        \"text\": \"优惠券\"\n      },\n      {\n        \"pagePath\": \"pages/shop-cart/index\",\n        \"iconPath\": \"images/nav/cart-off.png\",\n        \"selectedIconPath\": \"images/nav/cart-on.png\",\n        \"text\": \"购物车\"\n      },\n      {\n        \"pagePath\": \"pages/my/index\",\n        \"iconPath\": \"images/nav/my-off.png\",\n        \"selectedIconPath\": \"images/nav/my-on.png\",\n        \"text\": \"我的\"\n      }\n    ]\n  },\n  \"permission\": {\n    \"scope.userLocation\": {\n      \"desc\": \"获取离你最近的门店\"\n    }\n  },\n  \"usingComponents\": {\n    \"fuwuxieyi\": \"/components/fuwuxieyi/index\",\n    \"goods-pop\": \"/components/goods-pop/index\",\n    \"login\": \"/components/login/index\",\n    \"bind-mobile\": \"/components/bind-mobile/index\",\n    \"payment\": \"/components/payment/index\",\n    \"mp-html\": \"mp-html\",\n    \"van-notice-bar\": \"@vant/weapp/notice-bar/index\",\n    \"van-search\": \"@vant/weapp/search/index\",\n    \"van-divider\": \"@vant/weapp/divider/index\",\n    \"van-icon\": \"@vant/weapp/icon/index\",\n    \"van-count-down\": \"@vant/weapp/count-down/index\",\n    \"van-button\": \"@vant/weapp/button/index\",\n    \"van-cell\": \"@vant/weapp/cell/index\",\n    \"van-cell-group\": \"@vant/weapp/cell-group/index\",\n    \"van-tag\": \"@vant/weapp/tag/index\",\n    \"van-card\": \"@vant/weapp/card/index\",\n    \"van-progress\": \"@vant/weapp/progress/index\",\n    \"van-submit-bar\": \"@vant/weapp/submit-bar/index\",\n    \"van-field\": \"@vant/weapp/field/index\",\n    \"van-radio\": \"@vant/weapp/radio/index\",\n    \"van-radio-group\": \"@vant/weapp/radio-group/index\",\n    \"van-sidebar\": \"@vant/weapp/sidebar/index\",\n    \"van-sidebar-item\": \"@vant/weapp/sidebar-item/index\",\n    \"van-empty\": \"@vant/weapp/empty/index\",\n    \"van-goods-action\": \"@vant/weapp/goods-action/index\",\n    \"van-goods-action-icon\": \"@vant/weapp/goods-action-icon/index\",\n    \"van-goods-action-button\": \"@vant/weapp/goods-action-button/index\",\n    \"van-popup\": \"@vant/weapp/popup/index\",\n    \"van-picker\": \"@vant/weapp/picker/index\",\n    \"van-stepper\": \"@vant/weapp/stepper/index\",\n    \"van-sticky\": \"@vant/weapp/sticky/index\",\n    \"van-dialog\": \"@vant/weapp/dialog/index\",\n    \"van-swipe-cell\": \"@vant/weapp/swipe-cell/index\",\n    \"van-calendar\": \"@vant/weapp/calendar/index\",\n    \"van-switch\": \"@vant/weapp/switch/index\",\n    \"van-rate\": \"@vant/weapp/rate/index\",\n    \"van-uploader\": \"@vant/weapp/uploader/index\",\n    \"van-grid\": \"@vant/weapp/grid/index\",\n    \"van-grid-item\": \"@vant/weapp/grid-item/index\",\n    \"van-image\": \"@vant/weapp/image/index\",\n    \"van-tab\": \"@vant/weapp/tab/index\",\n    \"van-tabs\": \"@vant/weapp/tabs/index\",\n    \"van-overlay\": \"@vant/weapp/overlay/index\",\n    \"van-datetime-picker\": \"@vant/weapp/datetime-picker/index\",\n    \"van-area\": \"@vant/weapp/area/index\",\n    \"van-action-sheet\": \"@vant/weapp/action-sheet/index\",\n    \"van-checkbox\": \"@vant/weapp/checkbox/index\",\n    \"van-checkbox-group\": \"@vant/weapp/checkbox-group/index\"\n  },\n  \"sitemapLocation\": \"sitemap.json\"\n}"
  },
  {
    "path": "app.wxss",
    "content": "@import \"/miniprogram_npm/@vant/weapp/common/index.wxss\";\n\n.container {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: space-between;\n  box-sizing: border-box;\n}\n.space {\n  height:20rpx;\n  background-color: #F2f2f2;\n}\n.safeAreaOldPaddingBttom {\n  padding-bottom: env(safe-area-inset-bottom);\n}\n.safeAreaNewPaddingBttom{\n  padding-bottom: constant(safe-area-inset-bottom);  \n}\n\n.safeAreaOldMarginBttom {\n  margin-bottom: env(safe-area-inset-bottom);\n}\n.safeAreaNewMarginBttom{\n  margin-bottom: constant(safe-area-inset-bottom);  \n}\n\n.no-data {\n  width: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n.no-data .line {\n  width:132rpx;\n  height:2rpx;\n  background: #999;\n}\n.no-data .txt {\n  font-size:26rpx;\n  color:rgba(153,153,153,1);\n  margin: 0 16rpx;\n}\n.ad-img {\n  width: 100vw;\n}\n.badge {\n  position: absolute;\n  top: 0;\n  right: 0;\n  box-sizing: border-box;\n  padding: 6rpx;\n  color: #fff;\n  font-size: 18rpx;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  background-color: #e64340;\n  border: 1rpx solid #fff;\n  border-radius: 50%;\n}\n.vw100 {\n  width: 100vw !important;\n}\n\npage {\n  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,\n    Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei',\n    sans-serif;\n}\n.block-btn {\n  padding: 0 32rpx;\n}\n\n.safe-bottom-box {\n  position: fixed;\n  bottom: calc(env(safe-area-inset-bottom) / 2);\n  left: 0;\n  width: 100vw;\n}\n.characteristic {\n  padding: 0 24rpx;\n  font-size: 24rpx;\n  color: #999;\n}"
  },
  {
    "path": "components/bind-mobile/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nComponent({\n  options: {\n    addGlobalClass: true,\n  },\n  /**\n   * 组件的对外属性，是属性名到属性设置的映射表\n   */\n  properties: {\n    title: String,\n    alarmText: String,\n    show: Boolean,\n  },\n\n  /**\n   * 组件的内部数据，和 properties 一同用于组件的模板渲染\n   */\n  data: {\n    \n  },\n  // 组件数据字段监听器，用于监听 properties 和 data 的变化\n  observers: {\n  },\n  lifetimes: {\n    attached() {\n      \n    },\n    detached() {\n      // 在组件实例被从页面节点树移除时执行\n    },\n  },\n  /**\n   * 组件的方法列表\n   */\n  methods: {\n    close() {\n      this.triggerEvent('cancel')\n    },\n    async getPhoneNumber(e) {\n      if (e.detail.errMsg.indexOf('privacy permission is not authorized') != -1) {\n        wx.showModal({\n          content: '请阅读并同意隐私条款以后才能继续本操作',\n          confirmText: '阅读协议',\n          cancelText: '取消',\n          success (res) {\n            if (res.confirm) {\n              wx.requirePrivacyAuthorize() // 弹出用户隐私授权框\n            }\n          }\n        })\n        return\n      }\n      if (!e.detail.errMsg) {\n        wx.showModal({\n          content: 'getPhoneNumber异常',\n          showCancel: false\n        })\n        return\n      }\n      if (e.detail.errMsg == \"getPhoneNumber:fail user deny\") {\n        return\n      }\n      if (!e.detail.errMsg || e.detail.errMsg != \"getPhoneNumber:ok\") {\n        wx.showModal({\n          content: e.detail.errMsg,\n          showCancel: false\n        })\n        return;\n      }\n      this._getPhoneNumber(e)\n    },\n    async _getPhoneNumber(e) {\n      let res\n      const extConfigSync = wx.getExtConfigSync()\n      if (extConfigSync.subDomain) {\n        // 服务商模式\n        const code = await AUTH.wxaCode()\n        res = await WXAPI.wxappServiceBindMobile({\n          token: wx.getStorageSync('token'),\n          code,\n          encryptedData: e.detail.encryptedData,\n          iv: e.detail.iv,\n        })\n      } else {\n        res = await WXAPI.bindMobileWxappV2(wx.getStorageSync('token'), e.detail.code)\n      }\n      if (res.code == 0) {\n        wx.showToast({\n          title: '绑定成功'\n        })\n        this.data.mobile = res.data\n        this.triggerEvent('ok', this.data)\n      } else {\n        wx.showModal({\n          content: res.msg,\n          showCancel: false\n        })\n      }\n    },\n  }\n})"
  },
  {
    "path": "components/bind-mobile/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \n  }\n}"
  },
  {
    "path": "components/bind-mobile/index.wxml",
    "content": "<van-popup\n  show=\"{{ show }}\"\n  position=\"bottom\"\n  round\n  closeable\n  bind:close=\"close\"\n>\n  <view class=\"pop-main\">\n    <view class=\"title\">{{ title }}</view>\n    <van-notice-bar\n      wx:if=\"{{ alarmText }}\"\n      left-icon=\"volume-o\"\n      text=\"{{ alarmText }}\"\n    />\n    <view class=\"btn-box\">\n      <van-button type=\"primary\" block round open-type=\"getPhoneNumber\" bind:getphonenumber=\"getPhoneNumber\">立即绑定</van-button>\n    </view>\n  </view>\n</van-popup>"
  },
  {
    "path": "components/bind-mobile/index.wxss",
    "content": ".pop-main {\n  display: flex;\n  flex-direction: column;\n}\n.title {\n  padding: 32rpx;\n  text-align: center;\n}\n.btn-box {\n  padding: 32rpx;\n}"
  },
  {
    "path": "components/bind-mobile/sn.txt",
    "content": "app.json usingComponents 加上\n\"bind-mobile\": \"/components/bind-mobile/index\",\n\n\n在需要的页面上加这句代码即可\n<bind-mobile\n  title=\"绑定手机号码\"\n  alarmText=\"为保障您的资金安全，请先绑定手机号码\"\n  show=\"{{ bindMobileShow }}\"\n  bind:cancel=\"bindMobileCancel\"\n  bind:ok=\"bindMobileOk\"\n/>\n\nbindMobileOk(e) {\n  console.log(e.detail); // 这里是组件里data的数据\n  this.setData({\n    bindMobileShow: false\n  })\n},\nbindMobileCancel() {\n  this.setData({\n    bindMobileShow: false\n  })\n},"
  },
  {
    "path": "components/date-time-selecter/index.js",
    "content": "const dayjs = require(\"dayjs\")\nconst weekStr = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']\nComponent({\n  options: {\n    addGlobalClass: true,\n  },\n  /**\n   * 组件的对外属性，是属性名到属性设置的映射表\n   */\n  properties: {\n    maxDays: Number,\n    title: String,\n    alarmText: String,\n    show: Boolean,\n  },\n\n  /**\n   * 组件的内部数据，和 properties 一同用于组件的模板渲染\n   */\n  data: {\n    activeKey: 0,\n    days: undefined, // 左侧的日期列表\n    day: undefined, // 选中的日期 YYYY-MM-DD\n    times: undefined, // 右侧选中的时间列表\n    timeSelectIndex: 0, // 选中的索引\n    timeSelected: undefined, // 用于自动滚到到这个位置\n  },\n  // 组件数据字段监听器，用于监听 properties 和 data 的变化\n  observers: {\n  },\n  lifetimes: {\n    attached() {\n      const days = []\n      for (let index = 0; index < this.data.maxDays; index++) {\n        const d = dayjs().add(index, 'day')\n        days.push({\n          d,\n          isToday: index == 0,\n          day: d.format('YYYY-MM-DD'),\n          display: d.format('MM月DD日') + ' ' + weekStr[d.day()]\n        })\n      }\n      this.setData({\n        days,\n        day: days[0].day\n      })\n      this.initTimes()\n    },\n    detached() {\n      // 在组件实例被从页面节点树移除时执行\n    },\n  },\n  /**\n   * 组件的方法列表\n   */\n  methods: {\n    initTimes() {\n      const dayItem = this.data.days[this.data.activeKey]\n      const times = []\n      let curHour = dayItem.isToday ? dayjs().hour() : 0 // 当前时间\n      for (let index = 0; index < 12; index++) {\n        let beginHour = index*2\n        if (beginHour < curHour) {\n          continue\n        }\n        let endHour = index*2 + 2\n        if (beginHour < 10) {\n          beginHour = '0' + beginHour\n        }\n        if (endHour < 10) {\n          endHour = '0' + endHour\n        }\n        times.push(beginHour + ':00-' + endHour + ':00')\n      }\n      this.setData({\n        timeSelectIndex: 0,\n        times,\n        timeSelected: times[0]\n      })\n    },\n    dayClick(e) {\n      const activeKey = e.currentTarget.dataset.idx\n      const dayItem = this.data.days[activeKey]\n      this.setData({\n        activeKey,\n        day: dayItem.day,\n      })\n      this.initTimes()\n    },\n    timeClick(e) {\n      const idx = e.currentTarget.dataset.idx\n      const timeSelected = this.data.times[idx]\n      this.setData({\n        timeSelectIndex: idx,\n        timeSelected,\n      })\n    },\n    closeSku() {\n      this.triggerEvent('cancel')\n    },\n    submit() {\n      this.triggerEvent('ok', this.data)\n    },\n  }\n})"
  },
  {
    "path": "components/date-time-selecter/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \n  }\n}"
  },
  {
    "path": "components/date-time-selecter/index.wxml",
    "content": "<van-popup\n  show=\"{{ show }}\"\n  position=\"bottom\"\n  round\n  closeable\n  bind:close=\"closeSku\"\n>\n  <view class=\"pop-main\">\n    <view class=\"title\">{{ title }}</view>\n    <van-notice-bar\n      wx:if=\"{{ alarmText }}\"\n      left-icon=\"volume-o\"\n      text=\"{{ alarmText }}\"\n    />\n    <view class=\"main\">\n      <scroll-view class=\"l\" scroll-y=\"true\" scroll-with-animation=\"true\" scroll-into-view=\"{{ day }}\">\n        <van-sidebar custom-class=\"ll\" active-key=\"{{ activeKey }}\">\n          <van-sidebar-item wx:for=\"{{ days }}\" wx:key=\"display\" id=\"{{item.day}}\" title=\"{{ item.display }}\" data-idx=\"{{index}}\" bindtap=\"dayClick\" />\n        </van-sidebar>\n      </scroll-view>\n      <scroll-view class=\"r\" scroll-y=\"true\" scroll-with-animation=\"true\" scroll-into-view=\"{{ timeSelected }}\">\n        <view wx:for=\"{{ times }}\" wx:key=\"*this\" class=\"time-box\" data-idx=\"{{ index }}\" bindtap=\"timeClick\">\n          <view class=\"time-l {{ index == timeSelectIndex ? 'time-l-active' : '' }}\">{{ item }}</view>\n          <view wx:if=\"{{ index == timeSelectIndex }}\" class=\"time-r\"><van-icon name=\"checked\" color=\"#07c160\" /></view>\n        </view>\n      </scroll-view>\n    </view>\n    <view class=\"btn-box\">\n      <van-button type=\"primary\" block round bind:click=\"submit\">确定</van-button>\n    </view>\n  </view>\n</van-popup>"
  },
  {
    "path": "components/date-time-selecter/index.wxss",
    "content": ".pop-main {\n  height: 80vh;\n  display: flex;\n  flex-direction: column;\n}\n.title {\n  padding: 32rpx;\n  text-align: center;\n}\n.main {\n  flex: 1;\n  overflow: hidden;\n  display: flex;\n}\n.l {\n  width: 250rpx;\n  height: 100%;\n}\n.ll {\n  width: 250rpx;\n}\n.r {\n  flex: 1;\n}\n.time-box {\n  padding: 32rpx;\n  display: flex;\n  justify-content: space-between;\n}\n.time-l-active {\n  font-weight: bold;\n}\n.btn-box {\n  padding: 32rpx;\n}"
  },
  {
    "path": "components/date-time-selecter/sn.txt",
    "content": "app.json usingComponents 加上\n\"date-time-selecter\": \"/components/date-time-selecter/index\",\n\n\n在需要的页面上加这句代码即可\n<date-time-selecter\n  maxDays=\"16\"\n  title=\"您期望的上门服务时间\"\n  alarmText=\"师傅上门前会与您确认最终上门时间\"\n  show=\"{{ show }}\"\n  bind:ok=\"dayTimeSelectOK\"\n  bind:cancel=\"dayTimeSelectCancel\"\n/>\n\ndayTimeSelectOK(e) {\n  console.log(e.detail); // 这里是组件里data的数据\n  this.setData({\n    show: false\n  })\n},\ndayTimeSelectCancel() {\n  this.setData({\n    show: false\n  })\n},"
  },
  {
    "path": "components/fuwuxieyi/index.js",
    "content": "const App = getApp();\n\nComponent({\n  options: {\n    addGlobalClass: true,\n  },\n  /**\n   * 组件的对外属性，是属性名到属性设置的映射表\n   */\n  properties: {\n    k: String,    \n  },\n\n  /**\n   * 组件的内部数据，和 properties 一同用于组件的模板渲染\n   */\n  data: {\n    s: false\n  },\n  // 组件数据字段监听器，用于监听 properties 和 data 的变化\n  observers: {\n\n  },\n  lifetimes: {\n    attached: function () {\n      if (!this.data.k) {\n        this.setData({\n          s: true\n        })\n        return\n      }\n      const agreeYxtk = wx.getStorageSync('agreeYxtk_' + this.data.k)\n      if (!agreeYxtk) {\n        this.setData({\n          s: true\n        })\n      }\n    },\n    detached: function () {\n      // 在组件实例被从页面节点树移除时执行\n    },\n  },\n  /**\n   * 组件的方法列表\n   */\n  methods: {\n    aggree(){\n      if (this.data.k) {\n        wx.setStorageSync('agreeYxtk_' + this.data.k, true)\n      }\n      this.setData({\n        s: false\n      })\n    },\n    notagree(){\n      wx.navigateTo({\n        url: '/pages/notagree/index'\n      })\n    },\n    goYstk(e){\n      const k = e.currentTarget.dataset.k\n      wx.navigateTo({\n        url: '/pages/about/index?key=' + k,\n      })\n    },\n    navBack: function () {\n      wx.navigateBack({\n        delta: 1\n      })\n    },\n    //回主页\n    toIndex: function () {\n      wx.navigateTo({\n        url: '/pages/admin/home/index/index'\n      })\n    },\n  }\n})"
  },
  {
    "path": "components/fuwuxieyi/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \n  }\n}"
  },
  {
    "path": "components/fuwuxieyi/index.wxml",
    "content": "<van-popup show=\"{{ s }}\" custom-class=\"btn-add-box-popup\" round close-on-click-overlay=\"{{ false }}\">\n  <view class=\"t\">用户协议及隐私政策</view>\n  <view class=\"content\">\n    您在使用我们的服务时，我们可能会收集和\n    使用您的相关信息。我们希望通过本\n    <text class=\"link\" data-k=\"yhxy\" bindtap=\"goYstk\">《用户协议》</text>\n    及<text class=\"link\" data-k=\"ysxy\" bindtap=\"goYstk\">《隐私协议》</text>向您说明，在使用我\n    们的服务时，我们如何收集、使用、储存和\n    分享这些信息，以及我们为您提供的访问、\n    更新、控制和保护这些信息的方式。本<text class=\"link\" data-k=\"yhxy\" bindtap=\"goYstk\">《用户协议》</text>及\n    <text class=\"link\" data-k=\"ysxy\" bindtap=\"goYstk\">《隐私协议》</text>，希望您仔细闭读，\n    充分理解协议中的内容后再点击同意。\n  </view>\n  <view class=\"btn-group\">\n    <van-button type=\"primary\" block size=\"small\" bind:click=\"aggree\">同意</van-button>\n    <van-button type=\"danger\" block size=\"small\" bind:click=\"notagree\">不同意</van-button>\n  </view>\n</van-popup>"
  },
  {
    "path": "components/fuwuxieyi/index.wxss",
    "content": ".btn-add-box-popup .t {\n  font-size: 36rpx;\n  text-align: center;\n  height: 88rpx;\n  line-height: 88rpx;\n  font-weight: bold;\n}\n.btn-add-box-popup .bd {\n  padding: 0 32rpx;\n  padding-bottom: 32rpx;\n}\n.btn-add-box-popup .del-btn {\n  margin-top: 32rpx;\n}\n\n.content {\n\twidth: 600rpx;\n\tpadding: 32rpx;\n\tfont-size: 32rpx;\n\tline-height: 54rpx;\n}\n.link {\n\tcolor: #10AEFF;\n}\n.btn-group {\n  padding: 32rpx;\n  display: flex;\n  justify-content: space-around;\n}\n.mt32 {\n\tmargin-top: 32rpx;\n}"
  },
  {
    "path": "components/fuwuxieyi/sn.txt",
    "content": "在需要的页面上加这句代码即可\n<fuwuxieyi k=\"invoice_apply\" />\nk 为页面唯一编号，随便命名即可\n不传k，每次都会弹出"
  },
  {
    "path": "components/goods-pop/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nconst TOOLS = require('../../utils/tools.js') // TOOLS.showTabBarBadge();\n\nComponent({\n  behaviors: [],\n  options: {\n    addGlobalClass: true,\n  },\n  /**\n   * 组件的对外属性，是属性名到属性设置的映射表\n   */\n  properties: {  \n    skuCurGoodsBaseInfo: null,\n  },\n\n  /**\n   * 组件的内部数据，和 properties 一同用于组件的模板渲染\n   */\n  data: {\n    skuCurGoodsShow: false,\n    skuCurGoods: undefined\n  },\n  // 组件数据字段监听器，用于监听 properties 和 data 的变化\n  observers: {\n    'skuCurGoodsBaseInfo': function(skuCurGoodsBaseInfo) {\n      console.log('observers-skuCurGoodsBaseInfo', skuCurGoodsBaseInfo)\n      if (!skuCurGoodsBaseInfo) {\n        return\n      }\n      if (skuCurGoodsBaseInfo.stores <= 0) {\n        wx.showToast({\n          title: '已售罄~',\n          icon: 'none'\n        })\n        return\n      }\n      this.initGoodsData(skuCurGoodsBaseInfo)\n    }\n  },\n  lifetimes: {\n    attached: function () {\n      console.log('11', this.data.skuCurGoods);\n    },\n    detached: function () {\n      // 在组件实例被从页面节点树移除时执行\n    },\n  },\n  pageLifetimes: {\n    // 组件所在页面的生命周期函数\n    show: function () { \n      console.log('22', this.data.skuCurGoods);\n    },\n    hide: function () { },\n    resize: function () { },\n  },\n  /**\n   * 组件的方法列表\n   */\n  methods: {\n    closeSku(){\n      // 关闭弹窗\n      this.setData({\n        skuCurGoodsShow: false\n      })\n      wx.showTabBar()\n    },\n    async initGoodsData(skuCurGoodsBaseInfo) {\n      const skuCurGoodsRes = await WXAPI.goodsDetail(skuCurGoodsBaseInfo.id)\n      if (skuCurGoodsRes.code != 0) {\n        wx.showToast({\n          title: skuCurGoodsRes.msg,\n          icon: 'none'\n        })\n        return\n      }\n      wx.hideTabBar()\n      const skuCurGoods = skuCurGoodsRes.data\n      skuCurGoods.basicInfo.storesBuy = 1\n      // 处理可选配件\n      skuCurGoods.basicInfo.hasAddition = skuCurGoodsBaseInfo.hasAddition\n      let goodsAddition = []\n      if (skuCurGoods.basicInfo.hasAddition) {\n        const res = await WXAPI.goodsAddition(skuCurGoodsBaseInfo.id)\n        if (res.code == 0) {\n          goodsAddition = res.data\n        }\n      }\n      console.log('abc:', skuCurGoods);\n      this.setData({\n        skuCurGoods,\n        goodsAddition,\n        skuGoodsPic: skuCurGoods.basicInfo.pic,\n        selectSizePrice: skuCurGoods.basicInfo.minPrice,\n        selectSizeOPrice: skuCurGoods.basicInfo.originalPrice,\n        skuCurGoodsShow: true\n      })\n    },\n    storesJia(){\n      const skuCurGoods = this.data.skuCurGoods\n      if (skuCurGoods.basicInfo.storesBuy < skuCurGoods.basicInfo.stores) {\n        skuCurGoods.basicInfo.storesBuy++\n        this.setData({\n          skuCurGoods\n        })\n      }\n    },\n    storesJian(){\n      const skuCurGoods = this.data.skuCurGoods\n      if (skuCurGoods.basicInfo.storesBuy > 1) {\n        skuCurGoods.basicInfo.storesBuy--\n        this.setData({\n          skuCurGoods\n        })\n      }\n    },\n    skuSelect(e){\n      const skuCurGoods = this.data.skuCurGoods\n      const propertyindex = e.currentTarget.dataset.propertyindex\n      const propertychildindex = e.currentTarget.dataset.propertychildindex\n      const property = this.data.skuCurGoods.properties[propertyindex]\n      const child = property.childsCurGoods[propertychildindex]\n      // 当前位置往下的所有sku取消选中状态\n      for (let index = propertyindex; index < skuCurGoods.properties.length; index++) {\n        const element = skuCurGoods.properties[index]\n        element.optionValueId = null\n        element.childsCurGoods.forEach(child => {\n          child.active = false\n        })\n      }\n      // 处理选中\n      property.childsCurGoods.forEach(ele => {\n        if (ele.id == child.id) {\n          ele.active = true\n        } else {\n          ele.active = false\n        }\n      })\n      // 隐藏没有的sku，不让选中\n      let _skuList = skuCurGoods.skuList\n      skuCurGoods.properties.forEach(p => {\n        p.childsCurGoods.forEach(c => {\n          // 处理当前选中的sku信息\n          if (c.active) {\n            _skuList = _skuList.filter(aaa => {\n              return aaa.propertyChildIds.indexOf(p.id + ':' + c.id) != -1\n            })\n          } else if(!p.optionValueId) {\n            const nextO = _skuList.find(aaa => {\n              return aaa.propertyChildIds.indexOf(p.id + ':' + c.id) != -1\n            })\n            c.hidden = (nextO || p.id == property.id) ? false : true\n          }\n        })\n      })\n      // 显示图片\n      let skuGoodsPic = this.data.skuGoodsPic\n      if (skuCurGoods.subPics && skuCurGoods.subPics.length > 0) {\n        const _subPic = skuCurGoods.subPics.find(ele => {\n          return ele.optionValueId == child.id\n        })\n        if (_subPic) {\n          skuGoodsPic = _subPic.pic\n        }\n      }\n      this.setData({\n        skuCurGoods,\n        skuGoodsPic\n      })\n      // 计算价格\n      this.calculateGoodsPrice()\n    },\n    /**\n     * 选择可选配件\n     */\n    async additionSelect(e) {\n      const propertyindex = e.currentTarget.dataset.propertyindex\n      const propertychildindex = e.currentTarget.dataset.propertychildindex\n\n      const goodsAddition = this.data.goodsAddition\n      const property = goodsAddition[propertyindex]\n      const child = property.items[propertychildindex]\n      if (child.active) {\n        // 该操作为取消选择\n        child.active = false\n        this.setData({\n          goodsAddition\n        })\n        this.calculateGoodsPrice()\n        return\n      }\n      // 单选配件取消所有子栏目选中状态\n      if (property.type == 0) {\n        property.items.forEach(child => {\n          child.active = false\n        })\n      }\n      // 设置当前选中状态\n      child.active = true\n      this.setData({\n        goodsAddition\n      })\n      this.calculateGoodsPrice()\n    },\n    async calculateGoodsPrice() {\n      // 计算最终的商品价格\n      let price = this.data.skuCurGoods.basicInfo.minPrice\n      let originalPrice = this.data.skuCurGoods.basicInfo.originalPrice\n      let totalScoreToPay = this.data.skuCurGoods.basicInfo.minScore\n      let buyNumMax = this.data.skuCurGoods.basicInfo.stores\n      let buyNumber = this.data.skuCurGoods.basicInfo.minBuyNumber\n      // 计算 sku 价格\n      const needSelectNum = this.data.skuCurGoods.properties ? this.data.skuCurGoods.properties.length : 0\n      let curSelectNum = 0;\n      let propertyChildIds = \"\";\n      let propertyChildNames = \"\";\n      if (this.data.skuCurGoods.properties) {\n        this.data.skuCurGoods.properties.forEach(p => {\n          p.childsCurGoods.forEach(c => {\n            if (c.active) {\n              curSelectNum++;\n              propertyChildIds = propertyChildIds + p.id + \":\" + c.id + \",\";\n              propertyChildNames = propertyChildNames + p.name + \":\" + c.name + \"  \";\n            }\n          })\n        })\n      }\n      let canSubmit = true;\n      if (needSelectNum != curSelectNum) {\n        canSubmit = false;\n      }\n      // 计算可选配件\n      if (this.data.skuCurGoods.basicInfo.hasAddition && this.data.goodsAddition) {\n        this.data.goodsAddition.forEach(ele => {\n          if (ele.required) {\n            const a = ele.items.find(item => {\n              return item.active\n            })\n            if (!a) {\n              canSubmit = false\n            }\n          }\n        })\n      }\n      const token = wx.getStorageSync('token')\n      if (canSubmit) {\n        const res = await WXAPI.goodsPriceV2({\n          token: token ? token : '',\n          goodsId: this.data.skuCurGoods.basicInfo.id,\n          propertyChildIds: propertyChildIds\n        })\n        if (res.code == 0) {\n          price = res.data.price\n          originalPrice = res.data.originalPrice\n          totalScoreToPay = res.data.score\n          buyNumMax = res.data.stores\n        }\n      }\n      // 计算配件价格\n      if (this.data.goodsAddition) {\n        this.data.goodsAddition.forEach(big => {\n          big.items.forEach(small => {\n            if (small.active) {\n              price = (price * 100 + small.price * 100) / 100\n            }\n          })\n        })\n      }\n      this.setData({\n        canSubmit,\n        selectSizePrice: price,\n        selectSizeOPrice: originalPrice,\n        totalScoreToPay: totalScoreToPay,\n        buyNumMax,\n        buyNumber: (buyNumMax >= buyNumber) ? buyNumber : 0\n      });\n    },\n    async addCarSku(){\n      await this.calculateGoodsPrice()\n      // 加入购物车\n      if (!this.data.canSubmit) {\n        wx.showToast({\n          title: '请选择规格/配件',\n          icon: 'none'\n        })\n        return\n      }\n      const skuCurGoods = this.data.skuCurGoods\n      const sku = []\n      if (skuCurGoods.properties) {\n        skuCurGoods.properties.forEach(p => {\n          const o = p.childsCurGoods.find(ele => {return ele.active})\n          if (!o) {        \n            return\n          }\n          sku.push({\n            optionId: o.propertyId,\n            optionValueId: o.id\n          })\n        })\n      }\n      const goodsAddition = []\n      if (this.data.goodsAddition) {\n        this.data.goodsAddition.forEach(ele => {\n          ele.items.forEach(item => {\n            if (item.active) {\n              goodsAddition.push({\n                id: item.id,\n                pid: item.pid\n              })\n            }\n          })\n        })\n      }\n      const res = await WXAPI.shippingCarInfoAddItem(wx.getStorageSync('token'), skuCurGoods.basicInfo.id, skuCurGoods.basicInfo.storesBuy, sku, goodsAddition)\n      if (res.code == 2000) {\n        wx.navigateTo({\n          url: '/pages/login/index',\n        })\n        return\n      }\n      if (res.code == 0) {\n        wx.showToast({\n          title: '加入成功',\n          icon: 'success'\n        })\n        wx.showTabBar()\n        TOOLS.showTabBarBadge() // 获取购物车数据，显示TabBarBadge\n        this.setData({\n          skuCurGoodsShow: false\n        })\n      } else {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n      }\n    },\n  }\n})"
  },
  {
    "path": "components/goods-pop/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \n  }\n}"
  },
  {
    "path": "components/goods-pop/index.wxml",
    "content": "<van-popup\n  show=\"{{ skuCurGoodsShow }}\"\n  position=\"bottom\"\n  round\n  custom-style=\"padding-top:32rpx;max-height: 80%;\"\n  bind:close=\"closeSku\"\n>\n  <van-card\n    centered\n    price=\"{{ selectSizePrice }}\"\n    origin-price=\"{{ selectSizePrice != selectSizePrice ? selectSizeOPrice : '' }}\"\n    title=\"{{ skuCurGoods.basicInfo.name }}\"\n    thumb=\"{{ skuGoodsPic }}\"\n  />\n  <view class=\"sku-container\">\n    <view class=\"sku\" wx:for=\"{{skuCurGoods.properties}}\" wx:key=\"id\" wx:for-index=\"idx\">\n      <view class=\"t\">{{item.name}}</view>\n      <view class=\"items\">\n        <text class=\"{{small.active? 'active' : ''}}\" wx:for=\"{{item.childsCurGoods}}\" wx:for-item=\"small\" wx:key=\"id\"  hidden=\"{{ small.hidden }}\" data-propertyindex=\"{{idx}}\" data-propertychildindex=\"{{index}}\" bindtap=\"skuSelect\">{{small.name}}</text>\n      </view>\n    </view>\n    <view class=\"sku\" wx:for=\"{{ goodsAddition }}\" wx:key=\"id\" wx:for-index=\"idx\">\n      <view class=\"t\">{{item.name}}</view>\n      <view class=\"items\">\n        <text class=\"{{small.active? 'active' : ''}}\" wx:for=\"{{item.items}}\" wx:for-item=\"small\" wx:key=\"id\" data-propertyindex=\"{{idx}}\" data-propertychildindex=\"{{index}}\" bindtap=\"additionSelect\">{{small.name}}</text>\n      </view>\n    </view>\n    <view class=\"num\">\n      <view class=\"t\">购买数量</view>\n      <van-stepper value=\"{{ skuCurGoods.basicInfo.storesBuy }}\" bind:plus=\"storesJia\" bind:minus=\"storesJian\" />\n    </view>\n  </view>\n  <view class=\"btn\">\n    <van-button type=\"danger\" block round bind:click=\"addCarSku\">加入购物车</van-button>\n  </view>\n</van-popup>"
  },
  {
    "path": "components/goods-pop/index.wxss",
    "content": ".sku-container {\n  box-sizing: border-box;\n  width: 100vw;\n  padding: 32rpx 32rpx 0 32rpx;\n}\n.sku-container .sku {\n  border-bottom: 1rpx solid #eee;\n  padding-bottom: 24rpx;\n  margin-bottom: 16rpx;\n}\n.sku-container .sku .t {\n  color: #333;\n}\n.sku-container .sku .items {\n  display: flex;\n  flex-wrap: wrap;\n}\n.sku-container .sku .items text {\n  padding: 8rpx 16rpx;\n  border: 1rpx solid #eee;\n  color: #666;\n  margin: 24rpx 24rpx 0 0;\n  font-size: 26rpx;\n  border-radius: 8rpx;\n}\n.sku-container .sku .items text.active {\n  border: 1rpx solid #e64340;\n  color: #e64340;\n}\n.sku-container .num {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 24rpx;\n}\n.sku-container .num .t {\n  color: #333;\n}\n.btn {\n  padding: 32rpx;\n}"
  },
  {
    "path": "components/login/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\n\nComponent({\n  options: {\n    // 样式隔离 https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#%E7%BB%84%E4%BB%B6%E6%A0%B7%E5%BC%8F%E9%9A%94%E7%A6%BB\n    styleIsolation: 'apply-shared',\n  },\n  /**\n   * 组件的对外属性，是属性名到属性设置的映射表\n   */\n  properties: {\n    avatarUrl: String,\n    name: String,\n    show: Boolean,\n  },\n\n  /**\n   * 组件的内部数据，和 properties 一同用于组件的模板渲染\n   */\n  data: {\n    nick: undefined\n  },\n  // 组件数据字段监听器，用于监听 properties 和 data 的变化\n  observers: {\n\n  },\n  lifetimes: {\n    attached() {\n      this.setData({\n        nick: this.data.name\n      })\n    },\n    detached: function () {\n      // 在组件实例被从页面节点树移除时执行\n    },\n  },\n  /**\n   * 组件的方法列表\n   */\n  methods: {\n    async _editNick() {\n      if (!this.data.nick) {\n        wx.showToast({\n          title: '请填写昵称',\n          icon: 'none'\n        })\n        return\n      }\n      const postData = {\n        token: wx.getStorageSync('token'),\n        nick: this.data.nick,\n      }\n      // https://www.yuque.com/apifm/nu0f75/ykr2zr\n      const res = await WXAPI.modifyUserInfoV2(postData)\n      if (res.code != 0) {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n        return\n      }\n      wx.showToast({\n        title: '保存成功',\n      })\n      this.setData({\n        show: false\n      })\n      getApp().getUserApiInfo()\n    },\n    async onChooseAvatar(e) {\n      let avatarUrl = e.detail.avatarUrl\n      let res = await WXAPI.uploadFileV2(wx.getStorageSync('token'), avatarUrl)\n      if (res.code != 0) {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n        return\n      }\n      avatarUrl = res.data.url\n      // https://www.yuque.com/apifm/nu0f75/ykr2zr\n      res = await WXAPI.modifyUserInfoV2({\n        token: wx.getStorageSync('token'),\n        avatarUrl,\n      })\n      if (res.code != 0) {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n        return\n      }\n      this.setData({\n        avatarUrl\n      })\n    },\n    jump() {\n      this.setData({\n        show: false\n      })\n    }\n  }\n})"
  },
  {
    "path": "components/login/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \n  }\n}"
  },
  {
    "path": "components/login/index.wxml",
    "content": "<van-popup show=\"{{ show }}\" custom-class=\"btn-add-box-popup\" round close-on-click-overlay=\"{{ false }}\">\n  <view class=\"t-box\">\n    <view class=\"t\">头像昵称填写</view>\n    <view class=\"jump\" bindtap=\"jump\">跳过</view>\n  </view>\n  <view class=\"avatar-box\">\n    <button class=\"avatar\" open-type=\"chooseAvatar\" bind:chooseavatar=\"onChooseAvatar\">\n      <view class=\"abc-box\">\n        <image class=\"avatar-img\" src=\"{{ avatarUrl ? avatarUrl : '/images/upload.png' }}\" mode=\"aspectFill\"></image>\n        <view class=\"trip\">设置头像</view>\n      </view>\n    </button>\n  </view>\n  <view class=\"nick-box\">\n    <van-field\n      model:value=\"{{ nick }}\"\n      size=\"large\"\n      placeholder=\"请输入昵称\"\n      clearable\n      type=\"nickname\"\n    />\n  </view>\n  <view class=\"btn-group\">\n    <van-button type=\"primary\" block round bind:click=\"_editNick\">保存</van-button>\n  </view>\n</van-popup>"
  },
  {
    "path": "components/login/index.wxss",
    "content": ".btn-add-box-popup {\n  width: 600rpx;\n}\n.t-box {\n  margin-top: 32rpx;\n  height: 100rpx;\n  position: relative;\n}\n.t {\n  line-height: 100rpx;\n  font-size: 32rpx;\n  text-align: center;\n}\n.jump {\n  position: absolute;\n  top: 0;\n  right: 48rpx;\n  line-height: 100rpx;\n  font-size: 28rpx;\n  color: #bbb;\n}\n.avatar {\n  margin-top: 32rpx;\n  width: 240rpx;\n  height: 240rpx;\n  padding: 0;\n  border-radius: 50%;\n}\n.avatar-img {\n  width: 240rpx;\n  height: 240rpx;\n}\n.nick-box {\n  padding: 32rpx 0;\n}\n.btn-group {\n  padding: 32rpx;\n}\n.abc-box {\n  position: relative;\n}\n.abc-box .trip {\n  position: absolute;\n  width: 100%;\n  bottom: 32rpx;\n  left: 0;\n  font-size: 24rpx;\n  background-color: rgba(0, 0, 0, 0.5);\n  color: #fff;\n}"
  },
  {
    "path": "components/login/sn.txt",
    "content": "1. app.json, usingComponents \"login\": \"/components/login/index\",\n2. 在需要的页面上加这句代码即可\n    <login show=\"{{ true }}\" avatarUrl=\"123.jpg\" name=\"张三\" />\n    show 控制弹框是否显示\n    avatarUrl 回显的头像\n    name 回显的昵称"
  },
  {
    "path": "components/payment/index.js",
    "content": "const WXAPI = require('apifm-wxapi');\nconst { wxaCode } = require('../../utils/auth');\nComponent({\n  options: {\n    addGlobalClass: true,\n  },\n  /**\n   * 组件的对外属性，是属性名到属性设置的映射表\n   */\n  properties: {\n    money: Number,\n    remark: String,\n    nextAction: Object,\n    extData: Object,\n    show: Boolean,\n  },\n\n  /**\n   * 组件的内部数据，和 properties 一同用于组件的模板渲染\n   */\n  data: {\n    payType: 'wx',\n    alipayOpenMod: '0'\n  },\n  // 组件数据字段监听器，用于监听 properties 和 data 的变化\n  observers: {\n    'show': function(show) {\n      this.setData({\n        alipayQrcode: null,\n        alipayOpenMod: wx.getStorageSync('alipay')\n      })\n    }\n  },\n  lifetimes: {\n    attached() {\n      \n    },\n    detached() {\n      // 在组件实例被从页面节点树移除时执行\n    },\n  },\n  /**\n   * 组件的方法列表\n   */\n  methods: {\n    close() {\n      this.triggerEvent('cancel')\n    },\n    payTypeChange(event) {\n      this.setData({\n        payType: event.detail,\n        alipayQrcode: null,\n      });\n    },\n    payTypeClick(event) {\n      const { name } = event.currentTarget.dataset;\n      this.setData({\n        payType: name,\n        alipayQrcode: null,\n      });\n    },\n    async submit() {\n      const postData = {\n        token: wx.getStorageSync('token'),\n        money: this.data.money,\n        remark: this.data.remark,\n      }\n      if (this.data.extData) {\n        postData = {\n          ...postData,\n          ...this.data.extData\n        }\n      }\n      if (this.data.nextAction) {\n        postData.nextAction = JSON.stringify(this.data.nextAction)\n      }\n      postData.payName = postData.remark\n      const url = wx.getStorageSync('wxpay_api_url')\n      let res\n      if (this.data.payType == 'wx') {\n        // https://www.yuque.com/apifm/nu0f75/ppadt8\n        res = await WXAPI.payVariableUrl(url ? url : '/pay/wx/wxapp', postData)\n      } else if (this.data.payType == 'alipay') {\n        // https://www.yuque.com/apifm/nu0f75/hguh83ekxsh71cn7\n        res = await WXAPI.alipayQrcode(postData)\n      } else {\n        wx.showModal({\n          content: '暂不支持该支付方式',\n          showCancel: false\n        })\n        this.close()\n        return\n      }\n      if (res.code != 0) {\n        wx.showModal({\n          content: JSON.stringify(res),\n          showCancel: false\n        })\n        this.close()\n        return\n      }\n      if (this.data.payType == 'wx') {\n        wx.requestPayment({\n          timeStamp: res.data.timeStamp,\n          nonceStr: res.data.nonceStr,\n          package: res.data.package,\n          signType: res.data.signType,\n          paySign: res.data.paySign,\n          fail: aaa => {\n            console.error(aaa)\n            wx.showToast({\n              title: '支付失败:' + aaa,\n              icon: 'none'\n            })\n          },\n          success: () => {\n            wx.showToast({\n              title: '支付成功'\n            })\n            this.triggerEvent('ok', this.data)\n          }\n        })\n      }\n      if (this.data.payType == 'alipay') {\n        const qrcodeRes = JSON.parse(res.data.qrcode)\n        const alipayQrcode = qrcodeRes.alipay_trade_precreate_response.qr_code\n        console.log(alipayQrcode);\n        // 生成二维码 https://www.yuque.com/apifm/nu0f75/xrnyo9\n        const resQrcode = await WXAPI.commonQrcode({\n          content: alipayQrcode,\n          width: 650\n        })\n        if (resQrcode.code != 0) {\n          wx.showToast({\n            title: '无法获取二维码',\n            icon: 'none'\n          })\n          return\n        }\n        console.log(resQrcode.data);\n        this.setData({\n          alipayQrcode: resQrcode.data\n        })\n      }\n    },\n  }\n})"
  },
  {
    "path": "components/payment/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \n  }\n}"
  },
  {
    "path": "components/payment/index.wxml",
    "content": "<van-popup\n  show=\"{{ show }}\"\n  position=\"bottom\"\n  round\n  closeable\n  bind:close=\"close\"\n>\n  <view class=\"pop-main\">\n    <view class=\"title\">{{ remark }}</view>\n    <view class=\"amount\"><text>￥</text>{{ money }}</view>\n    <van-divider contentPosition=\"center\">选择支付方式</van-divider>\n    <van-radio-group value=\"{{ payType }}\" bind:change=\"payTypeChange\">\n      <van-cell-group>\n        <van-cell icon=\"https://dcdn.it120.cc/2024/08/29/b327bac1-bfe6-4083-8c56-e2628a7273df.png\" title=\"微信支付\" clickable data-name=\"wx\" bind:click=\"payTypeClick\">\n          <van-radio slot=\"right-icon\" name=\"wx\" />\n        </van-cell>\n        <van-cell wx:if=\"{{ alipayOpenMod == '1' }}\" icon=\"https://dcdn.it120.cc/2024/08/29/b6fdcdd9-bb24-46fd-b066-1a41c0ea8047.png\" title=\"支付宝支付\" clickable data-name=\"alipay\" bind:click=\"payTypeClick\">\n          <van-radio slot=\"right-icon\" name=\"alipay\" />\n        </van-cell>\n      </van-cell-group>\n    </van-radio-group>\n    <block wx:if=\"{{ alipayQrcode }}\">\n      <image src=\"{{ alipayQrcode }}\" mode=\"widthFix\" class=\"alipayQrcode\" show-menu-by-longpress></image>\n      <view class=\"alipayQrcodeText\">长按图片保存，然后使用支付宝扫一扫付款</view>\n    </block>\n    \n    <view wx:if=\"{{ !alipayQrcode }}\" class=\"btn-box\">\n      <van-button type=\"primary\" block round bind:click=\"submit\">立即支付</van-button>\n    </view>\n  </view>\n</van-popup>"
  },
  {
    "path": "components/payment/index.wxss",
    "content": ".pop-main {\n  display: flex;\n  flex-direction: column;\n}\n.title {\n  padding: 32rpx;\n  text-align: center;\n}\n.btn-box {\n  padding: 32rpx;\n}\n.alipayQrcode {\n  margin-left: 50rpx;\n}\n.alipayQrcodeText {\n  text-align: center;\n  color: rgb(201, 25, 48);\n  font-size: 24rpx;\n}\n.amount {\n  padding: 16rpx;\n  text-align: center;\n  color: #e64340;\n  font-weight: bold;\n  font-size: 52rpx;\n}\n.amount text {\n  font-weight: normal;\n  font-size: 28rpx;\n}"
  },
  {
    "path": "components/payment/sn.txt",
    "content": "app.json usingComponents 加上\n\"payment\": \"/components/payment/index\",\n\n\n在需要的页面上加这句代码即可\n<payment\n  money=\"100\"\n  remark=\"支付备注信息\"\n  nextAction=\"\"\n  extData=\"需要同时提交给接口的参数对象\"\n  show=\"{{ paymentShow }}\"\n  bind:cancel=\"paymentCancel\"\n  bind:ok=\"paymentOk\"\n/>\n\npaymentOk(e) {\n  console.log(e.detail); // 这里是组件里data的数据\n  this.setData({\n    paymentShow: false\n  })\n},\npaymentCancel() {\n  this.setData({\n    paymentShow: false\n  })\n},"
  },
  {
    "path": "components/vip-success/index.js",
    "content": "Component({\n  options: {\n    addGlobalClass: true,\n  },\n  \n  properties: {\n    show: {\n      type: Boolean,\n      value: false\n    },\n    levelName: {\n      type: String,\n      value: ''\n    },\n    benefits: {\n      type: Array,\n      value: []\n    }\n  },\n\n  data: {\n    \n  },\n\n  methods: {\n    handleMaskClick() {\n      // 点击遮罩层不关闭，必须点击确定按钮\n    },\n\n    stopPropagation() {\n      // 阻止事件冒泡\n    },\n\n    handleConfirm() {\n      this.triggerEvent('confirm')\n    }\n  }\n})\n"
  },
  {
    "path": "components/vip-success/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"@vant/weapp/icon/index\"\n  }\n}\n"
  },
  {
    "path": "components/vip-success/index.wxml",
    "content": "<view class=\"success-modal\" wx:if=\"{{show}}\" catchtap=\"handleMaskClick\">\n  <view class=\"modal-content\" catchtap=\"stopPropagation\">\n    <!-- 烟花效果背景 -->\n    <view class=\"fireworks\">\n      <view class=\"firework\" wx:for=\"{{[1,2,3,4,5]}}\" wx:key=\"*this\"></view>\n    </view>\n    \n    <!-- 主内容 -->\n    <view class=\"success-icon\">\n      <view class=\"icon-circle\">\n        <van-icon name=\"passed\" color=\"#fff\" size=\"60px\" />\n      </view>\n    </view>\n    \n    <view class=\"success-title\">🎉 恭喜您</view>\n    <view class=\"success-desc\">成功升级为</view>\n    <view class=\"level-name\">{{levelName}}</view>\n    \n    <view class=\"benefits-preview\" wx:if=\"{{benefits.length > 0}}\">\n      <view class=\"benefit-tag\" wx:for=\"{{benefits}}\" wx:key=\"index\">\n        {{item}}\n      </view>\n    </view>\n    \n    <view class=\"confirm-btn\" bindtap=\"handleConfirm\">\n      确定\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "components/vip-success/index.wxss",
    "content": ".success-modal {\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: rgba(0, 0, 0, 0.7);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  z-index: 9999;\n  animation: fadeIn 0.3s ease;\n}\n\n@keyframes fadeIn {\n  from {\n    opacity: 0;\n  }\n  to {\n    opacity: 1;\n  }\n}\n\n.modal-content {\n  position: relative;\n  width: 600rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 32rpx;\n  padding: 60rpx 40rpx;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  overflow: hidden;\n  animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);\n}\n\n@keyframes scaleIn {\n  from {\n    transform: scale(0.5);\n    opacity: 0;\n  }\n  to {\n    transform: scale(1);\n    opacity: 1;\n  }\n}\n\n.fireworks {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  pointer-events: none;\n  overflow: hidden;\n}\n\n.firework {\n  position: absolute;\n  width: 10rpx;\n  height: 10rpx;\n  border-radius: 50%;\n  background: rgba(255, 255, 255, 0.8);\n  animation: explode 1.5s ease-out infinite;\n}\n\n.firework:nth-child(1) {\n  top: 20%;\n  left: 20%;\n  animation-delay: 0s;\n}\n\n.firework:nth-child(2) {\n  top: 30%;\n  right: 20%;\n  animation-delay: 0.3s;\n}\n\n.firework:nth-child(3) {\n  top: 50%;\n  left: 10%;\n  animation-delay: 0.6s;\n}\n\n.firework:nth-child(4) {\n  top: 60%;\n  right: 15%;\n  animation-delay: 0.9s;\n}\n\n.firework:nth-child(5) {\n  top: 40%;\n  left: 50%;\n  animation-delay: 1.2s;\n}\n\n@keyframes explode {\n  0% {\n    transform: scale(0);\n    opacity: 1;\n  }\n  50% {\n    transform: scale(20);\n    opacity: 0.5;\n  }\n  100% {\n    transform: scale(40);\n    opacity: 0;\n  }\n}\n\n.success-icon {\n  margin-bottom: 32rpx;\n  animation: bounce 1s ease infinite;\n}\n\n@keyframes bounce {\n  0%, 100% {\n    transform: translateY(0);\n  }\n  50% {\n    transform: translateY(-20rpx);\n  }\n}\n\n.icon-circle {\n  width: 160rpx;\n  height: 160rpx;\n  background: rgba(255, 255, 255, 0.2);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  backdrop-filter: blur(10rpx);\n  border: 6rpx solid rgba(255, 255, 255, 0.3);\n  box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.2);\n}\n\n.success-title {\n  font-size: 48rpx;\n  font-weight: bold;\n  color: #ffffff;\n  margin-bottom: 16rpx;\n  text-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.2);\n}\n\n.success-desc {\n  font-size: 28rpx;\n  color: rgba(255, 255, 255, 0.9);\n  margin-bottom: 12rpx;\n}\n\n.level-name {\n  font-size: 40rpx;\n  font-weight: bold;\n  color: #ffffff;\n  padding: 16rpx 48rpx;\n  background: rgba(255, 255, 255, 0.2);\n  border-radius: 40rpx;\n  backdrop-filter: blur(10rpx);\n  margin-bottom: 32rpx;\n}\n\n.benefits-preview {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 16rpx;\n  justify-content: center;\n  margin-bottom: 40rpx;\n}\n\n.benefit-tag {\n  padding: 12rpx 24rpx;\n  background: rgba(255, 255, 255, 0.2);\n  border-radius: 24rpx;\n  font-size: 24rpx;\n  color: #ffffff;\n  backdrop-filter: blur(10rpx);\n}\n\n.confirm-btn {\n  width: 100%;\n  padding: 28rpx;\n  background: #ffffff;\n  color: #667eea;\n  font-size: 32rpx;\n  font-weight: bold;\n  border-radius: 48rpx;\n  text-align: center;\n  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.2);\n  transition: all 0.3s;\n}\n\n.confirm-btn:active {\n  transform: scale(0.95);\n}\n"
  },
  {
    "path": "config.js",
    "content": "module.exports = {\n  version: '26.3.13',\n  note: '首页购买动态SDK升级', // 这个为版本描述，无需修改\n  subDomain: 'tz', // 此处改成你自己的专属域名。什么是专属域名？请看教程 https://www.it120.cc/help/qr6l4m.html\n  merchantId: 951, // 商户ID，可在后台工厂设置-->商户信息查看\n  sdkAppID: 1400450467, // 腾讯实时音视频应用编号，请看教程 https://www.it120.cc/help/nxoqsl.html\n  bindSeller: false, // true 开启三级分销抢客； false 为不开启\n  customerServiceType: 'QW', // 客服类型，QW为企业微信，需要在后台系统参数配置企业ID和客服URL，XCX 为小程序的默认客服\n  openIdAutoRegister: true, // 用户打开小程序的时候自动注册新用户【用户不存在的时候】\n}"
  },
  {
    "path": "jsconfig.json",
    "content": "{\n\t\"compilerOptions\": {\n\t\t\"target\": \"es2015\",\n\t\t\"module\": \"commonjs\"\n\t}\t\n}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/action-sheet/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/action-sheet/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar button_1 = require(\"../mixins/button\");\n(0, component_1.VantComponent)({\n    classes: ['list-class'],\n    mixins: [button_1.button],\n    props: {\n        show: Boolean,\n        title: String,\n        cancelText: String,\n        description: String,\n        round: {\n            type: Boolean,\n            value: true,\n        },\n        zIndex: {\n            type: Number,\n            value: 100,\n        },\n        actions: {\n            type: Array,\n            value: [],\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n        },\n        closeOnClickAction: {\n            type: Boolean,\n            value: true,\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    methods: {\n        onSelect: function (event) {\n            var _this = this;\n            var index = event.currentTarget.dataset.index;\n            var _a = this.data, actions = _a.actions, closeOnClickAction = _a.closeOnClickAction, canIUseGetUserProfile = _a.canIUseGetUserProfile;\n            var item = actions[index];\n            if (item) {\n                this.$emit('select', item);\n                if (closeOnClickAction) {\n                    this.onClose();\n                }\n                if (item.openType === 'getUserInfo' && canIUseGetUserProfile) {\n                    wx.getUserProfile({\n                        desc: item.getUserProfileDesc || '  ',\n                        complete: function (userProfile) {\n                            _this.$emit('getuserinfo', userProfile);\n                        },\n                    });\n                }\n            }\n        },\n        onCancel: function () {\n            this.$emit('cancel');\n        },\n        onClose: function () {\n            this.$emit('close');\n        },\n        onClickOverlay: function () {\n            this.$emit('click-overlay');\n            this.onClose();\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/action-sheet/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-popup\": \"../popup/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/action-sheet/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<van-popup\n  show=\"{{ show }}\"\n  position=\"bottom\"\n  round=\"{{ round }}\"\n  z-index=\"{{ zIndex }}\"\n  overlay=\"{{ overlay }}\"\n  custom-class=\"van-action-sheet custom-class\"\n  safe-area-inset-bottom=\"{{ safeAreaInsetBottom }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:close=\"onClickOverlay\"\n>\n  <view wx:if=\"{{ title }}\" class=\"van-action-sheet__header\">\n    {{ title }}\n    <van-icon\n      name=\"cross\"\n      custom-class=\"van-action-sheet__close\"\n      bind:click=\"onClose\"\n    />\n  </view>\n  <view wx:if=\"{{ description }}\" class=\"van-action-sheet__description van-hairline--bottom\">\n    {{ description }}\n  </view>\n  <view wx:if=\"{{ actions && actions.length }}\" class=\"list-class\">\n    <!-- button外包一层view，防止actions动态变化，导致渲染时button被打散 -->\n    <button\n      wx:for=\"{{ actions }}\"\n      wx:key=\"index\"\n      open-type=\"{{ item.disabled || item.loading || (canIUseGetUserProfile && item.openType === 'getUserInfo') ? '' : item.openType }}\"\n      style=\"{{ item.color ? 'color: ' + item.color : '' }}\"\n      class=\"{{ utils.bem('action-sheet__item', { disabled: item.disabled || item.loading }) }} {{ item.className || '' }}\"\n      hover-class=\"van-action-sheet__item--hover\"\n      data-index=\"{{ index }}\"\n      bindtap=\"{{ item.disabled || item.loading ? '' : 'onSelect' }}\"\n      bindgetuserinfo=\"onGetUserInfo\"\n      bindcontact=\"onContact\"\n      bindgetphonenumber=\"onGetPhoneNumber\"\n      binderror=\"onError\"\n      bindlaunchapp=\"onLaunchApp\"\n      bindopensetting=\"onOpenSetting\"\n      lang=\"{{ lang }}\"\n      session-from=\"{{ sessionFrom }}\"\n      send-message-title=\"{{ sendMessageTitle }}\"\n      send-message-path=\"{{ sendMessagePath }}\"\n      send-message-img=\"{{ sendMessageImg }}\"\n      show-message-card=\"{{ showMessageCard }}\"\n      app-parameter=\"{{ appParameter }}\"\n    >\n      <block wx:if=\"{{ !item.loading }}\">\n        {{ item.name }}\n        <view wx:if=\"{{ item.subname }}\" class=\"van-action-sheet__subname\" >{{ item.subname }}</view>\n      </block>\n      <van-loading wx:else custom-class=\"van-action-sheet__loading\" size=\"22px\" />\n    </button>\n  </view>\n  <slot />\n  <block wx:if=\"{{ cancelText }}\">\n    <view class=\"van-action-sheet__gap\" />\n    <view\n      class=\"van-action-sheet__cancel\"\n      hover-class=\"van-action-sheet__cancel--hover\"\n      hover-stay-time=\"70\"\n      bind:tap=\"onCancel\"\n    >\n      {{ cancelText }}\n    </view>\n  </block>\n</van-popup>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/action-sheet/index.wxss",
    "content": "@import '../common/index.wxss';.van-action-sheet{color:var(--action-sheet-item-text-color,#323233);max-height:var(--action-sheet-max-height,90%)!important}.van-action-sheet__cancel,.van-action-sheet__item{background-color:var(--action-sheet-item-background,#fff);font-size:var(--action-sheet-item-font-size,16px);line-height:var(--action-sheet-item-line-height,22px);padding:14px 16px;text-align:center}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5}.van-action-sheet__cancel:after,.van-action-sheet__item:after{border-width:0}.van-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,#646566)}.van-action-sheet__gap{background-color:var(--action-sheet-cancel-padding-color,#f7f8fa);display:block;height:var(--action-sheet-cancel-padding-top,8px)}.van-action-sheet__item--disabled{color:var(--action-sheet-item-disabled-text-color,#c8c9cc)}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__subname{color:var(--action-sheet-subname-color,#969799);font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.van-action-sheet__header{font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--font-weight-bold,500);line-height:var(--action-sheet-header-height,48px);text-align:center}.van-action-sheet__description{color:var(--action-sheet-description-color,#969799);font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.van-action-sheet__close{color:var(--action-sheet-close-icon-color,#c8c9cc);font-size:var(--action-sheet-close-icon-size,22px)!important;line-height:inherit!important;padding:var(--action-sheet-close-icon-padding,0 16px);position:absolute!important;right:0;top:0}.van-action-sheet__loading{display:flex!important}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/area/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/area/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar shared_1 = require(\"../picker/shared\");\nvar utils_1 = require(\"../common/utils\");\nvar EMPTY_CODE = '000000';\n(0, component_1.VantComponent)({\n    classes: ['active-class', 'toolbar-class', 'column-class'],\n    props: __assign(__assign({}, shared_1.pickerProps), { showToolbar: {\n            type: Boolean,\n            value: true,\n        }, value: {\n            type: String,\n            observer: function (value) {\n                this.code = value;\n                this.setValues();\n            },\n        }, areaList: {\n            type: Object,\n            value: {},\n            observer: 'setValues',\n        }, columnsNum: {\n            type: null,\n            value: 3,\n        }, columnsPlaceholder: {\n            type: Array,\n            observer: function (val) {\n                this.setData({\n                    typeToColumnsPlaceholder: {\n                        province: val[0] || '',\n                        city: val[1] || '',\n                        county: val[2] || '',\n                    },\n                });\n            },\n        } }),\n    data: {\n        columns: [{ values: [] }, { values: [] }, { values: [] }],\n        typeToColumnsPlaceholder: {},\n    },\n    mounted: function () {\n        var _this = this;\n        (0, utils_1.requestAnimationFrame)(function () {\n            _this.setValues();\n        });\n    },\n    methods: {\n        getPicker: function () {\n            if (this.picker == null) {\n                this.picker = this.selectComponent('.van-area__picker');\n            }\n            return this.picker;\n        },\n        onCancel: function (event) {\n            this.emit('cancel', event.detail);\n        },\n        onConfirm: function (event) {\n            var index = event.detail.index;\n            var value = event.detail.value;\n            value = this.parseValues(value);\n            this.emit('confirm', { value: value, index: index });\n        },\n        emit: function (type, detail) {\n            detail.values = detail.value;\n            delete detail.value;\n            this.$emit(type, detail);\n        },\n        parseValues: function (values) {\n            var columnsPlaceholder = this.data.columnsPlaceholder;\n            return values.map(function (value, index) {\n                if (value &&\n                    (!value.code || value.name === columnsPlaceholder[index])) {\n                    return __assign(__assign({}, value), { code: '', name: '' });\n                }\n                return value;\n            });\n        },\n        onChange: function (event) {\n            var _this = this;\n            var _a;\n            var _b = event.detail, index = _b.index, picker = _b.picker, value = _b.value;\n            this.code = value[index].code;\n            (_a = this.setValues()) === null || _a === void 0 ? void 0 : _a.then(function () {\n                _this.$emit('change', {\n                    picker: picker,\n                    values: _this.parseValues(picker.getValues()),\n                    index: index,\n                });\n            });\n        },\n        getConfig: function (type) {\n            var areaList = this.data.areaList;\n            return (areaList && areaList[\"\".concat(type, \"_list\")]) || {};\n        },\n        getList: function (type, code) {\n            if (type !== 'province' && !code) {\n                return [];\n            }\n            var typeToColumnsPlaceholder = this.data.typeToColumnsPlaceholder;\n            var list = this.getConfig(type);\n            var result = Object.keys(list).map(function (code) { return ({\n                code: code,\n                name: list[code],\n            }); });\n            if (code != null) {\n                // oversea code\n                if (code[0] === '9' && type === 'city') {\n                    code = '9';\n                }\n                result = result.filter(function (item) { return item.code.indexOf(code) === 0; });\n            }\n            if (typeToColumnsPlaceholder[type] && result.length) {\n                // set columns placeholder\n                var codeFill = type === 'province'\n                    ? ''\n                    : type === 'city'\n                        ? EMPTY_CODE.slice(2, 4)\n                        : EMPTY_CODE.slice(4, 6);\n                result.unshift({\n                    code: \"\".concat(code).concat(codeFill),\n                    name: typeToColumnsPlaceholder[type],\n                });\n            }\n            return result;\n        },\n        getIndex: function (type, code) {\n            var compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;\n            var list = this.getList(type, code.slice(0, compareNum - 2));\n            // oversea code\n            if (code[0] === '9' && type === 'province') {\n                compareNum = 1;\n            }\n            code = code.slice(0, compareNum);\n            for (var i = 0; i < list.length; i++) {\n                if (list[i].code.slice(0, compareNum) === code) {\n                    return i;\n                }\n            }\n            return 0;\n        },\n        setValues: function () {\n            var picker = this.getPicker();\n            if (!picker) {\n                return;\n            }\n            var code = this.code || this.getDefaultCode();\n            var provinceList = this.getList('province');\n            var cityList = this.getList('city', code.slice(0, 2));\n            var stack = [];\n            var indexes = [];\n            var columnsNum = this.data.columnsNum;\n            if (columnsNum >= 1) {\n                stack.push(picker.setColumnValues(0, provinceList, false));\n                indexes.push(this.getIndex('province', code));\n            }\n            if (columnsNum >= 2) {\n                stack.push(picker.setColumnValues(1, cityList, false));\n                indexes.push(this.getIndex('city', code));\n                if (cityList.length && code.slice(2, 4) === '00') {\n                    code = cityList[0].code;\n                }\n            }\n            if (columnsNum === 3) {\n                stack.push(picker.setColumnValues(2, this.getList('county', code.slice(0, 4)), false));\n                indexes.push(this.getIndex('county', code));\n            }\n            return Promise.all(stack)\n                .catch(function () { })\n                .then(function () { return picker.setIndexes(indexes); })\n                .catch(function () { });\n        },\n        getDefaultCode: function () {\n            var columnsPlaceholder = this.data.columnsPlaceholder;\n            if (columnsPlaceholder.length) {\n                return EMPTY_CODE;\n            }\n            var countyCodes = Object.keys(this.getConfig('county'));\n            if (countyCodes[0]) {\n                return countyCodes[0];\n            }\n            var cityCodes = Object.keys(this.getConfig('city'));\n            if (cityCodes[0]) {\n                return cityCodes[0];\n            }\n            return '';\n        },\n        getValues: function () {\n            var picker = this.getPicker();\n            if (!picker) {\n                return [];\n            }\n            return this.parseValues(picker.getValues().filter(function (value) { return !!value; }));\n        },\n        getDetail: function () {\n            var values = this.getValues();\n            var area = {\n                code: '',\n                country: '',\n                province: '',\n                city: '',\n                county: '',\n            };\n            if (!values.length) {\n                return area;\n            }\n            var names = values.map(function (item) { return item.name; });\n            area.code = values[values.length - 1].code;\n            if (area.code[0] === '9') {\n                area.country = names[1] || '';\n                area.province = names[2] || '';\n            }\n            else {\n                area.province = names[0] || '';\n                area.city = names[1] || '';\n                area.county = names[2] || '';\n            }\n            return area;\n        },\n        reset: function (code) {\n            this.code = code || '';\n            return this.setValues();\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/area/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-picker\": \"../picker/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/area/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-picker\n  class=\"van-area__picker\"\n  active-class=\"active-class\"\n  toolbar-class=\"toolbar-class\"\n  column-class=\"column-class\"\n  show-toolbar=\"{{ showToolbar }}\"\n  value-key=\"name\"\n  title=\"{{ title }}\"\n  loading=\"{{ loading }}\"\n  columns=\"{{ computed.displayColumns(columns, columnsNum) }}\"\n  item-height=\"{{ itemHeight }}\"\n  visible-item-count=\"{{ visibleItemCount }}\"\n  cancel-button-text=\"{{ cancelButtonText }}\"\n  confirm-button-text=\"{{ confirmButtonText }}\"\n  bind:change=\"onChange\"\n  bind:confirm=\"onConfirm\"\n  bind:cancel=\"onCancel\"\n/>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/area/index.wxs",
    "content": "/* eslint-disable */\nfunction displayColumns(columns, columnsNum) {\n  return columns.slice(0, +columnsNum);\n}\n\nmodule.exports = {\n  displayColumns: displayColumns,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/area/index.wxss",
    "content": "@import '../common/index.wxss';"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/button/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/button/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar button_1 = require(\"../mixins/button\");\nvar version_1 = require(\"../common/version\");\nvar mixins = [button_1.button];\nif ((0, version_1.canIUseFormFieldButton)()) {\n    mixins.push('wx://form-field-button');\n}\n(0, component_1.VantComponent)({\n    mixins: mixins,\n    classes: ['hover-class', 'loading-class'],\n    data: {\n        baseStyle: '',\n    },\n    props: {\n        formType: String,\n        icon: String,\n        classPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n        plain: Boolean,\n        block: Boolean,\n        round: Boolean,\n        square: Boolean,\n        loading: Boolean,\n        hairline: Boolean,\n        disabled: Boolean,\n        loadingText: String,\n        customStyle: String,\n        loadingType: {\n            type: String,\n            value: 'circular',\n        },\n        type: {\n            type: String,\n            value: 'default',\n        },\n        dataset: null,\n        size: {\n            type: String,\n            value: 'normal',\n        },\n        loadingSize: {\n            type: String,\n            value: '20px',\n        },\n        color: String,\n    },\n    methods: {\n        onClick: function (event) {\n            var _this = this;\n            this.$emit('click', event);\n            var _a = this.data, canIUseGetUserProfile = _a.canIUseGetUserProfile, openType = _a.openType, getUserProfileDesc = _a.getUserProfileDesc, lang = _a.lang;\n            if (openType === 'getUserInfo' && canIUseGetUserProfile) {\n                wx.getUserProfile({\n                    desc: getUserProfileDesc || '  ',\n                    lang: lang || 'en',\n                    complete: function (userProfile) {\n                        _this.$emit('getuserinfo', userProfile);\n                    },\n                });\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/button/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/button/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<button\n  id=\"{{ id || buttonId }}\"\n  data-detail=\"{{ dataset }}\"\n  class=\"custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}\"\n  hover-class=\"{{ disabled || loading ? '' : 'van-button--active hover-class'}}\"\n  lang=\"{{ lang }}\"\n  form-type=\"{{ formType }}\"\n  style=\"{{ computed.rootStyle({ plain, color, customStyle }) }}\"\n  open-type=\"{{ disabled || loading || (canIUseGetUserProfile && openType === 'getUserInfo') ? '' : openType }}\"\n  business-id=\"{{ businessId }}\"\n  session-from=\"{{ sessionFrom }}\"\n  send-message-title=\"{{ sendMessageTitle }}\"\n  send-message-path=\"{{ sendMessagePath }}\"\n  send-message-img=\"{{ sendMessageImg }}\"\n  show-message-card=\"{{ showMessageCard }}\"\n  app-parameter=\"{{ appParameter }}\"\n  aria-label=\"{{ ariaLabel }}\"\n  bindtap=\"{{ disabled || loading ? '' : 'onClick' }}\"\n  bindgetuserinfo=\"onGetUserInfo\"\n  bindcontact=\"onContact\"\n  bindgetphonenumber=\"onGetPhoneNumber\"\n  bindgetrealtimephonenumber=\"onGetRealTimePhoneNumber\"\n  bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n  binderror=\"onError\"\n  bindlaunchapp=\"onLaunchApp\"\n  bindopensetting=\"onOpenSetting\"\n  bindchooseavatar=\"onChooseAvatar\"\n>\n  <block wx:if=\"{{ loading }}\">\n    <van-loading\n      custom-class=\"loading-class\"\n      size=\"{{ loadingSize }}\"\n      type=\"{{ loadingType }}\"\n      color=\"{{ computed.loadingColor({ type, color, plain }) }}\"\n    />\n    <view wx:if=\"{{ loadingText }}\" class=\"van-button__loading-text\">\n      {{ loadingText }}\n    </view>\n  </block>\n  <block wx:else>\n    <van-icon\n      wx:if=\"{{ icon }}\"\n      size=\"1.2em\"\n      name=\"{{ icon }}\"\n      class-prefix=\"{{ classPrefix }}\"\n      class=\"van-button__icon\"\n      custom-style=\"line-height: inherit;\"\n    />\n    <view class=\"van-button__text\">\n      <slot />\n    </view>\n  </block>\n</button>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/button/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction rootStyle(data) {\n  if (!data.color) {\n    return data.customStyle;\n  }\n\n  var properties = {\n    color: data.plain ? data.color : '#fff',\n    background: data.plain ? null : data.color,\n  };\n\n  // hide border when color is linear-gradient\n  if (data.color.indexOf('gradient') !== -1) {\n    properties.border = 0;\n  } else {\n    properties['border-color'] = data.color;\n  }\n\n  return style([properties, data.customStyle]);\n}\n\nfunction loadingColor(data) {\n  if (data.plain) {\n    return data.color ? data.color : '#c9c9c9';\n  }\n\n  if (data.type === 'default') {\n    return '#c9c9c9';\n  }\n\n  return '#fff';\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  loadingColor: loadingColor,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/button/index.wxss",
    "content": "@import '../common/index.wxss';.van-button{-webkit-text-size-adjust:100%;align-items:center;-webkit-appearance:none;border-radius:var(--button-border-radius,2px);box-sizing:border-box;display:inline-flex;font-size:var(--button-default-font-size,16px);height:var(--button-default-height,44px);justify-content:center;line-height:var(--button-line-height,20px);padding:0;position:relative;text-align:center;transition:opacity .2s;vertical-align:middle}.van-button:before{background-color:#000;border:inherit;border-color:#000;border-radius:inherit;content:\" \";height:100%;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:100%}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{background:var(--button-default-background-color,#fff);border:var(--button-border-width,1px) solid var(--button-default-border-color,#ebedf0);color:var(--button-default-color,#323233)}.van-button--primary{background:var(--button-primary-background-color,#07c160);border:var(--button-border-width,1px) solid var(--button-primary-border-color,#07c160);color:var(--button-primary-color,#fff)}.van-button--info{background:var(--button-info-background-color,#1989fa);border:var(--button-border-width,1px) solid var(--button-info-border-color,#1989fa);color:var(--button-info-color,#fff)}.van-button--danger{background:var(--button-danger-background-color,#ee0a24);border:var(--button-border-width,1px) solid var(--button-danger-border-color,#ee0a24);color:var(--button-danger-color,#fff)}.van-button--warning{background:var(--button-warning-background-color,#ff976a);border:var(--button-border-width,1px) solid var(--button-warning-border-color,#ff976a);color:var(--button-warning-color,#fff)}.van-button--plain{background:var(--button-plain-background-color,#fff)}.van-button--plain.van-button--primary{color:var(--button-primary-background-color,#07c160)}.van-button--plain.van-button--info{color:var(--button-info-background-color,#1989fa)}.van-button--plain.van-button--danger{color:var(--button-danger-background-color,#ee0a24)}.van-button--plain.van-button--warning{color:var(--button-warning-background-color,#ff976a)}.van-button--large{height:var(--button-large-height,50px);width:100%}.van-button--normal{font-size:var(--button-normal-font-size,14px);padding:0 15px}.van-button--small{font-size:var(--button-small-font-size,12px);height:var(--button-small-height,30px);min-width:var(--button-small-min-width,60px);padding:0 var(--padding-xs,8px)}.van-button--mini{display:inline-block;font-size:var(--button-mini-font-size,10px);height:var(--button-mini-height,22px);min-width:var(--button-mini-min-width,50px)}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:flex;width:100%}.van-button--round{border-radius:var(--button-round-border-radius,999px)}.van-button--square{border-radius:0}.van-button--disabled{opacity:var(--button-disabled-opacity,.5)}.van-button__text{display:inline}.van-button__icon+.van-button__text:not(:empty),.van-button__loading-text{margin-left:4px}.van-button__icon{line-height:inherit!important;min-width:1em;vertical-align:top}.van-button--hairline{border-width:0;padding-top:1px}.van-button--hairline:after{border-color:inherit;border-radius:calc(var(--button-border-radius, 2px)*2);border-width:1px}.van-button--hairline.van-button--round:after{border-radius:var(--button-round-border-radius,999px)}.van-button--hairline.van-button--square:after{border-radius:0}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/calendar.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<view class=\"van-calendar\">\n  <header\n    title=\"{{ title }}\"\n    showTitle=\"{{ showTitle }}\"\n    subtitle=\"{{ subtitle }}\"\n    showSubtitle=\"{{ showSubtitle }}\"\n    firstDayOfWeek=\"{{ firstDayOfWeek }}\"\n    bind:click-subtitle=\"onClickSubtitle\"\n  >\n    <slot name=\"title\" slot=\"title\"></slot>\n  </header>\n\n  <scroll-view\n    class=\"van-calendar__body\"\n    scroll-y\n    scroll-into-view=\"{{ scrollIntoView }}\"\n  >\n    <month\n      wx:for=\"{{ computed.getMonths(minDate, maxDate) }}\"\n      wx:key=\"index\"\n      id=\"month{{ index }}\"\n      class=\"month\"\n      data-date=\"{{ item }}\"\n      date=\"{{ item }}\"\n      type=\"{{ type }}\"\n      color=\"{{ color }}\"\n      minDate=\"{{ minDate }}\"\n      maxDate=\"{{ maxDate }}\"\n      showMark=\"{{ showMark }}\"\n      formatter=\"{{ formatter }}\"\n      rowHeight=\"{{ rowHeight }}\"\n      currentDate=\"{{ currentDate }}\"\n      showSubtitle=\"{{ showSubtitle }}\"\n      allowSameDay=\"{{ allowSameDay }}\"\n      showMonthTitle=\"{{ index !== 0 || !showSubtitle }}\"\n      firstDayOfWeek=\"{{ firstDayOfWeek }}\"\n      bind:click=\"onClickDay\"\n    />\n  </scroll-view>\n\n  <view\n    class=\"{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}\"\n  >\n    <slot name=\"footer\"></slot>\n  </view>\n\n  <view\n    class=\"{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}\"\n  >\n    <van-button\n      wx:if=\"{{ showConfirm }}\"\n      round\n      block\n      type=\"danger\"\n      color=\"{{ color }}\"\n      custom-class=\"van-calendar__confirm\"\n      disabled=\"{{ computed.getButtonDisabled(type, currentDate, minRange) }}\"\n      nativeType=\"text\"\n      bind:click=\"onConfirm\"\n    >\n      {{\n        computed.getButtonDisabled(type, currentDate, minRange)\n          ? confirmDisabledText\n          : confirmText\n      }}\n    </van-button>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/components/header/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/components/header/index.js",
    "content": "\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../../../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        title: {\n            type: String,\n            value: '日期选择',\n        },\n        subtitle: String,\n        showTitle: Boolean,\n        showSubtitle: Boolean,\n        firstDayOfWeek: {\n            type: Number,\n            observer: 'initWeekDay',\n        },\n    },\n    data: {\n        weekdays: [],\n    },\n    created: function () {\n        this.initWeekDay();\n    },\n    methods: {\n        initWeekDay: function () {\n            var defaultWeeks = ['日', '一', '二', '三', '四', '五', '六'];\n            var firstDayOfWeek = this.data.firstDayOfWeek || 0;\n            this.setData({\n                weekdays: __spreadArray(__spreadArray([], defaultWeeks.slice(firstDayOfWeek, 7), true), defaultWeeks.slice(0, firstDayOfWeek), true),\n            });\n        },\n        onClickSubtitle: function (event) {\n            this.$emit('click-subtitle', event);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/components/header/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/components/header/index.wxml",
    "content": "<view class=\"van-calendar__header\">\n  <block wx:if=\"{{ showTitle }}\">\n    <view class=\"van-calendar__header-title\"><slot name=\"title\"></slot></view>\n    <view class=\"van-calendar__header-title\">{{ title }}</view>\n  </block>\n\n  <view wx:if=\"{{ showSubtitle }}\" class=\"van-calendar__header-subtitle\" bind:tap=\"onClickSubtitle\">\n    {{ subtitle }}\n  </view>\n\n  <view class=\"van-calendar__weekdays\">\n    <view wx:for=\"{{ weekdays }}\" wx:key=\"index\" class=\"van-calendar__weekday\">\n      {{ item }}\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/components/header/index.wxss",
    "content": "@import '../../../common/index.wxss';.van-calendar__header{box-shadow:var(--calendar-header-box-shadow,0 2px 10px hsla(220,1%,50%,.16));flex-shrink:0}.van-calendar__header-subtitle,.van-calendar__header-title{font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.van-calendar__header-title+.van-calendar__header-title,.van-calendar__header-title:empty{display:none}.van-calendar__header-title:empty+.van-calendar__header-title{display:block!important}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--calendar-weekdays-font-size,12px);line-height:var(--calendar-weekdays-height,30px);text-align:center}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/components/month/index.d.ts",
    "content": "export interface Day {\n    date: Date;\n    type: string;\n    text: number;\n    bottomInfo?: string;\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/components/month/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../../../common/component\");\nvar utils_1 = require(\"../../utils\");\n(0, component_1.VantComponent)({\n    props: {\n        date: {\n            type: null,\n            observer: 'setDays',\n        },\n        type: {\n            type: String,\n            observer: 'setDays',\n        },\n        color: String,\n        minDate: {\n            type: null,\n            observer: 'setDays',\n        },\n        maxDate: {\n            type: null,\n            observer: 'setDays',\n        },\n        showMark: Boolean,\n        rowHeight: null,\n        formatter: {\n            type: null,\n            observer: 'setDays',\n        },\n        currentDate: {\n            type: null,\n            observer: 'setDays',\n        },\n        firstDayOfWeek: {\n            type: Number,\n            observer: 'setDays',\n        },\n        allowSameDay: Boolean,\n        showSubtitle: Boolean,\n        showMonthTitle: Boolean,\n    },\n    data: {\n        visible: true,\n        days: [],\n    },\n    methods: {\n        onClick: function (event) {\n            var index = event.currentTarget.dataset.index;\n            var item = this.data.days[index];\n            if (item.type !== 'disabled') {\n                this.$emit('click', item);\n            }\n        },\n        setDays: function () {\n            var days = [];\n            var startDate = new Date(this.data.date);\n            var year = startDate.getFullYear();\n            var month = startDate.getMonth();\n            var totalDay = (0, utils_1.getMonthEndDay)(startDate.getFullYear(), startDate.getMonth() + 1);\n            for (var day = 1; day <= totalDay; day++) {\n                var date = new Date(year, month, day);\n                var type = this.getDayType(date);\n                var config = {\n                    date: date,\n                    type: type,\n                    text: day,\n                    bottomInfo: this.getBottomInfo(type),\n                };\n                if (this.data.formatter) {\n                    config = this.data.formatter(config);\n                }\n                days.push(config);\n            }\n            this.setData({ days: days });\n        },\n        getMultipleDayType: function (day) {\n            var currentDate = this.data.currentDate;\n            if (!Array.isArray(currentDate)) {\n                return '';\n            }\n            var isSelected = function (date) {\n                return currentDate.some(function (item) { return (0, utils_1.compareDay)(item, date) === 0; });\n            };\n            if (isSelected(day)) {\n                var prevDay = (0, utils_1.getPrevDay)(day);\n                var nextDay = (0, utils_1.getNextDay)(day);\n                var prevSelected = isSelected(prevDay);\n                var nextSelected = isSelected(nextDay);\n                if (prevSelected && nextSelected) {\n                    return 'multiple-middle';\n                }\n                if (prevSelected) {\n                    return 'end';\n                }\n                return nextSelected ? 'start' : 'multiple-selected';\n            }\n            return '';\n        },\n        getRangeDayType: function (day) {\n            var _a = this.data, currentDate = _a.currentDate, allowSameDay = _a.allowSameDay;\n            if (!Array.isArray(currentDate)) {\n                return '';\n            }\n            var startDay = currentDate[0], endDay = currentDate[1];\n            if (!startDay) {\n                return '';\n            }\n            var compareToStart = (0, utils_1.compareDay)(day, startDay);\n            if (!endDay) {\n                return compareToStart === 0 ? 'start' : '';\n            }\n            var compareToEnd = (0, utils_1.compareDay)(day, endDay);\n            if (compareToStart === 0 && compareToEnd === 0 && allowSameDay) {\n                return 'start-end';\n            }\n            if (compareToStart === 0) {\n                return 'start';\n            }\n            if (compareToEnd === 0) {\n                return 'end';\n            }\n            if (compareToStart > 0 && compareToEnd < 0) {\n                return 'middle';\n            }\n            return '';\n        },\n        getDayType: function (day) {\n            var _a = this.data, type = _a.type, minDate = _a.minDate, maxDate = _a.maxDate, currentDate = _a.currentDate;\n            if ((0, utils_1.compareDay)(day, minDate) < 0 || (0, utils_1.compareDay)(day, maxDate) > 0) {\n                return 'disabled';\n            }\n            if (type === 'single') {\n                return (0, utils_1.compareDay)(day, currentDate) === 0 ? 'selected' : '';\n            }\n            if (type === 'multiple') {\n                return this.getMultipleDayType(day);\n            }\n            /* istanbul ignore else */\n            if (type === 'range') {\n                return this.getRangeDayType(day);\n            }\n            return '';\n        },\n        getBottomInfo: function (type) {\n            if (this.data.type === 'range') {\n                if (type === 'start') {\n                    return '开始';\n                }\n                if (type === 'end') {\n                    return '结束';\n                }\n                if (type === 'start-end') {\n                    return '开始/结束';\n                }\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/components/month/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/components/month/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\"></wxs>\n<wxs src=\"../../../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-calendar__month\" style=\"{{ computed.getMonthStyle(visible, date, rowHeight) }}\">\n  <view wx:if=\"{{ showMonthTitle }}\" class=\"van-calendar__month-title\">\n    {{ computed.formatMonthTitle(date) }}\n  </view>\n\n  <view wx:if=\"{{ visible }}\" class=\"van-calendar__days\">\n    <view wx:if=\"{{ showMark }}\" class=\"van-calendar__month-mark\">\n      {{ computed.getMark(date) }}\n    </view>\n\n    <view\n      wx:for=\"{{ days }}\"\n      wx:key=\"index\"\n      style=\"{{ computed.getDayStyle(item.type, index, date, rowHeight, color, firstDayOfWeek) }}\"\n      class=\"{{ utils.bem('calendar__day', [item.type]) }} {{ item.className }}\"\n      data-index=\"{{ index }}\"\n      bindtap=\"onClick\"\n    >\n      <view wx:if=\"{{ item.type === 'selected' }}\" class=\"van-calendar__selected-day\" style=\"width: {{ rowHeight }}px; height: {{ rowHeight }}px; background: {{ color }}\">\n        <view wx:if=\"{{ item.topInfo }}\" class=\"van-calendar__top-info\">{{ item.topInfo }}</view>\n        {{ item.text }}\n        <view wx:if=\"{{ item.bottomInfo }}\" class=\"van-calendar__bottom-info\">\n          {{ item.bottomInfo }}\n        </view>\n      </view>\n\n      <view wx:else>\n        <view wx:if=\"{{ item.topInfo }}\" class=\"van-calendar__top-info\">{{ item.topInfo }}</view>\n        {{ item.text }}\n        <view wx:if=\"{{ item.bottomInfo }}\" class=\"van-calendar__bottom-info\">\n          {{ item.bottomInfo }}\n        </view>\n      </view>\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/components/month/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('../../utils.wxs');\n\nfunction getMark(date) {\n  return getDate(date).getMonth() + 1;\n}\n\nvar ROW_HEIGHT = 64;\n\nfunction getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {\n  var style = [];\n  var current = getDate(date).getDay() || 7;\n  var offset = current < firstDayOfWeek ? (7 - firstDayOfWeek + current) :\n               current === 7 && firstDayOfWeek === 0 ? 0 :\n               (current - firstDayOfWeek);\n\n  if (index === 0) {\n    style.push(['margin-left', (100 * offset) / 7 + '%']);\n  }\n\n  if (rowHeight !== ROW_HEIGHT) {\n    style.push(['height', rowHeight + 'px']);\n  }\n\n  if (color) {\n    if (\n      type === 'start' ||\n      type === 'end' ||\n      type === 'start-end' ||\n      type === 'multiple-selected' ||\n      type === 'multiple-middle'\n    ) {\n      style.push(['background', color]);\n    } else if (type === 'middle') {\n      style.push(['color', color]);\n    }\n  }\n\n  return style\n    .map(function(item) {\n      return item.join(':');\n    })\n    .join(';');\n}\n\nfunction formatMonthTitle(date) {\n  date = getDate(date);\n  return date.getFullYear() + '年' + (date.getMonth() + 1) + '月';\n}\n\nfunction getMonthStyle(visible, date, rowHeight) {\n  if (!visible) {\n    date = getDate(date);\n\n    var totalDay = utils.getMonthEndDay(\n      date.getFullYear(),\n      date.getMonth() + 1\n    );\n    var offset = getDate(date).getDay();\n    var padding = Math.ceil((totalDay + offset) / 7) * rowHeight;\n\n    return 'padding-bottom:' + padding + 'px';\n  }\n}\n\nmodule.exports = {\n  getMark: getMark,\n  getDayStyle: getDayStyle,\n  formatMonthTitle: formatMonthTitle,\n  getMonthStyle: getMonthStyle\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/components/month/index.wxss",
    "content": "@import '../../../common/index.wxss';.van-calendar{background-color:var(--calendar-background-color,#fff);display:flex;flex-direction:column;height:100%}.van-calendar__month-title{font-size:var(--calendar-month-title-font-size,14px);font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.van-calendar__days{display:flex;flex-wrap:wrap;position:relative;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{color:var(--calendar-month-mark-color,rgba(242,243,245,.8));font-size:var(--calendar-month-mark-font-size,160px);left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:0}.van-calendar__day,.van-calendar__selected-day{align-items:center;display:flex;justify-content:center;text-align:center}.van-calendar__day{font-size:var(--calendar-day-font-size,16px);height:var(--calendar-day-height,64px);position:relative;width:14.285%}.van-calendar__day--end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected,.van-calendar__day--start,.van-calendar__day--start-end{background-color:var(--calendar-range-edge-background-color,#ee0a24);color:var(--calendar-range-edge-color,#fff)}.van-calendar__day--start{border-radius:4px 0 0 4px}.van-calendar__day--end{border-radius:0 4px 4px 0}.van-calendar__day--multiple-selected,.van-calendar__day--start-end{border-radius:4px}.van-calendar__day--middle{color:var(--calendar-range-middle-color,#ee0a24)}.van-calendar__day--middle:after{background-color:currentColor;bottom:0;content:\"\";left:0;opacity:var(--calendar-range-middle-background-opacity,.1);position:absolute;right:0;top:0}.van-calendar__day--disabled{color:var(--calendar-day-disabled-color,#c8c9cc);cursor:default}.van-calendar__bottom-info,.van-calendar__top-info{font-size:var(--calendar-info-font-size,10px);left:0;line-height:var(--calendar-info-line-height,14px);position:absolute;right:0}@media (max-width:350px){.van-calendar__bottom-info,.van-calendar__top-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{background-color:var(--calendar-selected-day-background-color,#ee0a24);border-radius:4px;color:var(--calendar-selected-day-color,#fff);height:var(--calendar-selected-day-size,54px);width:var(--calendar-selected-day-size,54px)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/index.js",
    "content": "\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar utils_1 = require(\"./utils\");\nvar toast_1 = __importDefault(require(\"../toast/toast\"));\nvar utils_2 = require(\"../common/utils\");\nvar initialMinDate = (0, utils_1.getToday)().getTime();\nvar initialMaxDate = (function () {\n    var now = (0, utils_1.getToday)();\n    return new Date(now.getFullYear(), now.getMonth() + 6, now.getDate()).getTime();\n})();\nvar getTime = function (date) {\n    return date instanceof Date ? date.getTime() : date;\n};\n(0, component_1.VantComponent)({\n    props: {\n        title: {\n            type: String,\n            value: '日期选择',\n        },\n        color: String,\n        show: {\n            type: Boolean,\n            observer: function (val) {\n                if (val) {\n                    this.initRect();\n                    this.scrollIntoView();\n                }\n            },\n        },\n        formatter: null,\n        confirmText: {\n            type: String,\n            value: '确定',\n        },\n        confirmDisabledText: {\n            type: String,\n            value: '确定',\n        },\n        rangePrompt: String,\n        showRangePrompt: {\n            type: Boolean,\n            value: true,\n        },\n        defaultDate: {\n            type: null,\n            value: (0, utils_1.getToday)().getTime(),\n            observer: function (val) {\n                this.setData({ currentDate: val });\n                this.scrollIntoView();\n            },\n        },\n        allowSameDay: Boolean,\n        type: {\n            type: String,\n            value: 'single',\n            observer: 'reset',\n        },\n        minDate: {\n            type: Number,\n            value: initialMinDate,\n        },\n        maxDate: {\n            type: Number,\n            value: initialMaxDate,\n        },\n        position: {\n            type: String,\n            value: 'bottom',\n        },\n        rowHeight: {\n            type: null,\n            value: utils_1.ROW_HEIGHT,\n        },\n        round: {\n            type: Boolean,\n            value: true,\n        },\n        poppable: {\n            type: Boolean,\n            value: true,\n        },\n        showMark: {\n            type: Boolean,\n            value: true,\n        },\n        showTitle: {\n            type: Boolean,\n            value: true,\n        },\n        showConfirm: {\n            type: Boolean,\n            value: true,\n        },\n        showSubtitle: {\n            type: Boolean,\n            value: true,\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n        },\n        maxRange: {\n            type: null,\n            value: null,\n        },\n        minRange: {\n            type: Number,\n            value: 1,\n        },\n        firstDayOfWeek: {\n            type: Number,\n            value: 0,\n        },\n        readonly: Boolean,\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    data: {\n        subtitle: '',\n        currentDate: null,\n        scrollIntoView: '',\n    },\n    watch: {\n        minDate: function () {\n            this.initRect();\n        },\n        maxDate: function () {\n            this.initRect();\n        },\n    },\n    created: function () {\n        this.setData({\n            currentDate: this.getInitialDate(this.data.defaultDate),\n        });\n    },\n    mounted: function () {\n        if (this.data.show || !this.data.poppable) {\n            this.initRect();\n            this.scrollIntoView();\n        }\n    },\n    methods: {\n        reset: function () {\n            this.setData({ currentDate: this.getInitialDate(this.data.defaultDate) });\n            this.scrollIntoView();\n        },\n        initRect: function () {\n            var _this = this;\n            if (this.contentObserver != null) {\n                this.contentObserver.disconnect();\n            }\n            var contentObserver = this.createIntersectionObserver({\n                thresholds: [0, 0.1, 0.9, 1],\n                observeAll: true,\n            });\n            this.contentObserver = contentObserver;\n            contentObserver.relativeTo('.van-calendar__body');\n            contentObserver.observe('.month', function (res) {\n                if (res.boundingClientRect.top <= res.relativeRect.top) {\n                    // @ts-ignore\n                    _this.setData({ subtitle: (0, utils_1.formatMonthTitle)(res.dataset.date) });\n                }\n            });\n        },\n        limitDateRange: function (date, minDate, maxDate) {\n            if (minDate === void 0) { minDate = null; }\n            if (maxDate === void 0) { maxDate = null; }\n            minDate = minDate || this.data.minDate;\n            maxDate = maxDate || this.data.maxDate;\n            if ((0, utils_1.compareDay)(date, minDate) === -1) {\n                return minDate;\n            }\n            if ((0, utils_1.compareDay)(date, maxDate) === 1) {\n                return maxDate;\n            }\n            return date;\n        },\n        getInitialDate: function (defaultDate) {\n            var _this = this;\n            if (defaultDate === void 0) { defaultDate = null; }\n            var _a = this.data, type = _a.type, minDate = _a.minDate, maxDate = _a.maxDate, allowSameDay = _a.allowSameDay;\n            if (!defaultDate)\n                return [];\n            var now = (0, utils_1.getToday)().getTime();\n            if (type === 'range') {\n                if (!Array.isArray(defaultDate)) {\n                    defaultDate = [];\n                }\n                var _b = defaultDate || [], startDay = _b[0], endDay = _b[1];\n                var startDate = getTime(startDay || now);\n                var start = this.limitDateRange(startDate, minDate, allowSameDay ? startDate : (0, utils_1.getPrevDay)(new Date(maxDate)).getTime());\n                var date = getTime(endDay || now);\n                var end = this.limitDateRange(date, allowSameDay ? date : (0, utils_1.getNextDay)(new Date(minDate)).getTime());\n                return [start, end];\n            }\n            if (type === 'multiple') {\n                if (Array.isArray(defaultDate)) {\n                    return defaultDate.map(function (date) { return _this.limitDateRange(date); });\n                }\n                return [this.limitDateRange(now)];\n            }\n            if (!defaultDate || Array.isArray(defaultDate)) {\n                defaultDate = now;\n            }\n            return this.limitDateRange(defaultDate);\n        },\n        scrollIntoView: function () {\n            var _this = this;\n            (0, utils_2.requestAnimationFrame)(function () {\n                var _a = _this.data, currentDate = _a.currentDate, type = _a.type, show = _a.show, poppable = _a.poppable, minDate = _a.minDate, maxDate = _a.maxDate;\n                if (!currentDate)\n                    return;\n                // @ts-ignore\n                var targetDate = type === 'single' ? currentDate : currentDate[0];\n                var displayed = show || !poppable;\n                if (!targetDate || !displayed) {\n                    return;\n                }\n                var months = (0, utils_1.getMonths)(minDate, maxDate);\n                months.some(function (month, index) {\n                    if ((0, utils_1.compareMonth)(month, targetDate) === 0) {\n                        _this.setData({ scrollIntoView: \"month\".concat(index) });\n                        return true;\n                    }\n                    return false;\n                });\n            });\n        },\n        onOpen: function () {\n            this.$emit('open');\n        },\n        onOpened: function () {\n            this.$emit('opened');\n        },\n        onClose: function () {\n            this.$emit('close');\n        },\n        onClosed: function () {\n            this.$emit('closed');\n        },\n        onClickDay: function (event) {\n            if (this.data.readonly) {\n                return;\n            }\n            var date = event.detail.date;\n            var _a = this.data, type = _a.type, currentDate = _a.currentDate, allowSameDay = _a.allowSameDay;\n            if (type === 'range') {\n                // @ts-ignore\n                var startDay_1 = currentDate[0], endDay = currentDate[1];\n                if (startDay_1 && !endDay) {\n                    var compareToStart = (0, utils_1.compareDay)(date, startDay_1);\n                    if (compareToStart === 1) {\n                        var days_1 = this.selectComponent('.month').data.days;\n                        days_1.some(function (day, index) {\n                            var isDisabled = day.type === 'disabled' &&\n                                getTime(startDay_1) < getTime(day.date) &&\n                                getTime(day.date) < getTime(date);\n                            if (isDisabled) {\n                                (date = days_1[index - 1].date);\n                            }\n                            return isDisabled;\n                        });\n                        this.select([startDay_1, date], true);\n                    }\n                    else if (compareToStart === -1) {\n                        this.select([date, null]);\n                    }\n                    else if (allowSameDay) {\n                        this.select([date, date], true);\n                    }\n                }\n                else {\n                    this.select([date, null]);\n                }\n            }\n            else if (type === 'multiple') {\n                var selectedIndex_1;\n                // @ts-ignore\n                var selected = currentDate.some(function (dateItem, index) {\n                    var equal = (0, utils_1.compareDay)(dateItem, date) === 0;\n                    if (equal) {\n                        selectedIndex_1 = index;\n                    }\n                    return equal;\n                });\n                if (selected) {\n                    // @ts-ignore\n                    var cancelDate = currentDate.splice(selectedIndex_1, 1);\n                    this.setData({ currentDate: currentDate });\n                    this.unselect(cancelDate);\n                }\n                else {\n                    // @ts-ignore\n                    this.select(__spreadArray(__spreadArray([], currentDate, true), [date], false));\n                }\n            }\n            else {\n                this.select(date, true);\n            }\n        },\n        unselect: function (dateArray) {\n            var date = dateArray[0];\n            if (date) {\n                this.$emit('unselect', (0, utils_1.copyDates)(date));\n            }\n        },\n        select: function (date, complete) {\n            if (complete && this.data.type === 'range') {\n                var valid = this.checkRange(date);\n                if (!valid) {\n                    // auto selected to max range if showConfirm\n                    if (this.data.showConfirm) {\n                        this.emit([\n                            date[0],\n                            (0, utils_1.getDayByOffset)(date[0], this.data.maxRange - 1),\n                        ]);\n                    }\n                    else {\n                        this.emit(date);\n                    }\n                    return;\n                }\n            }\n            this.emit(date);\n            if (complete && !this.data.showConfirm) {\n                this.onConfirm();\n            }\n        },\n        emit: function (date) {\n            this.setData({\n                currentDate: Array.isArray(date) ? date.map(getTime) : getTime(date),\n            });\n            this.$emit('select', (0, utils_1.copyDates)(date));\n        },\n        checkRange: function (date) {\n            var _a = this.data, maxRange = _a.maxRange, rangePrompt = _a.rangePrompt, showRangePrompt = _a.showRangePrompt;\n            if (maxRange && (0, utils_1.calcDateNum)(date) > maxRange) {\n                if (showRangePrompt) {\n                    (0, toast_1.default)({\n                        context: this,\n                        message: rangePrompt || \"\\u9009\\u62E9\\u5929\\u6570\\u4E0D\\u80FD\\u8D85\\u8FC7 \".concat(maxRange, \" \\u5929\"),\n                    });\n                }\n                this.$emit('over-range');\n                return false;\n            }\n            return true;\n        },\n        onConfirm: function () {\n            var _this = this;\n            if (this.data.type === 'range' &&\n                !this.checkRange(this.data.currentDate)) {\n                return;\n            }\n            wx.nextTick(function () {\n                // @ts-ignore\n                _this.$emit('confirm', (0, utils_1.copyDates)(_this.data.currentDate));\n            });\n        },\n        onClickSubtitle: function (event) {\n            this.$emit('click-subtitle', event);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"header\": \"./components/header/index\",\n    \"month\": \"./components/month/index\",\n    \"van-button\": \"../button/index\",\n    \"van-popup\": \"../popup/index\",\n    \"van-toast\": \"../toast/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<import src=\"./calendar.wxml\" />\n\n<van-popup\n  wx:if=\"{{ poppable }}\"\n  custom-class=\"van-calendar__popup--{{ position }}\"\n  close-icon-class=\"van-calendar__close-icon\"\n  show=\"{{ show }}\"\n  round=\"{{ round }}\"\n  position=\"{{ position }}\"\n  closeable=\"{{ showTitle || showSubtitle }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  safe-area-inset-bottom=\"{{ safeAreaInsetBottom }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:enter=\"onOpen\"\n  bind:close=\"onClose\"\n  bind:after-enter=\"onOpened\"\n  bind:after-leave=\"onClosed\"\n>\n  <include src=\"./calendar.wxml\" />\n</van-popup>\n\n<include wx:else src=\"./calendar.wxml\" />\n\n<van-toast id=\"van-toast\" />\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('./utils.wxs');\n\nfunction getMonths(minDate, maxDate) {\n  var months = [];\n  var cursor = getDate(minDate);\n\n  cursor.setDate(1);\n\n  do {\n    months.push(cursor.getTime());\n    cursor.setMonth(cursor.getMonth() + 1);\n  } while (utils.compareMonth(cursor, getDate(maxDate)) !== 1);\n\n  return months;\n}\n\nfunction getButtonDisabled(type, currentDate, minRange) {\n  if (currentDate == null) {\n    return true;\n  }\n\n  if (type === 'range') {\n    return !currentDate[0] || !currentDate[1];\n  }\n\n  if (type === 'multiple') {\n    return currentDate.length < minRange;\n  }\n\n  return !currentDate;\n}\n\nmodule.exports = {\n  getMonths: getMonths,\n  getButtonDisabled: getButtonDisabled\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/index.wxss",
    "content": "@import '../common/index.wxss';.van-calendar{background-color:var(--calendar-background-color,#fff);display:flex;flex-direction:column;height:var(--calendar-height,100%)}.van-calendar__close-icon{top:11px}.van-calendar__popup--bottom,.van-calendar__popup--top{height:var(--calendar-popup-height,90%)}.van-calendar__popup--left,.van-calendar__popup--right{height:100%}.van-calendar__body{-webkit-overflow-scrolling:touch;flex:1;overflow:auto}.van-calendar__footer{flex-shrink:0;padding:0 var(--padding-md,16px)}.van-calendar__footer--safe-area-inset-bottom{padding-bottom:env(safe-area-inset-bottom)}.van-calendar__footer+.van-calendar__footer,.van-calendar__footer:empty{display:none}.van-calendar__footer:empty+.van-calendar__footer{display:block!important}.van-calendar__confirm{height:var(--calendar-confirm-button-height,36px)!important;line-height:var(--calendar-confirm-button-line-height,34px)!important;margin:var(--calendar-confirm-button-margin,7px 0)!important}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/utils.d.ts",
    "content": "export declare const ROW_HEIGHT = 64;\nexport declare function formatMonthTitle(date: Date): string;\nexport declare function compareMonth(date1: Date | number, date2: Date | number): 0 | 1 | -1;\nexport declare function compareDay(day1: Date | number, day2: Date | number): 0 | 1 | -1;\nexport declare function getDayByOffset(date: Date, offset: number): Date;\nexport declare function getPrevDay(date: Date): Date;\nexport declare function getNextDay(date: Date): Date;\nexport declare function getToday(): Date;\nexport declare function calcDateNum(date: [Date, Date]): number;\nexport declare function copyDates(dates: Date | Date[]): Date | Date[];\nexport declare function getMonthEndDay(year: number, month: number): number;\nexport declare function getMonths(minDate: number, maxDate: number): number[];\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/utils.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMonths = exports.getMonthEndDay = exports.copyDates = exports.calcDateNum = exports.getToday = exports.getNextDay = exports.getPrevDay = exports.getDayByOffset = exports.compareDay = exports.compareMonth = exports.formatMonthTitle = exports.ROW_HEIGHT = void 0;\nexports.ROW_HEIGHT = 64;\nfunction formatMonthTitle(date) {\n    if (!(date instanceof Date)) {\n        date = new Date(date);\n    }\n    return \"\".concat(date.getFullYear(), \"\\u5E74\").concat(date.getMonth() + 1, \"\\u6708\");\n}\nexports.formatMonthTitle = formatMonthTitle;\nfunction compareMonth(date1, date2) {\n    if (!(date1 instanceof Date)) {\n        date1 = new Date(date1);\n    }\n    if (!(date2 instanceof Date)) {\n        date2 = new Date(date2);\n    }\n    var year1 = date1.getFullYear();\n    var year2 = date2.getFullYear();\n    var month1 = date1.getMonth();\n    var month2 = date2.getMonth();\n    if (year1 === year2) {\n        return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;\n    }\n    return year1 > year2 ? 1 : -1;\n}\nexports.compareMonth = compareMonth;\nfunction compareDay(day1, day2) {\n    if (!(day1 instanceof Date)) {\n        day1 = new Date(day1);\n    }\n    if (!(day2 instanceof Date)) {\n        day2 = new Date(day2);\n    }\n    var compareMonthResult = compareMonth(day1, day2);\n    if (compareMonthResult === 0) {\n        var date1 = day1.getDate();\n        var date2 = day2.getDate();\n        return date1 === date2 ? 0 : date1 > date2 ? 1 : -1;\n    }\n    return compareMonthResult;\n}\nexports.compareDay = compareDay;\nfunction getDayByOffset(date, offset) {\n    date = new Date(date);\n    date.setDate(date.getDate() + offset);\n    return date;\n}\nexports.getDayByOffset = getDayByOffset;\nfunction getPrevDay(date) {\n    return getDayByOffset(date, -1);\n}\nexports.getPrevDay = getPrevDay;\nfunction getNextDay(date) {\n    return getDayByOffset(date, 1);\n}\nexports.getNextDay = getNextDay;\nfunction getToday() {\n    var today = new Date();\n    today.setHours(0, 0, 0, 0);\n    return today;\n}\nexports.getToday = getToday;\nfunction calcDateNum(date) {\n    var day1 = new Date(date[0]).getTime();\n    var day2 = new Date(date[1]).getTime();\n    return (day2 - day1) / (1000 * 60 * 60 * 24) + 1;\n}\nexports.calcDateNum = calcDateNum;\nfunction copyDates(dates) {\n    if (Array.isArray(dates)) {\n        return dates.map(function (date) {\n            if (date === null) {\n                return date;\n            }\n            return new Date(date);\n        });\n    }\n    return new Date(dates);\n}\nexports.copyDates = copyDates;\nfunction getMonthEndDay(year, month) {\n    return 32 - new Date(year, month - 1, 32).getDate();\n}\nexports.getMonthEndDay = getMonthEndDay;\nfunction getMonths(minDate, maxDate) {\n    var months = [];\n    var cursor = new Date(minDate);\n    cursor.setDate(1);\n    do {\n        months.push(cursor.getTime());\n        cursor.setMonth(cursor.getMonth() + 1);\n    } while (compareMonth(cursor, maxDate) !== 1);\n    return months;\n}\nexports.getMonths = getMonths;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/calendar/utils.wxs",
    "content": "/* eslint-disable */\nfunction getMonthEndDay(year, month) {\n  return 32 -  getDate(year, month - 1, 32).getDate();\n}\n\nfunction compareMonth(date1, date2) {\n  date1 = getDate(date1);\n  date2 = getDate(date2);\n\n  var year1 = date1.getFullYear();\n  var year2 = date2.getFullYear();\n  var month1 = date1.getMonth();\n  var month2 = date2.getMonth();\n\n  if (year1 === year2) {\n    return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;\n  }\n\n  return year1 > year2 ? 1 : -1;\n}\n\nmodule.exports = {\n  getMonthEndDay: getMonthEndDay,\n  compareMonth: compareMonth\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/card/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/card/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar link_1 = require(\"../mixins/link\");\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: [\n        'num-class',\n        'desc-class',\n        'thumb-class',\n        'title-class',\n        'price-class',\n        'origin-price-class',\n    ],\n    mixins: [link_1.link],\n    props: {\n        tag: String,\n        num: String,\n        desc: String,\n        thumb: String,\n        title: String,\n        price: {\n            type: String,\n            observer: 'updatePrice',\n        },\n        centered: Boolean,\n        lazyLoad: Boolean,\n        thumbLink: String,\n        originPrice: String,\n        thumbMode: {\n            type: String,\n            value: 'aspectFit',\n        },\n        currency: {\n            type: String,\n            value: '¥',\n        },\n    },\n    methods: {\n        updatePrice: function () {\n            var price = this.data.price;\n            var priceArr = price.toString().split('.');\n            this.setData({\n                integerStr: priceArr[0],\n                decimalStr: priceArr[1] ? \".\".concat(priceArr[1]) : '',\n            });\n        },\n        onClickThumb: function () {\n            this.jumpLink('thumbLink');\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/card/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-tag\": \"../tag/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/card/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"custom-class van-card\">\n  <view class=\"{{ utils.bem('card__header', { center: centered }) }}\">\n    <view class=\"van-card__thumb\" bind:tap=\"onClickThumb\">\n      <image\n        wx:if=\"{{ thumb }}\"\n        src=\"{{ thumb }}\"\n        mode=\"{{ thumbMode }}\"\n        lazy-load=\"{{ lazyLoad }}\"\n        class=\"van-card__img thumb-class\"\n      />\n      <slot wx:else name=\"thumb\" />\n      <van-tag\n        wx:if=\"{{ tag }}\"\n        mark\n        type=\"danger\"\n        custom-class=\"van-card__tag\"\n      >\n        {{ tag }}\n      </van-tag>\n      <slot wx:else name=\"tag\" />\n    </view>\n\n    <view class=\"van-card__content {{ utils.bem('card__content', { center: centered }) }}\">\n      <view>\n        <view wx:if=\"{{ title }}\" class=\"van-card__title title-class\">{{ title }}</view>\n        <slot wx:else name=\"title\" />\n\n        <view wx:if=\"{{ desc }}\" class=\"van-card__desc desc-class\">{{ desc }}</view>\n        <slot wx:else name=\"desc\" />\n\n        <slot name=\"tags\" />\n      </view>\n\n      <view class=\"van-card__bottom\">\n        <slot name=\"price-top\" />\n        <view wx:if=\"{{ price || price === 0 }}\" class=\"van-card__price price-class\">\n          <text>{{ currency }}</text>\n          <text class=\"van-card__price-integer\">{{ integerStr }}</text>\n          <text class=\"van-card__price-decimal\">{{ decimalStr }}</text>\n        </view>\n        <slot wx:else name=\"price\" />\n        <view wx:if=\"{{ originPrice || originPrice === 0 }}\" class=\"van-card__origin-price origin-price-class\">{{ currency }} {{ originPrice }}</view>\n        <slot wx:else name=\"origin-price\" />\n        <view wx:if=\"{{ num }}\" class=\"van-card__num num-class\">x {{ num }}</view>\n        <slot wx:else  name=\"num\" />\n        <slot name=\"bottom\" />\n      </view>\n    </view>\n  </view>\n\n  <view class=\"van-card__footer\">\n    <slot name=\"footer\" />\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/card/index.wxss",
    "content": "@import '../common/index.wxss';.van-card{background-color:var(--card-background-color,#fafafa);box-sizing:border-box;color:var(--card-text-color,#323233);font-size:var(--card-font-size,12px);padding:var(--card-padding,8px 16px);position:relative}.van-card__header{display:flex}.van-card__header--center{align-items:center;justify-content:center}.van-card__thumb{flex:none;height:var(--card-thumb-size,88px);margin-right:var(--padding-xs,8px);position:relative;width:var(--card-thumb-size,88px)}.van-card__thumb:empty{display:none}.van-card__img{border-radius:8px;height:100%;width:100%}.van-card__content{display:flex;flex:1;flex-direction:column;justify-content:space-between;min-height:var(--card-thumb-size,88px);min-width:0;position:relative}.van-card__content--center{justify-content:center}.van-card__desc,.van-card__title{word-wrap:break-word}.van-card__title{font-weight:700;line-height:var(--card-title-line-height,16px)}.van-card__desc{color:var(--card-desc-color,#646566);line-height:var(--card-desc-line-height,20px)}.van-card__bottom{line-height:20px}.van-card__price{color:var(--card-price-color,#ee0a24);display:inline-block;font-size:var(--card-price-font-size,12px);font-weight:700}.van-card__price-integer{font-size:var(--card-price-integer-font-size,16px)}.van-card__price-decimal,.van-card__price-integer{font-family:var(--card-price-font-family,Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif)}.van-card__origin-price{color:var(--card-origin-price-color,#646566);display:inline-block;font-size:var(--card-origin-price-font-size,10px);margin-left:5px;text-decoration:line-through}.van-card__num{float:right}.van-card__tag{left:0;position:absolute!important;top:2px}.van-card__footer{flex:none;text-align:right;width:100%}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cascader/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cascader/index.js",
    "content": "\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar FieldName;\n(function (FieldName) {\n    FieldName[\"TEXT\"] = \"text\";\n    FieldName[\"VALUE\"] = \"value\";\n    FieldName[\"CHILDREN\"] = \"children\";\n})(FieldName || (FieldName = {}));\nvar defaultFieldNames = {\n    text: FieldName.TEXT,\n    value: FieldName.VALUE,\n    children: FieldName.CHILDREN,\n};\n(0, component_1.VantComponent)({\n    props: {\n        title: String,\n        value: {\n            type: String,\n        },\n        placeholder: {\n            type: String,\n            value: '请选择',\n        },\n        activeColor: {\n            type: String,\n            value: '#1989fa',\n        },\n        options: {\n            type: Array,\n            value: [],\n        },\n        swipeable: {\n            type: Boolean,\n            value: false,\n        },\n        closeable: {\n            type: Boolean,\n            value: true,\n        },\n        ellipsis: {\n            type: Boolean,\n            value: true,\n        },\n        showHeader: {\n            type: Boolean,\n            value: true,\n        },\n        closeIcon: {\n            type: String,\n            value: 'cross',\n        },\n        fieldNames: {\n            type: Object,\n            value: defaultFieldNames,\n            observer: 'updateFieldNames',\n        },\n        useTitleSlot: Boolean,\n    },\n    data: {\n        tabs: [],\n        activeTab: 0,\n        textKey: FieldName.TEXT,\n        valueKey: FieldName.VALUE,\n        childrenKey: FieldName.CHILDREN,\n        innerValue: '',\n    },\n    watch: {\n        options: function () {\n            this.updateTabs();\n        },\n        value: function (newVal) {\n            this.updateValue(newVal);\n        },\n    },\n    created: function () {\n        this.updateTabs();\n    },\n    methods: {\n        updateValue: function (val) {\n            var _this = this;\n            if (val !== undefined) {\n                var values = this.data.tabs.map(function (tab) { return tab.selected && tab.selected[_this.data.valueKey]; });\n                if (values.indexOf(val) > -1) {\n                    return;\n                }\n            }\n            this.innerValue = val;\n            this.updateTabs();\n        },\n        updateFieldNames: function () {\n            var _a = this.data.fieldNames || defaultFieldNames, _b = _a.text, text = _b === void 0 ? 'text' : _b, _c = _a.value, value = _c === void 0 ? 'value' : _c, _d = _a.children, children = _d === void 0 ? 'children' : _d;\n            this.setData({\n                textKey: text,\n                valueKey: value,\n                childrenKey: children,\n            });\n        },\n        getSelectedOptionsByValue: function (options, value) {\n            for (var i = 0; i < options.length; i++) {\n                var option = options[i];\n                if (option[this.data.valueKey] === value) {\n                    return [option];\n                }\n                if (option[this.data.childrenKey]) {\n                    var selectedOptions = this.getSelectedOptionsByValue(option[this.data.childrenKey], value);\n                    if (selectedOptions) {\n                        return __spreadArray([option], selectedOptions, true);\n                    }\n                }\n            }\n        },\n        updateTabs: function () {\n            var _this = this;\n            var options = this.data.options;\n            var innerValue = this.innerValue;\n            if (!options.length) {\n                return;\n            }\n            if (innerValue !== undefined) {\n                var selectedOptions = this.getSelectedOptionsByValue(options, innerValue);\n                if (selectedOptions) {\n                    var optionsCursor_1 = options;\n                    var tabs_1 = selectedOptions.map(function (option) {\n                        var tab = {\n                            options: optionsCursor_1,\n                            selected: option,\n                        };\n                        var next = optionsCursor_1.find(function (item) { return item[_this.data.valueKey] === option[_this.data.valueKey]; });\n                        if (next) {\n                            optionsCursor_1 = next[_this.data.childrenKey];\n                        }\n                        return tab;\n                    });\n                    if (optionsCursor_1) {\n                        tabs_1.push({\n                            options: optionsCursor_1,\n                            selected: null,\n                        });\n                    }\n                    this.setData({\n                        tabs: tabs_1,\n                    });\n                    wx.nextTick(function () {\n                        _this.setData({\n                            activeTab: tabs_1.length - 1,\n                        });\n                    });\n                    return;\n                }\n            }\n            this.setData({\n                tabs: [\n                    {\n                        options: options,\n                        selected: null,\n                    },\n                ],\n                activeTab: 0,\n            });\n        },\n        onClose: function () {\n            this.$emit('close');\n        },\n        onClickTab: function (e) {\n            var _a = e.detail, tabIndex = _a.index, title = _a.title;\n            this.$emit('click-tab', { title: title, tabIndex: tabIndex });\n            this.setData({\n                activeTab: tabIndex,\n            });\n        },\n        // 选中\n        onSelect: function (e) {\n            var _this = this;\n            var _a = e.currentTarget.dataset, option = _a.option, tabIndex = _a.tabIndex;\n            if (option && option.disabled) {\n                return;\n            }\n            var _b = this.data, valueKey = _b.valueKey, childrenKey = _b.childrenKey;\n            var tabs = this.data.tabs;\n            tabs[tabIndex].selected = option;\n            if (tabs.length > tabIndex + 1) {\n                tabs = tabs.slice(0, tabIndex + 1);\n            }\n            if (option[childrenKey]) {\n                var nextTab = {\n                    options: option[childrenKey],\n                    selected: null,\n                };\n                if (tabs[tabIndex + 1]) {\n                    tabs[tabIndex + 1] = nextTab;\n                }\n                else {\n                    tabs.push(nextTab);\n                }\n                wx.nextTick(function () {\n                    _this.setData({\n                        activeTab: tabIndex + 1,\n                    });\n                });\n            }\n            this.setData({\n                tabs: tabs,\n            });\n            var selectedOptions = tabs.map(function (tab) { return tab.selected; }).filter(Boolean);\n            var value = option[valueKey];\n            var params = {\n                value: value,\n                tabIndex: tabIndex,\n                selectedOptions: selectedOptions,\n            };\n            this.innerValue = value;\n            this.$emit('change', params);\n            if (!option[childrenKey]) {\n                this.$emit('finish', params);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cascader/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-tab\":  \"../tab/index\",\n    \"van-tabs\": \"../tabs/index\"\n  }\n}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cascader/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"utils\" />\n\n<view wx:if=\"{{ showHeader }}\" class=\"van-cascader__header\">\n  <slot name=\"title\" wx:if=\"{{ useTitleSlot }}\"></slot>\n  <text class=\"van-cascader__title\" wx:else>{{ title }}</text>\n  <van-icon\n    wx:if=\"{{ closeable }}\"\n    name=\"{{ closeIcon }}\"\n    class=\"van-cascader__close-icon\"\n    bind:tap=\"onClose\"\n  />\n</view>\n\n<van-tabs\n  active=\"{{ activeTab }}\"\n  custom-class=\"van-cascader__tabs\"\n  wrap-class=\"van-cascader__tabs-wrap\"\n  tab-class=\"van-cascader__tab\"\n  color=\"{{ activeColor }}\"\n  border=\"{{ false }}\"\n  swipeable=\"{{ swipeable }}\"\n  ellipsis=\"{{ ellipsis }}\"\n  bind:click=\"onClickTab\"\n>\n  <van-tab\n    wx:for=\"{{ tabs }}\"\n    wx:for-item=\"tab\"\n    wx:for-index=\"tabIndex\"\n    wx:key=\"tabIndex\"\n    title=\"{{ tab.selected ? tab.selected[textKey] : placeholder }}\"\n    style=\"width: 100%;\"\n    title-style=\"{{ !tab.selected ? 'color: #969799;font-weight:normal;' : '' }}\"\n  >\n    <!-- 暂不支持 -->\n    <!-- <slot name=\"options-top\"></slot> -->\n\n    <view class=\"van-cascader__options\">\n      <view\n        wx:for=\"{{ tab.options }}\"\n        wx:for-item=\"option\"\n        wx:key=\"index\"\n        class=\"{{ option.className }} {{ utils.optionClass(tab, valueKey, option) }}\"\n        style=\"{{ utils.optionStyle({ tab, valueKey, option, activeColor }) }}\"\n        data-option=\"{{ option }}\"\n        data-tab-index=\"{{ tabIndex }}\"\n        bind:tap=\"onSelect\"\n      >\n        <text>{{ option[textKey] }}</text>\n        <van-icon wx:if=\"{{ utils.isSelected(tab, valueKey, option) }}\" name=\"success\" size=\"18\" />\n      </view>\n    </view>\n    <!-- 暂不支持 -->\n    <!-- <slot name=\"options-bottom\"></slot> -->\n  </van-tab>\n</van-tabs>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cascader/index.wxs",
    "content": "var utils = require('../wxs/utils.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction isSelected(tab, valueKey, option) {\n  return tab.selected && tab.selected[valueKey] === option[valueKey]\n}\n\nfunction optionClass(tab, valueKey, option) {\n  return utils.bem('cascader__option', { selected: isSelected(tab, valueKey, option), disabled: option.disabled })\n}\n\nfunction optionStyle(data) {\n  var color = data.option.color || (isSelected(data.tab, data.valueKey, data.option) ? data.activeColor : undefined);\n  return style({\n    color\n  });\n}\n\n\nmodule.exports = {\n  isSelected: isSelected,\n  optionClass: optionClass,\n  optionStyle: optionStyle,\n};"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cascader/index.wxss",
    "content": "@import '../common/index.wxss';.van-cascader__header{align-items:center;display:flex;height:48px;justify-content:space-between;padding:0 16px}.van-cascader__title{font-size:16px;font-weight:600;line-height:20px}.van-cascader__close-icon{color:#c8c9cc;font-size:22px;height:22px}.van-cascader__tabs-wrap{height:48px!important;padding:0 8px}.van-cascader__tab{color:#323233!important;flex:none!important;font-weight:600!important;padding:0 8px!important}.van-cascader__tab--unselected{color:#969799!important;font-weight:400!important}.van-cascader__option{align-items:center;cursor:pointer;display:flex;font-size:14px;justify-content:space-between;line-height:20px;padding:10px 16px}.van-cascader__option:active{background-color:#f2f3f5}.van-cascader__option--selected{color:#1989fa;font-weight:600}.van-cascader__option--disabled{color:#c8c9cc;cursor:not-allowed}.van-cascader__option--disabled:active{background-color:initial}.van-cascader__options{-webkit-overflow-scrolling:touch;box-sizing:border-box;height:384px;overflow-y:auto;padding-top:6px}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cell/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cell/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar link_1 = require(\"../mixins/link\");\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: [\n        'title-class',\n        'label-class',\n        'value-class',\n        'right-icon-class',\n        'hover-class',\n    ],\n    mixins: [link_1.link],\n    props: {\n        title: null,\n        value: null,\n        icon: String,\n        size: String,\n        label: String,\n        center: Boolean,\n        isLink: Boolean,\n        required: Boolean,\n        clickable: Boolean,\n        titleWidth: String,\n        customStyle: String,\n        arrowDirection: String,\n        useLabelSlot: Boolean,\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        titleStyle: String,\n    },\n    methods: {\n        onClick: function (event) {\n            this.$emit('click', event.detail);\n            this.jumpLink();\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cell/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cell/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('cell', [size, { center, required, borderless: !border, clickable: isLink || clickable }]) }}\"\n  hover-class=\"van-cell--hover hover-class\"\n  hover-stay-time=\"70\"\n  style=\"{{ customStyle }}\"\n  bind:tap=\"onClick\"\n>\n  <van-icon\n    wx:if=\"{{ icon }}\"\n    name=\"{{ icon }}\"\n    class=\"van-cell__left-icon-wrap\"\n    custom-class=\"van-cell__left-icon\"\n  />\n  <slot wx:else name=\"icon\" />\n\n  <view\n    style=\"{{ computed.titleStyle({ titleWidth, titleStyle }) }}\"\n    class=\"van-cell__title title-class\"\n  >\n\n    <block wx:if=\"{{ title }}\">{{ title }}</block>\n    <slot wx:else name=\"title\" />\n\n    <view wx:if=\"{{ label || useLabelSlot }}\" class=\"van-cell__label label-class\">\n      <slot wx:if=\"{{ useLabelSlot }}\" name=\"label\" />\n      <block wx:elif=\"{{ label }}\">{{ label }}</block>\n    </view>\n  </view>\n\n  <view class=\"van-cell__value value-class\">\n    <block wx:if=\"{{ value || value === 0 }}\">{{ value }}</block>\n    <slot wx:else />\n  </view>\n\n  <van-icon\n    wx:if=\"{{ isLink }}\"\n    name=\"{{ arrowDirection ? 'arrow' + '-' + arrowDirection : 'arrow' }}\"\n    class=\"van-cell__right-icon-wrap right-icon-class\"\n    custom-class=\"van-cell__right-icon\"\n  />\n  <slot wx:else name=\"right-icon\" />\n\n  <slot name=\"extra\" />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cell/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction titleStyle(data) {\n  return style([\n    {\n      'max-width': addUnit(data.titleWidth),\n      'min-width': addUnit(data.titleWidth),\n    },\n    data.titleStyle,\n  ]);\n}\n\nmodule.exports = {\n  titleStyle: titleStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cell/index.wxss",
    "content": "@import '../common/index.wxss';.van-cell{background-color:var(--cell-background-color,#fff);box-sizing:border-box;color:var(--cell-text-color,#323233);display:flex;font-size:var(--cell-font-size,14px);line-height:var(--cell-line-height,24px);padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px);position:relative;width:100%}.van-cell:after{border-bottom:1px solid #ebedf0;bottom:0;box-sizing:border-box;content:\" \";left:16px;pointer-events:none;position:absolute;right:16px;transform:scaleY(.5);transform-origin:center}.van-cell--borderless:after{display:none}.van-cell-group{background-color:var(--cell-background-color,#fff)}.van-cell__label{color:var(--cell-label-color,#969799);font-size:var(--cell-label-font-size,12px);line-height:var(--cell-label-line-height,18px);margin-top:var(--cell-label-margin-top,3px)}.van-cell__value{color:var(--cell-value-color,#969799);overflow:hidden;text-align:right;vertical-align:middle}.van-cell__title,.van-cell__value{flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{align-items:center;display:flex;font-size:var(--cell-icon-size,16px);height:var(--cell-line-height,24px)}.van-cell__left-icon-wrap{margin-right:var(--padding-base,4px)}.van-cell__right-icon-wrap{color:var(--cell-right-icon-color,#969799);margin-left:var(--padding-base,4px)}.van-cell__left-icon{vertical-align:middle}.van-cell__left-icon,.van-cell__right-icon{line-height:var(--cell-line-height,24px)}.van-cell--clickable.van-cell--hover{background-color:var(--cell-active-color,#f2f3f5)}.van-cell--required{overflow:visible}.van-cell--required:before{color:var(--cell-required-color,#ee0a24);content:\"*\";font-size:var(--cell-font-size,14px);left:var(--padding-xs,8px);position:absolute}.van-cell--center{align-items:center}.van-cell--large{padding-bottom:var(--cell-large-vertical-padding,12px);padding-top:var(--cell-large-vertical-padding,12px)}.van-cell--large .van-cell__title{font-size:var(--cell-large-title-font-size,16px)}.van-cell--large .van-cell__value{font-size:var(--cell-large-value-font-size,16px)}.van-cell--large .van-cell__label{font-size:var(--cell-large-label-font-size,14px)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cell-group/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cell-group/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        title: String,\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        inset: Boolean,\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cell-group/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cell-group/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ title }}\"\n  class=\"{{ utils.bem('cell-group__title', { inset }) }}\"\n>\n  {{ title }}\n</view>\n<view class=\"custom-class {{ utils.bem('cell-group', { inset }) }} {{ border ? 'van-hairline--top-bottom' : '' }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/cell-group/index.wxss",
    "content": "@import '../common/index.wxss';.van-cell-group--inset{border-radius:var(--cell-group-inset-border-radius,8px);margin:var(--cell-group-inset-padding,0 16px);overflow:hidden}.van-cell-group__title{color:var(--cell-group-title-color,#969799);font-size:var(--cell-group-title-font-size,14px);line-height:var(--cell-group-title-line-height,16px);padding:var(--cell-group-title-padding,16px 16px 8px)}.van-cell-group__title--inset{padding:var(--cell-group-inset-title-padding,16px 16px 8px 32px)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/checkbox/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/checkbox/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar relation_1 = require(\"../common/relation\");\nvar component_1 = require(\"../common/component\");\nfunction emit(target, value) {\n    target.$emit('input', value);\n    target.$emit('change', value);\n}\n(0, component_1.VantComponent)({\n    field: true,\n    relation: (0, relation_1.useParent)('checkbox-group'),\n    classes: ['icon-class', 'label-class'],\n    props: {\n        value: Boolean,\n        disabled: Boolean,\n        useIconSlot: Boolean,\n        checkedColor: String,\n        labelPosition: {\n            type: String,\n            value: 'right',\n        },\n        labelDisabled: Boolean,\n        shape: {\n            type: String,\n            value: 'round',\n        },\n        iconSize: {\n            type: null,\n            value: 20,\n        },\n    },\n    data: {\n        parentDisabled: false,\n        direction: 'vertical',\n    },\n    methods: {\n        emitChange: function (value) {\n            if (this.parent) {\n                this.setParentValue(this.parent, value);\n            }\n            else {\n                emit(this, value);\n            }\n        },\n        toggle: function () {\n            var _a = this.data, parentDisabled = _a.parentDisabled, disabled = _a.disabled, value = _a.value;\n            if (!disabled && !parentDisabled) {\n                this.emitChange(!value);\n            }\n        },\n        onClickLabel: function () {\n            var _a = this.data, labelDisabled = _a.labelDisabled, parentDisabled = _a.parentDisabled, disabled = _a.disabled, value = _a.value;\n            if (!disabled && !labelDisabled && !parentDisabled) {\n                this.emitChange(!value);\n            }\n        },\n        setParentValue: function (parent, value) {\n            var parentValue = parent.data.value.slice();\n            var name = this.data.name;\n            var max = parent.data.max;\n            if (value) {\n                if (max && parentValue.length >= max) {\n                    return;\n                }\n                if (parentValue.indexOf(name) === -1) {\n                    parentValue.push(name);\n                    emit(parent, parentValue);\n                }\n            }\n            else {\n                var index = parentValue.indexOf(name);\n                if (index !== -1) {\n                    parentValue.splice(index, 1);\n                    emit(parent, parentValue);\n                }\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/checkbox/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/checkbox/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('checkbox', [{ horizontal: direction === 'horizontal' }]) }} custom-class\">\n  <view\n    wx:if=\"{{ labelPosition === 'left' }}\"\n    class=\"label-class {{ utils.bem('checkbox__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n  <view class=\"van-checkbox__icon-wrap\" bindtap=\"toggle\">\n    <slot wx:if=\"{{ useIconSlot }}\" name=\"icon\" />\n    <van-icon\n      wx:else\n      name=\"success\"\n      size=\"0.8em\"\n      class=\"{{ utils.bem('checkbox__icon', [shape, { disabled: disabled || parentDisabled, checked: value }]) }}\"\n      style=\"{{ computed.iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) }}\"\n      custom-class=\"icon-class\"\n      custom-style=\"line-height: 1.25em;\"\n    />\n  </view>\n  <view\n    wx:if=\"{{ labelPosition === 'right' }}\"\n    class=\"label-class {{ utils.bem('checkbox__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/checkbox/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) {\n  var styles = {\n    'font-size': addUnit(iconSize),\n  };\n\n  if (checkedColor && value && !disabled && !parentDisabled) {\n    styles['border-color'] = checkedColor;\n    styles['background-color'] = checkedColor;\n  }\n\n  return style(styles);\n}\n\nmodule.exports = {\n  iconStyle: iconStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/checkbox/index.wxss",
    "content": "@import '../common/index.wxss';.van-checkbox{align-items:center;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox--horizontal{margin-right:12px}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{flex:none}.van-checkbox__icon{align-items:center;border:1px solid var(--checkbox-border-color,#c8c9cc);box-sizing:border-box;color:transparent;display:flex;font-size:var(--checkbox-size,20px);height:1em;justify-content:center;text-align:center;transition-duration:var(--checkbox-transition-duration,.2s);transition-property:color,border-color,background-color;width:1em}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:var(--checkbox-checked-icon-color,#1989fa);color:#fff}.van-checkbox__icon--disabled{background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;color:var(--checkbox-label-color,#323233);padding-left:var(--checkbox-label-margin,10px)}.van-checkbox__label--left{float:left;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/checkbox-group/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/checkbox-group/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar relation_1 = require(\"../common/relation\");\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    field: true,\n    relation: (0, relation_1.useChildren)('checkbox', function (target) {\n        this.updateChild(target);\n    }),\n    props: {\n        max: Number,\n        value: {\n            type: Array,\n            observer: 'updateChildren',\n        },\n        disabled: {\n            type: Boolean,\n            observer: 'updateChildren',\n        },\n        direction: {\n            type: String,\n            value: 'vertical',\n        },\n    },\n    methods: {\n        updateChildren: function () {\n            var _this = this;\n            this.children.forEach(function (child) { return _this.updateChild(child); });\n        },\n        updateChild: function (child) {\n            var _a = this.data, value = _a.value, disabled = _a.disabled, direction = _a.direction;\n            child.setData({\n                value: value.indexOf(child.data.name) !== -1,\n                parentDisabled: disabled,\n                direction: direction,\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/checkbox-group/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/checkbox-group/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"{{ utils.bem('checkbox-group', [{ horizontal: direction === 'horizontal' }]) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/checkbox-group/index.wxss",
    "content": "@import '../common/index.wxss';.van-checkbox-group--horizontal{display:flex;flex-wrap:wrap}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/circle/canvas.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\ntype CanvasContext = WechatMiniprogram.CanvasContext;\nexport declare function adaptor(ctx: CanvasContext & Record<string, unknown>): CanvasContext;\nexport {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/circle/canvas.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.adaptor = void 0;\nfunction adaptor(ctx) {\n    // @ts-ignore\n    return Object.assign(ctx, {\n        setStrokeStyle: function (val) {\n            ctx.strokeStyle = val;\n        },\n        setLineWidth: function (val) {\n            ctx.lineWidth = val;\n        },\n        setLineCap: function (val) {\n            ctx.lineCap = val;\n        },\n        setFillStyle: function (val) {\n            ctx.fillStyle = val;\n        },\n        setFontSize: function (val) {\n            ctx.font = String(val);\n        },\n        setGlobalAlpha: function (val) {\n            ctx.globalAlpha = val;\n        },\n        setLineJoin: function (val) {\n            ctx.lineJoin = val;\n        },\n        setTextAlign: function (val) {\n            ctx.textAlign = val;\n        },\n        setMiterLimit: function (val) {\n            ctx.miterLimit = val;\n        },\n        setShadow: function (offsetX, offsetY, blur, color) {\n            ctx.shadowOffsetX = offsetX;\n            ctx.shadowOffsetY = offsetY;\n            ctx.shadowBlur = blur;\n            ctx.shadowColor = color;\n        },\n        setTextBaseline: function (val) {\n            ctx.textBaseline = val;\n        },\n        createCircularGradient: function () { },\n        draw: function () { },\n    });\n}\nexports.adaptor = adaptor;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/circle/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/circle/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = require(\"../common/color\");\nvar component_1 = require(\"../common/component\");\nvar utils_1 = require(\"../common/utils\");\nvar validator_1 = require(\"../common/validator\");\nvar version_1 = require(\"../common/version\");\nvar canvas_1 = require(\"./canvas\");\nfunction format(rate) {\n    return Math.min(Math.max(rate, 0), 100);\n}\nvar PERIMETER = 2 * Math.PI;\nvar BEGIN_ANGLE = -Math.PI / 2;\nvar STEP = 1;\n(0, component_1.VantComponent)({\n    props: {\n        text: String,\n        lineCap: {\n            type: String,\n            value: 'round',\n        },\n        value: {\n            type: Number,\n            value: 0,\n            observer: 'reRender',\n        },\n        speed: {\n            type: Number,\n            value: 50,\n        },\n        size: {\n            type: Number,\n            value: 100,\n            observer: function () {\n                this.drawCircle(this.currentValue);\n            },\n        },\n        fill: String,\n        layerColor: {\n            type: String,\n            value: color_1.WHITE,\n        },\n        color: {\n            type: null,\n            value: color_1.BLUE,\n            observer: function () {\n                var _this = this;\n                this.setHoverColor().then(function () {\n                    _this.drawCircle(_this.currentValue);\n                });\n            },\n        },\n        type: {\n            type: String,\n            value: '',\n        },\n        strokeWidth: {\n            type: Number,\n            value: 4,\n        },\n        clockwise: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        hoverColor: color_1.BLUE,\n    },\n    methods: {\n        getContext: function () {\n            var _this = this;\n            var _a = this.data, type = _a.type, size = _a.size;\n            if (type === '' || !(0, version_1.canIUseCanvas2d)()) {\n                var ctx = wx.createCanvasContext('van-circle', this);\n                return Promise.resolve(ctx);\n            }\n            var dpr = (0, utils_1.getSystemInfoSync)().pixelRatio;\n            return new Promise(function (resolve) {\n                wx.createSelectorQuery()\n                    .in(_this)\n                    .select('#van-circle')\n                    .node()\n                    .exec(function (res) {\n                    var canvas = res[0].node;\n                    var ctx = canvas.getContext(type);\n                    if (!_this.inited) {\n                        _this.inited = true;\n                        canvas.width = size * dpr;\n                        canvas.height = size * dpr;\n                        ctx.scale(dpr, dpr);\n                    }\n                    resolve((0, canvas_1.adaptor)(ctx));\n                });\n            });\n        },\n        setHoverColor: function () {\n            var _this = this;\n            var _a = this.data, color = _a.color, size = _a.size;\n            if ((0, validator_1.isObj)(color)) {\n                return this.getContext().then(function (context) {\n                    if (!context)\n                        return;\n                    var LinearColor = context.createLinearGradient(size, 0, 0, 0);\n                    Object.keys(color)\n                        .sort(function (a, b) { return parseFloat(a) - parseFloat(b); })\n                        .map(function (key) {\n                        return LinearColor.addColorStop(parseFloat(key) / 100, color[key]);\n                    });\n                    _this.hoverColor = LinearColor;\n                });\n            }\n            this.hoverColor = color;\n            return Promise.resolve();\n        },\n        presetCanvas: function (context, strokeStyle, beginAngle, endAngle, fill) {\n            var _a = this.data, strokeWidth = _a.strokeWidth, lineCap = _a.lineCap, clockwise = _a.clockwise, size = _a.size;\n            var position = size / 2;\n            var radius = position - strokeWidth / 2;\n            context.setStrokeStyle(strokeStyle);\n            context.setLineWidth(strokeWidth);\n            context.setLineCap(lineCap);\n            context.beginPath();\n            context.arc(position, position, radius, beginAngle, endAngle, !clockwise);\n            context.stroke();\n            if (fill) {\n                context.setFillStyle(fill);\n                context.fill();\n            }\n        },\n        renderLayerCircle: function (context) {\n            var _a = this.data, layerColor = _a.layerColor, fill = _a.fill;\n            this.presetCanvas(context, layerColor, 0, PERIMETER, fill);\n        },\n        renderHoverCircle: function (context, formatValue) {\n            var clockwise = this.data.clockwise;\n            // 结束角度\n            var progress = PERIMETER * (formatValue / 100);\n            var endAngle = clockwise\n                ? BEGIN_ANGLE + progress\n                : 3 * Math.PI - (BEGIN_ANGLE + progress);\n            this.presetCanvas(context, this.hoverColor, BEGIN_ANGLE, endAngle);\n        },\n        drawCircle: function (currentValue) {\n            var _this = this;\n            var size = this.data.size;\n            this.getContext().then(function (context) {\n                if (!context)\n                    return;\n                context.clearRect(0, 0, size, size);\n                _this.renderLayerCircle(context);\n                var formatValue = format(currentValue);\n                if (formatValue !== 0) {\n                    _this.renderHoverCircle(context, formatValue);\n                }\n                context.draw();\n            });\n        },\n        reRender: function () {\n            var _this = this;\n            // tofector 动画暂时没有想到好的解决方案\n            var _a = this.data, value = _a.value, speed = _a.speed;\n            if (speed <= 0 || speed > 1000) {\n                this.drawCircle(value);\n                return;\n            }\n            this.clearMockInterval();\n            this.currentValue = this.currentValue || 0;\n            var run = function () {\n                _this.interval = setTimeout(function () {\n                    if (_this.currentValue !== value) {\n                        if (Math.abs(_this.currentValue - value) < STEP) {\n                            _this.currentValue = value;\n                        }\n                        else if (_this.currentValue < value) {\n                            _this.currentValue += STEP;\n                        }\n                        else {\n                            _this.currentValue -= STEP;\n                        }\n                        _this.drawCircle(_this.currentValue);\n                        run();\n                    }\n                    else {\n                        _this.clearMockInterval();\n                    }\n                }, 1000 / speed);\n            };\n            run();\n        },\n        clearMockInterval: function () {\n            if (this.interval) {\n                clearTimeout(this.interval);\n                this.interval = null;\n            }\n        },\n    },\n    mounted: function () {\n        var _this = this;\n        this.currentValue = this.data.value;\n        this.setHoverColor().then(function () {\n            _this.drawCircle(_this.currentValue);\n        });\n    },\n    destroyed: function () {\n        this.clearMockInterval();\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/circle/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/circle/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-circle\">\n  <canvas class=\"van-circle__canvas\" type=\"{{ type }}\" style=\"width: {{ utils.addUnit(size) }};height:{{ utils.addUnit(size) }}\" id=\"van-circle\" canvas-id=\"van-circle\"></canvas>\n  <view wx:if=\"{{ !text }}\" class=\"van-circle__text\">\n    <slot></slot>\n  </view>\n  <cover-view wx:else class=\"van-circle__text\">{{ text }}</cover-view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/circle/index.wxss",
    "content": "@import '../common/index.wxss';.van-circle{display:inline-block;position:relative;text-align:center}.van-circle__text{color:var(--circle-text-color,#323233);left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/col/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/col/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar relation_1 = require(\"../common/relation\");\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useParent)('row'),\n    props: {\n        span: Number,\n        offset: Number,\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/col/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/col/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('col', [span]) }} {{ offset ? 'van-col--offset-' + offset : '' }}\"\n  style=\"{{ computed.rootStyle({ gutter }) }}\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/col/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  if (!data.gutter) {\n    return '';\n  }\n\n  return style({\n    'padding-right': addUnit(data.gutter / 2),\n    'padding-left': addUnit(data.gutter / 2),\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/col/index.wxss",
    "content": "@import '../common/index.wxss';.van-col{box-sizing:border-box;float:left}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/collapse/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/collapse/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useChildren)('collapse-item'),\n    props: {\n        value: {\n            type: null,\n            observer: 'updateExpanded',\n        },\n        accordion: {\n            type: Boolean,\n            observer: 'updateExpanded',\n        },\n        border: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    methods: {\n        updateExpanded: function () {\n            this.children.forEach(function (child) {\n                child.updateExpanded();\n            });\n        },\n        switch: function (name, expanded) {\n            var _a = this.data, accordion = _a.accordion, value = _a.value;\n            var changeItem = name;\n            if (!accordion) {\n                name = expanded\n                    ? (value || []).concat(name)\n                    : (value || []).filter(function (activeName) { return activeName !== name; });\n            }\n            else {\n                name = expanded ? name : '';\n            }\n            if (expanded) {\n                this.$emit('open', changeItem);\n            }\n            else {\n                this.$emit('close', changeItem);\n            }\n            this.$emit('change', name);\n            this.$emit('input', name);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/collapse/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/collapse/index.wxml",
    "content": "<view class=\"custom-class van-collapse {{ border ? 'van-hairline--top-bottom' : '' }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/collapse/index.wxss",
    "content": "@import '../common/index.wxss';"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/collapse-item/animate.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\nexport declare function setContentAnimate(context: WechatMiniprogram.Component.TrivialInstance, expanded: boolean, mounted: boolean): void;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/collapse-item/animate.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setContentAnimate = void 0;\nvar utils_1 = require(\"../common/utils\");\nfunction useAnimation(context, expanded, mounted, height) {\n    var animation = wx.createAnimation({\n        duration: 0,\n        timingFunction: 'ease-in-out',\n    });\n    if (expanded) {\n        if (height === 0) {\n            animation.height('auto').top(1).step();\n        }\n        else {\n            animation\n                .height(height)\n                .top(1)\n                .step({\n                duration: mounted ? 300 : 1,\n            })\n                .height('auto')\n                .step();\n        }\n        context.setData({\n            animation: animation.export(),\n        });\n        return;\n    }\n    animation.height(height).top(0).step({ duration: 1 }).height(0).step({\n        duration: 300,\n    });\n    context.setData({\n        animation: animation.export(),\n    });\n}\nfunction setContentAnimate(context, expanded, mounted) {\n    (0, utils_1.getRect)(context, '.van-collapse-item__content')\n        .then(function (rect) { return rect.height; })\n        .then(function (height) {\n        useAnimation(context, expanded, mounted, height);\n    });\n}\nexports.setContentAnimate = setContentAnimate;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/collapse-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/collapse-item/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\nvar animate_1 = require(\"./animate\");\n(0, component_1.VantComponent)({\n    classes: ['title-class', 'content-class'],\n    relation: (0, relation_1.useParent)('collapse'),\n    props: {\n        size: String,\n        name: null,\n        title: null,\n        value: null,\n        icon: String,\n        label: String,\n        disabled: Boolean,\n        clickable: Boolean,\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        isLink: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        expanded: false,\n        parentBorder: true,\n    },\n    mounted: function () {\n        this.updateExpanded();\n        this.mounted = true;\n    },\n    methods: {\n        updateExpanded: function () {\n            if (!this.parent) {\n                return;\n            }\n            var _a = this.parent.data, value = _a.value, accordion = _a.accordion, border = _a.border;\n            var _b = this.parent.children, children = _b === void 0 ? [] : _b;\n            var name = this.data.name;\n            var index = children.indexOf(this);\n            var currentName = name == null ? index : name;\n            var expanded = accordion\n                ? value === currentName\n                : (value || []).some(function (name) { return name === currentName; });\n            if (expanded !== this.data.expanded) {\n                (0, animate_1.setContentAnimate)(this, expanded, this.mounted);\n            }\n            this.setData({ index: index, expanded: expanded, parentBorder: border });\n        },\n        onClick: function () {\n            if (this.data.disabled) {\n                return;\n            }\n            var _a = this.data, name = _a.name, expanded = _a.expanded;\n            var index = this.parent.children.indexOf(this);\n            var currentName = name == null ? index : name;\n            this.parent.switch(currentName, !expanded);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/collapse-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../cell/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/collapse-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-collapse-item custom-class {{ index !== 0 && parentBorder ? 'van-hairline--top' : '' }}\">\n  <van-cell\n    size=\"{{ size }}\"\n    title=\"{{ title }}\"\n    title-class=\"title-class\"\n    icon=\"{{ icon }}\"\n    value=\"{{ value }}\"\n    label=\"{{ label }}\"\n    is-link=\"{{ isLink }}\"\n    clickable=\"{{ clickable }}\"\n    border=\"{{ border && expanded }}\"\n    class=\"{{ utils.bem('collapse-item__title', { disabled, expanded }) }}\"\n    right-icon-class=\"van-cell__right-icon\"\n    custom-class=\"van-cell\"\n    hover-class=\"van-cell--hover\"\n    bind:click=\"onClick\"\n  >\n    <slot\n      name=\"title\"\n      slot=\"title\"\n    />\n    <slot\n      name=\"icon\"\n      slot=\"icon\"\n    />\n    <slot name=\"value\" />\n    <slot\n      name=\"right-icon\"\n      slot=\"right-icon\"\n    />\n  </van-cell>\n  <view\n    class=\"{{ utils.bem('collapse-item__wrapper') }}\"\n    style=\"height: 0;\"\n    animation=\"{{ animation }}\"\n  >\n    <view\n      class=\"van-collapse-item__content content-class\"\n    >\n      <slot />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/collapse-item/index.wxss",
    "content": "@import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{transform:rotate(90deg);transition:transform var(--collapse-item-transition-duration,.3s)}.van-collapse-item__title--expanded .van-cell__right-icon{transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:var(--collapse-item-title-disabled-color,#c8c9cc)!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__content{background-color:var(--collapse-item-content-background-color,#fff);color:var(--collapse-item-content-text-color,#969799);font-size:var(--collapse-item-content-font-size,13px);line-height:var(--collapse-item-content-line-height,1.5);padding:var(--collapse-item-content-padding,15px)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/color.d.ts",
    "content": "export declare const RED = \"#ee0a24\";\nexport declare const BLUE = \"#1989fa\";\nexport declare const WHITE = \"#fff\";\nexport declare const GREEN = \"#07c160\";\nexport declare const ORANGE = \"#ff976a\";\nexport declare const GRAY = \"#323233\";\nexport declare const GRAY_DARK = \"#969799\";\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/color.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GRAY_DARK = exports.GRAY = exports.ORANGE = exports.GREEN = exports.WHITE = exports.BLUE = exports.RED = void 0;\nexports.RED = '#ee0a24';\nexports.BLUE = '#1989fa';\nexports.WHITE = '#fff';\nexports.GREEN = '#07c160';\nexports.ORANGE = '#ff976a';\nexports.GRAY = '#323233';\nexports.GRAY_DARK = '#969799';\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/component.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\nimport { VantComponentOptions } from 'definitions/index';\ndeclare function VantComponent<Data extends WechatMiniprogram.Component.DataOption, Props extends WechatMiniprogram.Component.PropertyOption, Methods extends WechatMiniprogram.Component.MethodOption>(vantOptions: VantComponentOptions<Data, Props, Methods>): void;\nexport { VantComponent };\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/component.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VantComponent = void 0;\nvar basic_1 = require(\"../mixins/basic\");\nfunction mapKeys(source, target, map) {\n    Object.keys(map).forEach(function (key) {\n        if (source[key]) {\n            target[map[key]] = source[key];\n        }\n    });\n}\nfunction VantComponent(vantOptions) {\n    var options = {};\n    mapKeys(vantOptions, options, {\n        data: 'data',\n        props: 'properties',\n        watch: 'observers',\n        mixins: 'behaviors',\n        methods: 'methods',\n        beforeCreate: 'created',\n        created: 'attached',\n        mounted: 'ready',\n        destroyed: 'detached',\n        classes: 'externalClasses',\n    });\n    // add default externalClasses\n    options.externalClasses = options.externalClasses || [];\n    options.externalClasses.push('custom-class');\n    // add default behaviors\n    options.behaviors = options.behaviors || [];\n    options.behaviors.push(basic_1.basic);\n    // add relations\n    var relation = vantOptions.relation;\n    if (relation) {\n        options.relations = relation.relations;\n        options.behaviors.push(relation.mixin);\n    }\n    // map field to form-field behavior\n    if (vantOptions.field) {\n        options.behaviors.push('wx://form-field');\n    }\n    // add default options\n    options.options = {\n        multipleSlots: true,\n        addGlobalClass: true,\n    };\n    Component(options);\n}\nexports.VantComponent = VantComponent;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/index.wxss",
    "content": ".van-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{clear:both;content:\"\";display:table}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{border:0 solid #ebedf0;bottom:-50%;box-sizing:border-box;content:\" \";left:-50%;pointer-events:none;position:absolute;right:-50%;top:-50%;transform:scale(.5);transform-origin:center}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/relation.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\ntype TrivialInstance = WechatMiniprogram.Component.TrivialInstance;\nexport declare function useParent(name: string, onEffect?: (this: TrivialInstance) => void): {\n    relations: {\n        [x: string]: WechatMiniprogram.Component.RelationOption;\n    };\n    mixin: string;\n};\nexport declare function useChildren(name: string, onEffect?: (this: TrivialInstance, target: TrivialInstance) => void): {\n    relations: {\n        [x: string]: WechatMiniprogram.Component.RelationOption;\n    };\n    mixin: string;\n};\nexport {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/relation.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useChildren = exports.useParent = void 0;\nfunction useParent(name, onEffect) {\n    var _a;\n    var path = \"../\".concat(name, \"/index\");\n    return {\n        relations: (_a = {},\n            _a[path] = {\n                type: 'ancestor',\n                linked: function () {\n                    onEffect && onEffect.call(this);\n                },\n                linkChanged: function () {\n                    onEffect && onEffect.call(this);\n                },\n                unlinked: function () {\n                    onEffect && onEffect.call(this);\n                },\n            },\n            _a),\n        mixin: Behavior({\n            created: function () {\n                var _this = this;\n                Object.defineProperty(this, 'parent', {\n                    get: function () { return _this.getRelationNodes(path)[0]; },\n                });\n                Object.defineProperty(this, 'index', {\n                    // @ts-ignore\n                    get: function () { var _a, _b; return (_b = (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.indexOf(_this); },\n                });\n            },\n        }),\n    };\n}\nexports.useParent = useParent;\nfunction useChildren(name, onEffect) {\n    var _a;\n    var path = \"../\".concat(name, \"/index\");\n    return {\n        relations: (_a = {},\n            _a[path] = {\n                type: 'descendant',\n                linked: function (target) {\n                    onEffect && onEffect.call(this, target);\n                },\n                linkChanged: function (target) {\n                    onEffect && onEffect.call(this, target);\n                },\n                unlinked: function (target) {\n                    onEffect && onEffect.call(this, target);\n                },\n            },\n            _a),\n        mixin: Behavior({\n            created: function () {\n                var _this = this;\n                Object.defineProperty(this, 'children', {\n                    get: function () { return _this.getRelationNodes(path) || []; },\n                });\n            },\n        }),\n    };\n}\nexports.useChildren = useChildren;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/style/clearfix.wxss",
    "content": ".van-clearfix:after{clear:both;content:\"\";display:table}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/style/ellipsis.wxss",
    "content": ".van-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.van-multi-ellipsis--l3{-webkit-line-clamp:3}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/style/hairline.wxss",
    "content": ".van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{border:0 solid #ebedf0;bottom:-50%;box-sizing:border-box;content:\" \";left:-50%;pointer-events:none;position:absolute;right:-50%;top:-50%;transform:scale(.5);transform-origin:center}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/style/mixins/clearfix.wxss",
    "content": ""
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/style/mixins/ellipsis.wxss",
    "content": ""
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/style/mixins/hairline.wxss",
    "content": ""
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/style/var.wxss",
    "content": ""
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/utils.d.ts",
    "content": "/// <reference types=\"node\" />\n/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\nexport { isDef } from './validator';\nexport { getSystemInfoSync } from './version';\nexport declare function range(num: number, min: number, max: number): number;\nexport declare function nextTick(cb: (...args: any[]) => void): void;\nexport declare function addUnit(value?: string | number): string | undefined;\nexport declare function requestAnimationFrame(cb: () => void): NodeJS.Timeout;\nexport declare function pickExclude(obj: unknown, keys: string[]): {};\nexport declare function getRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult>;\nexport declare function getAllRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult[]>;\nexport declare function groupSetData(context: WechatMiniprogram.Component.TrivialInstance, cb: () => void): void;\nexport declare function toPromise(promiseLike: Promise<unknown> | unknown): Promise<unknown>;\nexport declare function addNumber(num1: any, num2: any): number;\nexport declare const clamp: (num: any, min: any, max: any) => number;\nexport declare function getCurrentPage<T>(): T & WechatMiniprogram.OptionalInterface<WechatMiniprogram.Page.ILifetime> & WechatMiniprogram.Page.InstanceProperties & WechatMiniprogram.Page.InstanceMethods<WechatMiniprogram.IAnyObject> & WechatMiniprogram.Page.Data<WechatMiniprogram.IAnyObject> & WechatMiniprogram.IAnyObject;\nexport declare const isPC: boolean;\nexport declare const isWxWork: boolean;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/utils.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isWxWork = exports.isPC = exports.getCurrentPage = exports.clamp = exports.addNumber = exports.toPromise = exports.groupSetData = exports.getAllRect = exports.getRect = exports.pickExclude = exports.requestAnimationFrame = exports.addUnit = exports.nextTick = exports.range = exports.getSystemInfoSync = exports.isDef = void 0;\nvar validator_1 = require(\"./validator\");\nvar version_1 = require(\"./version\");\nvar validator_2 = require(\"./validator\");\nObject.defineProperty(exports, \"isDef\", { enumerable: true, get: function () { return validator_2.isDef; } });\nvar version_2 = require(\"./version\");\nObject.defineProperty(exports, \"getSystemInfoSync\", { enumerable: true, get: function () { return version_2.getSystemInfoSync; } });\nfunction range(num, min, max) {\n    return Math.min(Math.max(num, min), max);\n}\nexports.range = range;\nfunction nextTick(cb) {\n    if ((0, version_1.canIUseNextTick)()) {\n        wx.nextTick(cb);\n    }\n    else {\n        setTimeout(function () {\n            cb();\n        }, 1000 / 30);\n    }\n}\nexports.nextTick = nextTick;\nfunction addUnit(value) {\n    if (!(0, validator_1.isDef)(value)) {\n        return undefined;\n    }\n    value = String(value);\n    return (0, validator_1.isNumber)(value) ? \"\".concat(value, \"px\") : value;\n}\nexports.addUnit = addUnit;\nfunction requestAnimationFrame(cb) {\n    return setTimeout(function () {\n        cb();\n    }, 1000 / 30);\n}\nexports.requestAnimationFrame = requestAnimationFrame;\nfunction pickExclude(obj, keys) {\n    if (!(0, validator_1.isPlainObject)(obj)) {\n        return {};\n    }\n    return Object.keys(obj).reduce(function (prev, key) {\n        if (!keys.includes(key)) {\n            prev[key] = obj[key];\n        }\n        return prev;\n    }, {});\n}\nexports.pickExclude = pickExclude;\nfunction getRect(context, selector) {\n    return new Promise(function (resolve) {\n        wx.createSelectorQuery()\n            .in(context)\n            .select(selector)\n            .boundingClientRect()\n            .exec(function (rect) {\n            if (rect === void 0) { rect = []; }\n            return resolve(rect[0]);\n        });\n    });\n}\nexports.getRect = getRect;\nfunction getAllRect(context, selector) {\n    return new Promise(function (resolve) {\n        wx.createSelectorQuery()\n            .in(context)\n            .selectAll(selector)\n            .boundingClientRect()\n            .exec(function (rect) {\n            if (rect === void 0) { rect = []; }\n            return resolve(rect[0]);\n        });\n    });\n}\nexports.getAllRect = getAllRect;\nfunction groupSetData(context, cb) {\n    if ((0, version_1.canIUseGroupSetData)()) {\n        context.groupSetData(cb);\n    }\n    else {\n        cb();\n    }\n}\nexports.groupSetData = groupSetData;\nfunction toPromise(promiseLike) {\n    if ((0, validator_1.isPromise)(promiseLike)) {\n        return promiseLike;\n    }\n    return Promise.resolve(promiseLike);\n}\nexports.toPromise = toPromise;\n// 浮点数精度处理\nfunction addNumber(num1, num2) {\n    var cardinal = Math.pow(10, 10);\n    return Math.round((num1 + num2) * cardinal) / cardinal;\n}\nexports.addNumber = addNumber;\n// 限制value在[min, max]之间\nvar clamp = function (num, min, max) { return Math.min(Math.max(num, min), max); };\nexports.clamp = clamp;\nfunction getCurrentPage() {\n    var pages = getCurrentPages();\n    return pages[pages.length - 1];\n}\nexports.getCurrentPage = getCurrentPage;\nexports.isPC = ['mac', 'windows'].includes((0, version_1.getSystemInfoSync)().platform);\n// 是否企业微信\nexports.isWxWork = (0, version_1.getSystemInfoSync)().environment === 'wxwork';\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/validator.d.ts",
    "content": "export declare function isFunction(val: unknown): val is Function;\nexport declare function isPlainObject(val: unknown): val is Record<string, unknown>;\nexport declare function isPromise<T = unknown>(val: unknown): val is Promise<T>;\nexport declare function isDef(value: unknown): boolean;\nexport declare function isObj(x: unknown): x is Record<string, unknown>;\nexport declare function isNumber(value: string): boolean;\nexport declare function isBoolean(value: unknown): value is boolean;\nexport declare function isImageUrl(url: string): boolean;\nexport declare function isVideoUrl(url: string): boolean;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/validator.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isVideoUrl = exports.isImageUrl = exports.isBoolean = exports.isNumber = exports.isObj = exports.isDef = exports.isPromise = exports.isPlainObject = exports.isFunction = void 0;\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isFunction(val) {\n    return typeof val === 'function';\n}\nexports.isFunction = isFunction;\nfunction isPlainObject(val) {\n    return val !== null && typeof val === 'object' && !Array.isArray(val);\n}\nexports.isPlainObject = isPlainObject;\nfunction isPromise(val) {\n    return isPlainObject(val) && isFunction(val.then) && isFunction(val.catch);\n}\nexports.isPromise = isPromise;\nfunction isDef(value) {\n    return value !== undefined && value !== null;\n}\nexports.isDef = isDef;\nfunction isObj(x) {\n    var type = typeof x;\n    return x !== null && (type === 'object' || type === 'function');\n}\nexports.isObj = isObj;\nfunction isNumber(value) {\n    return /^\\d+(\\.\\d+)?$/.test(value);\n}\nexports.isNumber = isNumber;\nfunction isBoolean(value) {\n    return typeof value === 'boolean';\n}\nexports.isBoolean = isBoolean;\nvar IMAGE_REGEXP = /\\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;\nvar VIDEO_REGEXP = /\\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv)/i;\nfunction isImageUrl(url) {\n    return IMAGE_REGEXP.test(url);\n}\nexports.isImageUrl = isImageUrl;\nfunction isVideoUrl(url) {\n    return VIDEO_REGEXP.test(url);\n}\nexports.isVideoUrl = isVideoUrl;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/version.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\ninterface WxWorkSystemInfo extends WechatMiniprogram.SystemInfo {\n    environment?: 'wxwork';\n}\ninterface SystemInfo extends WxWorkSystemInfo, WechatMiniprogram.SystemInfo {\n}\nexport declare function getSystemInfoSync(): SystemInfo;\nexport declare function canIUseModel(): boolean;\nexport declare function canIUseFormFieldButton(): boolean;\nexport declare function canIUseAnimate(): boolean;\nexport declare function canIUseGroupSetData(): boolean;\nexport declare function canIUseNextTick(): boolean;\nexport declare function canIUseCanvas2d(): boolean;\nexport declare function canIUseGetUserProfile(): boolean;\nexport {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/common/version.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.canIUseGetUserProfile = exports.canIUseCanvas2d = exports.canIUseNextTick = exports.canIUseGroupSetData = exports.canIUseAnimate = exports.canIUseFormFieldButton = exports.canIUseModel = exports.getSystemInfoSync = void 0;\nvar systemInfo;\nfunction getSystemInfoSync() {\n    if (systemInfo == null) {\n        systemInfo = wx.getSystemInfoSync();\n    }\n    return systemInfo;\n}\nexports.getSystemInfoSync = getSystemInfoSync;\nfunction compareVersion(v1, v2) {\n    v1 = v1.split('.');\n    v2 = v2.split('.');\n    var len = Math.max(v1.length, v2.length);\n    while (v1.length < len) {\n        v1.push('0');\n    }\n    while (v2.length < len) {\n        v2.push('0');\n    }\n    for (var i = 0; i < len; i++) {\n        var num1 = parseInt(v1[i], 10);\n        var num2 = parseInt(v2[i], 10);\n        if (num1 > num2) {\n            return 1;\n        }\n        if (num1 < num2) {\n            return -1;\n        }\n    }\n    return 0;\n}\nfunction gte(version) {\n    var system = getSystemInfoSync();\n    return compareVersion(system.SDKVersion, version) >= 0;\n}\nfunction canIUseModel() {\n    return gte('2.9.3');\n}\nexports.canIUseModel = canIUseModel;\nfunction canIUseFormFieldButton() {\n    return gte('2.10.3');\n}\nexports.canIUseFormFieldButton = canIUseFormFieldButton;\nfunction canIUseAnimate() {\n    return gte('2.9.0');\n}\nexports.canIUseAnimate = canIUseAnimate;\nfunction canIUseGroupSetData() {\n    return gte('2.4.0');\n}\nexports.canIUseGroupSetData = canIUseGroupSetData;\nfunction canIUseNextTick() {\n    try {\n        return wx.canIUse('nextTick');\n    }\n    catch (e) {\n        return gte('2.7.1');\n    }\n}\nexports.canIUseNextTick = canIUseNextTick;\nfunction canIUseCanvas2d() {\n    return gte('2.9.0');\n}\nexports.canIUseCanvas2d = canIUseCanvas2d;\nfunction canIUseGetUserProfile() {\n    return !!wx.getUserProfile;\n}\nexports.canIUseGetUserProfile = canIUseGetUserProfile;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/config-provider/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/config-provider/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        themeVars: {\n            type: Object,\n            value: {},\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/config-provider/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/config-provider/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-config-provider\" style=\"{{ computed.mapThemeVarsToCSSVars(themeVars) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/config-provider/index.wxs",
    "content": "/* eslint-disable */\nvar object = require('../wxs/object.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction kebabCase(word) {\n  var newWord = word\n    .replace(getRegExp(\"[A-Z]\", 'g'), function (i) {\n      return '-' + i;\n    })\n    .toLowerCase()\n    .replace(getRegExp(\"^-\"), '');\n\n  return newWord;\n}\n\nfunction mapThemeVarsToCSSVars(themeVars) {\n  var cssVars = {};\n  object.keys(themeVars).forEach(function (key) {\n    var cssVarsKey = '--' + kebabCase(key);\n    cssVars[cssVarsKey] = themeVars[key];\n  });\n\n  return style(cssVars);\n}\n\nmodule.exports = {\n  kebabCase: kebabCase,\n  mapThemeVarsToCSSVars: mapThemeVarsToCSSVars,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/count-down/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/count-down/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar utils_1 = require(\"./utils\");\nfunction simpleTick(fn) {\n    return setTimeout(fn, 30);\n}\n(0, component_1.VantComponent)({\n    props: {\n        useSlot: Boolean,\n        millisecond: Boolean,\n        time: {\n            type: Number,\n            observer: 'reset',\n        },\n        format: {\n            type: String,\n            value: 'HH:mm:ss',\n        },\n        autoStart: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        timeData: (0, utils_1.parseTimeData)(0),\n        formattedTime: '0',\n    },\n    destroyed: function () {\n        clearTimeout(this.tid);\n        this.tid = null;\n    },\n    methods: {\n        // 开始\n        start: function () {\n            if (this.counting) {\n                return;\n            }\n            this.counting = true;\n            this.endTime = Date.now() + this.remain;\n            this.tick();\n        },\n        // 暂停\n        pause: function () {\n            this.counting = false;\n            clearTimeout(this.tid);\n        },\n        // 重置\n        reset: function () {\n            this.pause();\n            this.remain = this.data.time;\n            this.setRemain(this.remain);\n            if (this.data.autoStart) {\n                this.start();\n            }\n        },\n        tick: function () {\n            if (this.data.millisecond) {\n                this.microTick();\n            }\n            else {\n                this.macroTick();\n            }\n        },\n        microTick: function () {\n            var _this = this;\n            this.tid = simpleTick(function () {\n                _this.setRemain(_this.getRemain());\n                if (_this.remain !== 0) {\n                    _this.microTick();\n                }\n            });\n        },\n        macroTick: function () {\n            var _this = this;\n            this.tid = simpleTick(function () {\n                var remain = _this.getRemain();\n                if (!(0, utils_1.isSameSecond)(remain, _this.remain) || remain === 0) {\n                    _this.setRemain(remain);\n                }\n                if (_this.remain !== 0) {\n                    _this.macroTick();\n                }\n            });\n        },\n        getRemain: function () {\n            return Math.max(this.endTime - Date.now(), 0);\n        },\n        setRemain: function (remain) {\n            this.remain = remain;\n            var timeData = (0, utils_1.parseTimeData)(remain);\n            if (this.data.useSlot) {\n                this.$emit('change', timeData);\n            }\n            this.setData({\n                formattedTime: (0, utils_1.parseFormat)(this.data.format, timeData),\n            });\n            if (remain === 0) {\n                this.pause();\n                this.$emit('finish');\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/count-down/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/count-down/index.wxml",
    "content": "<view class=\"van-count-down\">\n  <slot wx:if=\"{{ useSlot }}\"/>\n  <block wx:else>{{ formattedTime }}</block>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/count-down/index.wxss",
    "content": "@import '../common/index.wxss';.van-count-down{color:var(--count-down-text-color,#323233);font-size:var(--count-down-font-size,14px);line-height:var(--count-down-line-height,20px)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/count-down/utils.d.ts",
    "content": "export type TimeData = {\n    days: number;\n    hours: number;\n    minutes: number;\n    seconds: number;\n    milliseconds: number;\n};\nexport declare function parseTimeData(time: number): TimeData;\nexport declare function parseFormat(format: string, timeData: TimeData): string;\nexport declare function isSameSecond(time1: number, time2: number): boolean;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/count-down/utils.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isSameSecond = exports.parseFormat = exports.parseTimeData = void 0;\nfunction padZero(num, targetLength) {\n    if (targetLength === void 0) { targetLength = 2; }\n    var str = num + '';\n    while (str.length < targetLength) {\n        str = '0' + str;\n    }\n    return str;\n}\nvar SECOND = 1000;\nvar MINUTE = 60 * SECOND;\nvar HOUR = 60 * MINUTE;\nvar DAY = 24 * HOUR;\nfunction parseTimeData(time) {\n    var days = Math.floor(time / DAY);\n    var hours = Math.floor((time % DAY) / HOUR);\n    var minutes = Math.floor((time % HOUR) / MINUTE);\n    var seconds = Math.floor((time % MINUTE) / SECOND);\n    var milliseconds = Math.floor(time % SECOND);\n    return {\n        days: days,\n        hours: hours,\n        minutes: minutes,\n        seconds: seconds,\n        milliseconds: milliseconds,\n    };\n}\nexports.parseTimeData = parseTimeData;\nfunction parseFormat(format, timeData) {\n    var days = timeData.days;\n    var hours = timeData.hours, minutes = timeData.minutes, seconds = timeData.seconds, milliseconds = timeData.milliseconds;\n    if (format.indexOf('DD') === -1) {\n        hours += days * 24;\n    }\n    else {\n        format = format.replace('DD', padZero(days));\n    }\n    if (format.indexOf('HH') === -1) {\n        minutes += hours * 60;\n    }\n    else {\n        format = format.replace('HH', padZero(hours));\n    }\n    if (format.indexOf('mm') === -1) {\n        seconds += minutes * 60;\n    }\n    else {\n        format = format.replace('mm', padZero(minutes));\n    }\n    if (format.indexOf('ss') === -1) {\n        milliseconds += seconds * 1000;\n    }\n    else {\n        format = format.replace('ss', padZero(seconds));\n    }\n    return format.replace('SSS', padZero(milliseconds, 3));\n}\nexports.parseFormat = parseFormat;\nfunction isSameSecond(time1, time2) {\n    return Math.floor(time1 / 1000) === Math.floor(time2 / 1000);\n}\nexports.isSameSecond = isSameSecond;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/datetime-picker/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/datetime-picker/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar validator_1 = require(\"../common/validator\");\nvar shared_1 = require(\"../picker/shared\");\nvar currentYear = new Date().getFullYear();\nfunction isValidDate(date) {\n    return (0, validator_1.isDef)(date) && !isNaN(new Date(date).getTime());\n}\nfunction range(num, min, max) {\n    return Math.min(Math.max(num, min), max);\n}\nfunction padZero(val) {\n    return \"00\".concat(val).slice(-2);\n}\nfunction times(n, iteratee) {\n    var index = -1;\n    var result = Array(n < 0 ? 0 : n);\n    while (++index < n) {\n        result[index] = iteratee(index);\n    }\n    return result;\n}\nfunction getTrueValue(formattedValue) {\n    if (formattedValue === undefined) {\n        formattedValue = '1';\n    }\n    while (isNaN(parseInt(formattedValue, 10))) {\n        formattedValue = formattedValue.slice(1);\n    }\n    return parseInt(formattedValue, 10);\n}\nfunction getMonthEndDay(year, month) {\n    return 32 - new Date(year, month - 1, 32).getDate();\n}\nvar defaultFormatter = function (type, value) { return value; };\n(0, component_1.VantComponent)({\n    classes: ['active-class', 'toolbar-class', 'column-class'],\n    props: __assign(__assign({}, shared_1.pickerProps), { value: {\n            type: null,\n            observer: 'updateValue',\n        }, filter: null, type: {\n            type: String,\n            value: 'datetime',\n            observer: 'updateValue',\n        }, showToolbar: {\n            type: Boolean,\n            value: true,\n        }, formatter: {\n            type: null,\n            value: defaultFormatter,\n        }, minDate: {\n            type: Number,\n            value: new Date(currentYear - 10, 0, 1).getTime(),\n            observer: 'updateValue',\n        }, maxDate: {\n            type: Number,\n            value: new Date(currentYear + 10, 11, 31).getTime(),\n            observer: 'updateValue',\n        }, minHour: {\n            type: Number,\n            value: 0,\n            observer: 'updateValue',\n        }, maxHour: {\n            type: Number,\n            value: 23,\n            observer: 'updateValue',\n        }, minMinute: {\n            type: Number,\n            value: 0,\n            observer: 'updateValue',\n        }, maxMinute: {\n            type: Number,\n            value: 59,\n            observer: 'updateValue',\n        } }),\n    data: {\n        innerValue: Date.now(),\n        columns: [],\n    },\n    methods: {\n        updateValue: function () {\n            var _this = this;\n            var data = this.data;\n            var val = this.correctValue(data.value);\n            var isEqual = val === data.innerValue;\n            this.updateColumnValue(val).then(function () {\n                if (!isEqual) {\n                    _this.$emit('input', val);\n                }\n            });\n        },\n        getPicker: function () {\n            if (this.picker == null) {\n                this.picker = this.selectComponent('.van-datetime-picker');\n                var picker_1 = this.picker;\n                var setColumnValues_1 = picker_1.setColumnValues;\n                picker_1.setColumnValues = function () {\n                    var args = [];\n                    for (var _i = 0; _i < arguments.length; _i++) {\n                        args[_i] = arguments[_i];\n                    }\n                    return setColumnValues_1.apply(picker_1, __spreadArray(__spreadArray([], args, true), [false], false));\n                };\n            }\n            return this.picker;\n        },\n        updateColumns: function () {\n            var _a = this.data.formatter, formatter = _a === void 0 ? defaultFormatter : _a;\n            var results = this.getOriginColumns().map(function (column) { return ({\n                values: column.values.map(function (value) { return formatter(column.type, value); }),\n            }); });\n            return this.set({ columns: results });\n        },\n        getOriginColumns: function () {\n            var filter = this.data.filter;\n            var results = this.getRanges().map(function (_a) {\n                var type = _a.type, range = _a.range;\n                var values = times(range[1] - range[0] + 1, function (index) {\n                    var value = range[0] + index;\n                    return type === 'year' ? \"\".concat(value) : padZero(value);\n                });\n                if (filter) {\n                    values = filter(type, values);\n                }\n                return { type: type, values: values };\n            });\n            return results;\n        },\n        getRanges: function () {\n            var data = this.data;\n            if (data.type === 'time') {\n                return [\n                    {\n                        type: 'hour',\n                        range: [data.minHour, data.maxHour],\n                    },\n                    {\n                        type: 'minute',\n                        range: [data.minMinute, data.maxMinute],\n                    },\n                ];\n            }\n            var _a = this.getBoundary('max', data.innerValue), maxYear = _a.maxYear, maxDate = _a.maxDate, maxMonth = _a.maxMonth, maxHour = _a.maxHour, maxMinute = _a.maxMinute;\n            var _b = this.getBoundary('min', data.innerValue), minYear = _b.minYear, minDate = _b.minDate, minMonth = _b.minMonth, minHour = _b.minHour, minMinute = _b.minMinute;\n            var result = [\n                {\n                    type: 'year',\n                    range: [minYear, maxYear],\n                },\n                {\n                    type: 'month',\n                    range: [minMonth, maxMonth],\n                },\n                {\n                    type: 'day',\n                    range: [minDate, maxDate],\n                },\n                {\n                    type: 'hour',\n                    range: [minHour, maxHour],\n                },\n                {\n                    type: 'minute',\n                    range: [minMinute, maxMinute],\n                },\n            ];\n            if (data.type === 'date')\n                result.splice(3, 2);\n            if (data.type === 'year-month')\n                result.splice(2, 3);\n            return result;\n        },\n        correctValue: function (value) {\n            var data = this.data;\n            // validate value\n            var isDateType = data.type !== 'time';\n            if (isDateType && !isValidDate(value)) {\n                value = data.minDate;\n            }\n            else if (!isDateType && !value) {\n                var minHour = data.minHour;\n                value = \"\".concat(padZero(minHour), \":00\");\n            }\n            // time type\n            if (!isDateType) {\n                var _a = value.split(':'), hour = _a[0], minute = _a[1];\n                hour = padZero(range(hour, data.minHour, data.maxHour));\n                minute = padZero(range(minute, data.minMinute, data.maxMinute));\n                return \"\".concat(hour, \":\").concat(minute);\n            }\n            // date type\n            value = Math.max(value, data.minDate);\n            value = Math.min(value, data.maxDate);\n            return value;\n        },\n        getBoundary: function (type, innerValue) {\n            var _a;\n            var value = new Date(innerValue);\n            var boundary = new Date(this.data[\"\".concat(type, \"Date\")]);\n            var year = boundary.getFullYear();\n            var month = 1;\n            var date = 1;\n            var hour = 0;\n            var minute = 0;\n            if (type === 'max') {\n                month = 12;\n                date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);\n                hour = 23;\n                minute = 59;\n            }\n            if (value.getFullYear() === year) {\n                month = boundary.getMonth() + 1;\n                if (value.getMonth() + 1 === month) {\n                    date = boundary.getDate();\n                    if (value.getDate() === date) {\n                        hour = boundary.getHours();\n                        if (value.getHours() === hour) {\n                            minute = boundary.getMinutes();\n                        }\n                    }\n                }\n            }\n            return _a = {},\n                _a[\"\".concat(type, \"Year\")] = year,\n                _a[\"\".concat(type, \"Month\")] = month,\n                _a[\"\".concat(type, \"Date\")] = date,\n                _a[\"\".concat(type, \"Hour\")] = hour,\n                _a[\"\".concat(type, \"Minute\")] = minute,\n                _a;\n        },\n        onCancel: function () {\n            this.$emit('cancel');\n        },\n        onConfirm: function () {\n            this.$emit('confirm', this.data.innerValue);\n        },\n        onChange: function () {\n            var _this = this;\n            var data = this.data;\n            var value;\n            var picker = this.getPicker();\n            var originColumns = this.getOriginColumns();\n            if (data.type === 'time') {\n                var indexes = picker.getIndexes();\n                value = \"\".concat(+originColumns[0].values[indexes[0]], \":\").concat(+originColumns[1]\n                    .values[indexes[1]]);\n            }\n            else {\n                var indexes = picker.getIndexes();\n                var values = indexes.map(function (value, index) { return originColumns[index].values[value]; });\n                var year = getTrueValue(values[0]);\n                var month = getTrueValue(values[1]);\n                var maxDate = getMonthEndDay(year, month);\n                var date = getTrueValue(values[2]);\n                if (data.type === 'year-month') {\n                    date = 1;\n                }\n                date = date > maxDate ? maxDate : date;\n                var hour = 0;\n                var minute = 0;\n                if (data.type === 'datetime') {\n                    hour = getTrueValue(values[3]);\n                    minute = getTrueValue(values[4]);\n                }\n                value = new Date(year, month - 1, date, hour, minute);\n            }\n            value = this.correctValue(value);\n            this.updateColumnValue(value).then(function () {\n                _this.$emit('input', value);\n                _this.$emit('change', picker);\n            });\n        },\n        updateColumnValue: function (value) {\n            var _this = this;\n            var values = [];\n            var type = this.data.type;\n            var formatter = this.data.formatter || defaultFormatter;\n            var picker = this.getPicker();\n            if (type === 'time') {\n                var pair = value.split(':');\n                values = [formatter('hour', pair[0]), formatter('minute', pair[1])];\n            }\n            else {\n                var date = new Date(value);\n                values = [\n                    formatter('year', \"\".concat(date.getFullYear())),\n                    formatter('month', padZero(date.getMonth() + 1)),\n                ];\n                if (type === 'date') {\n                    values.push(formatter('day', padZero(date.getDate())));\n                }\n                if (type === 'datetime') {\n                    values.push(formatter('day', padZero(date.getDate())), formatter('hour', padZero(date.getHours())), formatter('minute', padZero(date.getMinutes())));\n                }\n            }\n            return this.set({ innerValue: value })\n                .then(function () { return _this.updateColumns(); })\n                .then(function () { return picker.setValues(values); });\n        },\n    },\n    created: function () {\n        var _this = this;\n        var innerValue = this.correctValue(this.data.value);\n        this.updateColumnValue(innerValue).then(function () {\n            _this.$emit('input', innerValue);\n        });\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/datetime-picker/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-picker\": \"../picker/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/datetime-picker/index.wxml",
    "content": "<van-picker\n  class=\"van-datetime-picker\"\n  active-class=\"active-class\"\n  toolbar-class=\"toolbar-class\"\n  column-class=\"column-class\"\n  title=\"{{ title }}\"\n  columns=\"{{ columns }}\"\n  item-height=\"{{ itemHeight }}\"\n  show-toolbar=\"{{ showToolbar }}\"\n  visible-item-count=\"{{ visibleItemCount }}\"\n  confirm-button-text=\"{{ confirmButtonText }}\"\n  cancel-button-text=\"{{ cancelButtonText }}\"\n  bind:change=\"onChange\"\n  bind:confirm=\"onConfirm\"\n  bind:cancel=\"onCancel\"\n/>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/datetime-picker/index.wxss",
    "content": "@import '../common/index.wxss';"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/definitions/index.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\ninterface VantComponentInstance {\n    parent: WechatMiniprogram.Component.TrivialInstance;\n    children: WechatMiniprogram.Component.TrivialInstance[];\n    index: number;\n    $emit: (name: string, detail?: unknown, options?: WechatMiniprogram.Component.TriggerEventOption) => void;\n    setView: (value: Record<string, any>, callback?: () => void) => void;\n}\nexport type VantComponentOptions<Data extends WechatMiniprogram.Component.DataOption, Props extends WechatMiniprogram.Component.PropertyOption, Methods extends WechatMiniprogram.Component.MethodOption> = {\n    data?: Data;\n    field?: boolean;\n    classes?: string[];\n    mixins?: string[];\n    props?: Props;\n    relation?: {\n        relations: Record<string, WechatMiniprogram.Component.RelationOption>;\n        mixin: string;\n    };\n    watch?: Record<string, (...args: any[]) => any>;\n    methods?: Methods;\n    beforeCreate?: () => void;\n    created?: () => void;\n    mounted?: () => void;\n    destroyed?: () => void;\n} & ThisType<VantComponentInstance & WechatMiniprogram.Component.Instance<Data & {\n    name: string;\n    value: any;\n} & Record<string, any>, Props, Methods> & Record<string, any>>;\nexport {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/definitions/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dialog/dialog.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\nexport type Action = 'confirm' | 'cancel' | 'overlay';\ntype DialogContext = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;\ninterface DialogOptions {\n    lang?: string;\n    show?: boolean;\n    title?: string;\n    width?: string | number | null;\n    zIndex?: number;\n    theme?: string;\n    context?: (() => DialogContext) | DialogContext;\n    message?: string;\n    overlay?: boolean;\n    selector?: string;\n    ariaLabel?: string;\n    /**\n     * @deprecated use custom-class instead\n     */\n    className?: string;\n    customStyle?: string;\n    transition?: string;\n    /**\n     * @deprecated use beforeClose instead\n     */\n    asyncClose?: boolean;\n    beforeClose?: null | ((action: Action) => Promise<void | boolean> | void);\n    businessId?: number;\n    sessionFrom?: string;\n    overlayStyle?: string;\n    appParameter?: string;\n    messageAlign?: string;\n    sendMessageImg?: string;\n    showMessageCard?: boolean;\n    sendMessagePath?: string;\n    sendMessageTitle?: string;\n    confirmButtonText?: string;\n    cancelButtonText?: string;\n    showConfirmButton?: boolean;\n    showCancelButton?: boolean;\n    closeOnClickOverlay?: boolean;\n    confirmButtonOpenType?: string;\n}\ndeclare const Dialog: {\n    (options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;\n    alert(options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;\n    confirm(options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;\n    close(): void;\n    stopLoading(): void;\n    currentOptions: DialogOptions;\n    defaultOptions: DialogOptions;\n    setDefaultOptions(options: DialogOptions): void;\n    resetDefaultOptions(): void;\n};\nexport default Dialog;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dialog/dialog.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar queue = [];\nvar defaultOptions = {\n    show: false,\n    title: '',\n    width: null,\n    theme: 'default',\n    message: '',\n    zIndex: 100,\n    overlay: true,\n    selector: '#van-dialog',\n    className: '',\n    asyncClose: false,\n    beforeClose: null,\n    transition: 'scale',\n    customStyle: '',\n    messageAlign: '',\n    overlayStyle: '',\n    confirmButtonText: '确认',\n    cancelButtonText: '取消',\n    showConfirmButton: true,\n    showCancelButton: false,\n    closeOnClickOverlay: false,\n    confirmButtonOpenType: '',\n};\nvar currentOptions = __assign({}, defaultOptions);\nfunction getContext() {\n    var pages = getCurrentPages();\n    return pages[pages.length - 1];\n}\nvar Dialog = function (options) {\n    options = __assign(__assign({}, currentOptions), options);\n    return new Promise(function (resolve, reject) {\n        var context = (typeof options.context === 'function'\n            ? options.context()\n            : options.context) || getContext();\n        var dialog = context.selectComponent(options.selector);\n        delete options.context;\n        delete options.selector;\n        if (dialog) {\n            dialog.setData(__assign({ callback: function (action, instance) {\n                    action === 'confirm' ? resolve(instance) : reject(instance);\n                } }, options));\n            wx.nextTick(function () {\n                dialog.setData({ show: true });\n            });\n            queue.push(dialog);\n        }\n        else {\n            console.warn('未找到 van-dialog 节点，请确认 selector 及 context 是否正确');\n        }\n    });\n};\nDialog.alert = function (options) { return Dialog(options); };\nDialog.confirm = function (options) {\n    return Dialog(__assign({ showCancelButton: true }, options));\n};\nDialog.close = function () {\n    queue.forEach(function (dialog) {\n        dialog.close();\n    });\n    queue = [];\n};\nDialog.stopLoading = function () {\n    queue.forEach(function (dialog) {\n        dialog.stopLoading();\n    });\n};\nDialog.currentOptions = currentOptions;\nDialog.defaultOptions = defaultOptions;\nDialog.setDefaultOptions = function (options) {\n    currentOptions = __assign(__assign({}, currentOptions), options);\n    Dialog.currentOptions = currentOptions;\n};\nDialog.resetDefaultOptions = function () {\n    currentOptions = __assign({}, defaultOptions);\n    Dialog.currentOptions = currentOptions;\n};\nDialog.resetDefaultOptions();\nexports.default = Dialog;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dialog/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dialog/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar button_1 = require(\"../mixins/button\");\nvar color_1 = require(\"../common/color\");\nvar utils_1 = require(\"../common/utils\");\n(0, component_1.VantComponent)({\n    mixins: [button_1.button],\n    classes: ['cancle-button-class', 'confirm-button-class'],\n    props: {\n        show: {\n            type: Boolean,\n            observer: function (show) {\n                !show && this.stopLoading();\n            },\n        },\n        title: String,\n        message: String,\n        theme: {\n            type: String,\n            value: 'default',\n        },\n        confirmButtonId: String,\n        className: String,\n        customStyle: String,\n        asyncClose: Boolean,\n        messageAlign: String,\n        beforeClose: null,\n        overlayStyle: String,\n        useSlot: Boolean,\n        useTitleSlot: Boolean,\n        useConfirmButtonSlot: Boolean,\n        useCancelButtonSlot: Boolean,\n        showCancelButton: Boolean,\n        closeOnClickOverlay: Boolean,\n        confirmButtonOpenType: String,\n        width: null,\n        zIndex: {\n            type: Number,\n            value: 2000,\n        },\n        confirmButtonText: {\n            type: String,\n            value: '确认',\n        },\n        cancelButtonText: {\n            type: String,\n            value: '取消',\n        },\n        confirmButtonColor: {\n            type: String,\n            value: color_1.RED,\n        },\n        cancelButtonColor: {\n            type: String,\n            value: color_1.GRAY,\n        },\n        showConfirmButton: {\n            type: Boolean,\n            value: true,\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n        },\n        transition: {\n            type: String,\n            value: 'scale',\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    data: {\n        loading: {\n            confirm: false,\n            cancel: false,\n        },\n        callback: (function () { }),\n    },\n    methods: {\n        onConfirm: function () {\n            this.handleAction('confirm');\n        },\n        onCancel: function () {\n            this.handleAction('cancel');\n        },\n        onClickOverlay: function () {\n            this.close('overlay');\n        },\n        close: function (action) {\n            this.setData({ show: false });\n            this.closeAction = action;\n        },\n        onAfterLeave: function () {\n            var action = this.closeAction;\n            this.$emit('close', action);\n            var callback = this.data.callback;\n            if (callback) {\n                callback(action, this);\n            }\n        },\n        stopLoading: function () {\n            this.setData({\n                loading: {\n                    confirm: false,\n                    cancel: false,\n                },\n            });\n        },\n        handleAction: function (action) {\n            var _a;\n            var _this = this;\n            this.$emit(action, { dialog: this });\n            var _b = this.data, asyncClose = _b.asyncClose, beforeClose = _b.beforeClose;\n            if (!asyncClose && !beforeClose) {\n                this.close(action);\n                return;\n            }\n            this.setData((_a = {},\n                _a[\"loading.\".concat(action)] = true,\n                _a));\n            if (beforeClose) {\n                (0, utils_1.toPromise)(beforeClose(action)).then(function (value) {\n                    if (value) {\n                        _this.close(action);\n                    }\n                    else {\n                        _this.stopLoading();\n                    }\n                });\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dialog/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-popup\": \"../popup/index\",\n    \"van-button\": \"../button/index\",\n    \"van-goods-action\": \"../goods-action/index\",\n    \"van-goods-action-button\": \"../goods-action-button/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dialog/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<van-popup\n  show=\"{{ show }}\"\n  z-index=\"{{ zIndex }}\"\n  overlay=\"{{ overlay }}\"\n  transition=\"{{ transition }}\"\n  custom-class=\"van-dialog van-dialog--{{ theme }}{{ className }} custom-class\"\n  custom-style=\"width: {{ utils.addUnit(width) }};{{ customStyle }}\"\n  overlay-style=\"{{ overlayStyle }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:close=\"onClickOverlay\"\n  bind:after-leave=\"onAfterLeave\"\n>\n  <view\n    wx:if=\"{{ title || useTitleSlot  }}\"\n    class=\"{{ utils.bem('dialog__header', { isolated: !(message || useSlot) }) }}\"\n  >\n    <slot wx:if=\"{{ useTitleSlot }}\" name=\"title\" />\n    <block wx:elif=\"{{ title }}\">{{ title }}</block>\n  </view>\n\n  <slot wx:if=\"{{ useSlot }}\" />\n  <view\n    wx:elif=\"{{ message }}\"\n    class=\"{{ utils.bem('dialog__message', [theme, messageAlign, { hasTitle: title }]) }}\"\n  >\n    <text class=\"van-dialog__message-text\">{{ message }}</text>\n  </view>\n\n  <van-goods-action wx:if=\"{{ theme === 'round-button' }}\" custom-class=\"van-dialog__footer--round-button\">\n    <van-goods-action-button\n      wx:if=\"{{ showCancelButton }}\"\n      size=\"large\"\n      loading=\"{{ loading.cancel }}\"\n      class=\"van-dialog__button van-hairline--right\"\n      custom-class=\"van-dialog__cancel cancle-button-class\"\n      custom-style=\"color: {{ cancelButtonColor }}\"\n      bind:click=\"onCancel\"\n    >\n      {{ cancelButtonText }}\n    </van-goods-action-button>\n    <van-goods-action-button\n      wx:if=\"{{ showConfirmButton }}\"\n      size=\"large\"\n      class=\"van-dialog__button\"\n      loading=\"{{ loading.confirm }}\"\n      custom-class=\"van-dialog__confirm confirm-button-class\"\n      custom-style=\"color: {{ confirmButtonColor }}\"\n      button-id=\"{{ confirmButtonId }}\"\n      open-type=\"{{ confirmButtonOpenType }}\"\n      lang=\"{{ lang }}\"\n      business-id=\"{{ businessId }}\"\n      session-from=\"{{ sessionFrom }}\"\n      send-message-title=\"{{ sendMessageTitle }}\"\n      send-message-path=\"{{ sendMessagePath }}\"\n      send-message-img=\"{{ sendMessageImg }}\"\n      show-message-card=\"{{ showMessageCard }}\"\n      app-parameter=\"{{ appParameter }}\"\n      bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n      bindgetRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n      bind:click=\"onConfirm\"\n      bindgetuserinfo=\"onGetUserInfo\"\n      bindcontact=\"onContact\"\n      bindgetphonenumber=\"onGetPhoneNumber\"\n      binderror=\"onError\"\n      bindlaunchapp=\"onLaunchApp\"\n      bindopensetting=\"onOpenSetting\"\n    >\n      {{ confirmButtonText }}\n    </van-goods-action-button>\n  </van-goods-action>\n\n  <view wx:elif=\"{{ showCancelButton || showConfirmButton }}\" class=\"van-hairline--top van-dialog__footer\">\n    <block wx:if=\"{{ showCancelButton }}\">\n      <slot wx:if=\"{{ useCancelButtonSlot }}\" name=\"cancel-button\" />\n\n      <van-button\n        wx:else\n        size=\"large\"\n        loading=\"{{ loading.cancel }}\"\n        class=\"van-dialog__button van-hairline--right\"\n        custom-class=\"van-dialog__cancel cancle-button-class\"\n        custom-style=\"color: {{ cancelButtonColor }}\"\n        bind:click=\"onCancel\"\n      >\n        {{ cancelButtonText }}\n      </van-button>\n    </block>\n\n    <block wx:if=\"{{ showConfirmButton }}\">\n      <slot wx:if=\"{{ useConfirmButtonSlot }}\" name=\"confirm-button\" />\n\n      <van-button\n        wx:else\n        size=\"large\"\n        class=\"van-dialog__button\"\n        loading=\"{{ loading.confirm }}\"\n        custom-class=\"van-dialog__confirm confirm-button-class\"\n        custom-style=\"color: {{ confirmButtonColor }}\"\n        button-id=\"{{ confirmButtonId }}\"\n        open-type=\"{{ confirmButtonOpenType }}\"\n        lang=\"{{ lang }}\"\n        business-id=\"{{ businessId }}\"\n        session-from=\"{{ sessionFrom }}\"\n        send-message-title=\"{{ sendMessageTitle }}\"\n        send-message-path=\"{{ sendMessagePath }}\"\n        send-message-img=\"{{ sendMessageImg }}\"\n        show-message-card=\"{{ showMessageCard }}\"\n        app-parameter=\"{{ appParameter }}\"\n        bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n        bindgetRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n        bind:click=\"onConfirm\"\n        bindgetuserinfo=\"onGetUserInfo\"\n        bindcontact=\"onContact\"\n        bindgetphonenumber=\"onGetPhoneNumber\"\n        binderror=\"onError\"\n        bindlaunchapp=\"onLaunchApp\"\n        bindopensetting=\"onOpenSetting\"\n      >\n        {{ confirmButtonText }}\n      </van-button>\n    </block>\n  </view>\n</van-popup>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dialog/index.wxss",
    "content": "@import '../common/index.wxss';.van-dialog{background-color:var(--dialog-background-color,#fff);border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,320px)}@media (max-width:321px){.van-dialog{width:var(--dialog-small-screen-width,90%)}}.van-dialog__header{font-weight:var(--dialog-header-font-weight,500);line-height:var(--dialog-header-line-height,24px);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.van-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.van-dialog__message{-webkit-overflow-scrolling:touch;font-size:var(--dialog-message-font-size,14px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.van-dialog__message-text{word-wrap:break-word}.van-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,#646566);padding-top:var(--dialog-has-title-message-padding-top,8px)}.van-dialog__message--round-button{color:#323233;padding-bottom:16px}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__message--justify{text-align:justify}.van-dialog__footer{display:flex}.van-dialog__footer--round-button{padding:8px 24px 16px!important;position:relative!important}.van-dialog__button{flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.van-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/divider/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/divider/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        dashed: Boolean,\n        hairline: Boolean,\n        contentPosition: String,\n        fontSize: String,\n        borderColor: String,\n        textColor: String,\n        customStyle: String,\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/divider/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {}\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/divider/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('divider', [{ dashed, hairline }, contentPosition]) }}\"\n  style=\"{{ computed.rootStyle({ borderColor, textColor, fontSize, customStyle }) }}\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/divider/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style([\n    {\n      'border-color': data.borderColor,\n      color: data.textColor,\n      'font-size': addUnit(data.fontSize),\n    },\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/divider/index.wxss",
    "content": "@import '../common/index.wxss';.van-divider{align-items:center;border:0 solid var(--divider-border-color,#ebedf0);color:var(--divider-text-color,#969799);display:flex;font-size:var(--divider-font-size,14px);line-height:var(--divider-line-height,24px);margin:var(--divider-margin,16px 0)}.van-divider:after,.van-divider:before{border-color:inherit;border-style:inherit;border-width:1px 0 0;box-sizing:border-box;display:block;flex:1;height:1px}.van-divider:before{content:\"\"}.van-divider--hairline:after,.van-divider--hairline:before{transform:scaleY(.5)}.van-divider--dashed{border-style:dashed}.van-divider--center:before,.van-divider--left:before,.van-divider--right:before{margin-right:var(--divider-content-padding,16px)}.van-divider--center:after,.van-divider--left:after,.van-divider--right:after{content:\"\";margin-left:var(--divider-content-padding,16px)}.van-divider--left:before{max-width:var(--divider-content-left-width,10%)}.van-divider--right:after{max-width:var(--divider-content-right-width,10%)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dropdown-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dropdown-item/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar relation_1 = require(\"../common/relation\");\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: ['item-title-class'],\n    field: true,\n    relation: (0, relation_1.useParent)('dropdown-menu', function () {\n        this.updateDataFromParent();\n    }),\n    props: {\n        value: {\n            type: null,\n            observer: 'rerender',\n        },\n        title: {\n            type: String,\n            observer: 'rerender',\n        },\n        disabled: Boolean,\n        titleClass: {\n            type: String,\n            observer: 'rerender',\n        },\n        options: {\n            type: Array,\n            value: [],\n            observer: 'rerender',\n        },\n        popupStyle: String,\n        useBeforeToggle: {\n            type: Boolean,\n            value: false,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    data: {\n        transition: true,\n        showPopup: false,\n        showWrapper: false,\n        displayTitle: '',\n        safeAreaTabBar: false,\n    },\n    methods: {\n        rerender: function () {\n            var _this = this;\n            wx.nextTick(function () {\n                var _a;\n                (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateItemListData();\n            });\n        },\n        updateDataFromParent: function () {\n            if (this.parent) {\n                var _a = this.parent.data, overlay = _a.overlay, duration = _a.duration, activeColor = _a.activeColor, closeOnClickOverlay = _a.closeOnClickOverlay, direction = _a.direction, safeAreaTabBar = _a.safeAreaTabBar;\n                this.setData({\n                    overlay: overlay,\n                    duration: duration,\n                    activeColor: activeColor,\n                    closeOnClickOverlay: closeOnClickOverlay,\n                    direction: direction,\n                    safeAreaTabBar: safeAreaTabBar,\n                });\n            }\n        },\n        onOpen: function () {\n            this.$emit('open');\n        },\n        onOpened: function () {\n            this.$emit('opened');\n        },\n        onClose: function () {\n            this.$emit('close');\n        },\n        onClosed: function () {\n            this.$emit('closed');\n            this.setData({ showWrapper: false });\n        },\n        onOptionTap: function (event) {\n            var option = event.currentTarget.dataset.option;\n            var value = option.value;\n            var shouldEmitChange = this.data.value !== value;\n            this.setData({ showPopup: false, value: value });\n            this.$emit('close');\n            this.rerender();\n            if (shouldEmitChange) {\n                this.$emit('change', value);\n            }\n        },\n        toggle: function (show, options) {\n            var _this = this;\n            if (options === void 0) { options = {}; }\n            var showPopup = this.data.showPopup;\n            if (typeof show !== 'boolean') {\n                show = !showPopup;\n            }\n            if (show === showPopup) {\n                return;\n            }\n            this.onBeforeToggle(show).then(function (status) {\n                var _a;\n                if (!status) {\n                    return;\n                }\n                _this.setData({\n                    transition: !options.immediate,\n                    showPopup: show,\n                });\n                if (show) {\n                    (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.getChildWrapperStyle().then(function (wrapperStyle) {\n                        _this.setData({ wrapperStyle: wrapperStyle, showWrapper: true });\n                        _this.rerender();\n                    });\n                }\n                else {\n                    _this.rerender();\n                }\n            });\n        },\n        onBeforeToggle: function (status) {\n            var _this = this;\n            var useBeforeToggle = this.data.useBeforeToggle;\n            if (!useBeforeToggle) {\n                return Promise.resolve(true);\n            }\n            return new Promise(function (resolve) {\n                _this.$emit('before-toggle', {\n                    status: status,\n                    callback: function (value) { return resolve(value); },\n                });\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dropdown-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-popup\": \"../popup/index\",\n    \"van-cell\": \"../cell/index\",\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dropdown-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ showWrapper }}\"\n  class=\"{{ utils.bem('dropdown-item', direction) }} custom-class\"\n  style=\"{{ wrapperStyle }}\"\n>\n  <van-popup\n    show=\"{{ showPopup }}\"\n    custom-style=\"position: absolute;{{ popupStyle }}\"\n    overlay-style=\"position: absolute;\"\n    overlay=\"{{ overlay }}\"\n    position=\"{{ direction === 'down' ? 'top' : 'bottom' }}\"\n    duration=\"{{ transition ? duration : 0 }}\"\n    safe-area-tab-bar=\"{{ safeAreaTabBar }}\"\n    close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n    rootPortal=\"{{ rootPortal }}\"\n    bind:enter=\"onOpen\"\n    bind:leave=\"onClose\"\n    bind:close=\"toggle\"\n    bind:after-enter=\"onOpened\"\n    bind:after-leave=\"onClosed\"\n  >\n    <van-cell\n      wx:for=\"{{ options }}\"\n      wx:key=\"value\"\n      data-option=\"{{ item }}\"\n      class=\"{{ utils.bem('dropdown-item__option', { active: item.value === value } ) }}\"\n      clickable\n      icon=\"{{ item.icon }}\"\n      bind:tap=\"onOptionTap\"\n    >\n      <view\n        slot=\"title\"\n        class=\"van-dropdown-item__title item-title-class\"\n        style=\"{{ item.value === value  ? 'color:' + activeColor : '' }}\"\n      >\n        {{ item.text }}\n      </view>\n      <van-icon\n        wx:if=\"{{ item.value === value }}\"\n        name=\"success\"\n        class=\"van-dropdown-item__icon\"\n        color=\"{{ activeColor }}\"\n      />\n    </van-cell>\n\n    <slot />\n  </van-popup>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dropdown-item/index.wxss",
    "content": "@import '../common/index.wxss';.van-dropdown-item{left:0;overflow:hidden;position:fixed;right:0}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:var(--dropdown-menu-option-active-color,#ee0a24)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dropdown-item/shared.d.ts",
    "content": "export interface Option {\n    text: string;\n    value: string | number;\n    icon: string;\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dropdown-item/shared.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dropdown-menu/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dropdown-menu/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\nvar utils_1 = require(\"../common/utils\");\nvar ARRAY = [];\n(0, component_1.VantComponent)({\n    field: true,\n    classes: ['title-class'],\n    relation: (0, relation_1.useChildren)('dropdown-item', function () {\n        this.updateItemListData();\n    }),\n    props: {\n        activeColor: {\n            type: String,\n            observer: 'updateChildrenData',\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n            observer: 'updateChildrenData',\n        },\n        zIndex: {\n            type: Number,\n            value: 10,\n        },\n        duration: {\n            type: Number,\n            value: 200,\n            observer: 'updateChildrenData',\n        },\n        direction: {\n            type: String,\n            value: 'down',\n            observer: 'updateChildrenData',\n        },\n        safeAreaTabBar: {\n            type: Boolean,\n            value: false,\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n            observer: 'updateChildrenData',\n        },\n        closeOnClickOutside: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        itemListData: [],\n    },\n    beforeCreate: function () {\n        var windowHeight = (0, utils_1.getSystemInfoSync)().windowHeight;\n        this.windowHeight = windowHeight;\n        ARRAY.push(this);\n    },\n    destroyed: function () {\n        var _this = this;\n        ARRAY = ARRAY.filter(function (item) { return item !== _this; });\n    },\n    methods: {\n        updateItemListData: function () {\n            this.setData({\n                itemListData: this.children.map(function (child) { return child.data; }),\n            });\n        },\n        updateChildrenData: function () {\n            this.children.forEach(function (child) {\n                child.updateDataFromParent();\n            });\n        },\n        toggleItem: function (active) {\n            this.children.forEach(function (item, index) {\n                var showPopup = item.data.showPopup;\n                if (index === active) {\n                    item.toggle();\n                }\n                else if (showPopup) {\n                    item.toggle(false, { immediate: true });\n                }\n            });\n        },\n        close: function () {\n            this.children.forEach(function (child) {\n                child.toggle(false, { immediate: true });\n            });\n        },\n        getChildWrapperStyle: function () {\n            var _this = this;\n            var _a = this.data, zIndex = _a.zIndex, direction = _a.direction;\n            return (0, utils_1.getRect)(this, '.van-dropdown-menu').then(function (rect) {\n                var _a = rect.top, top = _a === void 0 ? 0 : _a, _b = rect.bottom, bottom = _b === void 0 ? 0 : _b;\n                var offset = direction === 'down' ? bottom : _this.windowHeight - top;\n                var wrapperStyle = \"z-index: \".concat(zIndex, \";\");\n                if (direction === 'down') {\n                    wrapperStyle += \"top: \".concat((0, utils_1.addUnit)(offset), \";\");\n                }\n                else {\n                    wrapperStyle += \"bottom: \".concat((0, utils_1.addUnit)(offset), \";\");\n                }\n                return wrapperStyle;\n            });\n        },\n        onTitleTap: function (event) {\n            var _this = this;\n            var index = event.currentTarget.dataset.index;\n            var child = this.children[index];\n            if (!child.data.disabled) {\n                ARRAY.forEach(function (menuItem) {\n                    if (menuItem &&\n                        menuItem.data.closeOnClickOutside &&\n                        menuItem !== _this) {\n                        menuItem.close();\n                    }\n                });\n                this.toggleItem(index);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dropdown-menu/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dropdown-menu/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-dropdown-menu van-dropdown-menu--top-bottom custom-class\">\n  <view\n    wx:for=\"{{ itemListData }}\"\n    wx:key=\"index\"\n    data-index=\"{{ index }}\"\n    class=\"{{ utils.bem('dropdown-menu__item', { disabled: item.disabled }) }}\"\n    bind:tap=\"onTitleTap\"\n  >\n    <view\n      class=\"{{ item.titleClass }} {{ utils.bem('dropdown-menu__title', { active: item.showPopup, down: item.showPopup === (direction === 'down') }) }} title-class\"\n      style=\"{{ item.showPopup ? 'color:' + activeColor : '' }}\"\n    >\n      <view class=\"van-ellipsis\">\n        {{ computed.displayTitle(item) }}\n      </view>\n    </view>\n  </view>\n\n  <slot />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dropdown-menu/index.wxs",
    "content": "/* eslint-disable */\nfunction displayTitle(item) {\n  if (item.title) {\n    return item.title;\n  }\n\n  var match = item.options.filter(function(option) {\n    return option.value === item.value;\n  });\n  var displayTitle = match.length ? match[0].text : '';\n  return displayTitle;\n}\n\nmodule.exports = {\n  displayTitle: displayTitle\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/dropdown-menu/index.wxss",
    "content": "@import '../common/index.wxss';.van-dropdown-menu{background-color:var(--dropdown-menu-background-color,#fff);box-shadow:var(--dropdown-menu-box-shadow,0 2px 12px hsla(210,1%,40%,.12));display:flex;height:var(--dropdown-menu-height,50px);-webkit-user-select:none;user-select:none}.van-dropdown-menu__item{align-items:center;display:flex;flex:1;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{box-sizing:border-box;color:var(--dropdown-menu-title-text-color,#323233);font-size:var(--dropdown-menu-title-font-size,15px);line-height:var(--dropdown-menu-title-line-height,18px);max-width:100%;padding:var(--dropdown-menu-title-padding,0 24px 0 8px);position:relative}.van-dropdown-menu__title:after{border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;content:\"\";margin-top:-5px;opacity:.8;position:absolute;right:11px;top:50%;transform:rotate(-45deg)}.van-dropdown-menu__title--active{color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/empty/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/empty/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        description: String,\n        image: {\n            type: String,\n            value: 'default',\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/empty/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {}\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/empty/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class van-empty\">\n  <view class=\"van-empty__image\">\n    <slot name=\"image\"></slot>\n  </view>\n  <view class=\"van-empty__image\">\n    <image wx:if=\"{{ image }}\" class=\"van-empty__image__img\" src=\"{{ computed.imageUrl(image) }}\" />\n  </view>\n\n  <view class=\"van-empty__description\">\n    <slot name=\"description\"></slot>\n  </view>\n  <view class=\"van-empty__description\">\n    {{ description }}\n  </view>\n\n  <view class=\"van-empty__bottom\">\n    <slot></slot>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/empty/index.wxs",
    "content": "/* eslint-disable */\nvar PRESETS = ['error', 'search', 'default', 'network'];\n\nfunction imageUrl(image) {\n  if (PRESETS.indexOf(image) !== -1) {\n    return 'https://img.yzcdn.cn/vant/empty-image-' + image + '.png';\n  }\n\n  return image;\n}\n\nmodule.exports = {\n  imageUrl: imageUrl,\n};\n\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/empty/index.wxss",
    "content": "@import '../common/index.wxss';.van-empty{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;padding:32px 0}.van-empty__image{height:160px;width:160px}.van-empty__image:empty{display:none}.van-empty__image__img{height:100%;width:100%}.van-empty__image:not(:empty)+.van-empty__image{display:none}.van-empty__description{color:#969799;font-size:14px;line-height:20px;margin-top:16px;padding:0 60px}.van-empty__description:empty,.van-empty__description:not(:empty)+.van-empty__description{display:none}.van-empty__bottom{margin-top:24px}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/field/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/field/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = require(\"../common/utils\");\nvar component_1 = require(\"../common/component\");\nvar props_1 = require(\"./props\");\n(0, component_1.VantComponent)({\n    field: true,\n    classes: ['input-class', 'right-icon-class', 'label-class'],\n    props: __assign(__assign(__assign(__assign({}, props_1.commonProps), props_1.inputProps), props_1.textareaProps), { size: String, icon: String, label: String, error: Boolean, center: Boolean, isLink: Boolean, leftIcon: String, rightIcon: String, autosize: null, required: Boolean, iconClass: String, clickable: Boolean, inputAlign: String, customStyle: String, errorMessage: String, arrowDirection: String, showWordLimit: Boolean, errorMessageAlign: String, readonly: {\n            type: Boolean,\n            observer: 'setShowClear',\n        }, clearable: {\n            type: Boolean,\n            observer: 'setShowClear',\n        }, clearTrigger: {\n            type: String,\n            value: 'focus',\n        }, border: {\n            type: Boolean,\n            value: true,\n        }, titleWidth: {\n            type: String,\n            value: '6.2em',\n        }, clearIcon: {\n            type: String,\n            value: 'clear',\n        }, extraEventParams: {\n            type: Boolean,\n            value: false,\n        } }),\n    data: {\n        focused: false,\n        innerValue: '',\n        showClear: false,\n    },\n    watch: {\n        value: function (value) {\n            if (value !== this.value) {\n                this.setData({ innerValue: value });\n                this.value = value;\n                this.setShowClear();\n            }\n        },\n        clearTrigger: function () {\n            this.setShowClear();\n        },\n    },\n    created: function () {\n        this.value = this.data.value;\n        this.setData({ innerValue: this.value });\n    },\n    methods: {\n        formatValue: function (value) {\n            var maxlength = this.data.maxlength;\n            if (maxlength !== -1 && value.length > maxlength) {\n                return value.slice(0, maxlength);\n            }\n            return value;\n        },\n        onInput: function (event) {\n            var _a = (event.detail || {}).value, value = _a === void 0 ? '' : _a;\n            var formatValue = this.formatValue(value);\n            this.value = formatValue;\n            this.setShowClear();\n            return this.emitChange(__assign(__assign({}, event.detail), { value: formatValue }));\n        },\n        onFocus: function (event) {\n            this.focused = true;\n            this.setShowClear();\n            this.$emit('focus', event.detail);\n        },\n        onBlur: function (event) {\n            this.focused = false;\n            this.setShowClear();\n            this.$emit('blur', event.detail);\n        },\n        onClickIcon: function () {\n            this.$emit('click-icon');\n        },\n        onClickInput: function (event) {\n            this.$emit('click-input', event.detail);\n        },\n        onClear: function () {\n            var _this = this;\n            this.setData({ innerValue: '' });\n            this.value = '';\n            this.setShowClear();\n            (0, utils_1.nextTick)(function () {\n                _this.emitChange({ value: '' });\n                _this.$emit('clear', '');\n            });\n        },\n        onConfirm: function (event) {\n            var _a = (event.detail || {}).value, value = _a === void 0 ? '' : _a;\n            this.value = value;\n            this.setShowClear();\n            this.$emit('confirm', value);\n        },\n        setValue: function (value) {\n            this.value = value;\n            this.setShowClear();\n            if (value === '') {\n                this.setData({ innerValue: '' });\n            }\n            this.emitChange({ value: value });\n        },\n        onLineChange: function (event) {\n            this.$emit('linechange', event.detail);\n        },\n        onKeyboardHeightChange: function (event) {\n            this.$emit('keyboardheightchange', event.detail);\n        },\n        onBindNicknameReview: function (event) {\n            this.$emit('nicknamereview', event.detail);\n        },\n        emitChange: function (detail) {\n            var extraEventParams = this.data.extraEventParams;\n            this.setData({ value: detail.value });\n            var result;\n            var data = extraEventParams\n                ? __assign(__assign({}, detail), { callback: function (data) {\n                        result = data;\n                    } }) : detail.value;\n            this.$emit('input', data);\n            this.$emit('change', data);\n            return result;\n        },\n        setShowClear: function () {\n            var _a = this.data, clearable = _a.clearable, readonly = _a.readonly, clearTrigger = _a.clearTrigger;\n            var _b = this, focused = _b.focused, value = _b.value;\n            var showClear = false;\n            if (clearable && !readonly) {\n                var hasValue = !!value;\n                var trigger = clearTrigger === 'always' || (clearTrigger === 'focus' && focused);\n                showClear = hasValue && trigger;\n            }\n            this.setView({ showClear: showClear });\n        },\n        noop: function () { },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/field/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../cell/index\",\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/field/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-cell\n  size=\"{{ size }}\"\n  icon=\"{{ leftIcon }}\"\n  center=\"{{ center }}\"\n  border=\"{{ border }}\"\n  is-link=\"{{ isLink }}\"\n  required=\"{{ required }}\"\n  clickable=\"{{ clickable }}\"\n  title-width=\"{{ titleWidth }}\"\n  title-style=\"margin-right: 12px;\"\n  custom-style=\"{{ customStyle }}\"\n  arrow-direction=\"{{ arrowDirection }}\"\n  custom-class=\"custom-class van-field\"\n>\n  <slot name=\"left-icon\" slot=\"icon\" />\n  <label for=\"{{ name }}\" wx:if=\"{{ label }}\" class=\"label-class {{ utils.bem('field__label', { disabled }) }}\" slot=\"title\">\n    {{ label }}\n  </label>\n  <slot wx:else name=\"label\" slot=\"title\" />\n  <view class=\"{{ utils.bem('field__body', [type]) }}\">\n    <view class=\"{{ utils.bem('field__control', [inputAlign, 'custom']) }}\" bindtap=\"onClickInput\">\n      <slot name=\"input\" />\n    </view>\n    <include wx:if=\"{{ type === 'textarea' }}\" src=\"./textarea.wxml\" />\n    <include wx:else src=\"./input.wxml\" />\n\n    <van-icon\n      wx:if=\"{{ showClear }}\"\n      name=\"{{ clearIcon }}\"\n      class=\"van-field__clear-root van-field__icon-root\"\n      catch:touchstart=\"onClear\"\n    />\n    <view class=\"van-field__icon-container\" bind:tap=\"onClickIcon\">\n      <van-icon\n        wx:if=\"{{ rightIcon || icon }}\"\n        name=\"{{ rightIcon || icon }}\"\n        class=\"van-field__icon-root {{ iconClass }}\"\n        custom-class=\"right-icon-class\"\n      />\n      <slot name=\"right-icon\" />\n      <slot name=\"icon\" />\n    </view>\n    <view class=\"van-field__button\">\n      <slot name=\"button\" />\n    </view>\n  </view>\n  <label for=\"{{ name }}\" wx:if=\"{{ showWordLimit && maxlength }}\" class=\"van-field__word-limit\">\n    <view class=\"{{ utils.bem('field__word-num', { full: value.length >= maxlength }) }}\">{{ value.length >= maxlength ? maxlength : value.length }}</view>/{{ maxlength }}\n  </label>\n  <label for=\"{{ name }}\"  wx:if=\"{{ errorMessage }}\" class=\"{{ utils.bem('field__error-message', [errorMessageAlign, { disabled, error }]) }}\">\n    {{ errorMessage }}\n  </label>\n</van-cell>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/field/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction inputStyle(autosize) {\n  if (autosize && autosize.constructor === 'Object') {\n    return style({\n      'min-height': addUnit(autosize.minHeight),\n      'max-height': addUnit(autosize.maxHeight),\n    });\n  }\n\n  return '';\n}\n\nmodule.exports = {\n  inputStyle: inputStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/field/index.wxss",
    "content": "@import '../common/index.wxss';.van-field{--cell-icon-size:var(--field-icon-size,16px)}.van-field__label{color:var(--field-label-color,#646566)}.van-field__label--disabled{color:var(--field-disabled-text-color,#c8c9cc)}.van-field__body{align-items:center;display:flex}.van-field__body--textarea{box-sizing:border-box;line-height:1.2em;min-height:var(--cell-line-height,24px);padding:3.6px 0}.van-field__control:empty+.van-field__control{display:block}.van-field__control{background-color:initial;border:0;box-sizing:border-box;color:var(--field-input-text-color,#323233);display:none;height:var(--cell-line-height,24px);line-height:inherit;margin:0;min-height:var(--cell-line-height,24px);padding:0;position:relative;resize:none;text-align:left;width:100%}.van-field__control:empty{display:none}.van-field__control--textarea{height:var(--field-text-area-min-height,18px);min-height:var(--field-text-area-min-height,18px)}.van-field__control--error{color:var(--field-input-error-text-color,#ee0a24)}.van-field__control--disabled{background-color:initial;color:var(--field-input-disabled-text-color,#c8c9cc);opacity:1}.van-field__control--center{text-align:center}.van-field__control--right{text-align:right}.van-field__control--custom{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.van-field__placeholder{color:var(--field-placeholder-text-color,#c8c9cc);left:0;pointer-events:none;position:absolute;right:0;top:0}.van-field__placeholder--error{color:var(--field-error-message-color,#ee0a24)}.van-field__icon-root{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.van-field__clear-root,.van-field__icon-container{line-height:inherit;margin-right:calc(var(--padding-xs, 8px)*-1);padding:0 var(--padding-xs,8px);vertical-align:middle}.van-field__button,.van-field__clear-root,.van-field__icon-container{flex-shrink:0}.van-field__clear-root{color:var(--field-clear-icon-color,#c8c9cc);font-size:var(--field-clear-icon-size,16px)}.van-field__icon-container{color:var(--field-icon-container-color,#969799);font-size:var(--field-icon-size,16px)}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:var(--padding-xs,8px)}.van-field__button:empty{display:none}.van-field__error-message{color:var(--field-error-message-color,#ee0a24);display:block;font-size:var(--field-error-message-text-font-size,12px);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{color:var(--field-word-limit-color,#646566);font-size:var(--field-word-limit-font-size,12px);line-height:var(--field-word-limit-line-height,16px);margin-top:var(--padding-base,4px);text-align:right}.van-field__word-num{display:inline}.van-field__word-num--full{color:var(--field-word-num-full-color,#ee0a24)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/field/input.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<input\n  id=\"{{ name }}\"\n  class=\"{{ utils.bem('field__control', [inputAlign, { disabled, error }]) }} input-class\"\n  type=\"{{ type }}\"\n  focus=\"{{ focus }}\"\n  cursor=\"{{ cursor }}\"\n  value=\"{{ innerValue }}\"\n  auto-focus=\"{{ autoFocus }}\"\n  disabled=\"{{ disabled || readonly }}\"\n  maxlength=\"{{ maxlength }}\"\n  placeholder=\"{{ placeholder }}\"\n  placeholder-style=\"{{ placeholderStyle }}\"\n  placeholder-class=\"{{ utils.bem('field__placeholder', { error }) }}\"\n  confirm-type=\"{{ confirmType }}\"\n  confirm-hold=\"{{ confirmHold }}\"\n  hold-keyboard=\"{{ holdKeyboard }}\"\n  cursor-spacing=\"{{ cursorSpacing }}\"\n  adjust-position=\"{{ adjustPosition }}\"\n  selection-end=\"{{ selectionEnd }}\"\n  selection-start=\"{{ selectionStart }}\"\n  always-embed=\"{{ alwaysEmbed }}\"\n  password=\"{{ password || type === 'password' }}\"\n  bindinput=\"onInput\"\n  bindtap=\"onClickInput\"\n  bindblur=\"onBlur\"\n  bindfocus=\"onFocus\"\n  bindconfirm=\"onConfirm\"\n  bindkeyboardheightchange=\"onKeyboardHeightChange\"\n  bindnicknamereview=\"onBindNicknameReview\"\n/>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/field/props.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\nexport declare const commonProps: WechatMiniprogram.Component.PropertyOption;\nexport declare const inputProps: WechatMiniprogram.Component.PropertyOption;\nexport declare const textareaProps: WechatMiniprogram.Component.PropertyOption;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/field/props.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.textareaProps = exports.inputProps = exports.commonProps = void 0;\nexports.commonProps = {\n    value: String,\n    placeholder: String,\n    placeholderStyle: String,\n    placeholderClass: String,\n    disabled: Boolean,\n    maxlength: {\n        type: Number,\n        value: -1,\n    },\n    cursorSpacing: {\n        type: Number,\n        value: 50,\n    },\n    autoFocus: Boolean,\n    focus: Boolean,\n    cursor: {\n        type: Number,\n        value: -1,\n    },\n    selectionStart: {\n        type: Number,\n        value: -1,\n    },\n    selectionEnd: {\n        type: Number,\n        value: -1,\n    },\n    adjustPosition: {\n        type: Boolean,\n        value: true,\n    },\n    holdKeyboard: Boolean,\n};\nexports.inputProps = {\n    type: {\n        type: String,\n        value: 'text',\n    },\n    password: Boolean,\n    confirmType: String,\n    confirmHold: Boolean,\n    alwaysEmbed: Boolean,\n};\nexports.textareaProps = {\n    autoHeight: Boolean,\n    fixed: Boolean,\n    showConfirmBar: {\n        type: Boolean,\n        value: true,\n    },\n    disableDefaultPadding: {\n        type: Boolean,\n        value: true,\n    },\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/field/textarea.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n<textarea\n  id=\"{{ name }}\"\n  class=\"{{ utils.bem('field__control', [inputAlign, type, { disabled, error }]) }} input-class\"\n  fixed=\"{{ fixed }}\"\n  focus=\"{{ focus }}\"\n  cursor=\"{{ cursor }}\"\n  value=\"{{ innerValue }}\"\n  auto-focus=\"{{ autoFocus }}\"\n  disabled=\"{{ disabled || readonly }}\"\n  maxlength=\"{{ maxlength }}\"\n  placeholder=\"{{ placeholder }}\"\n  placeholder-style=\"{{ placeholderStyle }}\"\n  placeholder-class=\"{{ utils.bem('field__placeholder', { error, disabled }) }}\"\n  auto-height=\"{{ !!autosize }}\"\n  style=\"{{ computed.inputStyle(autosize) }}\"\n  cursor-spacing=\"{{ cursorSpacing }}\"\n  adjust-position=\"{{ adjustPosition }}\"\n  show-confirm-bar=\"{{ showConfirmBar }}\"\n  hold-keyboard=\"{{ holdKeyboard }}\"\n  selection-end=\"{{ selectionEnd }}\"\n  selection-start=\"{{ selectionStart }}\"\n  disable-default-padding=\"{{ disableDefaultPadding }}\"\n  bindinput=\"onInput\"\n  bindtap=\"onClickInput\"\n  bindblur=\"onBlur\"\n  bindfocus=\"onFocus\"\n  bindconfirm=\"onConfirm\"\n  bindlinechange=\"onLineChange\"\n  bindkeyboardheightchange=\"onKeyboardHeightChange\"\n/>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/field/types.d.ts",
    "content": "export interface InputDetails {\n    /** 输入框内容 */\n    value: string;\n    /** 光标位置 */\n    cursor?: number;\n    /** keyCode 为键值 (目前工具还不支持返回keyCode参数) `2.1.0` 起支持 */\n    keyCode?: number;\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/field/types.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useChildren)('goods-action-button', function () {\n        this.children.forEach(function (item) {\n            item.updateStyle();\n        });\n    }),\n    props: {\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"custom-class {{ utils.bem('goods-action', { safe: safeAreaInsetBottom }) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action/index.wxss",
    "content": "@import '../common/index.wxss';.van-goods-action{align-items:center;background-color:var(--goods-action-background-color,#fff);bottom:0;box-sizing:initial;display:flex;height:var(--goods-action-height,50px);left:0;position:fixed;right:0}.van-goods-action--safe{padding-bottom:env(safe-area-inset-bottom)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action-button/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action-button/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\nvar button_1 = require(\"../mixins/button\");\nvar link_1 = require(\"../mixins/link\");\n(0, component_1.VantComponent)({\n    mixins: [link_1.link, button_1.button],\n    relation: (0, relation_1.useParent)('goods-action'),\n    props: {\n        text: String,\n        color: String,\n        size: {\n            type: String,\n            value: 'normal',\n        },\n        loading: Boolean,\n        disabled: Boolean,\n        plain: Boolean,\n        type: {\n            type: String,\n            value: 'danger',\n        },\n        customStyle: {\n            type: String,\n            value: '',\n        },\n    },\n    methods: {\n        onClick: function (event) {\n            this.$emit('click', event.detail);\n            this.jumpLink();\n        },\n        updateStyle: function () {\n            if (this.parent == null) {\n                return;\n            }\n            var index = this.index;\n            var _a = this.parent.children, children = _a === void 0 ? [] : _a;\n            this.setData({\n                isFirst: index === 0,\n                isLast: index === children.length - 1,\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action-button/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-button\": \"../button/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action-button/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<van-button\n  id=\"{{ id }}\"\n  button-id=\"{{ buttonId }}\"\n  lang=\"{{ lang }}\"\n  type=\"{{ type }}\"\n  size=\"{{ size }}\"\n  color=\"{{ color }}\"\n  plain=\"{{ plain }}\"\n  loading=\"{{ loading }}\"\n  disabled=\"{{ disabled }}\"\n  open-type=\"{{ openType }}\"\n  class=\"{{ utils.bem('goods-action-button', [type, { first: isFirst, last: isLast, plain: plain }])}}\"\n  custom-class=\"van-goods-action-button__inner custom-class\"\n  custom-style=\"{{customStyle}}\"\n  business-id=\"{{ businessId }}\"\n  session-from=\"{{ sessionFrom }}\"\n  app-parameter=\"{{ appParameter }}\"\n  send-message-img=\"{{ sendMessageImg }}\"\n  send-message-path=\"{{ sendMessagePath }}\"\n  show-message-card=\"{{ showMessageCard }}\"\n  send-message-title=\"{{ sendMessageTitle }}\"\n  bind:click=\"onClick\"\n  binderror=\"onError\"\n  bindcontact=\"onContact\"\n  bindopensetting=\"onOpenSetting\"\n  bindgetuserinfo=\"onGetUserInfo\"\n  bindagreeprivacyauthorization=\"onAgreePrivacyAuthorization\"\n  bindgetRealTimePhoneNumber=\"onGetRealTimePhoneNumber\"\n  bindgetphonenumber=\"onGetPhoneNumber\"\n  bindlaunchapp=\"onLaunchApp\"\n>\n  {{ text }}\n  <slot></slot>\n</van-button>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action-button/index.wxss",
    "content": "@import '../common/index.wxss';:host{flex:1}.van-goods-action-button{--button-warning-background-color:var(--goods-action-button-warning-color,linear-gradient(to right,#ffd01e,#ff8917));--button-danger-background-color:var(--goods-action-button-danger-color,linear-gradient(to right,#ff6034,#ee0a24));--button-default-height:var(--goods-action-button-height,40px);--button-line-height:var(--goods-action-button-line-height,20px);--button-plain-background-color:var(--goods-action-button-plain-color,#fff);--button-border-width:0;display:block}.van-goods-action-button--first{--button-border-radius:999px 0 0 var(--goods-action-button-border-radius,999px);margin-left:5px}.van-goods-action-button--last{--button-border-radius:0 999px var(--goods-action-button-border-radius,999px) 0;margin-right:5px}.van-goods-action-button--first.van-goods-action-button--last{--button-border-radius:var(--goods-action-button-border-radius,999px)}.van-goods-action-button--plain{--button-border-width:1px}.van-goods-action-button__inner{font-weight:var(--font-weight-bold,500)!important;width:100%}@media (max-width:321px){.van-goods-action-button{font-size:13px}}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action-icon/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action-icon/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar button_1 = require(\"../mixins/button\");\nvar link_1 = require(\"../mixins/link\");\n(0, component_1.VantComponent)({\n    classes: ['icon-class', 'text-class', 'info-class'],\n    mixins: [link_1.link, button_1.button],\n    props: {\n        text: String,\n        dot: Boolean,\n        info: String,\n        icon: String,\n        size: String,\n        color: String,\n        classPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n        disabled: Boolean,\n        loading: Boolean,\n    },\n    methods: {\n        onClick: function (event) {\n            this.$emit('click', event.detail);\n            this.jumpLink();\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action-icon/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-button\": \"../button/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action-icon/index.wxml",
    "content": "<van-button\n  square\n  id=\"{{ id }}\"\n  size=\"large\"\n  lang=\"{{ lang }}\"\n  loading=\"{{ loading }}\"\n  disabled=\"{{ disabled }}\"\n  open-type=\"{{ openType }}\"\n  business-id=\"{{ businessId }}\"\n  custom-class=\"van-goods-action-icon\"\n  session-from=\"{{ sessionFrom }}\"\n  app-parameter=\"{{ appParameter }}\"\n  send-message-img=\"{{ sendMessageImg }}\"\n  send-message-path=\"{{ sendMessagePath }}\"\n  show-message-card=\"{{ showMessageCard }}\"\n  send-message-title=\"{{ sendMessageTitle }}\"\n  bind:click=\"onClick\"\n  binderror=\"onError\"\n  bindcontact=\"onContact\"\n  bindopensetting=\"onOpenSetting\"\n  bindgetuserinfo=\"onGetUserInfo\"\n  bindgetphonenumber=\"onGetPhoneNumber\"\n  bindlaunchapp=\"onLaunchApp\"\n>\n  <van-icon\n    wx:if=\"{{ icon }}\"\n    name=\"{{ icon }}\"\n    dot=\"{{ dot }}\"\n    info=\"{{ info }}\"\n    size=\"{{ size }}\"\n    color=\"{{ color }}\"\n    class-prefix=\"{{ classPrefix }}\"\n    class=\"van-goods-action-icon__icon\"\n    custom-class=\"icon-class\"\n    info-class=\"info-class\"\n  />\n  <view wx:else>\n    <slot name=\"icon\" />\n  </view>\n  <text class=\"text-class\">{{ text }}</text>\n</van-button>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/goods-action-icon/index.wxss",
    "content": "@import '../common/index.wxss';.van-goods-action-icon{border:none!important;color:var(--goods-action-icon-text-color,#646566)!important;display:flex!important;flex-direction:column;font-size:var(--goods-action-icon-font-size,10px)!important;height:var(--goods-action-icon-height,50px)!important;justify-content:center!important;line-height:1!important;min-width:var(--goods-action-icon-width,48px)}.van-goods-action-icon__icon{color:var(--goods-action-icon-color,#323233);display:flex;font-size:var(--goods-action-icon-size,18px);margin:0 auto 5px}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/grid/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/grid/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useChildren)('grid-item'),\n    props: {\n        square: {\n            type: Boolean,\n            observer: 'updateChildren',\n        },\n        gutter: {\n            type: null,\n            value: 0,\n            observer: 'updateChildren',\n        },\n        clickable: {\n            type: Boolean,\n            observer: 'updateChildren',\n        },\n        columnNum: {\n            type: Number,\n            value: 4,\n            observer: 'updateChildren',\n        },\n        center: {\n            type: Boolean,\n            value: true,\n            observer: 'updateChildren',\n        },\n        border: {\n            type: Boolean,\n            value: true,\n            observer: 'updateChildren',\n        },\n        direction: {\n            type: String,\n            observer: 'updateChildren',\n        },\n        iconSize: {\n            type: String,\n            observer: 'updateChildren',\n        },\n        reverse: {\n            type: Boolean,\n            value: false,\n            observer: 'updateChildren',\n        },\n    },\n    methods: {\n        updateChildren: function () {\n            this.children.forEach(function (child) {\n                child.updateStyle();\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/grid/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/grid/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"van-grid custom-class {{ border && !gutter ? 'van-hairline--top' : '' }}\"\n  style=\"{{ computed.rootStyle({ gutter }) }}\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/grid/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    'padding-left': addUnit(data.gutter),\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/grid/index.wxss",
    "content": "@import '../common/index.wxss';.van-grid{box-sizing:border-box;overflow:hidden;position:relative}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/grid-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/grid-item/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\nvar link_1 = require(\"../mixins/link\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useParent)('grid'),\n    classes: ['content-class', 'icon-class', 'text-class'],\n    mixins: [link_1.link],\n    props: {\n        icon: String,\n        iconColor: String,\n        iconPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n        dot: Boolean,\n        info: null,\n        badge: null,\n        text: String,\n        useSlot: Boolean,\n    },\n    data: {\n        viewStyle: '',\n    },\n    mounted: function () {\n        this.updateStyle();\n    },\n    methods: {\n        updateStyle: function () {\n            if (!this.parent) {\n                return;\n            }\n            var _a = this.parent, data = _a.data, children = _a.children;\n            var columnNum = data.columnNum, border = data.border, square = data.square, gutter = data.gutter, clickable = data.clickable, center = data.center, direction = data.direction, reverse = data.reverse, iconSize = data.iconSize;\n            this.setData({\n                center: center,\n                border: border,\n                square: square,\n                gutter: gutter,\n                clickable: clickable,\n                direction: direction,\n                reverse: reverse,\n                iconSize: iconSize,\n                index: children.indexOf(this),\n                columnNum: columnNum,\n            });\n        },\n        onClick: function () {\n            this.$emit('click');\n            this.jumpLink();\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/grid-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/grid-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('grid-item', { square }) }}\"\n  style=\"{{ computed.wrapperStyle({ square, gutter, columnNum, index }) }}\"\n  bindtap=\"onClick\"\n>\n  <view\n    class=\"content-class {{ utils.bem('grid-item__content', [direction, { center, square, reverse, clickable, surround: border && gutter }]) }} {{ border ? 'van-hairline--surround' : '' }}\"\n    style=\"{{ computed.contentStyle({ square, gutter }) }}\"\n  >\n    <block wx:if=\"{{ useSlot }}\">\n      <slot />\n    </block>\n    <block wx:else>\n      <view class=\"van-grid-item__icon icon-class\">\n        <van-icon wx:if=\"{{ icon }}\" name=\"{{ icon }}\" color=\"{{ iconColor }}\" class-prefix=\"{{ iconPrefix }}\" dot=\"{{ dot }}\" info=\"{{ badge || info }}\" size=\"{{ iconSize }}\" />\n        <slot wx:else name=\"icon\"></slot>\n      </view>\n      <view class=\"van-grid-item__text text-class\">\n        <text wx:if=\"{{ text }}\">{{ text }}</text>\n        <slot wx:else name=\"text\"></slot>\n      </view>\n    </block>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/grid-item/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction wrapperStyle(data) {\n  var width = 100 / data.columnNum + '%';\n\n  return style({\n    width: width,\n    'padding-top': data.square ? width : null,\n    'padding-right': addUnit(data.gutter),\n    'margin-top':\n      data.index >= data.columnNum && !data.square\n        ? addUnit(data.gutter)\n        : null,\n  });\n}\n\nfunction contentStyle(data) {\n  return data.square\n    ? style({\n        right: addUnit(data.gutter),\n        bottom: addUnit(data.gutter),\n        height: 'auto',\n      })\n    : '';\n}\n\nmodule.exports = {\n  wrapperStyle: wrapperStyle,\n  contentStyle: contentStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/grid-item/index.wxss",
    "content": "@import '../common/index.wxss';.van-grid-item{box-sizing:border-box;float:left;position:relative}.van-grid-item--square{height:0}.van-grid-item__content{background-color:var(--grid-item-content-background-color,#fff);box-sizing:border-box;display:flex;flex-direction:column;height:100%;padding:var(--grid-item-content-padding,16px 8px)}.van-grid-item__content:after{border-width:0 1px 1px 0;z-index:1}.van-grid-item__content--surround:after{border-width:1px}.van-grid-item__content--center{align-items:center;justify-content:center}.van-grid-item__content--square{left:0;position:absolute;right:0;top:0}.van-grid-item__content--horizontal{flex-direction:row}.van-grid-item__content--horizontal .van-grid-item__text{margin:0 0 0 8px}.van-grid-item__content--reverse{flex-direction:column-reverse}.van-grid-item__content--reverse .van-grid-item__text{margin:0 0 8px}.van-grid-item__content--horizontal.van-grid-item__content--reverse{flex-direction:row-reverse}.van-grid-item__content--horizontal.van-grid-item__content--reverse .van-grid-item__text{margin:0 8px 0 0}.van-grid-item__content--clickable:active{background-color:var(--grid-item-content-active-color,#f2f3f5)}.van-grid-item__icon{align-items:center;display:flex;font-size:var(--grid-item-icon-size,26px);height:var(--grid-item-icon-size,26px)}.van-grid-item__text{word-wrap:break-word;color:var(--grid-item-text-color,#646566);font-size:var(--grid-item-text-font-size,12px)}.van-grid-item__icon+.van-grid-item__text{margin-top:8px}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/icon/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/icon/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: ['info-class'],\n    props: {\n        dot: Boolean,\n        info: null,\n        size: null,\n        color: String,\n        customStyle: String,\n        classPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n        name: String,\n    },\n    methods: {\n        onClick: function () {\n            this.$emit('click');\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/icon/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-info\": \"../info/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/icon/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"{{ computed.rootClass({ classPrefix, name }) }}\"\n  style=\"{{ computed.rootStyle({ customStyle, color, size }) }}\"\n  bindtap=\"onClick\"\n>\n  <van-info\n    wx:if=\"{{ info !== null || dot }}\"\n    dot=\"{{ dot }}\"\n    info=\"{{ info }}\"\n    custom-class=\"van-icon__info info-class\"\n  />\n  <image\n    wx:if=\"{{ computed.isImage(name) }}\"\n    src=\"{{ name }}\"\n    mode=\"aspectFit\"\n    class=\"van-icon__image\"\n  />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/icon/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction isImage(name) {\n  return name.indexOf('/') !== -1;\n}\n\nfunction rootClass(data) {\n  var classes = ['custom-class'];\n\n  if (data.classPrefix !== 'van-icon') {\n    classes.push('van-icon--custom')\n  }\n\n  if (data.classPrefix != null) {\n    classes.push(data.classPrefix);\n  }\n\n  if (isImage(data.name)) {\n    classes.push('van-icon--image');\n  } else if (data.classPrefix != null) {\n    classes.push(data.classPrefix + '-' + data.name);\n  }\n\n  return classes.join(' ');\n}\n\nfunction rootStyle(data) {\n  return style([\n    {\n      color: data.color,\n      'font-size': addUnit(data.size),\n    },\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  isImage: isImage,\n  rootClass: rootClass,\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/icon/index.wxss",
    "content": "@import '../common/index.wxss';.van-icon{text-rendering:auto;-webkit-font-smoothing:antialiased;font:normal normal normal 14px/1 vant-icon;font:normal normal normal 14px/1 var(--van-icon-font-family,\"vant-icon\");font-size:inherit;position:relative}.van-icon,.van-icon:before{display:inline-block}.van-icon-contact:before{content:\"\\e753\"}.van-icon-notes:before{content:\"\\e63c\"}.van-icon-records:before{content:\"\\e63d\"}.van-icon-cash-back-record:before{content:\"\\e63e\"}.van-icon-newspaper:before{content:\"\\e63f\"}.van-icon-discount:before{content:\"\\e640\"}.van-icon-completed:before{content:\"\\e641\"}.van-icon-user:before{content:\"\\e642\"}.van-icon-description:before{content:\"\\e643\"}.van-icon-list-switch:before{content:\"\\e6ad\"}.van-icon-list-switching:before{content:\"\\e65a\"}.van-icon-link-o:before{content:\"\\e751\"}.van-icon-miniprogram-o:before{content:\"\\e752\"}.van-icon-qq:before{content:\"\\e74e\"}.van-icon-wechat-moments:before{content:\"\\e74f\"}.van-icon-weibo:before{content:\"\\e750\"}.van-icon-cash-o:before{content:\"\\e74d\"}.van-icon-guide-o:before{content:\"\\e74c\"}.van-icon-invitation:before{content:\"\\e6d6\"}.van-icon-shield-o:before{content:\"\\e74b\"}.van-icon-exchange:before{content:\"\\e6af\"}.van-icon-eye:before{content:\"\\e6b0\"}.van-icon-enlarge:before{content:\"\\e6b1\"}.van-icon-expand-o:before{content:\"\\e6b2\"}.van-icon-eye-o:before{content:\"\\e6b3\"}.van-icon-expand:before{content:\"\\e6b4\"}.van-icon-filter-o:before{content:\"\\e6b5\"}.van-icon-fire:before{content:\"\\e6b6\"}.van-icon-fail:before{content:\"\\e6b7\"}.van-icon-failure:before{content:\"\\e6b8\"}.van-icon-fire-o:before{content:\"\\e6b9\"}.van-icon-flag-o:before{content:\"\\e6ba\"}.van-icon-font:before{content:\"\\e6bb\"}.van-icon-font-o:before{content:\"\\e6bc\"}.van-icon-gem-o:before{content:\"\\e6bd\"}.van-icon-flower-o:before{content:\"\\e6be\"}.van-icon-gem:before{content:\"\\e6bf\"}.van-icon-gift-card:before{content:\"\\e6c0\"}.van-icon-friends:before{content:\"\\e6c1\"}.van-icon-friends-o:before{content:\"\\e6c2\"}.van-icon-gold-coin:before{content:\"\\e6c3\"}.van-icon-gold-coin-o:before{content:\"\\e6c4\"}.van-icon-good-job-o:before{content:\"\\e6c5\"}.van-icon-gift:before{content:\"\\e6c6\"}.van-icon-gift-o:before{content:\"\\e6c7\"}.van-icon-gift-card-o:before{content:\"\\e6c8\"}.van-icon-good-job:before{content:\"\\e6c9\"}.van-icon-home-o:before{content:\"\\e6ca\"}.van-icon-goods-collect:before{content:\"\\e6cb\"}.van-icon-graphic:before{content:\"\\e6cc\"}.van-icon-goods-collect-o:before{content:\"\\e6cd\"}.van-icon-hot-o:before{content:\"\\e6ce\"}.van-icon-info:before{content:\"\\e6cf\"}.van-icon-hotel-o:before{content:\"\\e6d0\"}.van-icon-info-o:before{content:\"\\e6d1\"}.van-icon-hot-sale-o:before{content:\"\\e6d2\"}.van-icon-hot:before{content:\"\\e6d3\"}.van-icon-like:before{content:\"\\e6d4\"}.van-icon-idcard:before{content:\"\\e6d5\"}.van-icon-like-o:before{content:\"\\e6d7\"}.van-icon-hot-sale:before{content:\"\\e6d8\"}.van-icon-location-o:before{content:\"\\e6d9\"}.van-icon-location:before{content:\"\\e6da\"}.van-icon-label:before{content:\"\\e6db\"}.van-icon-lock:before{content:\"\\e6dc\"}.van-icon-label-o:before{content:\"\\e6dd\"}.van-icon-map-marked:before{content:\"\\e6de\"}.van-icon-logistics:before{content:\"\\e6df\"}.van-icon-manager:before{content:\"\\e6e0\"}.van-icon-more:before{content:\"\\e6e1\"}.van-icon-live:before{content:\"\\e6e2\"}.van-icon-manager-o:before{content:\"\\e6e3\"}.van-icon-medal:before{content:\"\\e6e4\"}.van-icon-more-o:before{content:\"\\e6e5\"}.van-icon-music-o:before{content:\"\\e6e6\"}.van-icon-music:before{content:\"\\e6e7\"}.van-icon-new-arrival-o:before{content:\"\\e6e8\"}.van-icon-medal-o:before{content:\"\\e6e9\"}.van-icon-new-o:before{content:\"\\e6ea\"}.van-icon-free-postage:before{content:\"\\e6eb\"}.van-icon-newspaper-o:before{content:\"\\e6ec\"}.van-icon-new-arrival:before{content:\"\\e6ed\"}.van-icon-minus:before{content:\"\\e6ee\"}.van-icon-orders-o:before{content:\"\\e6ef\"}.van-icon-new:before{content:\"\\e6f0\"}.van-icon-paid:before{content:\"\\e6f1\"}.van-icon-notes-o:before{content:\"\\e6f2\"}.van-icon-other-pay:before{content:\"\\e6f3\"}.van-icon-pause-circle:before{content:\"\\e6f4\"}.van-icon-pause:before{content:\"\\e6f5\"}.van-icon-pause-circle-o:before{content:\"\\e6f6\"}.van-icon-peer-pay:before{content:\"\\e6f7\"}.van-icon-pending-payment:before{content:\"\\e6f8\"}.van-icon-passed:before{content:\"\\e6f9\"}.van-icon-plus:before{content:\"\\e6fa\"}.van-icon-phone-circle-o:before{content:\"\\e6fb\"}.van-icon-phone-o:before{content:\"\\e6fc\"}.van-icon-printer:before{content:\"\\e6fd\"}.van-icon-photo-fail:before{content:\"\\e6fe\"}.van-icon-phone:before{content:\"\\e6ff\"}.van-icon-photo-o:before{content:\"\\e700\"}.van-icon-play-circle:before{content:\"\\e701\"}.van-icon-play:before{content:\"\\e702\"}.van-icon-phone-circle:before{content:\"\\e703\"}.van-icon-point-gift-o:before{content:\"\\e704\"}.van-icon-point-gift:before{content:\"\\e705\"}.van-icon-play-circle-o:before{content:\"\\e706\"}.van-icon-shrink:before{content:\"\\e707\"}.van-icon-photo:before{content:\"\\e708\"}.van-icon-qr:before{content:\"\\e709\"}.van-icon-qr-invalid:before{content:\"\\e70a\"}.van-icon-question-o:before{content:\"\\e70b\"}.van-icon-revoke:before{content:\"\\e70c\"}.van-icon-replay:before{content:\"\\e70d\"}.van-icon-service:before{content:\"\\e70e\"}.van-icon-question:before{content:\"\\e70f\"}.van-icon-search:before{content:\"\\e710\"}.van-icon-refund-o:before{content:\"\\e711\"}.van-icon-service-o:before{content:\"\\e712\"}.van-icon-scan:before{content:\"\\e713\"}.van-icon-share:before{content:\"\\e714\"}.van-icon-send-gift-o:before{content:\"\\e715\"}.van-icon-share-o:before{content:\"\\e716\"}.van-icon-setting:before{content:\"\\e717\"}.van-icon-points:before{content:\"\\e718\"}.van-icon-photograph:before{content:\"\\e719\"}.van-icon-shop:before{content:\"\\e71a\"}.van-icon-shop-o:before{content:\"\\e71b\"}.van-icon-shop-collect-o:before{content:\"\\e71c\"}.van-icon-shop-collect:before{content:\"\\e71d\"}.van-icon-smile:before{content:\"\\e71e\"}.van-icon-shopping-cart-o:before{content:\"\\e71f\"}.van-icon-sign:before{content:\"\\e720\"}.van-icon-sort:before{content:\"\\e721\"}.van-icon-star-o:before{content:\"\\e722\"}.van-icon-smile-comment-o:before{content:\"\\e723\"}.van-icon-stop:before{content:\"\\e724\"}.van-icon-stop-circle-o:before{content:\"\\e725\"}.van-icon-smile-o:before{content:\"\\e726\"}.van-icon-star:before{content:\"\\e727\"}.van-icon-success:before{content:\"\\e728\"}.van-icon-stop-circle:before{content:\"\\e729\"}.van-icon-records-o:before{content:\"\\e72a\"}.van-icon-shopping-cart:before{content:\"\\e72b\"}.van-icon-tosend:before{content:\"\\e72c\"}.van-icon-todo-list:before{content:\"\\e72d\"}.van-icon-thumb-circle-o:before{content:\"\\e72e\"}.van-icon-thumb-circle:before{content:\"\\e72f\"}.van-icon-umbrella-circle:before{content:\"\\e730\"}.van-icon-underway:before{content:\"\\e731\"}.van-icon-upgrade:before{content:\"\\e732\"}.van-icon-todo-list-o:before{content:\"\\e733\"}.van-icon-tv-o:before{content:\"\\e734\"}.van-icon-underway-o:before{content:\"\\e735\"}.van-icon-user-o:before{content:\"\\e736\"}.van-icon-vip-card-o:before{content:\"\\e737\"}.van-icon-vip-card:before{content:\"\\e738\"}.van-icon-send-gift:before{content:\"\\e739\"}.van-icon-wap-home:before{content:\"\\e73a\"}.van-icon-wap-nav:before{content:\"\\e73b\"}.van-icon-volume-o:before{content:\"\\e73c\"}.van-icon-video:before{content:\"\\e73d\"}.van-icon-wap-home-o:before{content:\"\\e73e\"}.van-icon-volume:before{content:\"\\e73f\"}.van-icon-warning:before{content:\"\\e740\"}.van-icon-weapp-nav:before{content:\"\\e741\"}.van-icon-wechat-pay:before{content:\"\\e742\"}.van-icon-warning-o:before{content:\"\\e743\"}.van-icon-wechat:before{content:\"\\e744\"}.van-icon-setting-o:before{content:\"\\e745\"}.van-icon-youzan-shield:before{content:\"\\e746\"}.van-icon-warn-o:before{content:\"\\e747\"}.van-icon-smile-comment:before{content:\"\\e748\"}.van-icon-user-circle-o:before{content:\"\\e749\"}.van-icon-video-o:before{content:\"\\e74a\"}.van-icon-add-square:before{content:\"\\e65c\"}.van-icon-add:before{content:\"\\e65d\"}.van-icon-arrow-down:before{content:\"\\e65e\"}.van-icon-arrow-up:before{content:\"\\e65f\"}.van-icon-arrow:before{content:\"\\e660\"}.van-icon-after-sale:before{content:\"\\e661\"}.van-icon-add-o:before{content:\"\\e662\"}.van-icon-alipay:before{content:\"\\e663\"}.van-icon-ascending:before{content:\"\\e664\"}.van-icon-apps-o:before{content:\"\\e665\"}.van-icon-aim:before{content:\"\\e666\"}.van-icon-award:before{content:\"\\e667\"}.van-icon-arrow-left:before{content:\"\\e668\"}.van-icon-award-o:before{content:\"\\e669\"}.van-icon-audio:before{content:\"\\e66a\"}.van-icon-bag-o:before{content:\"\\e66b\"}.van-icon-balance-list:before{content:\"\\e66c\"}.van-icon-back-top:before{content:\"\\e66d\"}.van-icon-bag:before{content:\"\\e66e\"}.van-icon-balance-pay:before{content:\"\\e66f\"}.van-icon-balance-o:before{content:\"\\e670\"}.van-icon-bar-chart-o:before{content:\"\\e671\"}.van-icon-bars:before{content:\"\\e672\"}.van-icon-balance-list-o:before{content:\"\\e673\"}.van-icon-birthday-cake-o:before{content:\"\\e674\"}.van-icon-bookmark:before{content:\"\\e675\"}.van-icon-bill:before{content:\"\\e676\"}.van-icon-bell:before{content:\"\\e677\"}.van-icon-browsing-history-o:before{content:\"\\e678\"}.van-icon-browsing-history:before{content:\"\\e679\"}.van-icon-bookmark-o:before{content:\"\\e67a\"}.van-icon-bulb-o:before{content:\"\\e67b\"}.van-icon-bullhorn-o:before{content:\"\\e67c\"}.van-icon-bill-o:before{content:\"\\e67d\"}.van-icon-calendar-o:before{content:\"\\e67e\"}.van-icon-brush-o:before{content:\"\\e67f\"}.van-icon-card:before{content:\"\\e680\"}.van-icon-cart-o:before{content:\"\\e681\"}.van-icon-cart-circle:before{content:\"\\e682\"}.van-icon-cart-circle-o:before{content:\"\\e683\"}.van-icon-cart:before{content:\"\\e684\"}.van-icon-cash-on-deliver:before{content:\"\\e685\"}.van-icon-cash-back-record-o:before{content:\"\\e686\"}.van-icon-cashier-o:before{content:\"\\e687\"}.van-icon-chart-trending-o:before{content:\"\\e688\"}.van-icon-certificate:before{content:\"\\e689\"}.van-icon-chat:before{content:\"\\e68a\"}.van-icon-clear:before{content:\"\\e68b\"}.van-icon-chat-o:before{content:\"\\e68c\"}.van-icon-checked:before{content:\"\\e68d\"}.van-icon-clock:before{content:\"\\e68e\"}.van-icon-clock-o:before{content:\"\\e68f\"}.van-icon-close:before{content:\"\\e690\"}.van-icon-closed-eye:before{content:\"\\e691\"}.van-icon-circle:before{content:\"\\e692\"}.van-icon-cluster-o:before{content:\"\\e693\"}.van-icon-column:before{content:\"\\e694\"}.van-icon-comment-circle-o:before{content:\"\\e695\"}.van-icon-cluster:before{content:\"\\e696\"}.van-icon-comment:before{content:\"\\e697\"}.van-icon-comment-o:before{content:\"\\e698\"}.van-icon-comment-circle:before{content:\"\\e699\"}.van-icon-completed-o:before{content:\"\\e69a\"}.van-icon-credit-pay:before{content:\"\\e69b\"}.van-icon-coupon:before{content:\"\\e69c\"}.van-icon-debit-pay:before{content:\"\\e69d\"}.van-icon-coupon-o:before{content:\"\\e69e\"}.van-icon-contact-o:before{content:\"\\e69f\"}.van-icon-descending:before{content:\"\\e6a0\"}.van-icon-desktop-o:before{content:\"\\e6a1\"}.van-icon-diamond-o:before{content:\"\\e6a2\"}.van-icon-description-o:before{content:\"\\e6a3\"}.van-icon-delete:before{content:\"\\e6a4\"}.van-icon-diamond:before{content:\"\\e6a5\"}.van-icon-delete-o:before{content:\"\\e6a6\"}.van-icon-cross:before{content:\"\\e6a7\"}.van-icon-edit:before{content:\"\\e6a8\"}.van-icon-ellipsis:before{content:\"\\e6a9\"}.van-icon-down:before{content:\"\\e6aa\"}.van-icon-discount-o:before{content:\"\\e6ab\"}.van-icon-ecard-pay:before{content:\"\\e6ac\"}.van-icon-envelop-o:before{content:\"\\e6ae\"}@font-face{font-display:auto;font-family:vant-icon;font-style:normal;font-weight:400;src:url(//at.alicdn.com/t/c/font_2553510_kfwma2yq1rs.woff2?t=1694918397022) format(\"woff2\"),url(//at.alicdn.com/t/c/font_2553510_kfwma2yq1rs.woff?t=1694918397022) format(\"woff\")}:host{align-items:center;display:inline-flex;justify-content:center}.van-icon--custom{position:relative}.van-icon--image{height:1em;width:1em}.van-icon__image{height:100%;width:100%}.van-icon__info{z-index:1}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/image/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/image/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar button_1 = require(\"../mixins/button\");\n(0, component_1.VantComponent)({\n    mixins: [button_1.button],\n    classes: ['custom-class', 'loading-class', 'error-class', 'image-class'],\n    props: {\n        src: {\n            type: String,\n            observer: function () {\n                this.setData({\n                    error: false,\n                    loading: true,\n                });\n            },\n        },\n        round: Boolean,\n        width: null,\n        height: null,\n        radius: null,\n        lazyLoad: Boolean,\n        useErrorSlot: Boolean,\n        useLoadingSlot: Boolean,\n        showMenuByLongpress: Boolean,\n        fit: {\n            type: String,\n            value: 'fill',\n        },\n        webp: {\n            type: Boolean,\n            value: false,\n        },\n        showError: {\n            type: Boolean,\n            value: true,\n        },\n        showLoading: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        error: false,\n        loading: true,\n        viewStyle: '',\n    },\n    methods: {\n        onLoad: function (event) {\n            this.setData({\n                loading: false,\n            });\n            this.$emit('load', event.detail);\n        },\n        onError: function (event) {\n            this.setData({\n                loading: false,\n                error: true,\n            });\n            this.$emit('error', event.detail);\n        },\n        onClick: function (event) {\n            this.$emit('click', event.detail);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/image/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/image/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  style=\"{{ computed.rootStyle({ width, height, radius }) }}\"\n  class=\"custom-class {{ utils.bem('image', { round })}}\"\n  bind:tap=\"onClick\"\n>\n  <image\n    wx:if=\"{{ !error }}\"\n    src=\"{{ src }}\"\n    mode=\"{{ computed.mode(fit) }}\"\n    lazy-load=\"{{ lazyLoad }}\"\n    webp=\"{{ webp }}\"\n    class=\"image-class van-image__img\"\n    show-menu-by-longpress=\"{{ showMenuByLongpress }}\"\n    bind:load=\"onLoad\"\n    bind:error=\"onError\"\n  />\n\n  <view\n    wx:if=\"{{ loading && showLoading }}\"\n    class=\"loading-class van-image__loading\"\n  >\n    <slot wx:if=\"{{ useLoadingSlot }}\" name=\"loading\" />\n    <van-icon wx:else name=\"photo\" custom-class=\"van-image__loading-icon\" />\n  </view>\n  <view\n    wx:if=\"{{ error && showError }}\"\n    class=\"error-class van-image__error\"\n  >\n    <slot wx:if=\"{{ useErrorSlot }}\" name=\"error\" />\n    <van-icon wx:else name=\"photo-fail\" custom-class=\"van-image__error-icon\" />\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/image/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style([\n    {\n      width: addUnit(data.width),\n      height: addUnit(data.height),\n      'border-radius': addUnit(data.radius),\n    },\n    data.radius ? 'overflow: hidden' : null,\n  ]);\n}\n\nvar FIT_MODE_MAP = {\n  none: 'center',\n  fill: 'scaleToFill',\n  cover: 'aspectFill',\n  contain: 'aspectFit',\n  widthFix: 'widthFix',\n  heightFix: 'heightFix',\n};\n\nfunction mode(fit) {\n  return FIT_MODE_MAP[fit];\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  mode: mode,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/image/index.wxss",
    "content": "@import '../common/index.wxss';.van-image{display:inline-block;position:relative;vertical-align:top}.van-image--round{border-radius:50%;overflow:hidden}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;height:100%;width:100%}.van-image__error,.van-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.van-image__loading-icon{color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.van-image__error-icon{color:var(--image-error-icon-color,#dcdee0);font-size:var(--image-error-icon-size,32px)!important}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/index-anchor/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/index-anchor/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = require(\"../common/utils\");\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useParent)('index-bar'),\n    props: {\n        useSlot: Boolean,\n        index: null,\n    },\n    data: {\n        active: false,\n        wrapperStyle: '',\n        anchorStyle: '',\n    },\n    methods: {\n        scrollIntoView: function (scrollTop) {\n            var _this = this;\n            (0, utils_1.getRect)(this, '.van-index-anchor-wrapper').then(function (rect) {\n                wx.pageScrollTo({\n                    duration: 0,\n                    scrollTop: scrollTop + rect.top - _this.parent.data.stickyOffsetTop,\n                });\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/index-anchor/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/index-anchor/index.wxml",
    "content": "<view\n  class=\"van-index-anchor-wrapper\"\n  style=\"{{ wrapperStyle }}\"\n>\n  <view\n    class=\"van-index-anchor {{ active ? 'van-index-anchor--active van-hairline--bottom' : '' }}\"\n    style=\"{{ anchorStyle }}\"\n  >\n    <slot wx:if=\"{{ useSlot }}\"/>\n    <block wx:else>\n      <text>{{ index }}</text>\n    </block>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/index-anchor/index.wxss",
    "content": "@import '../common/index.wxss';.van-index-anchor{background-color:var(--index-anchor-background-color,transparent);color:var(--index-anchor-text-color,#323233);font-size:var(--index-anchor-font-size,14px);font-weight:var(--index-anchor-font-weight,500);line-height:var(--index-anchor-line-height,32px);padding:var(--index-anchor-padding,0 16px)}.van-index-anchor--active{background-color:var(--index-anchor-active-background-color,#fff);color:var(--index-anchor-active-text-color,#07c160);left:0;right:0}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/index-bar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/index-bar/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = require(\"../common/color\");\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\nvar utils_1 = require(\"../common/utils\");\nvar page_scroll_1 = require(\"../mixins/page-scroll\");\nvar indexList = function () {\n    var indexList = [];\n    var charCodeOfA = 'A'.charCodeAt(0);\n    for (var i = 0; i < 26; i++) {\n        indexList.push(String.fromCharCode(charCodeOfA + i));\n    }\n    return indexList;\n};\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useChildren)('index-anchor', function () {\n        this.updateData();\n    }),\n    props: {\n        sticky: {\n            type: Boolean,\n            value: true,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        highlightColor: {\n            type: String,\n            value: color_1.GREEN,\n        },\n        stickyOffsetTop: {\n            type: Number,\n            value: 0,\n        },\n        indexList: {\n            type: Array,\n            value: indexList(),\n        },\n    },\n    mixins: [\n        (0, page_scroll_1.pageScrollMixin)(function (event) {\n            this.scrollTop = (event === null || event === void 0 ? void 0 : event.scrollTop) || 0;\n            this.onScroll();\n        }),\n    ],\n    data: {\n        activeAnchorIndex: null,\n        showSidebar: false,\n    },\n    created: function () {\n        this.scrollTop = 0;\n    },\n    methods: {\n        updateData: function () {\n            var _this = this;\n            wx.nextTick(function () {\n                if (_this.timer != null) {\n                    clearTimeout(_this.timer);\n                }\n                _this.timer = setTimeout(function () {\n                    _this.setData({\n                        showSidebar: !!_this.children.length,\n                    });\n                    _this.setRect().then(function () {\n                        _this.onScroll();\n                    });\n                }, 0);\n            });\n        },\n        setRect: function () {\n            return Promise.all([\n                this.setAnchorsRect(),\n                this.setListRect(),\n                this.setSiderbarRect(),\n            ]);\n        },\n        setAnchorsRect: function () {\n            var _this = this;\n            return Promise.all(this.children.map(function (anchor) {\n                return (0, utils_1.getRect)(anchor, '.van-index-anchor-wrapper').then(function (rect) {\n                    Object.assign(anchor, {\n                        height: rect.height,\n                        top: rect.top + _this.scrollTop,\n                    });\n                });\n            }));\n        },\n        setListRect: function () {\n            var _this = this;\n            return (0, utils_1.getRect)(this, '.van-index-bar').then(function (rect) {\n                if (!(0, utils_1.isDef)(rect)) {\n                    return;\n                }\n                Object.assign(_this, {\n                    height: rect.height,\n                    top: rect.top + _this.scrollTop,\n                });\n            });\n        },\n        setSiderbarRect: function () {\n            var _this = this;\n            return (0, utils_1.getRect)(this, '.van-index-bar__sidebar').then(function (res) {\n                if (!(0, utils_1.isDef)(res)) {\n                    return;\n                }\n                _this.sidebar = {\n                    height: res.height,\n                    top: res.top,\n                };\n            });\n        },\n        setDiffData: function (_a) {\n            var target = _a.target, data = _a.data;\n            var diffData = {};\n            Object.keys(data).forEach(function (key) {\n                if (target.data[key] !== data[key]) {\n                    diffData[key] = data[key];\n                }\n            });\n            if (Object.keys(diffData).length) {\n                target.setData(diffData);\n            }\n        },\n        getAnchorRect: function (anchor) {\n            return (0, utils_1.getRect)(anchor, '.van-index-anchor-wrapper').then(function (rect) { return ({\n                height: rect.height,\n                top: rect.top,\n            }); });\n        },\n        getActiveAnchorIndex: function () {\n            var _a = this, children = _a.children, scrollTop = _a.scrollTop;\n            var _b = this.data, sticky = _b.sticky, stickyOffsetTop = _b.stickyOffsetTop;\n            for (var i = this.children.length - 1; i >= 0; i--) {\n                var preAnchorHeight = i > 0 ? children[i - 1].height : 0;\n                var reachTop = sticky ? preAnchorHeight + stickyOffsetTop : 0;\n                if (reachTop + scrollTop >= children[i].top) {\n                    return i;\n                }\n            }\n            return -1;\n        },\n        onScroll: function () {\n            var _this = this;\n            var _a = this, _b = _a.children, children = _b === void 0 ? [] : _b, scrollTop = _a.scrollTop;\n            if (!children.length) {\n                return;\n            }\n            var _c = this.data, sticky = _c.sticky, stickyOffsetTop = _c.stickyOffsetTop, zIndex = _c.zIndex, highlightColor = _c.highlightColor;\n            var active = this.getActiveAnchorIndex();\n            this.setDiffData({\n                target: this,\n                data: {\n                    activeAnchorIndex: active,\n                },\n            });\n            if (sticky) {\n                var isActiveAnchorSticky_1 = false;\n                if (active !== -1) {\n                    isActiveAnchorSticky_1 =\n                        children[active].top <= stickyOffsetTop + scrollTop;\n                }\n                children.forEach(function (item, index) {\n                    if (index === active) {\n                        var wrapperStyle = '';\n                        var anchorStyle = \"\\n              color: \".concat(highlightColor, \";\\n            \");\n                        if (isActiveAnchorSticky_1) {\n                            wrapperStyle = \"\\n                height: \".concat(children[index].height, \"px;\\n              \");\n                            anchorStyle = \"\\n                position: fixed;\\n                top: \".concat(stickyOffsetTop, \"px;\\n                z-index: \").concat(zIndex, \";\\n                color: \").concat(highlightColor, \";\\n              \");\n                        }\n                        _this.setDiffData({\n                            target: item,\n                            data: {\n                                active: true,\n                                anchorStyle: anchorStyle,\n                                wrapperStyle: wrapperStyle,\n                            },\n                        });\n                    }\n                    else if (index === active - 1) {\n                        var currentAnchor = children[index];\n                        var currentOffsetTop = currentAnchor.top;\n                        var targetOffsetTop = index === children.length - 1\n                            ? _this.top\n                            : children[index + 1].top;\n                        var parentOffsetHeight = targetOffsetTop - currentOffsetTop;\n                        var translateY = parentOffsetHeight - currentAnchor.height;\n                        var anchorStyle = \"\\n              position: relative;\\n              transform: translate3d(0, \".concat(translateY, \"px, 0);\\n              z-index: \").concat(zIndex, \";\\n              color: \").concat(highlightColor, \";\\n            \");\n                        _this.setDiffData({\n                            target: item,\n                            data: {\n                                active: true,\n                                anchorStyle: anchorStyle,\n                            },\n                        });\n                    }\n                    else {\n                        _this.setDiffData({\n                            target: item,\n                            data: {\n                                active: false,\n                                anchorStyle: '',\n                                wrapperStyle: '',\n                            },\n                        });\n                    }\n                });\n            }\n        },\n        onClick: function (event) {\n            this.scrollToAnchor(event.target.dataset.index);\n        },\n        onTouchMove: function (event) {\n            var sidebarLength = this.children.length;\n            var touch = event.touches[0];\n            var itemHeight = this.sidebar.height / sidebarLength;\n            var index = Math.floor((touch.clientY - this.sidebar.top) / itemHeight);\n            if (index < 0) {\n                index = 0;\n            }\n            else if (index > sidebarLength - 1) {\n                index = sidebarLength - 1;\n            }\n            this.scrollToAnchor(index);\n        },\n        onTouchStop: function () {\n            this.scrollToAnchorIndex = null;\n        },\n        scrollToAnchor: function (index) {\n            var _this = this;\n            if (typeof index !== 'number' || this.scrollToAnchorIndex === index) {\n                return;\n            }\n            this.scrollToAnchorIndex = index;\n            var anchor = this.children.find(function (item) { return item.data.index === _this.data.indexList[index]; });\n            if (anchor) {\n                anchor.scrollIntoView(this.scrollTop);\n                this.$emit('select', anchor.data.index);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/index-bar/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/index-bar/index.wxml",
    "content": "<view class=\"van-index-bar\">\n  <slot />\n\n  <view\n    wx:if=\"{{ showSidebar }}\"\n    class=\"van-index-bar__sidebar\"\n    catch:tap=\"onClick\"\n    catch:touchmove=\"onTouchMove\"\n    catch:touchend=\"onTouchStop\"\n    catch:touchcancel=\"onTouchStop\"\n  >\n    <view\n      wx:for=\"{{ indexList }}\"\n      wx:key=\"index\"\n      class=\"van-index-bar__index\"\n      style=\"z-index: {{ zIndex + 1 }}; color: {{ activeAnchorIndex === index ? highlightColor : '' }}\"\n      data-index=\"{{ index }}\"\n    >\n      {{ item }}\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/index-bar/index.wxss",
    "content": "@import '../common/index.wxss';.van-index-bar{position:relative}.van-index-bar__sidebar{display:flex;flex-direction:column;position:fixed;right:0;text-align:center;top:50%;transform:translateY(-50%);-webkit-user-select:none;user-select:none}.van-index-bar__index{font-size:var(--index-bar-index-font-size,10px);font-weight:500;line-height:var(--index-bar-index-line-height,14px);padding:0 var(--padding-base,4px) 0 var(--padding-md,16px)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/info/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/info/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        dot: Boolean,\n        info: null,\n        customStyle: String,\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/info/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/info/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ info !== null && info !== '' || dot }}\"\n  class=\"van-info {{ utils.bem('info', { dot }) }} custom-class\"\n  style=\"{{ customStyle }}\"\n>{{ dot ? '' : info }}</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/info/index.wxss",
    "content": "@import '../common/index.wxss';.van-info{align-items:center;background-color:var(--info-background-color,#ee0a24);border:var(--info-border-width,1px) solid #fff;border-radius:var(--info-size,16px);box-sizing:border-box;color:var(--info-color,#fff);display:inline-flex;font-family:var(--info-font-family,-apple-system-font,Helvetica Neue,Arial,sans-serif);font-size:var(--info-font-size,12px);font-weight:var(--info-font-weight,500);height:var(--info-size,16px);justify-content:center;min-width:var(--info-size,16px);padding:var(--info-padding,0 3px);position:absolute;right:0;top:0;transform:translate(50%,-50%);transform-origin:100%;white-space:nowrap}.van-info--dot{background-color:var(--info-dot-color,#ee0a24);border-radius:100%;height:var(--info-dot-size,8px);min-width:0;width:var(--info-dot-size,8px)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/loading/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/loading/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        color: String,\n        vertical: Boolean,\n        type: {\n            type: String,\n            value: 'circular',\n        },\n        size: String,\n        textSize: String,\n    },\n    data: {\n        array12: Array.from({ length: 12 }),\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/loading/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/loading/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class {{ utils.bem('loading', { vertical }) }}\">\n  <view\n    class=\"van-loading__spinner van-loading__spinner--{{ type }}\"\n    style=\"{{ computed.spinnerStyle({ color, size }) }}\"\n  >\n    <view\n      wx:if=\"{{ type === 'spinner' }}\"\n      wx:for=\"{{ array12 }}\"\n      wx:key=\"index\"\n      class=\"van-loading__dot\"\n    />\n  </view>\n  <view class=\"van-loading__text\" style=\"{{ computed.textStyle({ textSize }) }}\">\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/loading/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction spinnerStyle(data) {\n  return style({\n    color: data.color,\n    width: addUnit(data.size),\n    height: addUnit(data.size),\n  });\n}\n\nfunction textStyle(data) {\n  return style({\n    'font-size': addUnit(data.textSize),\n  });\n}\n\nmodule.exports = {\n  spinnerStyle: spinnerStyle,\n  textStyle: textStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/loading/index.wxss",
    "content": "@import '../common/index.wxss';:host{font-size:0;line-height:1}.van-loading{align-items:center;color:var(--loading-spinner-color,#c8c9cc);display:inline-flex;justify-content:center}.van-loading__spinner{animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;box-sizing:border-box;height:var(--loading-spinner-size,30px);max-height:100%;max-width:100%;position:relative;width:var(--loading-spinner-size,30px)}.van-loading__spinner--spinner{animation-timing-function:steps(12)}.van-loading__spinner--circular{border:1px solid transparent;border-radius:100%;border-top-color:initial}.van-loading__text{color:var(--loading-text-color,#969799);font-size:var(--loading-text-font-size,14px);line-height:var(--loading-text-line-height,20px);margin-left:var(--padding-xs,8px)}.van-loading__text:empty{display:none}.van-loading--vertical{flex-direction:column}.van-loading--vertical .van-loading__text{margin:var(--padding-xs,8px) 0 0}.van-loading__dot{height:100%;left:0;position:absolute;top:0;width:100%}.van-loading__dot:before{background-color:currentColor;border-radius:40%;content:\" \";display:block;height:25%;margin:0 auto;width:2px}.van-loading__dot:first-of-type{opacity:1;transform:rotate(30deg)}.van-loading__dot:nth-of-type(2){opacity:.9375;transform:rotate(60deg)}.van-loading__dot:nth-of-type(3){opacity:.875;transform:rotate(90deg)}.van-loading__dot:nth-of-type(4){opacity:.8125;transform:rotate(120deg)}.van-loading__dot:nth-of-type(5){opacity:.75;transform:rotate(150deg)}.van-loading__dot:nth-of-type(6){opacity:.6875;transform:rotate(180deg)}.van-loading__dot:nth-of-type(7){opacity:.625;transform:rotate(210deg)}.van-loading__dot:nth-of-type(8){opacity:.5625;transform:rotate(240deg)}.van-loading__dot:nth-of-type(9){opacity:.5;transform:rotate(270deg)}.van-loading__dot:nth-of-type(10){opacity:.4375;transform:rotate(300deg)}.van-loading__dot:nth-of-type(11){opacity:.375;transform:rotate(330deg)}.van-loading__dot:nth-of-type(12){opacity:.3125;transform:rotate(1turn)}@keyframes van-rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/mixins/basic.d.ts",
    "content": "export declare const basic: string;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/mixins/basic.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.basic = void 0;\nexports.basic = Behavior({\n    methods: {\n        $emit: function (name, detail, options) {\n            this.triggerEvent(name, detail, options);\n        },\n        set: function (data) {\n            this.setData(data);\n            return new Promise(function (resolve) { return wx.nextTick(resolve); });\n        },\n        // high performance setData\n        setView: function (data, callback) {\n            var _this = this;\n            var target = {};\n            var hasChange = false;\n            Object.keys(data).forEach(function (key) {\n                if (data[key] !== _this.data[key]) {\n                    target[key] = data[key];\n                    hasChange = true;\n                }\n            });\n            if (hasChange) {\n                return this.setData(target, callback);\n            }\n            return callback && callback();\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/mixins/button.d.ts",
    "content": "export declare const button: string;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/mixins/button.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.button = void 0;\nvar version_1 = require(\"../common/version\");\nexports.button = Behavior({\n    externalClasses: ['hover-class'],\n    properties: {\n        id: String,\n        buttonId: String,\n        lang: String,\n        businessId: Number,\n        sessionFrom: String,\n        sendMessageTitle: String,\n        sendMessagePath: String,\n        sendMessageImg: String,\n        showMessageCard: Boolean,\n        appParameter: String,\n        ariaLabel: String,\n        openType: String,\n        getUserProfileDesc: String,\n    },\n    data: {\n        canIUseGetUserProfile: (0, version_1.canIUseGetUserProfile)(),\n    },\n    methods: {\n        onGetUserInfo: function (event) {\n            this.triggerEvent('getuserinfo', event.detail);\n        },\n        onContact: function (event) {\n            this.triggerEvent('contact', event.detail);\n        },\n        onGetPhoneNumber: function (event) {\n            this.triggerEvent('getphonenumber', event.detail);\n        },\n        onGetRealTimePhoneNumber: function (event) {\n            this.triggerEvent('getrealtimephonenumber', event.detail);\n        },\n        onError: function (event) {\n            this.triggerEvent('error', event.detail);\n        },\n        onLaunchApp: function (event) {\n            this.triggerEvent('launchapp', event.detail);\n        },\n        onOpenSetting: function (event) {\n            this.triggerEvent('opensetting', event.detail);\n        },\n        onAgreePrivacyAuthorization: function (event) {\n            this.triggerEvent('agreeprivacyauthorization', event.detail);\n        },\n        onChooseAvatar: function (event) {\n            this.triggerEvent('chooseavatar', event.detail);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/mixins/link.d.ts",
    "content": "export declare const link: string;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/mixins/link.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.link = void 0;\nexports.link = Behavior({\n    properties: {\n        url: String,\n        linkType: {\n            type: String,\n            value: 'navigateTo',\n        },\n    },\n    methods: {\n        jumpLink: function (urlKey) {\n            if (urlKey === void 0) { urlKey = 'url'; }\n            var url = this.data[urlKey];\n            if (url) {\n                if (this.data.linkType === 'navigateTo' &&\n                    getCurrentPages().length > 9) {\n                    wx.redirectTo({ url: url });\n                }\n                else {\n                    wx[this.data.linkType]({ url: url });\n                }\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/mixins/page-scroll.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\ntype IPageScrollOption = WechatMiniprogram.Page.IPageScrollOption;\ntype Scroller = (this: WechatMiniprogram.Component.TrivialInstance, event?: IPageScrollOption) => void;\nexport declare function pageScrollMixin(scroller: Scroller): string;\nexport {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/mixins/page-scroll.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pageScrollMixin = void 0;\nvar validator_1 = require(\"../common/validator\");\nvar utils_1 = require(\"../common/utils\");\nfunction onPageScroll(event) {\n    var _a = (0, utils_1.getCurrentPage)().vanPageScroller, vanPageScroller = _a === void 0 ? [] : _a;\n    vanPageScroller.forEach(function (scroller) {\n        if (typeof scroller === 'function') {\n            // @ts-ignore\n            scroller(event);\n        }\n    });\n}\nfunction pageScrollMixin(scroller) {\n    return Behavior({\n        attached: function () {\n            var page = (0, utils_1.getCurrentPage)();\n            if (!(0, utils_1.isDef)(page)) {\n                return;\n            }\n            var _scroller = scroller.bind(this);\n            var _a = page.vanPageScroller, vanPageScroller = _a === void 0 ? [] : _a;\n            if ((0, validator_1.isFunction)(page.onPageScroll) && page.onPageScroll !== onPageScroll) {\n                vanPageScroller.push(page.onPageScroll.bind(page));\n            }\n            vanPageScroller.push(_scroller);\n            page.vanPageScroller = vanPageScroller;\n            page.onPageScroll = onPageScroll;\n            this._scroller = _scroller;\n        },\n        detached: function () {\n            var _this = this;\n            var page = (0, utils_1.getCurrentPage)();\n            if (!(0, utils_1.isDef)(page) || !(0, utils_1.isDef)(page.vanPageScroller)) {\n                return;\n            }\n            var vanPageScroller = page.vanPageScroller;\n            var index = vanPageScroller.findIndex(function (v) { return v === _this._scroller; });\n            if (index > -1) {\n                page.vanPageScroller.splice(index, 1);\n            }\n            this._scroller = undefined;\n        },\n    });\n}\nexports.pageScrollMixin = pageScrollMixin;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/mixins/touch.d.ts",
    "content": "export declare const touch: string;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/mixins/touch.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.touch = void 0;\n// @ts-nocheck\nvar MIN_DISTANCE = 10;\nfunction getDirection(x, y) {\n    if (x > y && x > MIN_DISTANCE) {\n        return 'horizontal';\n    }\n    if (y > x && y > MIN_DISTANCE) {\n        return 'vertical';\n    }\n    return '';\n}\nexports.touch = Behavior({\n    methods: {\n        resetTouchStatus: function () {\n            this.direction = '';\n            this.deltaX = 0;\n            this.deltaY = 0;\n            this.offsetX = 0;\n            this.offsetY = 0;\n        },\n        touchStart: function (event) {\n            this.resetTouchStatus();\n            var touch = event.touches[0];\n            this.startX = touch.clientX;\n            this.startY = touch.clientY;\n        },\n        touchMove: function (event) {\n            var touch = event.touches[0];\n            this.deltaX = touch.clientX - this.startX;\n            this.deltaY = touch.clientY - this.startY;\n            this.offsetX = Math.abs(this.deltaX);\n            this.offsetY = Math.abs(this.deltaY);\n            this.direction =\n                this.direction || getDirection(this.offsetX, this.offsetY);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/mixins/transition.d.ts",
    "content": "export declare function transition(showDefaultValue: boolean): string;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/mixins/transition.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.transition = void 0;\n// @ts-nocheck\nvar utils_1 = require(\"../common/utils\");\nvar validator_1 = require(\"../common/validator\");\nvar getClassNames = function (name) { return ({\n    enter: \"van-\".concat(name, \"-enter van-\").concat(name, \"-enter-active enter-class enter-active-class\"),\n    'enter-to': \"van-\".concat(name, \"-enter-to van-\").concat(name, \"-enter-active enter-to-class enter-active-class\"),\n    leave: \"van-\".concat(name, \"-leave van-\").concat(name, \"-leave-active leave-class leave-active-class\"),\n    'leave-to': \"van-\".concat(name, \"-leave-to van-\").concat(name, \"-leave-active leave-to-class leave-active-class\"),\n}); };\nfunction transition(showDefaultValue) {\n    return Behavior({\n        properties: {\n            customStyle: String,\n            // @ts-ignore\n            show: {\n                type: Boolean,\n                value: showDefaultValue,\n                observer: 'observeShow',\n            },\n            // @ts-ignore\n            duration: {\n                type: null,\n                value: 300,\n            },\n            name: {\n                type: String,\n                value: 'fade',\n            },\n        },\n        data: {\n            type: '',\n            inited: false,\n            display: false,\n        },\n        ready: function () {\n            if (this.data.show === true) {\n                this.observeShow(true, false);\n            }\n        },\n        methods: {\n            observeShow: function (value, old) {\n                if (value === old) {\n                    return;\n                }\n                value ? this.enureEnter() : this.enureLeave();\n            },\n            enureEnter: function () {\n                var _this = this;\n                if (this.enterPromise)\n                    return;\n                this.enterPromise = new Promise(function (resolve) { return _this.enter(resolve); });\n            },\n            enureLeave: function () {\n                var _this = this;\n                var enterPromise = this.enterPromise;\n                if (!enterPromise)\n                    return;\n                enterPromise\n                    .then(function () { return new Promise(function (resolve) { return _this.leave(resolve); }); })\n                    .then(function () {\n                    _this.enterPromise = null;\n                });\n            },\n            enter: function (resolve) {\n                var _this = this;\n                var _a = this.data, duration = _a.duration, name = _a.name;\n                var classNames = getClassNames(name);\n                var currentDuration = (0, validator_1.isObj)(duration) ? duration.enter : duration;\n                if (this.status === 'enter') {\n                    return;\n                }\n                this.status = 'enter';\n                this.$emit('before-enter');\n                (0, utils_1.requestAnimationFrame)(function () {\n                    if (_this.status !== 'enter') {\n                        return;\n                    }\n                    _this.$emit('enter');\n                    _this.setData({\n                        inited: true,\n                        display: true,\n                        classes: classNames.enter,\n                        currentDuration: currentDuration,\n                    });\n                    (0, utils_1.requestAnimationFrame)(function () {\n                        if (_this.status !== 'enter') {\n                            return;\n                        }\n                        _this.transitionEnded = false;\n                        _this.setData({ classes: classNames['enter-to'] });\n                        resolve();\n                    });\n                });\n            },\n            leave: function (resolve) {\n                var _this = this;\n                if (!this.data.display) {\n                    return;\n                }\n                var _a = this.data, duration = _a.duration, name = _a.name;\n                var classNames = getClassNames(name);\n                var currentDuration = (0, validator_1.isObj)(duration) ? duration.leave : duration;\n                this.status = 'leave';\n                this.$emit('before-leave');\n                (0, utils_1.requestAnimationFrame)(function () {\n                    if (_this.status !== 'leave') {\n                        return;\n                    }\n                    _this.$emit('leave');\n                    _this.setData({\n                        classes: classNames.leave,\n                        currentDuration: currentDuration,\n                    });\n                    (0, utils_1.requestAnimationFrame)(function () {\n                        if (_this.status !== 'leave') {\n                            return;\n                        }\n                        _this.transitionEnded = false;\n                        setTimeout(function () {\n                            _this.onTransitionEnd();\n                            resolve();\n                        }, currentDuration);\n                        _this.setData({ classes: classNames['leave-to'] });\n                    });\n                });\n            },\n            onTransitionEnd: function () {\n                if (this.transitionEnded) {\n                    return;\n                }\n                this.transitionEnded = true;\n                this.$emit(\"after-\".concat(this.status));\n                var _a = this.data, show = _a.show, display = _a.display;\n                if (!show && display) {\n                    this.setData({ display: false });\n                }\n            },\n        },\n    });\n}\nexports.transition = transition;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/nav-bar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/nav-bar/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar utils_1 = require(\"../common/utils\");\n(0, component_1.VantComponent)({\n    classes: ['title-class'],\n    props: {\n        title: String,\n        fixed: {\n            type: Boolean,\n            observer: 'setHeight',\n        },\n        placeholder: {\n            type: Boolean,\n            observer: 'setHeight',\n        },\n        leftText: String,\n        rightText: String,\n        customStyle: String,\n        leftArrow: Boolean,\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        safeAreaInsetTop: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        height: 46,\n    },\n    created: function () {\n        var statusBarHeight = (0, utils_1.getSystemInfoSync)().statusBarHeight;\n        this.setData({\n            statusBarHeight: statusBarHeight,\n            height: 46 + statusBarHeight,\n        });\n    },\n    mounted: function () {\n        this.setHeight();\n    },\n    methods: {\n        onClickLeft: function () {\n            this.$emit('click-left');\n        },\n        onClickRight: function () {\n            this.$emit('click-right');\n        },\n        setHeight: function () {\n            var _this = this;\n            if (!this.data.fixed || !this.data.placeholder) {\n                return;\n            }\n            wx.nextTick(function () {\n                (0, utils_1.getRect)(_this, '.van-nav-bar').then(function (res) {\n                    if (res && 'height' in res) {\n                        _this.setData({ height: res.height });\n                    }\n                });\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/nav-bar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/nav-bar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view wx:if=\"{{ fixed && placeholder }}\" style=\"height: {{ height }}px;\" />\n\n<view\n  class=\"{{ utils.bem('nav-bar', { fixed }) }} custom-class {{ border ? 'van-hairline--bottom' : '' }}\"\n  style=\"{{ computed.barStyle({ zIndex, statusBarHeight, safeAreaInsetTop }) }}; {{ customStyle }}\"\n>\n  <view class=\"van-nav-bar__content\">\n    <view class=\"van-nav-bar__left\" bind:tap=\"onClickLeft\">\n      <block wx:if=\"{{ leftArrow || leftText }}\">\n        <van-icon\n          wx:if=\"{{ leftArrow }}\"\n          size=\"16px\"\n          name=\"arrow-left\"\n          custom-class=\"van-nav-bar__arrow\"\n        />\n        <view\n          wx:if=\"{{ leftText }}\"\n          class=\"van-nav-bar__text\"\n          hover-class=\"van-nav-bar__text--hover\"\n          hover-stay-time=\"70\"\n        >{{ leftText }}</view>\n      </block>\n      <slot wx:else name=\"left\" />\n    </view>\n    <view class=\"van-nav-bar__title title-class van-ellipsis\">\n      <block wx:if=\"{{ title }}\">{{ title }}</block>\n      <slot wx:else name=\"title\" />\n    </view>\n    <view class=\"van-nav-bar__right\" bind:tap=\"onClickRight\">\n      <view\n        wx:if=\"{{ rightText }}\"\n        class=\"van-nav-bar__text\"\n        hover-class=\"van-nav-bar__text--hover\"\n        hover-stay-time=\"70\"\n      >{{ rightText }}</view>\n      <slot wx:else name=\"right\" />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/nav-bar/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction barStyle(data) {\n  return style({\n    'z-index': data.zIndex,\n    'padding-top': data.safeAreaInsetTop ? data.statusBarHeight + 'px' : 0,\n  });\n}\n\nmodule.exports = {\n  barStyle: barStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/nav-bar/index.wxss",
    "content": "@import '../common/index.wxss';.van-nav-bar{background-color:var(--nav-bar-background-color,#fff);box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.van-nav-bar__content{height:100%;position:relative}.van-nav-bar__text{color:var(--nav-bar-text-color,#1989fa);display:inline-block;margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.van-nav-bar__text--hover{background-color:#f2f3f5}.van-nav-bar__arrow{color:var(--nav-bar-icon-color,#1989fa)!important;font-size:var(--nav-bar-arrow-size,16px)!important;vertical-align:middle}.van-nav-bar__arrow+.van-nav-bar__text{margin-left:-20px;padding-left:25px}.van-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.van-nav-bar__title{color:var(--nav-bar-title-text-color,#323233);font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--font-weight-bold,500);margin:0 auto;max-width:60%}.van-nav-bar__left,.van-nav-bar__right{align-items:center;bottom:0;display:flex;font-size:var(--font-size-md,14px);position:absolute;top:0}.van-nav-bar__left{left:var(--padding-md,16px)}.van-nav-bar__right{right:var(--padding-md,16px)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/notice-bar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/notice-bar/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar utils_1 = require(\"../common/utils\");\n(0, component_1.VantComponent)({\n    props: {\n        text: {\n            type: String,\n            value: '',\n            observer: 'init',\n        },\n        mode: {\n            type: String,\n            value: '',\n        },\n        url: {\n            type: String,\n            value: '',\n        },\n        openType: {\n            type: String,\n            value: 'navigate',\n        },\n        delay: {\n            type: Number,\n            value: 1,\n        },\n        speed: {\n            type: Number,\n            value: 60,\n            observer: 'init',\n        },\n        scrollable: null,\n        leftIcon: {\n            type: String,\n            value: '',\n        },\n        color: String,\n        backgroundColor: String,\n        background: String,\n        wrapable: Boolean,\n    },\n    data: {\n        show: true,\n    },\n    created: function () {\n        this.resetAnimation = wx.createAnimation({\n            duration: 0,\n            timingFunction: 'linear',\n        });\n    },\n    destroyed: function () {\n        this.timer && clearTimeout(this.timer);\n    },\n    mounted: function () {\n        this.init();\n    },\n    methods: {\n        init: function () {\n            var _this = this;\n            (0, utils_1.requestAnimationFrame)(function () {\n                Promise.all([\n                    (0, utils_1.getRect)(_this, '.van-notice-bar__content'),\n                    (0, utils_1.getRect)(_this, '.van-notice-bar__wrap'),\n                ]).then(function (rects) {\n                    var contentRect = rects[0], wrapRect = rects[1];\n                    var scrollable = _this.data.scrollable;\n                    if (contentRect == null ||\n                        wrapRect == null ||\n                        !contentRect.width ||\n                        !wrapRect.width ||\n                        scrollable === false) {\n                        return;\n                    }\n                    if (scrollable || wrapRect.width < contentRect.width) {\n                        _this.initAnimation(wrapRect.width, contentRect.width);\n                        _this.scroll(true);\n                    }\n                });\n            });\n        },\n        initAnimation: function (warpWidth, contentWidth) {\n            var _a = this.data, speed = _a.speed, delay = _a.delay;\n            this.wrapWidth = warpWidth;\n            this.contentWidth = contentWidth;\n            // begin 0\n            this.contentDuration = (contentWidth / speed) * 1000;\n            // begin -wrapWidth\n            this.duration = ((warpWidth + contentWidth) / speed) * 1000;\n            this.animation = wx.createAnimation({\n                duration: this.contentDuration,\n                timingFunction: 'linear',\n                delay: delay,\n            });\n        },\n        scroll: function (isInit) {\n            var _this = this;\n            if (isInit === void 0) { isInit = false; }\n            this.timer && clearTimeout(this.timer);\n            this.timer = null;\n            this.setData({\n                animationData: this.resetAnimation\n                    .translateX(isInit ? 0 : this.wrapWidth)\n                    .step()\n                    .export(),\n            });\n            var duration = isInit ? this.contentDuration : this.duration;\n            (0, utils_1.requestAnimationFrame)(function () {\n                _this.setData({\n                    animationData: _this.animation\n                        .translateX(-_this.contentWidth)\n                        .step({ duration: duration })\n                        .export(),\n                });\n            });\n            this.timer = setTimeout(function () {\n                _this.scroll();\n            }, duration + this.data.delay);\n        },\n        onClickIcon: function (event) {\n            if (this.data.mode === 'closeable') {\n                this.timer && clearTimeout(this.timer);\n                this.timer = null;\n                this.setData({ show: false });\n                this.$emit('close', event.detail);\n            }\n        },\n        onClick: function (event) {\n            this.$emit('click', event);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/notice-bar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/notice-bar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  wx:if=\"{{ show }}\"\n  class=\"custom-class {{ utils.bem('notice-bar', { withicon: mode, wrapable }) }}\"\n  style=\"{{ computed.rootStyle({ color, backgroundColor, background }) }}\"\n  bind:tap=\"onClick\"\n>\n  <van-icon\n    wx:if=\"{{ leftIcon }}\"\n    name=\"{{ leftIcon }}\"\n    class=\"van-notice-bar__left-icon\"\n  />\n  <slot wx:else name=\"left-icon\" />\n\n  <view class=\"van-notice-bar__wrap\">\n    <view class=\"van-notice-bar__content {{ scrollable === false && !wrapable ? 'van-ellipsis' : '' }}\" animation=\"{{ animationData }}\">\n      {{ text }}\n      <slot wx:if=\"{{ !text }}\"></slot>\n    </view>\n  </view>\n\n  <van-icon\n    wx:if=\"{{ mode === 'closeable' }}\"\n    class=\"van-notice-bar__right-icon\"\n    name=\"cross\"\n    catch:tap=\"onClickIcon\"\n  />\n  <navigator\n    wx:elif=\"{{ mode === 'link' }}\"\n    url=\"{{ url }}\"\n    open-type=\"{{ openType }}\"\n  >\n    <van-icon class=\"van-notice-bar__right-icon\" name=\"arrow\" />\n  </navigator>\n  <slot wx:else name=\"right-icon\" />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/notice-bar/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    color: data.color,\n    'background-color': data.backgroundColor,\n    background: data.background,\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/notice-bar/index.wxss",
    "content": "@import '../common/index.wxss';.van-notice-bar{align-items:center;background-color:var(--notice-bar-background-color,#fffbe8);color:var(--notice-bar-text-color,#ed6a0c);display:flex;font-size:var(--notice-bar-font-size,14px);height:var(--notice-bar-height,40px);line-height:var(--notice-bar-line-height,24px);padding:var(--notice-bar-padding,0 16px)}.van-notice-bar--withicon{padding-right:40px;position:relative}.van-notice-bar--wrapable{height:auto;padding:var(--notice-bar-wrapable-padding,8px 16px)}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal}.van-notice-bar__left-icon{align-items:center;display:flex;margin-right:4px;vertical-align:middle}.van-notice-bar__left-icon,.van-notice-bar__right-icon{font-size:var(--notice-bar-icon-size,16px);min-width:var(--notice-bar-icon-min-width,22px)}.van-notice-bar__right-icon{position:absolute;right:15px;top:10px}.van-notice-bar__wrap{flex:1;height:var(--notice-bar-line-height,24px);overflow:hidden;position:relative}.van-notice-bar__content{position:absolute;white-space:nowrap}.van-notice-bar__content.van-ellipsis{max-width:100%}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/notify/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/notify/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar color_1 = require(\"../common/color\");\nvar utils_1 = require(\"../common/utils\");\n(0, component_1.VantComponent)({\n    props: {\n        message: String,\n        background: String,\n        type: {\n            type: String,\n            value: 'danger',\n        },\n        color: {\n            type: String,\n            value: color_1.WHITE,\n        },\n        duration: {\n            type: Number,\n            value: 3000,\n        },\n        zIndex: {\n            type: Number,\n            value: 110,\n        },\n        safeAreaInsetTop: {\n            type: Boolean,\n            value: false,\n        },\n        top: null,\n    },\n    data: {\n        show: false,\n        onOpened: null,\n        onClose: null,\n        onClick: null,\n    },\n    created: function () {\n        var statusBarHeight = (0, utils_1.getSystemInfoSync)().statusBarHeight;\n        this.setData({ statusBarHeight: statusBarHeight });\n    },\n    methods: {\n        show: function () {\n            var _this = this;\n            var _a = this.data, duration = _a.duration, onOpened = _a.onOpened;\n            clearTimeout(this.timer);\n            this.setData({ show: true });\n            wx.nextTick(onOpened);\n            if (duration > 0 && duration !== Infinity) {\n                this.timer = setTimeout(function () {\n                    _this.hide();\n                }, duration);\n            }\n        },\n        hide: function () {\n            var onClose = this.data.onClose;\n            clearTimeout(this.timer);\n            this.setData({ show: false });\n            wx.nextTick(onClose);\n        },\n        onTap: function (event) {\n            var onClick = this.data.onClick;\n            if (onClick) {\n                onClick(event.detail);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/notify/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-transition\": \"../transition/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/notify/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-transition\n  name=\"slide-down\"\n  show=\"{{ show }}\"\n  custom-class=\"van-notify__container\"\n  custom-style=\"{{ computed.rootStyle({ zIndex, top }) }}\"\n  bind:tap=\"onTap\"\n>\n  <view\n    class=\"van-notify van-notify--{{ type }}\"\n    style=\"{{ computed.notifyStyle({ background, color }) }}\"\n  >\n    <view\n      wx:if=\"{{ safeAreaInsetTop }}\"\n      style=\"height: {{ statusBarHeight }}px\"\n    />\n    <text>{{ message }}</text>\n  </view>\n</van-transition>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/notify/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    'z-index': data.zIndex,\n    top: addUnit(data.top),\n  });\n}\n\nfunction notifyStyle(data) {\n  return style({\n    background: data.background,\n    color: data.color,\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  notifyStyle: notifyStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/notify/index.wxss",
    "content": "@import '../common/index.wxss';.van-notify{word-wrap:break-word;font-size:var(--notify-font-size,14px);line-height:var(--notify-line-height,20px);padding:var(--notify-padding,6px 15px);text-align:center}.van-notify__container{box-sizing:border-box;left:0;position:fixed;top:0;width:100%}.van-notify--primary{background-color:var(--notify-primary-background-color,#1989fa)}.van-notify--success{background-color:var(--notify-success-background-color,#07c160)}.van-notify--danger{background-color:var(--notify-danger-background-color,#ee0a24)}.van-notify--warning{background-color:var(--notify-warning-background-color,#ff976a)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/notify/notify.d.ts",
    "content": "interface NotifyOptions {\n    type?: 'primary' | 'success' | 'danger' | 'warning';\n    color?: string;\n    zIndex?: number;\n    top?: number;\n    message: string;\n    context?: any;\n    duration?: number;\n    selector?: string;\n    background?: string;\n    safeAreaInsetTop?: boolean;\n    onClick?: () => void;\n    onOpened?: () => void;\n    onClose?: () => void;\n}\ndeclare function Notify(options: NotifyOptions | string): any;\ndeclare namespace Notify {\n    var clear: (options?: NotifyOptions | undefined) => void;\n    var setDefaultOptions: (options: NotifyOptions) => void;\n    var resetDefaultOptions: () => void;\n}\nexport default Notify;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/notify/notify.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar color_1 = require(\"../common/color\");\nvar defaultOptions = {\n    selector: '#van-notify',\n    type: 'danger',\n    message: '',\n    background: '',\n    duration: 3000,\n    zIndex: 110,\n    top: 0,\n    color: color_1.WHITE,\n    safeAreaInsetTop: false,\n    onClick: function () { },\n    onOpened: function () { },\n    onClose: function () { },\n};\nvar currentOptions = __assign({}, defaultOptions);\nfunction parseOptions(message) {\n    if (message == null) {\n        return {};\n    }\n    return typeof message === 'string' ? { message: message } : message;\n}\nfunction getContext() {\n    var pages = getCurrentPages();\n    return pages[pages.length - 1];\n}\nfunction Notify(options) {\n    options = __assign(__assign({}, currentOptions), parseOptions(options));\n    var context = options.context || getContext();\n    var notify = context.selectComponent(options.selector);\n    delete options.context;\n    delete options.selector;\n    if (notify) {\n        notify.setData(options);\n        notify.show();\n        return notify;\n    }\n    console.warn('未找到 van-notify 节点，请确认 selector 及 context 是否正确');\n}\nexports.default = Notify;\nNotify.clear = function (options) {\n    options = __assign(__assign({}, defaultOptions), parseOptions(options));\n    var context = options.context || getContext();\n    var notify = context.selectComponent(options.selector);\n    if (notify) {\n        notify.hide();\n    }\n};\nNotify.setDefaultOptions = function (options) {\n    Object.assign(currentOptions, options);\n};\nNotify.resetDefaultOptions = function () {\n    currentOptions = __assign({}, defaultOptions);\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/overlay/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/overlay/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        show: Boolean,\n        customStyle: String,\n        duration: {\n            type: null,\n            value: 300,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        lockScroll: {\n            type: Boolean,\n            value: true,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    methods: {\n        onClick: function () {\n            this.$emit('click');\n        },\n        // for prevent touchmove\n        noop: function () { },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/overlay/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-transition\": \"../transition/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/overlay/index.wxml",
    "content": "<import src=\"./overlay.wxml\" />\n\n<root-portal wx:if=\"{{ rootPortal }}\">\n  <include src=\"./overlay.wxml\" />\n</root-portal>\n\n<include wx:else src=\"./overlay.wxml\" />\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/overlay/index.wxss",
    "content": "@import '../common/index.wxss';.van-overlay{background-color:var(--overlay-background-color,rgba(0,0,0,.7));height:100%;left:0;position:fixed;top:0;width:100%}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/overlay/overlay.wxml",
    "content": "<van-transition\n  show=\"{{ show }}\"\n  custom-class=\"van-overlay custom-class\"\n  custom-style=\"z-index: {{ zIndex }}; {{ customStyle }}\"\n  duration=\"{{ duration }}\"\n  bind:tap=\"onClick\"\n  catch:touchmove=\"{{ lockScroll ? 'noop' : ''}}\"\n>\n  <slot></slot>\n</van-transition>"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/panel/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/panel/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: ['header-class', 'footer-class'],\n    props: {\n        desc: String,\n        title: String,\n        status: String,\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/panel/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-cell\": \"../cell/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/panel/index.wxml",
    "content": "<view class=\"van-panel van-hairline--top-bottom custom-class\">\n  <van-cell\n    wx:if=\"{{ title || desc || status }}\"\n    title=\"{{ title }}\"\n    label=\"{{ desc }}\"\n    value=\"{{ status }}\"\n    custom-class=\"header-class\"\n    value-class=\"van-panel__header-value\"\n  />\n  <slot wx:else name=\"header\" />\n\n  <view class=\"van-panel__content\">\n    <slot />\n  </view>\n\n  <view class=\"van-panel__footer van-hairline--top footer-class\">\n    <slot name=\"footer\" />\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/panel/index.wxss",
    "content": "@import '../common/index.wxss';.van-panel{background:var(--panel-background-color,#fff)}.van-panel__header-value{color:var(--panel-header-value-color,#ee0a24)}.van-panel__footer{padding:var(--panel-footer-padding,8px 16px)}.van-panel__footer:empty{display:none}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar shared_1 = require(\"./shared\");\n(0, component_1.VantComponent)({\n    classes: ['active-class', 'toolbar-class', 'column-class'],\n    props: __assign(__assign({}, shared_1.pickerProps), { valueKey: {\n            type: String,\n            value: 'text',\n        }, toolbarPosition: {\n            type: String,\n            value: 'top',\n        }, defaultIndex: {\n            type: Number,\n            value: 0,\n        }, columns: {\n            type: Array,\n            value: [],\n            observer: function (columns) {\n                if (columns === void 0) { columns = []; }\n                this.simple = columns.length && !columns[0].values;\n                if (Array.isArray(this.children) && this.children.length) {\n                    this.setColumns().catch(function () { });\n                }\n            },\n        } }),\n    beforeCreate: function () {\n        var _this = this;\n        Object.defineProperty(this, 'children', {\n            get: function () { return _this.selectAllComponents('.van-picker__column') || []; },\n        });\n    },\n    methods: {\n        noop: function () { },\n        setColumns: function () {\n            var _this = this;\n            var data = this.data;\n            var columns = this.simple ? [{ values: data.columns }] : data.columns;\n            var stack = columns.map(function (column, index) {\n                return _this.setColumnValues(index, column.values);\n            });\n            return Promise.all(stack);\n        },\n        emit: function (event) {\n            var type = event.currentTarget.dataset.type;\n            if (this.simple) {\n                this.$emit(type, {\n                    value: this.getColumnValue(0),\n                    index: this.getColumnIndex(0),\n                });\n            }\n            else {\n                this.$emit(type, {\n                    value: this.getValues(),\n                    index: this.getIndexes(),\n                });\n            }\n        },\n        onChange: function (event) {\n            if (this.simple) {\n                this.$emit('change', {\n                    picker: this,\n                    value: this.getColumnValue(0),\n                    index: this.getColumnIndex(0),\n                });\n            }\n            else {\n                this.$emit('change', {\n                    picker: this,\n                    value: this.getValues(),\n                    index: event.currentTarget.dataset.index,\n                });\n            }\n        },\n        // get column instance by index\n        getColumn: function (index) {\n            return this.children[index];\n        },\n        // get column value by index\n        getColumnValue: function (index) {\n            var column = this.getColumn(index);\n            return column && column.getValue();\n        },\n        // set column value by index\n        setColumnValue: function (index, value) {\n            var column = this.getColumn(index);\n            if (column == null) {\n                return Promise.reject(new Error('setColumnValue: 对应列不存在'));\n            }\n            return column.setValue(value);\n        },\n        // get column option index by column index\n        getColumnIndex: function (columnIndex) {\n            return (this.getColumn(columnIndex) || {}).data.currentIndex;\n        },\n        // set column option index by column index\n        setColumnIndex: function (columnIndex, optionIndex) {\n            var column = this.getColumn(columnIndex);\n            if (column == null) {\n                return Promise.reject(new Error('setColumnIndex: 对应列不存在'));\n            }\n            return column.setIndex(optionIndex);\n        },\n        // get options of column by index\n        getColumnValues: function (index) {\n            return (this.children[index] || {}).data.options;\n        },\n        // set options of column by index\n        setColumnValues: function (index, options, needReset) {\n            if (needReset === void 0) { needReset = true; }\n            var column = this.children[index];\n            if (column == null) {\n                return Promise.reject(new Error('setColumnValues: 对应列不存在'));\n            }\n            var isSame = JSON.stringify(column.data.options) === JSON.stringify(options);\n            if (isSame) {\n                return Promise.resolve();\n            }\n            return column.set({ options: options }).then(function () {\n                if (needReset) {\n                    column.setIndex(0);\n                }\n            });\n        },\n        // get values of all columns\n        getValues: function () {\n            return this.children.map(function (child) { return child.getValue(); });\n        },\n        // set values of all columns\n        setValues: function (values) {\n            var _this = this;\n            var stack = values.map(function (value, index) {\n                return _this.setColumnValue(index, value);\n            });\n            return Promise.all(stack);\n        },\n        // get indexes of all columns\n        getIndexes: function () {\n            return this.children.map(function (child) { return child.data.currentIndex; });\n        },\n        // set indexes of all columns\n        setIndexes: function (indexes) {\n            var _this = this;\n            var stack = indexes.map(function (optionIndex, columnIndex) {\n                return _this.setColumnIndex(columnIndex, optionIndex);\n            });\n            return Promise.all(stack);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"picker-column\": \"../picker-column/index\",\n    \"loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-picker custom-class\">\n  <include wx:if=\"{{ toolbarPosition === 'top' }}\" src=\"./toolbar.wxml\" />\n\n  <view wx:if=\"{{ loading }}\" class=\"van-picker__loading\">\n    <loading color=\"#1989fa\"/>\n  </view>\n\n  <view\n    class=\"van-picker__columns\"\n    style=\"{{ computed.columnsStyle({ itemHeight, visibleItemCount }) }}\"\n    catch:touchmove=\"noop\"\n  >\n    <picker-column\n      class=\"van-picker__column\"\n      wx:for=\"{{ computed.columns(columns) }}\"\n      wx:key=\"index\"\n      data-index=\"{{ index }}\"\n      custom-class=\"column-class\"\n      value-key=\"{{ valueKey }}\"\n      initial-options=\"{{ item.values }}\"\n      default-index=\"{{ item.defaultIndex || defaultIndex }}\"\n      item-height=\"{{ itemHeight }}\"\n      visible-item-count=\"{{ visibleItemCount }}\"\n      active-class=\"active-class\"\n      bind:change=\"onChange\"\n    />\n    <view class=\"van-picker__mask\" style=\"{{ computed.maskStyle({ itemHeight, visibleItemCount }) }}\" />\n    <view\n      class=\"van-picker__frame van-hairline--top-bottom\"\n      style=\"{{ computed.frameStyle({ itemHeight }) }}\"\n    />\n  </view>\n\n  <include wx:if=\"{{ toolbarPosition === 'bottom' }}\" src=\"./toolbar.wxml\" />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\nvar array = require('../wxs/array.wxs');\n\nfunction columnsStyle(data) {\n  return style({\n    height: addUnit(data.itemHeight * data.visibleItemCount),\n  });\n}\n\nfunction maskStyle(data) {\n  return style({\n    'background-size':\n      '100% ' + addUnit((data.itemHeight * (data.visibleItemCount - 1)) / 2),\n  });\n}\n\nfunction frameStyle(data) {\n  return style({\n    height: addUnit(data.itemHeight),\n  });\n}\n\nfunction columns(columns) {\n  if (!array.isArray(columns)) {\n    return [];\n  }\n\n  if (columns.length && !columns[0].values) {\n    return [{ values: columns }];\n  }\n\n  return columns;\n}\n\nmodule.exports = {\n  columnsStyle: columnsStyle,\n  frameStyle: frameStyle,\n  maskStyle: maskStyle,\n  columns: columns,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker/index.wxss",
    "content": "@import '../common/index.wxss';.van-picker{-webkit-text-size-adjust:100%;background-color:var(--picker-background-color,#fff);overflow:hidden;position:relative;-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:flex;height:var(--picker-toolbar-height,44px);justify-content:space-between;line-height:var(--picker-toolbar-height,44px)}.van-picker__cancel,.van-picker__confirm{font-size:var(--picker-action-font-size,14px);padding:var(--picker-action-padding,0 16px)}.van-picker__cancel--hover,.van-picker__confirm--hover{opacity:.7}.van-picker__confirm{color:var(--picker-confirm-action-color,#576b95)}.van-picker__cancel{color:var(--picker-cancel-action-color,#969799)}.van-picker__title{font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bold,500);max-width:50%;text-align:center}.van-picker__columns{display:flex;position:relative}.van-picker__column{flex:1 1;width:0}.van-picker__loading{align-items:center;background-color:var(--picker-loading-mask-color,hsla(0,0%,100%,.9));bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:4}.van-picker__mask{-webkit-backface-visibility:hidden;backface-visibility:hidden;background-image:linear-gradient(180deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4)),linear-gradient(0deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.4));background-position:top,bottom;background-repeat:no-repeat;height:100%;left:0;top:0;width:100%;z-index:2}.van-picker__frame,.van-picker__mask{pointer-events:none;position:absolute}.van-picker__frame{left:16px;right:16px;top:50%;transform:translateY(-50%);z-index:1}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker/shared.d.ts",
    "content": "export declare const pickerProps: {\n    title: StringConstructor;\n    loading: BooleanConstructor;\n    showToolbar: BooleanConstructor;\n    cancelButtonText: {\n        type: StringConstructor;\n        value: string;\n    };\n    confirmButtonText: {\n        type: StringConstructor;\n        value: string;\n    };\n    visibleItemCount: {\n        type: NumberConstructor;\n        value: number;\n    };\n    itemHeight: {\n        type: NumberConstructor;\n        value: number;\n    };\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker/shared.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pickerProps = void 0;\nexports.pickerProps = {\n    title: String,\n    loading: Boolean,\n    showToolbar: Boolean,\n    cancelButtonText: {\n        type: String,\n        value: '取消',\n    },\n    confirmButtonText: {\n        type: String,\n        value: '确认',\n    },\n    visibleItemCount: {\n        type: Number,\n        value: 6,\n    },\n    itemHeight: {\n        type: Number,\n        value: 44,\n    },\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker/toolbar.wxml",
    "content": "<view wx:if=\"{{ showToolbar }}\" class=\"van-picker__toolbar toolbar-class\">\n  <view\n    class=\"van-picker__cancel\"\n    hover-class=\"van-picker__cancel--hover\"\n    hover-stay-time=\"70\"\n    data-type=\"cancel\"\n    bindtap=\"emit\"\n  >\n    {{ cancelButtonText }}\n  </view>\n  <view wx:if=\"{{ title }}\" class=\"van-picker__title van-ellipsis\">{{\n    title\n  }}</view>\n  <view\n    class=\"van-picker__confirm\"\n    hover-class=\"van-picker__confirm--hover\"\n    hover-stay-time=\"70\"\n    data-type=\"confirm\"\n    bindtap=\"emit\"\n  >\n    {{ confirmButtonText }}\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker-column/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker-column/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar utils_1 = require(\"../common/utils\");\nvar validator_1 = require(\"../common/validator\");\nvar DEFAULT_DURATION = 200;\n(0, component_1.VantComponent)({\n    classes: ['active-class'],\n    props: {\n        valueKey: String,\n        className: String,\n        itemHeight: Number,\n        visibleItemCount: Number,\n        initialOptions: {\n            type: Array,\n            value: [],\n        },\n        defaultIndex: {\n            type: Number,\n            value: 0,\n            observer: function (value) {\n                this.setIndex(value);\n            },\n        },\n    },\n    data: {\n        startY: 0,\n        offset: 0,\n        duration: 0,\n        startOffset: 0,\n        options: [],\n        currentIndex: 0,\n    },\n    created: function () {\n        var _this = this;\n        var _a = this.data, defaultIndex = _a.defaultIndex, initialOptions = _a.initialOptions;\n        this.set({\n            currentIndex: defaultIndex,\n            options: initialOptions,\n        }).then(function () {\n            _this.setIndex(defaultIndex);\n        });\n    },\n    methods: {\n        getCount: function () {\n            return this.data.options.length;\n        },\n        onTouchStart: function (event) {\n            this.setData({\n                startY: event.touches[0].clientY,\n                startOffset: this.data.offset,\n                duration: 0,\n            });\n        },\n        onTouchMove: function (event) {\n            var data = this.data;\n            var deltaY = event.touches[0].clientY - data.startY;\n            this.setData({\n                offset: (0, utils_1.range)(data.startOffset + deltaY, -(this.getCount() * data.itemHeight), data.itemHeight),\n            });\n        },\n        onTouchEnd: function () {\n            var data = this.data;\n            if (data.offset !== data.startOffset) {\n                this.setData({ duration: DEFAULT_DURATION });\n                var index = (0, utils_1.range)(Math.round(-data.offset / data.itemHeight), 0, this.getCount() - 1);\n                this.setIndex(index, true);\n            }\n        },\n        onClickItem: function (event) {\n            var index = event.currentTarget.dataset.index;\n            this.setIndex(index, true);\n        },\n        adjustIndex: function (index) {\n            var data = this.data;\n            var count = this.getCount();\n            index = (0, utils_1.range)(index, 0, count);\n            for (var i = index; i < count; i++) {\n                if (!this.isDisabled(data.options[i]))\n                    return i;\n            }\n            for (var i = index - 1; i >= 0; i--) {\n                if (!this.isDisabled(data.options[i]))\n                    return i;\n            }\n        },\n        isDisabled: function (option) {\n            return (0, validator_1.isObj)(option) && option.disabled;\n        },\n        getOptionText: function (option) {\n            var data = this.data;\n            return (0, validator_1.isObj)(option) && data.valueKey in option\n                ? option[data.valueKey]\n                : option;\n        },\n        setIndex: function (index, userAction) {\n            var _this = this;\n            var data = this.data;\n            index = this.adjustIndex(index) || 0;\n            var offset = -index * data.itemHeight;\n            if (index !== data.currentIndex) {\n                return this.set({ offset: offset, currentIndex: index }).then(function () {\n                    userAction && _this.$emit('change', index);\n                });\n            }\n            return this.set({ offset: offset });\n        },\n        setValue: function (value) {\n            var options = this.data.options;\n            for (var i = 0; i < options.length; i++) {\n                if (this.getOptionText(options[i]) === value) {\n                    return this.setIndex(i);\n                }\n            }\n            return Promise.resolve();\n        },\n        getValue: function () {\n            var data = this.data;\n            return data.options[data.currentIndex];\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker-column/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker-column/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"van-picker-column custom-class\"\n  style=\"{{ computed.rootStyle({ itemHeight, visibleItemCount }) }}\"\n  bind:touchstart=\"onTouchStart\"\n  catch:touchmove=\"onTouchMove\"\n  bind:touchend=\"onTouchEnd\"\n  bind:touchcancel=\"onTouchEnd\"\n>\n  <view style=\"{{ computed.wrapperStyle({ offset, itemHeight, visibleItemCount, duration }) }}\">\n    <view\n      wx:for=\"{{ options }}\"\n      wx:for-item=\"option\"\n      wx:key=\"index\"\n      data-index=\"{{ index }}\"\n      style=\"height: {{ itemHeight }}px\"\n      class=\"van-ellipsis {{ utils.bem('picker-column__item', { disabled: option && option.disabled, selected: index === currentIndex }) }} {{ index === currentIndex ? 'active-class' : '' }}\"\n      bindtap=\"onClickItem\"\n    >{{ computed.optionText(option, valueKey) }}</view>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker-column/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction isObj(x) {\n  var type = typeof x;\n  return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction optionText(option, valueKey) {\n  return isObj(option) && option[valueKey] != null ? option[valueKey] : option;\n}\n\nfunction rootStyle(data) {\n  return style({\n    height: addUnit(data.itemHeight * data.visibleItemCount),\n  });\n}\n\nfunction wrapperStyle(data) {\n  var offset = addUnit(\n    data.offset + (data.itemHeight * (data.visibleItemCount - 1)) / 2\n  );\n\n  return style({\n    transition: 'transform ' + data.duration + 'ms',\n    'line-height': addUnit(data.itemHeight),\n    transform: 'translate3d(0, ' + offset + ', 0)',\n  });\n}\n\nmodule.exports = {\n  optionText: optionText,\n  rootStyle: rootStyle,\n  wrapperStyle: wrapperStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/picker-column/index.wxss",
    "content": "@import '../common/index.wxss';.van-picker-column{color:var(--picker-option-text-color,#000);font-size:var(--picker-option-font-size,16px);overflow:hidden;text-align:center}.van-picker-column__item{padding:0 5px}.van-picker-column__item--selected{color:var(--picker-option-selected-text-color,#323233);font-weight:var(--font-weight-bold,500)}.van-picker-column__item--disabled{opacity:var(--picker-option-disabled-opacity,.3)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/popup/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/popup/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar transition_1 = require(\"../mixins/transition\");\n(0, component_1.VantComponent)({\n    classes: [\n        'enter-class',\n        'enter-active-class',\n        'enter-to-class',\n        'leave-class',\n        'leave-active-class',\n        'leave-to-class',\n        'close-icon-class',\n    ],\n    mixins: [(0, transition_1.transition)(false)],\n    props: {\n        round: Boolean,\n        closeable: Boolean,\n        customStyle: String,\n        overlayStyle: String,\n        transition: {\n            type: String,\n            observer: 'observeClass',\n        },\n        zIndex: {\n            type: Number,\n            value: 100,\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n        },\n        closeIcon: {\n            type: String,\n            value: 'cross',\n        },\n        closeIconPosition: {\n            type: String,\n            value: 'top-right',\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n        },\n        position: {\n            type: String,\n            value: 'center',\n            observer: 'observeClass',\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n        safeAreaInsetTop: {\n            type: Boolean,\n            value: false,\n        },\n        safeAreaTabBar: {\n            type: Boolean,\n            value: false,\n        },\n        lockScroll: {\n            type: Boolean,\n            value: true,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    created: function () {\n        this.observeClass();\n    },\n    methods: {\n        onClickCloseIcon: function () {\n            this.$emit('close');\n        },\n        onClickOverlay: function () {\n            this.$emit('click-overlay');\n            if (this.data.closeOnClickOverlay) {\n                this.$emit('close');\n            }\n        },\n        observeClass: function () {\n            var _a = this.data, transition = _a.transition, position = _a.position, duration = _a.duration;\n            var updateData = {\n                name: transition || position,\n            };\n            if (transition === 'none') {\n                updateData.duration = 0;\n                this.originDuration = duration;\n            }\n            else if (this.originDuration != null) {\n                updateData.duration = this.originDuration;\n            }\n            this.setData(updateData);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/popup/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-overlay\": \"../overlay/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/popup/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<import src=\"./popup.wxml\" />\n\n<van-overlay\n  wx:if=\"{{ overlay }}\"\n  show=\"{{ show }}\"\n  z-index=\"{{ zIndex }}\"\n  custom-style=\"{{ overlayStyle }}\"\n  duration=\"{{ duration }}\"\n  bind:click=\"onClickOverlay\"\n  lock-scroll=\"{{ lockScroll }}\"\n  root-portal=\"{{ rootPortal }}\"\n/>\n\n<root-portal wx:if=\"{{ rootPortal }}\">\n  <include src=\"./popup.wxml\" />\n</root-portal>\n\n <include wx:else src=\"./popup.wxml\" />\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/popup/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction popupStyle(data) {\n  return style([\n    {\n      'z-index': data.zIndex,\n      '-webkit-transition-duration': data.currentDuration + 'ms',\n      'transition-duration': data.currentDuration + 'ms',\n    },\n    data.display ? null : 'display: none',\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  popupStyle: popupStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/popup/index.wxss",
    "content": "@import '../common/index.wxss';.van-popup{-webkit-overflow-scrolling:touch;animation:ease both;background-color:var(--popup-background-color,#fff);box-sizing:border-box;max-height:100%;overflow-y:auto;position:fixed;transition-timing-function:ease}.van-popup--center{left:50%;top:50%;transform:translate3d(-50%,-50%,0)}.van-popup--center.van-popup--round{border-radius:var(--popup-round-border-radius,16px)}.van-popup--top{left:0;top:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--right{right:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0}.van-popup--left{left:0;top:50%;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0}.van-popup--bottom.van-popup--safe{padding-bottom:env(safe-area-inset-bottom)}.van-popup--bottom.van-popup--safeTabBar,.van-popup--top.van-popup--safeTabBar{bottom:var(--tabbar-height,50px)}.van-popup--safeTop{padding-top:env(safe-area-inset-top)}.van-popup__close-icon{color:var(--popup-close-icon-color,#969799);font-size:var(--popup-close-icon-size,18px);position:absolute;z-index:var(--popup-close-icon-z-index,1)}.van-popup__close-icon--top-left{left:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--top-right{right:var(--popup-close-icon-margin,16px);top:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-left{bottom:var(--popup-close-icon-margin,16px);left:var(--popup-close-icon-margin,16px)}.van-popup__close-icon--bottom-right{bottom:var(--popup-close-icon-margin,16px);right:var(--popup-close-icon-margin,16px)}.van-popup__close-icon:active{opacity:.6}.van-scale-enter-active,.van-scale-leave-active{transition-property:opacity,transform}.van-scale-enter,.van-scale-leave-to{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-center-enter-active,.van-center-leave-active{transition-property:opacity}.van-center-enter,.van-center-leave-to{opacity:0}.van-bottom-enter-active,.van-bottom-leave-active,.van-left-enter-active,.van-left-leave-active,.van-right-enter-active,.van-right-leave-active,.van-top-enter-active,.van-top-leave-active{transition-property:transform}.van-bottom-enter,.van-bottom-leave-to{transform:translate3d(0,100%,0)}.van-top-enter,.van-top-leave-to{transform:translate3d(0,-100%,0)}.van-left-enter,.van-left-leave-to{transform:translate3d(-100%,-50%,0)}.van-right-enter,.van-right-leave-to{transform:translate3d(100%,-50%,0)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/popup/popup.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n<view\n  wx:if=\"{{ inited }}\"\n  class=\"custom-class {{ classes }} {{ utils.bem('popup', [position, { round, safe: safeAreaInsetBottom, safeTop: safeAreaInsetTop, safeTabBar: safeAreaTabBar }]) }}\"\n  style=\"{{ computed.popupStyle({ zIndex, currentDuration, display, customStyle }) }}\"\n  bind:transitionend=\"onTransitionEnd\"\n>\n  <slot />\n  <van-icon\n    wx:if=\"{{ closeable }}\"\n    name=\"{{ closeIcon }}\"\n    class=\"close-icon-class van-popup__close-icon van-popup__close-icon--{{ closeIconPosition }}\"\n    bind:tap=\"onClickCloseIcon\"\n  />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/progress/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/progress/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar color_1 = require(\"../common/color\");\nvar utils_1 = require(\"../common/utils\");\n(0, component_1.VantComponent)({\n    props: {\n        inactive: Boolean,\n        percentage: {\n            type: Number,\n            observer: 'setLeft',\n        },\n        pivotText: String,\n        pivotColor: String,\n        trackColor: String,\n        showPivot: {\n            type: Boolean,\n            value: true,\n        },\n        color: {\n            type: String,\n            value: color_1.BLUE,\n        },\n        textColor: {\n            type: String,\n            value: '#fff',\n        },\n        strokeWidth: {\n            type: null,\n            value: 4,\n        },\n    },\n    data: {\n        right: 0,\n    },\n    mounted: function () {\n        this.setLeft();\n    },\n    methods: {\n        setLeft: function () {\n            var _this = this;\n            Promise.all([\n                (0, utils_1.getRect)(this, '.van-progress'),\n                (0, utils_1.getRect)(this, '.van-progress__pivot'),\n            ]).then(function (_a) {\n                var portion = _a[0], pivot = _a[1];\n                if (portion && pivot) {\n                    _this.setData({\n                        right: (pivot.width * (_this.data.percentage - 100)) / 100,\n                    });\n                }\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/progress/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/progress/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"van-progress custom-class\"\n  style=\"{{ computed.rootStyle({ strokeWidth, trackColor }) }}\"\n>\n  <view\n    class=\"van-progress__portion\"\n    style=\"{{ computed.portionStyle({ percentage, inactive, color }) }}\"\n  >\n    <view\n      wx:if=\"{{ showPivot && computed.pivotText(pivotText, percentage) }}\"\n      style=\"{{ computed.pivotStyle({ textColor, pivotColor, inactive, color, right }) }}\"\n      class=\"van-progress__pivot\"\n    >\n      {{ computed.pivotText(pivotText, percentage) }}\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/progress/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('../wxs/utils.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction pivotText(pivotText, percentage) {\n  return pivotText || percentage + '%';\n}\n\nfunction rootStyle(data) {\n  return style({\n    'height': data.strokeWidth ? utils.addUnit(data.strokeWidth) : '',\n    'background': data.trackColor,\n  });\n}\n\nfunction portionStyle(data) {\n  return style({\n    background: data.inactive ? '#cacaca' : data.color,\n    width: data.percentage ? data.percentage + '%' : '',\n  });\n}\n\nfunction pivotStyle(data) {\n  return style({\n    color: data.textColor,\n    right: data.right + 'px',\n    background: data.pivotColor ? data.pivotColor : data.inactive ? '#cacaca' : data.color,\n  });\n}\n\nmodule.exports = {\n  pivotText: pivotText,\n  rootStyle: rootStyle,\n  portionStyle: portionStyle,\n  pivotStyle: pivotStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/progress/index.wxss",
    "content": "@import '../common/index.wxss';.van-progress{background:var(--progress-background-color,#ebedf0);border-radius:var(--progress-height,4px);height:var(--progress-height,4px);position:relative}.van-progress__portion{background:var(--progress-color,#1989fa);border-radius:inherit;height:100%;left:0;position:absolute}.van-progress__pivot{background-color:var(--progress-pivot-background-color,#1989fa);border-radius:1em;box-sizing:border-box;color:var(--progress-pivot-text-color,#fff);font-size:var(--progress-pivot-font-size,10px);line-height:var(--progress-pivot-line-height,1.6);min-width:3.6em;padding:var(--progress-pivot-padding,0 5px);position:absolute;text-align:center;top:50%;transform:translateY(-50%);word-break:keep-all}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/radio/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/radio/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar version_1 = require(\"../common/version\");\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    field: true,\n    relation: (0, relation_1.useParent)('radio-group', function () {\n        this.updateFromParent();\n    }),\n    classes: ['icon-class', 'label-class'],\n    props: {\n        name: null,\n        value: null,\n        disabled: Boolean,\n        useIconSlot: Boolean,\n        checkedColor: String,\n        labelPosition: {\n            type: String,\n            value: 'right',\n        },\n        labelDisabled: Boolean,\n        shape: {\n            type: String,\n            value: 'round',\n        },\n        iconSize: {\n            type: null,\n            value: 20,\n        },\n    },\n    data: {\n        direction: '',\n        parentDisabled: false,\n    },\n    methods: {\n        updateFromParent: function () {\n            if (!this.parent) {\n                return;\n            }\n            var _a = this.parent.data, value = _a.value, parentDisabled = _a.disabled, direction = _a.direction;\n            this.setData({\n                value: value,\n                direction: direction,\n                parentDisabled: parentDisabled,\n            });\n        },\n        emitChange: function (value) {\n            var instance = this.parent || this;\n            instance.$emit('input', value);\n            instance.$emit('change', value);\n            if ((0, version_1.canIUseModel)()) {\n                instance.setData({ value: value });\n            }\n        },\n        onChange: function () {\n            if (!this.data.disabled && !this.data.parentDisabled) {\n                this.emitChange(this.data.name);\n            }\n        },\n        onClickLabel: function () {\n            var _a = this.data, disabled = _a.disabled, parentDisabled = _a.parentDisabled, labelDisabled = _a.labelDisabled, name = _a.name;\n            if (!(disabled || parentDisabled) && !labelDisabled) {\n                this.emitChange(name);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/radio/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/radio/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('radio', [direction]) }} custom-class\">\n  <view\n    wx:if=\"{{ labelPosition === 'left' }}\"\n    class=\"{{ utils.bem('radio__label', [labelPosition, { disabled: disabled || parentDisabled }]) }} label-class\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n  <view class=\"van-radio__icon-wrap\" style=\"font-size: {{ utils.addUnit(iconSize) }}\" bindtap=\"onChange\">\n    <slot wx:if=\"{{ useIconSlot }}\" name=\"icon\" />\n    <van-icon\n      wx:else\n      name=\"success\"\n      class=\"{{ utils.bem('radio__icon', [shape, { disabled: disabled || parentDisabled, checked: value === name }]) }}\"\n      style=\"{{ computed.iconStyle({ iconSize, checkedColor, disabled, parentDisabled, value, name }) }}\"\n      custom-class=\"icon-class\"\n      custom-style=\"{{ computed.iconCustomStyle({ iconSize }) }}\"\n    />\n  </view>\n  <view\n    wx:if=\"{{ labelPosition === 'right' }}\"\n    class=\"label-class {{ utils.bem('radio__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}\"\n    bindtap=\"onClickLabel\"\n  >\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/radio/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction iconStyle(data) {\n  var styles = {\n    'font-size': addUnit(data.iconSize),\n  };\n\n  if (\n    data.checkedColor &&\n    !(data.disabled || data.parentDisabled) &&\n    data.value === data.name\n  ) {\n    styles['border-color'] = data.checkedColor;\n    styles['background-color'] = data.checkedColor;\n  }\n\n  return style(styles);\n}\n\nfunction iconCustomStyle(data) {\n  return style({\n    'line-height': addUnit(data.iconSize),\n    'font-size': '.8em',\n    display: 'block',\n  });\n}\n\nmodule.exports = {\n  iconStyle: iconStyle,\n  iconCustomStyle: iconCustomStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/radio/index.wxss",
    "content": "@import '../common/index.wxss';.van-radio{align-items:center;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap{flex:none}.van-radio--horizontal{margin-right:var(--padding-sm,12px)}.van-radio__icon{align-items:center;border:1px solid var(--radio-border-color,#c8c9cc);box-sizing:border-box;color:transparent;display:flex;font-size:var(--radio-size,20px);height:1em;justify-content:center;text-align:center;transition-duration:var(--radio-transition-duration,.2s);transition-property:color,border-color,background-color;width:1em}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{background-color:var(--radio-checked-icon-color,#1989fa);border-color:var(--radio-checked-icon-color,#1989fa);color:#fff}.van-radio__icon--disabled{background-color:var(--radio-disabled-background-color,#ebedf0);border-color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__icon--disabled.van-radio__icon--checked{color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__label{word-wrap:break-word;color:var(--radio-label-color,#323233);line-height:var(--radio-size,20px);padding-left:var(--radio-label-margin,10px)}.van-radio__label--left{float:left;margin:0 var(--radio-label-margin,10px) 0 0}.van-radio__label--disabled{color:var(--radio-disabled-label-color,#c8c9cc)}.van-radio__label:empty{margin:0}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/radio-group/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/radio-group/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    field: true,\n    relation: (0, relation_1.useChildren)('radio'),\n    props: {\n        value: {\n            type: null,\n            observer: 'updateChildren',\n        },\n        direction: String,\n        disabled: {\n            type: Boolean,\n            observer: 'updateChildren',\n        },\n    },\n    methods: {\n        updateChildren: function () {\n            this.children.forEach(function (child) { return child.updateFromParent(); });\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/radio-group/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/radio-group/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"{{ utils.bem('radio-group', [direction]) }}\">\n  <slot></slot>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/radio-group/index.wxss",
    "content": "@import '../common/index.wxss';.van-radio-group--horizontal{display:flex;flex-wrap:wrap}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/rate/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/rate/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = require(\"../common/utils\");\nvar component_1 = require(\"../common/component\");\nvar version_1 = require(\"../common/version\");\n(0, component_1.VantComponent)({\n    field: true,\n    classes: ['icon-class'],\n    props: {\n        value: {\n            type: Number,\n            observer: function (value) {\n                if (value !== this.data.innerValue) {\n                    this.setData({ innerValue: value });\n                }\n            },\n        },\n        readonly: Boolean,\n        disabled: Boolean,\n        allowHalf: Boolean,\n        size: null,\n        icon: {\n            type: String,\n            value: 'star',\n        },\n        voidIcon: {\n            type: String,\n            value: 'star-o',\n        },\n        color: String,\n        voidColor: String,\n        disabledColor: String,\n        count: {\n            type: Number,\n            value: 5,\n            observer: function (value) {\n                this.setData({ innerCountArray: Array.from({ length: value }) });\n            },\n        },\n        gutter: null,\n        touchable: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        innerValue: 0,\n        innerCountArray: Array.from({ length: 5 }),\n    },\n    methods: {\n        onSelect: function (event) {\n            var _this = this;\n            var data = this.data;\n            var score = event.currentTarget.dataset.score;\n            if (!data.disabled && !data.readonly) {\n                this.setData({ innerValue: score + 1 });\n                if ((0, version_1.canIUseModel)()) {\n                    this.setData({ value: score + 1 });\n                }\n                wx.nextTick(function () {\n                    _this.$emit('input', score + 1);\n                    _this.$emit('change', score + 1);\n                });\n            }\n        },\n        onTouchMove: function (event) {\n            var _this = this;\n            var touchable = this.data.touchable;\n            if (!touchable)\n                return;\n            var clientX = event.touches[0].clientX;\n            (0, utils_1.getAllRect)(this, '.van-rate__icon').then(function (list) {\n                var target = list\n                    .sort(function (cur, next) { return cur.dataset.score - next.dataset.score; })\n                    .find(function (item) { return clientX >= item.left && clientX <= item.right; });\n                if (target != null) {\n                    _this.onSelect(__assign(__assign({}, event), { currentTarget: target }));\n                }\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/rate/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/rate/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"../wxs/style.wxs\" module=\"style\" />\n\n<view\n  class=\"{{ utils.bem('rate') }} custom-class\"\n  bind:touchmove=\"onTouchMove\"\n>\n  <view\n    class=\"{{ utils.bem('rate__item') }}\"\n    wx:for=\"{{ innerCountArray }}\"\n    wx:key=\"index\"\n    style=\"{{ style({ paddingRight: index !== count - 1 ? utils.addUnit(gutter) : null }) }}\"\n  >\n    <van-icon\n      name=\"{{ index + 1 <= innerValue ? icon : voidIcon }}\"\n      class=\"{{ utils.bem('rate__icon', [{ disabled, full: index + 1 <= innerValue }])}}\"\n      style=\"{{ style({ fontSize: utils.addUnit(size) }) }}\"\n      custom-class=\"icon-class\"\n      data-score=\"{{ index }}\"\n      color=\"{{ disabled ? disabledColor : index + 1 <= innerValue ? color : voidColor }}\"\n      bind:click=\"onSelect\"\n    />\n\n    <van-icon\n      wx:if=\"{{ allowHalf }}\"\n      name=\"{{ index + 0.5 <= innerValue ? icon : voidIcon }}\"\n      class=\"{{ utils.bem('rate__icon', ['half', { disabled, full: index + 0.5 <= innerValue }]) }}\"\n      style=\"{{ style({ fontSize: utils.addUnit(size) }) }}\"\n      custom-class=\"icon-class\"\n      data-score=\"{{ index - 0.5 }}\"\n      color=\"{{ disabled ? disabledColor : index + 0.5 <= innerValue ? color : voidColor }}\"\n      bind:click=\"onSelect\"\n    />\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/rate/index.wxss",
    "content": "@import '../common/index.wxss';.van-rate{display:inline-flex;-webkit-user-select:none;user-select:none}.van-rate__item{padding:0 var(--rate-horizontal-padding,2px);position:relative}.van-rate__item:not(:last-child){padding-right:var(--rate-icon-gutter,4px)}.van-rate__icon{color:var(--rate-icon-void-color,#c8c9cc);display:block;font-size:var(--rate-icon-size,20px);height:100%}.van-rate__icon--half{left:var(--rate-horizontal-padding,2px);overflow:hidden;position:absolute;top:0;width:.5em}.van-rate__icon--full,.van-rate__icon--half{color:var(--rate-icon-full-color,#ee0a24)}.van-rate__icon--disabled{color:var(--rate-icon-disabled-color,#c8c9cc)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/row/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/row/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useChildren)('col', function (target) {\n        var gutter = this.data.gutter;\n        if (gutter) {\n            target.setData({ gutter: gutter });\n        }\n    }),\n    props: {\n        gutter: {\n            type: Number,\n            observer: 'setGutter',\n        },\n    },\n    methods: {\n        setGutter: function () {\n            var _this = this;\n            this.children.forEach(function (col) {\n                col.setData(_this.data);\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/row/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/row/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-row custom-class\" style=\"{{ computed.rootStyle({ gutter }) }}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/row/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  if (!data.gutter) {\n    return '';\n  }\n\n  return style({\n    'margin-right': addUnit(-data.gutter / 2),\n    'margin-left': addUnit(-data.gutter / 2),\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/row/index.wxss",
    "content": "@import '../common/index.wxss';.van-row:after{clear:both;content:\"\";display:table}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/search/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/search/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar version_1 = require(\"../common/version\");\n(0, component_1.VantComponent)({\n    field: true,\n    classes: ['field-class', 'input-class', 'cancel-class'],\n    props: {\n        value: {\n            type: String,\n            value: '',\n        },\n        label: String,\n        focus: Boolean,\n        error: Boolean,\n        disabled: Boolean,\n        readonly: Boolean,\n        inputAlign: String,\n        showAction: Boolean,\n        useActionSlot: Boolean,\n        useLeftIconSlot: Boolean,\n        useRightIconSlot: Boolean,\n        leftIcon: {\n            type: String,\n            value: 'search',\n        },\n        rightIcon: String,\n        placeholder: String,\n        placeholderStyle: String,\n        actionText: {\n            type: String,\n            value: '取消',\n        },\n        background: {\n            type: String,\n            value: '#ffffff',\n        },\n        maxlength: {\n            type: Number,\n            value: -1,\n        },\n        shape: {\n            type: String,\n            value: 'square',\n        },\n        clearable: {\n            type: Boolean,\n            value: true,\n        },\n        clearTrigger: {\n            type: String,\n            value: 'focus',\n        },\n        clearIcon: {\n            type: String,\n            value: 'clear',\n        },\n        cursorSpacing: {\n            type: Number,\n            value: 0,\n        },\n    },\n    methods: {\n        onChange: function (event) {\n            if ((0, version_1.canIUseModel)()) {\n                this.setData({ value: event.detail });\n            }\n            this.$emit('change', event.detail);\n        },\n        onCancel: function () {\n            var _this = this;\n            /**\n             * 修复修改输入框值时，输入框失焦和赋值同时触发，赋值失效\n             * https://github.com/youzan/vant-weapp/issues/1768\n             */\n            setTimeout(function () {\n                if ((0, version_1.canIUseModel)()) {\n                    _this.setData({ value: '' });\n                }\n                _this.$emit('cancel');\n                _this.$emit('change', '');\n            }, 200);\n        },\n        onSearch: function (event) {\n            this.$emit('search', event.detail);\n        },\n        onFocus: function (event) {\n            this.$emit('focus', event.detail);\n        },\n        onBlur: function (event) {\n            this.$emit('blur', event.detail);\n        },\n        onClear: function (event) {\n            this.$emit('clear', event.detail);\n        },\n        onClickInput: function (event) {\n            this.$emit('click-input', event.detail);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/search/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-field\": \"../field/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/search/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ utils.bem('search', { withaction: showAction || useActionSlot }) }} custom-class\"\n  style=\"background: {{ background }}\"\n>\n  <view class=\"{{ utils.bem('search__content', [shape]) }}\">\n    <view class=\"van-search__label\" wx:if=\"{{ label }}\">{{ label }}</view>\n    <slot wx:else name=\"label\" />\n\n    <van-field\n      type=\"search\"\n      left-icon=\"{{ !useLeftIconSlot ? leftIcon : '' }}\"\n      right-icon=\"{{ !useRightIconSlot ? rightIcon : '' }}\"\n      focus=\"{{ focus }}\"\n      error=\"{{ error }}\"\n      border=\"{{ false }}\"\n      confirm-type=\"search\"\n      class=\"van-search__field field-class\"\n      value=\"{{ value }}\"\n      disabled=\"{{ disabled }}\"\n      readonly=\"{{ readonly }}\"\n      clearable=\"{{ clearable }}\"\n      clear-trigger=\"{{ clearTrigger }}\"\n      clear-icon=\"{{ clearIcon }}\"\n      maxlength=\"{{ maxlength }}\"\n      input-align=\"{{ inputAlign }}\"\n      input-class=\"input-class\"\n      placeholder=\"{{ placeholder }}\"\n      placeholder-style=\"{{ placeholderStyle }}\"\n      cursor-spacing=\"{{ cursorSpacing }}\"\n      custom-style=\"padding: 5px 10px 5px 0; background-color: transparent;\"\n      bind:blur=\"onBlur\"\n      bind:focus=\"onFocus\"\n      bind:change=\"onChange\"\n      bind:confirm=\"onSearch\"\n      bind:clear=\"onClear\"\n      bind:click-input=\"onClickInput\"\n    >\n      <slot wx:if=\"{{ useLeftIconSlot }}\" name=\"left-icon\" slot=\"left-icon\" />\n      <slot wx:if=\"{{ useRightIconSlot }}\" name=\"right-icon\" slot=\"right-icon\" />\n    </van-field>\n  </view>\n\n  <view\n    wx:if=\"{{ showAction || useActionSlot }}\"\n    class=\"van-search__action\"\n    hover-class=\"van-search__action--hover\"\n    hover-stay-time=\"70\"\n  >\n    <slot wx:if=\"{{ useActionSlot }}\" name=\"action\" />\n    <view wx:else bind:tap=\"onCancel\" class=\"van-search__action-button cancel-class\">{{ actionText }}</view>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/search/index.wxss",
    "content": "@import '../common/index.wxss';.van-search{align-items:center;box-sizing:border-box;display:flex;padding:var(--search-padding,10px 12px)}.van-search__content{background-color:var(--search-background-color,#f7f8fa);border-radius:2px;display:flex;flex:1;padding-left:var(--padding-sm,12px)}.van-search__content--round{border-radius:999px}.van-search__label{color:var(--search-label-color,#323233);font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,34px);padding:var(--search-label-padding,0 5px)}.van-search__field{flex:1}.van-search__field__left-icon{color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{color:var(--search-action-text-color,#323233);font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,34px)}.van-search__action--hover{background-color:#f2f3f5}.van-search__action-button{padding:var(--search-action-padding,0 8px)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/share-sheet/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/share-sheet/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        // whether to show popup\n        show: Boolean,\n        // overlay custom style\n        overlayStyle: String,\n        // z-index\n        zIndex: {\n            type: Number,\n            value: 100,\n        },\n        title: String,\n        cancelText: {\n            type: String,\n            value: '取消',\n        },\n        description: String,\n        options: {\n            type: Array,\n            value: [],\n        },\n        overlay: {\n            type: Boolean,\n            value: true,\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n        closeOnClickOverlay: {\n            type: Boolean,\n            value: true,\n        },\n        duration: {\n            type: null,\n            value: 300,\n        },\n        rootPortal: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    methods: {\n        onClickOverlay: function () {\n            this.$emit('click-overlay');\n        },\n        onCancel: function () {\n            this.onClose();\n            this.$emit('cancel');\n        },\n        onSelect: function (event) {\n            this.$emit('select', event.detail);\n        },\n        onClose: function () {\n            this.$emit('close');\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/share-sheet/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-popup\": \"../popup/index\",\n    \"options\": \"./options\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/share-sheet/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<van-popup\n  round\n  class=\"van-share-sheet\"\n  show=\"{{ show }}\"\n  position=\"bottom\"\n  overlay=\"{{ overlay }}\"\n  duration=\"{{ duration }}\"\n  z-index=\"{{ zIndex }}\"\n  overlay-style=\"{{ overlayStyle }}\"\n  close-on-click-overlay=\"{{ closeOnClickOverlay }}\"\n  safe-area-inset-bottom=\"{{ safeAreaInsetBottom }}\"\n  root-portal=\"{{ rootPortal }}\"\n  bind:close=\"onClose\"\n  bind:click-overlay=\"onClickOverlay\"\n>\n  <view class=\"van-share-sheet__header\">\n    <view class=\"van-share-sheet__title\">\n      <slot name=\"title\" />\n    </view>\n    <view wx:if=\"{{ title }}\" class=\"van-share-sheet__title\">{{ title }}</view>\n\n    <view class=\"van-share-sheet__description\">\n      <slot name=\"description\" />\n    </view>\n    <view wx:if=\"{{ description }}\" class=\"van-share-sheet__description\">\n      {{ description }}\n    </view>\n  </view>\n\n  <block wx:if=\"{{ computed.isMulti(options) }}\">\n    <options\n      wx:for=\"{{ options }}\"\n      show-border=\"{{ index !== 0 }}\"\n      wx:key=\"index\"\n      options=\"{{ item }}\"\n      bind:select=\"onSelect\"\n    />\n  </block>\n\n  <options wx:else options=\"{{ options }}\" bind:select=\"onSelect\" />\n\n  <button type=\"button\" class=\"van-share-sheet__cancel\" bindtap=\"onCancel\">\n    {{ cancelText }}\n  </button>\n</van-popup>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/share-sheet/index.wxs",
    "content": "/* eslint-disable */\nfunction isMulti(options) {\n  if (options == null || options[0] == null) {\n    return false;\n  }\n\n  return \"Array\" === options.constructor && \"Array\" === options[0].constructor;\n}\n\nmodule.exports = {\n  isMulti: isMulti\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/share-sheet/index.wxss",
    "content": "@import '../common/index.wxss';.van-share-sheet__header{padding:12px 16px 4px;text-align:center}.van-share-sheet__title{color:#323233;font-size:14px;font-weight:400;line-height:20px;margin-top:8px}.van-share-sheet__title:empty,.van-share-sheet__title:not(:empty)+.van-share-sheet__title{display:none}.van-share-sheet__description{color:#969799;display:block;font-size:12px;line-height:16px;margin-top:8px}.van-share-sheet__description:empty,.van-share-sheet__description:not(:empty)+.van-share-sheet__description{display:none}.van-share-sheet__cancel{background:#fff;border:none;box-sizing:initial;display:block;font-size:16px;height:auto;line-height:48px;padding:0;text-align:center;width:100%}.van-share-sheet__cancel:before{background-color:#f7f8fa;content:\" \";display:block;height:8px}.van-share-sheet__cancel:after{display:none}.van-share-sheet__cancel:active{background-color:#f2f3f5}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/share-sheet/options.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/share-sheet/options.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        options: Array,\n        showBorder: Boolean,\n    },\n    methods: {\n        onSelect: function (event) {\n            var index = event.currentTarget.dataset.index;\n            var option = this.data.options[index];\n            this.$emit('select', __assign(__assign({}, option), { index: index }));\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/share-sheet/options.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/share-sheet/options.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./options.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('share-sheet__options', { border: showBorder }) }}\">\n  <view\n    wx:for=\"{{ options }}\"\n    wx:key=\"index\"\n    class=\"van-share-sheet__option\"\n    data-index=\"{{ index }}\"\n    bindtap=\"onSelect\"\n  >\n    <button class=\"van-share-sheet__button\" open-type=\"{{ item.openType }}\">\n      <image src=\"{{ computed.getIconURL(item.icon) }}\" class=\"van-share-sheet__icon\" /> \n      <view wx:if=\"{{ item.name }}\" class=\"van-share-sheet__name\">{{ item.name }}</view>\n      <view wx:if=\"{{ item.description }}\" class=\"van-share-sheet__option-description\">\n        {{ item.description }}\n      </view>\n    </button>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/share-sheet/options.wxs",
    "content": "/* eslint-disable */\nvar PRESET_ICONS = ['qq', 'link', 'weibo', 'wechat', 'poster', 'qrcode', 'weapp-qrcode', 'wechat-moments'];\n\nfunction getIconURL(icon) {\n  if (PRESET_ICONS.indexOf(icon) !== -1) {\n    return 'https://img.yzcdn.cn/vant/share-sheet-' + icon + '.png';\n  }\n\n  return icon;\n}\n\nmodule.exports = {\n  getIconURL: getIconURL,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/share-sheet/options.wxss",
    "content": "@import '../common/index.wxss';.van-share-sheet__options{-webkit-overflow-scrolling:touch;display:flex;overflow-x:auto;overflow-y:visible;padding:16px 0 16px 8px;position:relative}.van-share-sheet__options--border:before{border-top:1px solid #ebedf0;box-sizing:border-box;content:\" \";left:16px;pointer-events:none;position:absolute;right:0;top:0;transform:scaleY(.5);transform-origin:center}.van-share-sheet__options::-webkit-scrollbar{height:0}.van-share-sheet__option{align-items:center;display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}.van-share-sheet__option:active{opacity:.7}.van-share-sheet__button{background-color:initial;border:0;height:auto;line-height:inherit;padding:0}.van-share-sheet__button:after{border:0}.van-share-sheet__icon{height:48px;margin:0 16px;width:48px}.van-share-sheet__name{color:#646566;font-size:12px;margin-top:8px;padding:0 4px}.van-share-sheet__option-description{color:#c8c9cc;font-size:12px;padding:0 4px}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sidebar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sidebar/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useChildren)('sidebar-item', function () {\n        this.setActive(this.data.activeKey);\n    }),\n    props: {\n        activeKey: {\n            type: Number,\n            value: 0,\n            observer: 'setActive',\n        },\n    },\n    beforeCreate: function () {\n        this.currentActive = -1;\n    },\n    methods: {\n        setActive: function (activeKey) {\n            var _a = this, children = _a.children, currentActive = _a.currentActive;\n            if (!children.length) {\n                return Promise.resolve();\n            }\n            this.currentActive = activeKey;\n            var stack = [];\n            if (currentActive !== activeKey && children[currentActive]) {\n                stack.push(children[currentActive].setActive(false));\n            }\n            if (children[activeKey]) {\n                stack.push(children[activeKey].setActive(true));\n            }\n            return Promise.all(stack);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sidebar/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sidebar/index.wxml",
    "content": "<view class=\"van-sidebar custom-class\">\n  <slot />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sidebar/index.wxss",
    "content": "@import '../common/index.wxss';.van-sidebar{width:var(--sidebar-width,80px)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sidebar-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sidebar-item/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    classes: ['active-class', 'disabled-class'],\n    relation: (0, relation_1.useParent)('sidebar'),\n    props: {\n        dot: Boolean,\n        badge: null,\n        info: null,\n        title: String,\n        disabled: Boolean,\n    },\n    methods: {\n        onClick: function () {\n            var _this = this;\n            var parent = this.parent;\n            if (!parent || this.data.disabled) {\n                return;\n            }\n            var index = parent.children.indexOf(this);\n            parent.setActive(index).then(function () {\n                _this.$emit('click', index);\n                parent.$emit('change', index);\n            });\n        },\n        setActive: function (selected) {\n            return this.setData({ selected: selected });\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sidebar-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-info\": \"../info/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sidebar-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ utils.bem('sidebar-item', { selected, disabled }) }} {{ selected ? 'active-class' : '' }} {{ disabled ? 'disabled-class' : '' }} custom-class\"\n  hover-class=\"van-sidebar-item--hover\"\n  hover-stay-time=\"70\"\n  bind:tap=\"onClick\"\n>\n  <view class=\"van-sidebar-item__text\">\n    <van-info\n      wx:if=\"{{ badge != null || info !== null || dot }}\"\n      dot=\"{{ dot }}\"\n      info=\"{{ badge != null ? badge : info }}\"\n    />\n    <view wx:if=\"{{ title }}\">{{ title }}</view>\n    <slot wx:else name=\"title\" />\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sidebar-item/index.wxss",
    "content": "@import '../common/index.wxss';.van-sidebar-item{background-color:var(--sidebar-background-color,#f7f8fa);border-left:3px solid transparent;box-sizing:border-box;color:var(--sidebar-text-color,#323233);display:block;font-size:var(--sidebar-font-size,14px);line-height:var(--sidebar-line-height,20px);overflow:hidden;padding:var(--sidebar-padding,20px 12px 20px 8px);-webkit-user-select:none;user-select:none}.van-sidebar-item__text{display:inline-block;position:relative;word-break:break-all}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{border-color:var(--sidebar-selected-border-color,#ee0a24);color:var(--sidebar-selected-text-color,#323233);font-weight:var(--sidebar-selected-font-weight,500)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:var(--sidebar-disabled-text-color,#c8c9cc)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/skeleton/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/skeleton/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: ['avatar-class', 'title-class', 'row-class'],\n    props: {\n        row: {\n            type: Number,\n            value: 0,\n            observer: function (value) {\n                this.setData({ rowArray: Array.from({ length: value }) });\n            },\n        },\n        title: Boolean,\n        avatar: Boolean,\n        loading: {\n            type: Boolean,\n            value: true,\n        },\n        animate: {\n            type: Boolean,\n            value: true,\n        },\n        avatarSize: {\n            type: String,\n            value: '32px',\n        },\n        avatarShape: {\n            type: String,\n            value: 'round',\n        },\n        titleWidth: {\n            type: String,\n            value: '40%',\n        },\n        rowWidth: {\n            type: null,\n            value: '100%',\n            observer: function (val) {\n                this.setData({ isArray: val instanceof Array });\n            },\n        },\n    },\n    data: {\n        isArray: false,\n        rowArray: [],\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/skeleton/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {}\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/skeleton/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  wx:if=\"{{ loading }}\"\n  class=\"custom-class {{ utils.bem('skeleton', [{animate}]) }}\"\n>\n  <view\n    wx:if=\"{{ avatar }}\"\n    class=\"avatar-class {{ utils.bem('skeleton__avatar', [avatarShape])}}\"\n    style=\"{{ 'width:' + avatarSize + ';height:' + avatarSize }}\"\n  />\n  <view class=\"{{ utils.bem('skeleton__content')}}\">\n    <view\n      wx:if=\"{{ title }}\"\n      class=\"title-class {{ utils.bem('skeleton__title') }}\"\n      style=\"{{ 'width:' + titleWidth }}\"\n    />\n    <view\n      wx:for=\"{{ rowArray }}\"\n      wx:key=\"index\"\n      wx:for-index=\"index\"\n      class=\"row-class {{ utils.bem('skeleton__row') }}\"\n      style=\"{{ 'width:' + (isArray ? rowWidth[index] : rowWidth) }}\"\n    />\n  </view>\n</view>\n<view wx:else class=\"{{ utils.bem('skeleton__content')}}\">\n  <slot />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/skeleton/index.wxss",
    "content": "@import '../common/index.wxss';.van-skeleton{box-sizing:border-box;display:flex;padding:var(--skeleton-padding,0 16px);width:100%}.van-skeleton__avatar{background-color:var(--skeleton-avatar-background-color,#f2f3f5);flex-shrink:0;margin-right:var(--padding-md,16px)}.van-skeleton__avatar--round{border-radius:100%}.van-skeleton__content{flex:1}.van-skeleton__avatar+.van-skeleton__content{padding-top:var(--padding-xs,8px)}.van-skeleton__row,.van-skeleton__title{background-color:var(--skeleton-row-background-color,#f2f3f5);height:var(--skeleton-row-height,16px)}.van-skeleton__title{margin:0}.van-skeleton__row:not(:first-child){margin-top:var(--skeleton-row-margin-top,12px)}.van-skeleton__title+.van-skeleton__row{margin-top:20px}.van-skeleton--animate{animation:van-skeleton-blink 1.2s ease-in-out infinite}@keyframes van-skeleton-blink{50%{opacity:.6}}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/slider/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/slider/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar touch_1 = require(\"../mixins/touch\");\nvar version_1 = require(\"../common/version\");\nvar utils_1 = require(\"../common/utils\");\nvar DRAG_STATUS = {\n    START: 'start',\n    MOVING: 'moving',\n    END: 'end',\n};\n(0, component_1.VantComponent)({\n    mixins: [touch_1.touch],\n    props: {\n        range: Boolean,\n        disabled: Boolean,\n        useButtonSlot: Boolean,\n        activeColor: String,\n        inactiveColor: String,\n        max: {\n            type: Number,\n            value: 100,\n        },\n        min: {\n            type: Number,\n            value: 0,\n        },\n        step: {\n            type: Number,\n            value: 1,\n        },\n        value: {\n            type: null,\n            value: 0,\n            observer: function (val) {\n                if (val !== this.value) {\n                    this.updateValue(val);\n                }\n            },\n        },\n        vertical: Boolean,\n        barHeight: null,\n    },\n    created: function () {\n        this.updateValue(this.data.value);\n    },\n    methods: {\n        onTouchStart: function (event) {\n            var _this = this;\n            if (this.data.disabled)\n                return;\n            var index = event.currentTarget.dataset.index;\n            if (typeof index === 'number') {\n                this.buttonIndex = index;\n            }\n            this.touchStart(event);\n            this.startValue = this.format(this.value);\n            this.newValue = this.value;\n            if (this.isRange(this.newValue)) {\n                this.startValue = this.newValue.map(function (val) { return _this.format(val); });\n            }\n            else {\n                this.startValue = this.format(this.newValue);\n            }\n            this.dragStatus = DRAG_STATUS.START;\n        },\n        onTouchMove: function (event) {\n            var _this = this;\n            if (this.data.disabled)\n                return;\n            if (this.dragStatus === DRAG_STATUS.START) {\n                this.$emit('drag-start');\n            }\n            this.touchMove(event);\n            this.dragStatus = DRAG_STATUS.MOVING;\n            (0, utils_1.getRect)(this, '.van-slider').then(function (rect) {\n                var vertical = _this.data.vertical;\n                var delta = vertical ? _this.deltaY : _this.deltaX;\n                var total = vertical ? rect.height : rect.width;\n                var diff = (delta / total) * _this.getRange();\n                if (_this.isRange(_this.startValue)) {\n                    _this.newValue[_this.buttonIndex] =\n                        _this.startValue[_this.buttonIndex] + diff;\n                }\n                else {\n                    _this.newValue = _this.startValue + diff;\n                }\n                _this.updateValue(_this.newValue, false, true);\n            });\n        },\n        onTouchEnd: function () {\n            var _this = this;\n            if (this.data.disabled)\n                return;\n            if (this.dragStatus === DRAG_STATUS.MOVING) {\n                this.dragStatus = DRAG_STATUS.END;\n                (0, utils_1.nextTick)(function () {\n                    _this.updateValue(_this.newValue, true);\n                    _this.$emit('drag-end');\n                });\n            }\n        },\n        onClick: function (event) {\n            var _this = this;\n            if (this.data.disabled)\n                return;\n            var min = this.data.min;\n            (0, utils_1.getRect)(this, '.van-slider').then(function (rect) {\n                var vertical = _this.data.vertical;\n                var touch = event.touches[0];\n                var delta = vertical\n                    ? touch.clientY - rect.top\n                    : touch.clientX - rect.left;\n                var total = vertical ? rect.height : rect.width;\n                var value = Number(min) + (delta / total) * _this.getRange();\n                if (_this.isRange(_this.value)) {\n                    var _a = _this.value, left = _a[0], right = _a[1];\n                    var middle = (left + right) / 2;\n                    if (value <= middle) {\n                        _this.updateValue([value, right], true);\n                    }\n                    else {\n                        _this.updateValue([left, value], true);\n                    }\n                }\n                else {\n                    _this.updateValue(value, true);\n                }\n            });\n        },\n        isRange: function (val) {\n            var range = this.data.range;\n            return range && Array.isArray(val);\n        },\n        handleOverlap: function (value) {\n            if (value[0] > value[1]) {\n                return value.slice(0).reverse();\n            }\n            return value;\n        },\n        updateValue: function (value, end, drag) {\n            var _this = this;\n            if (this.isRange(value)) {\n                value = this.handleOverlap(value).map(function (val) { return _this.format(val); });\n            }\n            else {\n                value = this.format(value);\n            }\n            this.value = value;\n            var vertical = this.data.vertical;\n            var mainAxis = vertical ? 'height' : 'width';\n            this.setData({\n                wrapperStyle: \"\\n          background: \".concat(this.data.inactiveColor || '', \";\\n          \").concat(vertical ? 'width' : 'height', \": \").concat((0, utils_1.addUnit)(this.data.barHeight) || '', \";\\n        \"),\n                barStyle: \"\\n          \".concat(mainAxis, \": \").concat(this.calcMainAxis(), \";\\n          left: \").concat(vertical ? 0 : this.calcOffset(), \";\\n          top: \").concat(vertical ? this.calcOffset() : 0, \";\\n          \").concat(drag ? 'transition: none;' : '', \"\\n        \"),\n            });\n            if (drag) {\n                this.$emit('drag', { value: value });\n            }\n            if (end) {\n                this.$emit('change', value);\n            }\n            if ((drag || end) && (0, version_1.canIUseModel)()) {\n                this.setData({ value: value });\n            }\n        },\n        getScope: function () {\n            return Number(this.data.max) - Number(this.data.min);\n        },\n        getRange: function () {\n            var _a = this.data, max = _a.max, min = _a.min;\n            return max - min;\n        },\n        getOffsetWidth: function (current, min) {\n            var scope = this.getScope();\n            // 避免最小值小于最小step时出现负数情况\n            return \"\".concat(Math.max(((current - min) * 100) / scope, 0), \"%\");\n        },\n        // 计算选中条的长度百分比\n        calcMainAxis: function () {\n            var value = this.value;\n            var min = this.data.min;\n            if (this.isRange(value)) {\n                return this.getOffsetWidth(value[1], value[0]);\n            }\n            return this.getOffsetWidth(value, Number(min));\n        },\n        // 计算选中条的开始位置的偏移量\n        calcOffset: function () {\n            var value = this.value;\n            var min = this.data.min;\n            var scope = this.getScope();\n            if (this.isRange(value)) {\n                return \"\".concat(((value[0] - Number(min)) * 100) / scope, \"%\");\n            }\n            return '0%';\n        },\n        format: function (value) {\n            var min = +this.data.min;\n            var max = +this.data.max;\n            var step = +this.data.step;\n            value = (0, utils_1.clamp)(value, min, max);\n            var diff = Math.round((value - min) / step) * step;\n            return (0, utils_1.addNumber)(min, diff);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/slider/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/slider/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"../wxs/style.wxs\" module=\"style\" />\n\n<view\n  class=\"custom-class {{ utils.bem('slider', { disabled, vertical }) }}\"\n  style=\"{{ wrapperStyle }}\"\n  bind:tap=\"onClick\"\n>\n  <view\n    class=\"{{ utils.bem('slider__bar') }}\"\n    style=\"{{ barStyle }}; {{ style({ backgroundColor: activeColor }) }}\"\n  >\n    <view\n      wx:if=\"{{ range }}\"\n      class=\"{{ utils.bem('slider__button-wrapper-left') }}\"\n      data-index=\"{{ 0 }}\"\n      bind:touchstart=\"onTouchStart\"\n      catch:touchmove=\"onTouchMove\"\n      bind:touchend=\"onTouchEnd\"\n      bind:touchcancel=\"onTouchEnd\"\n    >\n      <slot\n        wx:if=\"{{ useButtonSlot }}\"\n        name=\"left-button\"\n      />\n      <view\n        wx:else\n        class=\"{{ utils.bem('slider__button') }}\"\n      />\n    </view>\n    <view\n      wx:if=\"{{ range }}\"\n      class=\"{{ utils.bem('slider__button-wrapper-right') }}\"\n      data-index=\"{{ 1 }}\"\n      bind:touchstart=\"onTouchStart\"\n      catch:touchmove=\"onTouchMove\"\n      bind:touchend=\"onTouchEnd\"\n      bind:touchcancel=\"onTouchEnd\"\n    >\n      <slot\n        wx:if=\"{{ useButtonSlot }}\"\n        name=\"right-button\"\n      />\n      <view\n        wx:else\n        class=\"{{ utils.bem('slider__button') }}\"\n      />\n    </view>\n\n    <view\n      wx:if=\"{{ !range }}\"\n      class=\"{{ utils.bem('slider__button-wrapper') }}\"\n      bind:touchstart=\"onTouchStart\"\n      catch:touchmove=\"onTouchMove\"\n      bind:touchend=\"onTouchEnd\"\n      bind:touchcancel=\"onTouchEnd\"\n    >\n      <slot\n        wx:if=\"{{ useButtonSlot }}\"\n        name=\"button\"\n      />\n      <view\n        wx:else\n        class=\"{{ utils.bem('slider__button') }}\"\n      />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/slider/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction barStyle(barHeight, activeColor) {\n  return style({\n    height: addUnit(barHeight),\n    background: activeColor,\n  });\n}\n\nmodule.exports = {\n  barStyle: barStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/slider/index.wxss",
    "content": "@import '../common/index.wxss';.van-slider{background-color:var(--slider-inactive-background-color,#ebedf0);border-radius:999px;height:var(--slider-bar-height,2px);position:relative}.van-slider:before{bottom:calc(var(--padding-xs, 8px)*-1);content:\"\";left:0;position:absolute;right:0;top:calc(var(--padding-xs, 8px)*-1)}.van-slider__bar{background-color:var(--slider-active-background-color,#1989fa);border-radius:inherit;height:100%;position:relative;transition:all .2s;width:100%}.van-slider__button{background-color:var(--slider-button-background-color,#fff);border-radius:var(--slider-button-border-radius,50%);box-shadow:var(--slider-button-box-shadow,0 1px 2px rgba(0,0,0,.5));height:var(--slider-button-height,24px);width:var(--slider-button-width,24px)}.van-slider__button-wrapper,.van-slider__button-wrapper-right{position:absolute;right:0;top:50%;transform:translate3d(50%,-50%,0)}.van-slider__button-wrapper-left{left:0;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}.van-slider--disabled{opacity:var(--slider-disabled-opacity,.5)}.van-slider--vertical{display:inline-block;height:100%;width:var(--slider-bar-height,2px)}.van-slider--vertical .van-slider__button-wrapper,.van-slider--vertical .van-slider__button-wrapper-right{bottom:0;right:50%;top:auto;transform:translate3d(50%,50%,0)}.van-slider--vertical .van-slider__button-wrapper-left{left:auto;right:50%;top:0;transform:translate3d(50%,-50%,0)}.van-slider--vertical:before{bottom:0;left:-8px;right:-8px;top:0}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/stepper/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/stepper/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar validator_1 = require(\"../common/validator\");\nvar LONG_PRESS_START_TIME = 600;\nvar LONG_PRESS_INTERVAL = 200;\n// add num and avoid float number\nfunction add(num1, num2) {\n    var cardinal = Math.pow(10, 10);\n    return Math.round((num1 + num2) * cardinal) / cardinal;\n}\nfunction equal(value1, value2) {\n    return String(value1) === String(value2);\n}\n(0, component_1.VantComponent)({\n    field: true,\n    classes: ['input-class', 'plus-class', 'minus-class'],\n    props: {\n        value: {\n            type: null,\n        },\n        integer: {\n            type: Boolean,\n            observer: 'check',\n        },\n        disabled: Boolean,\n        inputWidth: String,\n        buttonSize: String,\n        asyncChange: Boolean,\n        disableInput: Boolean,\n        decimalLength: {\n            type: Number,\n            value: null,\n            observer: 'check',\n        },\n        min: {\n            type: null,\n            value: 1,\n            observer: 'check',\n        },\n        max: {\n            type: null,\n            value: Number.MAX_SAFE_INTEGER,\n            observer: 'check',\n        },\n        step: {\n            type: null,\n            value: 1,\n        },\n        showPlus: {\n            type: Boolean,\n            value: true,\n        },\n        showMinus: {\n            type: Boolean,\n            value: true,\n        },\n        disablePlus: Boolean,\n        disableMinus: Boolean,\n        longPress: {\n            type: Boolean,\n            value: true,\n        },\n        theme: String,\n        alwaysEmbed: Boolean,\n    },\n    data: {\n        currentValue: '',\n    },\n    watch: {\n        value: function () {\n            this.observeValue();\n        },\n    },\n    created: function () {\n        this.setData({\n            currentValue: this.format(this.data.value).newValue,\n        });\n    },\n    methods: {\n        observeValue: function () {\n            var value = this.data.value;\n            this.setData({ currentValue: this.format(value).newValue });\n        },\n        check: function () {\n            var newValue = this.format(this.data.currentValue).newValue;\n            if (!equal(newValue, this.data.currentValue)) {\n                this.setData({ currentValue: newValue });\n            }\n        },\n        isDisabled: function (type) {\n            var _a = this.data, disabled = _a.disabled, disablePlus = _a.disablePlus, disableMinus = _a.disableMinus, currentValue = _a.currentValue, max = _a.max, min = _a.min;\n            if (type === 'plus') {\n                return disabled || disablePlus || +currentValue >= +max;\n            }\n            return disabled || disableMinus || +currentValue <= +min;\n        },\n        onFocus: function (event) {\n            this.$emit('focus', event.detail);\n        },\n        onBlur: function (event) {\n            var data = this.format(event.detail.value);\n            this.setData({ currentValue: data.newValue });\n            this.emitChange(data);\n            this.$emit('blur', __assign(__assign({}, event.detail), { value: +data.newValue }));\n        },\n        // filter illegal characters\n        filter: function (value) {\n            value = String(value).replace(/[^0-9.-]/g, '');\n            if (this.data.integer && value.indexOf('.') !== -1) {\n                value = value.split('.')[0];\n            }\n            return value;\n        },\n        format: function (value) {\n            // filter illegal characters and format integer\n            var safeValue = this.filter(value);\n            // format range\n            var rangeValue = Math.max(Math.min(this.data.max, +safeValue), this.data.min);\n            // format decimal\n            var newValue = (0, validator_1.isDef)(this.data.decimalLength)\n                ? rangeValue.toFixed(this.data.decimalLength)\n                : String(rangeValue);\n            return { value: value, newValue: newValue };\n        },\n        onInput: function (event) {\n            var _a = (event.detail || {}).value, value = _a === void 0 ? '' : _a;\n            // allow input to be empty\n            if (value === '') {\n                return;\n            }\n            var formatted = this.format(value);\n            this.emitChange(formatted);\n        },\n        emitChange: function (data) {\n            var value = data.value, newValue = data.newValue;\n            if (!this.data.asyncChange) {\n                // fix when input 11. parsed to 11, unable to enter decimal\n                this.setData({ currentValue: +value === +newValue ? value : newValue });\n            }\n            this.$emit('change', +newValue);\n        },\n        onChange: function () {\n            var type = this.type;\n            if (this.isDisabled(type)) {\n                this.$emit('overlimit', type);\n                return;\n            }\n            var diff = type === 'minus' ? -this.data.step : +this.data.step;\n            var value = this.format(String(add(+this.data.currentValue, diff)));\n            this.emitChange(value);\n            this.$emit(type);\n        },\n        longPressStep: function () {\n            var _this = this;\n            this.longPressTimer = setTimeout(function () {\n                _this.onChange();\n                _this.longPressStep();\n            }, LONG_PRESS_INTERVAL);\n        },\n        onTap: function (event) {\n            var type = event.currentTarget.dataset.type;\n            this.type = type;\n            this.onChange();\n        },\n        onTouchStart: function (event) {\n            var _this = this;\n            if (!this.data.longPress) {\n                return;\n            }\n            clearTimeout(this.longPressTimer);\n            var type = event.currentTarget.dataset.type;\n            this.type = type;\n            this.isLongPress = false;\n            this.longPressTimer = setTimeout(function () {\n                _this.isLongPress = true;\n                _this.onChange();\n                _this.longPressStep();\n            }, LONG_PRESS_START_TIME);\n        },\n        onTouchEnd: function () {\n            if (!this.data.longPress) {\n                return;\n            }\n            clearTimeout(this.longPressTimer);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/stepper/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/stepper/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"{{ utils.bem('stepper', [theme]) }} custom-class\">\n  <view\n    wx:if=\"{{ showMinus }}\"\n    data-type=\"minus\"\n    style=\"{{ computed.buttonStyle({ buttonSize }) }}\"\n    class=\"minus-class {{ utils.bem('stepper__minus', { disabled: disabled || disableMinus || currentValue <= min }) }}\"\n    hover-class=\"van-stepper__minus--hover\"\n    hover-stay-time=\"70\"\n    bind:tap=\"onTap\"\n    bind:touchstart=\"onTouchStart\"\n    bind:touchend=\"onTouchEnd\"\n  >\n    <slot name=\"minus\" />\n  </view>\n  <input\n    type=\"{{ integer ? 'number' : 'digit' }}\"\n    class=\"input-class {{ utils.bem('stepper__input', { disabled: disabled || disableInput }) }}\"\n    style=\"{{ computed.inputStyle({ buttonSize, inputWidth }) }}\"\n    value=\"{{ currentValue }}\"\n    focus=\"{{ focus }}\"\n    disabled=\"{{ disabled || disableInput }}\"\n    always-embed=\"{{ alwaysEmbed }}\"\n    bindinput=\"onInput\"\n    bind:focus=\"onFocus\"\n    bind:blur=\"onBlur\"\n  />\n  <view\n    wx:if=\"{{ showPlus }}\"\n    data-type=\"plus\"\n    style=\"{{ computed.buttonStyle({ buttonSize }) }}\"\n    class=\"plus-class {{ utils.bem('stepper__plus', { disabled: disabled || disablePlus || currentValue >= max }) }}\"\n    hover-class=\"van-stepper__plus--hover\"\n    hover-stay-time=\"70\"\n    bind:tap=\"onTap\"\n    bind:touchstart=\"onTouchStart\"\n    bind:touchend=\"onTouchEnd\"\n  >\n    <slot name=\"plus\" />\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/stepper/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction buttonStyle(data) {\n  return style({\n    width: addUnit(data.buttonSize),\n    height: addUnit(data.buttonSize),\n  });\n}\n\nfunction inputStyle(data) {\n  return style({\n    width: addUnit(data.inputWidth),\n    height: addUnit(data.buttonSize),\n  });\n}\n\nmodule.exports = {\n  buttonStyle: buttonStyle,\n  inputStyle: inputStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/stepper/index.wxss",
    "content": "@import '../common/index.wxss';.van-stepper{font-size:0}.van-stepper__minus,.van-stepper__plus{background-color:var(--stepper-background-color,#f2f3f5);border:0;box-sizing:border-box;color:var(--stepper-button-icon-color,#323233);display:inline-block;height:var(--stepper-input-height,28px);margin:1px;padding:var(--padding-base,4px);position:relative;vertical-align:middle;width:var(--stepper-input-height,28px)}.van-stepper__minus:before,.van-stepper__plus:before{height:1px;width:9px}.van-stepper__minus:after,.van-stepper__plus:after{height:9px;width:1px}.van-stepper__minus:empty.van-stepper__minus:after,.van-stepper__minus:empty.van-stepper__minus:before,.van-stepper__minus:empty.van-stepper__plus:after,.van-stepper__minus:empty.van-stepper__plus:before,.van-stepper__plus:empty.van-stepper__minus:after,.van-stepper__plus:empty.van-stepper__minus:before,.van-stepper__plus:empty.van-stepper__plus:after,.van-stepper__plus:empty.van-stepper__plus:before{background-color:currentColor;bottom:0;content:\"\";left:0;margin:auto;position:absolute;right:0;top:0}.van-stepper__minus--hover,.van-stepper__plus--hover{background-color:var(--stepper-active-color,#e8e8e8)}.van-stepper__minus--disabled,.van-stepper__plus--disabled{color:var(--stepper-button-disabled-icon-color,#c8c9cc)}.van-stepper__minus--disabled,.van-stepper__minus--disabled.van-stepper__minus--hover,.van-stepper__minus--disabled.van-stepper__plus--hover,.van-stepper__plus--disabled,.van-stepper__plus--disabled.van-stepper__minus--hover,.van-stepper__plus--disabled.van-stepper__plus--hover{background-color:var(--stepper-button-disabled-color,#f7f8fa)}.van-stepper__minus{border-radius:var(--stepper-border-radius,var(--stepper-border-radius,4px)) 0 0 var(--stepper-border-radius,var(--stepper-border-radius,4px))}.van-stepper__minus:after{display:none}.van-stepper__plus{border-radius:0 var(--stepper-border-radius,var(--stepper-border-radius,4px)) var(--stepper-border-radius,var(--stepper-border-radius,4px)) 0}.van-stepper--round .van-stepper__input{background-color:initial!important}.van-stepper--round .van-stepper__minus,.van-stepper--round .van-stepper__plus{border-radius:100%}.van-stepper--round .van-stepper__minus:active,.van-stepper--round .van-stepper__plus:active{opacity:.7}.van-stepper--round .van-stepper__minus--disabled,.van-stepper--round .van-stepper__minus--disabled:active,.van-stepper--round .van-stepper__plus--disabled,.van-stepper--round .van-stepper__plus--disabled:active{opacity:.3}.van-stepper--round .van-stepper__plus{background-color:#ee0a24;color:#fff}.van-stepper--round .van-stepper__minus{background-color:#fff;border:1px solid #ee0a24;color:#ee0a24}.van-stepper__input{-webkit-appearance:none;background-color:var(--stepper-background-color,#f2f3f5);border:0;border-radius:0;border-width:1px 0;box-sizing:border-box;color:var(--stepper-input-text-color,#323233);display:inline-block;font-size:var(--stepper-input-font-size,14px);height:var(--stepper-input-height,28px);margin:1px;min-height:0;padding:1px;text-align:center;vertical-align:middle;width:var(--stepper-input-width,32px)}.van-stepper__input--disabled{background-color:var(--stepper-input-disabled-background-color,#f2f3f5);color:var(--stepper-input-disabled-text-color,#c8c9cc)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/steps/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/steps/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar color_1 = require(\"../common/color\");\n(0, component_1.VantComponent)({\n    classes: ['desc-class'],\n    props: {\n        icon: String,\n        steps: Array,\n        active: Number,\n        direction: {\n            type: String,\n            value: 'horizontal',\n        },\n        activeColor: {\n            type: String,\n            value: color_1.GREEN,\n        },\n        inactiveColor: {\n            type: String,\n            value: color_1.GRAY_DARK,\n        },\n        activeIcon: {\n            type: String,\n            value: 'checked',\n        },\n        inactiveIcon: String,\n    },\n    methods: {\n        onClick: function (event) {\n            var index = event.currentTarget.dataset.index;\n            this.$emit('click-step', index);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/steps/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/steps/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"custom-class {{ utils.bem('steps', [direction]) }}\">\n  <view class=\"van-step__wrapper\">\n    <view\n      wx:for=\"{{ steps }}\"\n      wx:key=\"index\"\n      bindtap=\"onClick\"\n      data-index=\"{{ index }}\"\n      class=\"{{ utils.bem('step', [direction, status(index, active)]) }} van-hairline\"\n      style=\"{{ status(index, active) === 'inactive' ? 'color: ' + inactiveColor: '' }}\"\n    >\n      <view class=\"van-step__title\" style=\"{{ index === active ? 'color: ' + activeColor : '' }}\">\n        <view>{{ item.text }}</view>\n        <view class=\"desc-class\">{{ item.desc }}</view>\n      </view>\n      <view class=\"van-step__circle-container\">\n        <block wx:if=\"{{ index !== active }}\">\n          <van-icon\n            wx:if=\"{{ item.inactiveIcon || inactiveIcon }}\"\n            color=\"{{ status(index, active) === 'inactive' ? inactiveColor: activeColor }}\"\n            name=\"{{ item.inactiveIcon || inactiveIcon }}\"\n            class=\"van-step__icon\"\n          />\n          <view\n            wx:else\n            class=\"van-step__circle\"\n            style=\"{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}\"\n          />\n        </block>\n\n        <van-icon wx:else name=\"{{ item.activeIcon || activeIcon }}\" color=\"{{ activeColor }}\" class=\"van-step__icon\" />\n      </view>\n      <view\n        wx:if=\"{{ index !== steps.length - 1 }}\"\n        class=\"van-step__line\" style=\"{{ 'background-color: ' + (index < active ? activeColor : inactiveColor) }}\"\n      />\n    </view>\n  </view>\n</view>\n\n<wxs module=\"status\">\nfunction get(index, active) {\n  if (index < active) {\n    return 'finish';\n  } else if (index === active) {\n    return 'process';\n  }\n\n  return 'inactive';\n}\n\nmodule.exports = get;\n</wxs>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/steps/index.wxss",
    "content": "@import '../common/index.wxss';.van-steps{background-color:var(--steps-background-color,#fff);overflow:hidden}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{display:flex;overflow:hidden;position:relative}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{color:var(--step-text-color,#969799);flex:1;font-size:var(--step-font-size,14px);position:relative}.van-step--finish{color:var(--step-finish-text-color,#323233)}.van-step__circle{background-color:var(--step-circle-color,#969799);border-radius:50%;height:var(--step-circle-size,5px);width:var(--step-circle-size,5px)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{bottom:0;position:absolute;right:0;top:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;transform:none}.van-step--horizontal:last-child .van-step__circle-container{padding:0 0 0 8px;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{background-color:#fff;bottom:6px;padding:0 var(--padding-xs,8px);position:absolute;transform:translate3d(-50%,50%,0);z-index:1}.van-step--horizontal .van-step__title{display:inline-block;font-size:var(--step-horizontal-title-font-size,12px);transform:translate3d(-50%,0,0)}.van-step--horizontal .van-step__line{background-color:var(--step-line-color,#ebedf0);bottom:6px;height:1px;left:0;position:absolute;right:0;transform:translate3d(0,50%,0)}.van-step--horizontal.van-step--process{color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical{line-height:18px;padding:10px 10px 10px 0}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{background-color:#fff;content:\"\";height:20px;left:-15px;position:absolute;top:0;width:1px;z-index:1}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{left:-14px;position:absolute;top:19px;transform:translate3d(-50%,-50%,0);z-index:2}.van-step--vertical .van-step__icon{background-color:var(--steps-background-color,#fff);font-size:var(--step-icon-size,12px);line-height:1}.van-step--vertical .van-step__line{background-color:var(--step-line-color,#ebedf0);height:100%;transform:translate3d(-50%,0,0);width:1px;z-index:1}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sticky/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sticky/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = require(\"../common/utils\");\nvar component_1 = require(\"../common/component\");\nvar validator_1 = require(\"../common/validator\");\nvar page_scroll_1 = require(\"../mixins/page-scroll\");\nvar ROOT_ELEMENT = '.van-sticky';\n(0, component_1.VantComponent)({\n    props: {\n        zIndex: {\n            type: Number,\n            value: 99,\n        },\n        offsetTop: {\n            type: Number,\n            value: 0,\n            observer: 'onScroll',\n        },\n        disabled: {\n            type: Boolean,\n            observer: 'onScroll',\n        },\n        container: {\n            type: null,\n            observer: 'onScroll',\n        },\n        scrollTop: {\n            type: null,\n            observer: function (val) {\n                this.onScroll({ scrollTop: val });\n            },\n        },\n    },\n    mixins: [\n        (0, page_scroll_1.pageScrollMixin)(function (event) {\n            if (this.data.scrollTop != null) {\n                return;\n            }\n            this.onScroll(event);\n        }),\n    ],\n    data: {\n        height: 0,\n        fixed: false,\n        transform: 0,\n    },\n    mounted: function () {\n        this.onScroll();\n    },\n    methods: {\n        onScroll: function (_a) {\n            var _this = this;\n            var _b = _a === void 0 ? {} : _a, scrollTop = _b.scrollTop;\n            var _c = this.data, container = _c.container, offsetTop = _c.offsetTop, disabled = _c.disabled;\n            if (disabled) {\n                this.setDataAfterDiff({\n                    fixed: false,\n                    transform: 0,\n                });\n                return;\n            }\n            this.scrollTop = scrollTop || this.scrollTop;\n            if (typeof container === 'function') {\n                Promise.all([(0, utils_1.getRect)(this, ROOT_ELEMENT), this.getContainerRect()])\n                    .then(function (_a) {\n                    var root = _a[0], container = _a[1];\n                    if (offsetTop + root.height > container.height + container.top) {\n                        _this.setDataAfterDiff({\n                            fixed: false,\n                            transform: container.height - root.height,\n                        });\n                    }\n                    else if (offsetTop >= root.top) {\n                        _this.setDataAfterDiff({\n                            fixed: true,\n                            height: root.height,\n                            transform: 0,\n                        });\n                    }\n                    else {\n                        _this.setDataAfterDiff({ fixed: false, transform: 0 });\n                    }\n                })\n                    .catch(function () { });\n                return;\n            }\n            (0, utils_1.getRect)(this, ROOT_ELEMENT).then(function (root) {\n                if (!(0, validator_1.isDef)(root) || (!root.width && !root.height)) {\n                    return;\n                }\n                if (offsetTop >= root.top) {\n                    _this.setDataAfterDiff({ fixed: true, height: root.height });\n                    _this.transform = 0;\n                }\n                else {\n                    _this.setDataAfterDiff({ fixed: false });\n                }\n            });\n        },\n        setDataAfterDiff: function (data) {\n            var _this = this;\n            wx.nextTick(function () {\n                var diff = Object.keys(data).reduce(function (prev, key) {\n                    if (data[key] !== _this.data[key]) {\n                        prev[key] = data[key];\n                    }\n                    return prev;\n                }, {});\n                if (Object.keys(diff).length > 0) {\n                    _this.setData(diff);\n                }\n                _this.$emit('scroll', {\n                    scrollTop: _this.scrollTop,\n                    isFixed: data.fixed || _this.data.fixed,\n                });\n            });\n        },\n        getContainerRect: function () {\n            var nodesRef = this.data.container();\n            if (!nodesRef) {\n                return Promise.reject(new Error('not found container'));\n            }\n            return new Promise(function (resolve) { return nodesRef.boundingClientRect(resolve).exec(); });\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sticky/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sticky/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class van-sticky\" style=\"{{ computed.containerStyle({ fixed, height, zIndex }) }}\">\n  <view class=\"{{ utils.bem('sticky-wrap', { fixed }) }}\" style=\"{{ computed.wrapStyle({ fixed, offsetTop, transform, zIndex }) }}\">\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sticky/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction wrapStyle(data) {\n  return style({\n    transform: data.transform\n      ? 'translate3d(0, ' + data.transform + 'px, 0)'\n      : '',\n    top: data.fixed ? addUnit(data.offsetTop) : '',\n    'z-index': data.zIndex,\n  });\n}\n\nfunction containerStyle(data) {\n  return style({\n    height: data.fixed ? addUnit(data.height) : '',\n    'z-index': data.zIndex,\n  });\n}\n\nmodule.exports = {\n  wrapStyle: wrapStyle,\n  containerStyle: containerStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/sticky/index.wxss",
    "content": "@import '../common/index.wxss';.van-sticky{position:relative}.van-sticky-wrap--fixed{left:0;position:fixed;right:0}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/submit-bar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/submit-bar/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: ['bar-class', 'price-class', 'button-class'],\n    props: {\n        tip: {\n            type: null,\n            observer: 'updateTip',\n        },\n        tipIcon: String,\n        type: Number,\n        price: {\n            type: null,\n            observer: 'updatePrice',\n        },\n        label: String,\n        loading: Boolean,\n        disabled: Boolean,\n        buttonText: String,\n        currency: {\n            type: String,\n            value: '¥',\n        },\n        buttonType: {\n            type: String,\n            value: 'danger',\n        },\n        decimalLength: {\n            type: Number,\n            value: 2,\n            observer: 'updatePrice',\n        },\n        suffixLabel: String,\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    methods: {\n        updatePrice: function () {\n            var _a = this.data, price = _a.price, decimalLength = _a.decimalLength;\n            var priceStrArr = typeof price === 'number' &&\n                (price / 100).toFixed(decimalLength).split('.');\n            this.setData({\n                hasPrice: typeof price === 'number',\n                integerStr: priceStrArr && priceStrArr[0],\n                decimalStr: decimalLength && priceStrArr ? \".\".concat(priceStrArr[1]) : '',\n            });\n        },\n        updateTip: function () {\n            this.setData({ hasTip: typeof this.data.tip === 'string' });\n        },\n        onSubmit: function (event) {\n            this.$emit('submit', event.detail);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/submit-bar/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-button\": \"../button/index\",\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/submit-bar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view class=\"van-submit-bar custom-class\">\n  <slot name=\"top\" />\n\n  <view class=\"van-submit-bar__tip\">\n    <van-icon\n      wx:if=\"{{ tipIcon }}\"\n      size=\"12px\"\n      name=\"{{ tipIcon }}\"\n      custom-class=\"van-submit-bar__tip-icon\"\n    />\n    <view wx:if=\"{{ hasTip }}\" class=\"van-submit-bar__tip-text\">\n      {{ tip }}\n    </view>\n    <slot name=\"tip\" />\n  </view>\n\n  <view class=\"bar-class van-submit-bar__bar\">\n    <slot />\n    <view wx:if=\"{{ hasPrice }}\" class=\"van-submit-bar__text\">\n      <text>{{ label || '合计：' }}</text>\n      <text class=\"van-submit-bar__price price-class\">\n        <text class=\"van-submit-bar__currency\">{{ currency }} </text>\n        <text class=\"van-submit-bar__price-integer\">{{ integerStr }}</text><text>{{decimalStr}}</text>\n      </text>\n      <text class=\"van-submit-bar__suffix-label\">{{ suffixLabel }}</text>\n    </view>\n    <van-button\n      round\n      type=\"{{ buttonType }}\"\n      loading=\"{{ loading }}\"\n      disabled=\"{{ disabled }}\"\n      class=\"van-submit-bar__button\"\n      custom-class=\"button-class\"\n      custom-style=\"width: 100%;\"\n      bind:click=\"onSubmit\"\n    >\n      {{ loading ? '' : buttonText }}\n    </van-button>\n  </view>\n\n  <view wx:if=\"{{ safeAreaInsetBottom }}\" class=\"van-submit-bar__safe\" />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/submit-bar/index.wxss",
    "content": "@import '../common/index.wxss';.van-submit-bar{background-color:var(--submit-bar-background-color,#fff);bottom:0;left:0;position:fixed;-webkit-user-select:none;user-select:none;width:100%;z-index:var(--submit-bar-z-index,100)}.van-submit-bar__tip{background-color:var(--submit-bar-tip-background-color,#fff7cc);color:var(--submit-bar-tip-color,#f56723);font-size:var(--submit-bar-tip-font-size,12px);line-height:var(--submit-bar-tip-line-height,1.5);padding:var(--submit-bar-tip-padding,10px)}.van-submit-bar__tip:empty{display:none}.van-submit-bar__tip-icon{margin-right:4px;vertical-align:middle}.van-submit-bar__tip-text{display:inline;vertical-align:middle}.van-submit-bar__bar{align-items:center;background-color:var(--submit-bar-background-color,#fff);display:flex;font-size:var(--submit-bar-text-font-size,14px);height:var(--submit-bar-height,50px);justify-content:flex-end;padding:var(--submit-bar-padding,0 16px)}.van-submit-bar__safe{height:constant(safe-area-inset-bottom);height:env(safe-area-inset-bottom)}.van-submit-bar__text{color:var(--submit-bar-text-color,#323233);flex:1;font-weight:var(--font-weight-bold,500);padding-right:var(--padding-sm,12px);text-align:right}.van-submit-bar__price{color:var(--submit-bar-price-color,#ee0a24);font-size:var(--submit-bar-price-font-size,12px);font-weight:var(--font-weight-bold,500)}.van-submit-bar__price-integer{font-family:Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif;font-size:20px}.van-submit-bar__currency{font-size:var(--submit-bar-currency-font-size,12px)}.van-submit-bar__suffix-label{margin-left:5px}.van-submit-bar__button{--button-default-height:var(--submit-bar-button-height,40px)!important;--button-line-height:var(--submit-bar-button-height,40px)!important;font-weight:var(--font-weight-bold,500);width:var(--submit-bar-button-width,110px)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/swipe-cell/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/swipe-cell/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar touch_1 = require(\"../mixins/touch\");\nvar utils_1 = require(\"../common/utils\");\nvar THRESHOLD = 0.3;\nvar ARRAY = [];\n(0, component_1.VantComponent)({\n    props: {\n        disabled: Boolean,\n        leftWidth: {\n            type: Number,\n            value: 0,\n            observer: function (leftWidth) {\n                if (leftWidth === void 0) { leftWidth = 0; }\n                if (this.offset > 0) {\n                    this.swipeMove(leftWidth);\n                }\n            },\n        },\n        rightWidth: {\n            type: Number,\n            value: 0,\n            observer: function (rightWidth) {\n                if (rightWidth === void 0) { rightWidth = 0; }\n                if (this.offset < 0) {\n                    this.swipeMove(-rightWidth);\n                }\n            },\n        },\n        asyncClose: Boolean,\n        name: {\n            type: null,\n            value: '',\n        },\n    },\n    mixins: [touch_1.touch],\n    data: {\n        catchMove: false,\n        wrapperStyle: '',\n    },\n    created: function () {\n        this.offset = 0;\n        ARRAY.push(this);\n    },\n    destroyed: function () {\n        var _this = this;\n        ARRAY = ARRAY.filter(function (item) { return item !== _this; });\n    },\n    methods: {\n        open: function (position) {\n            var _a = this.data, leftWidth = _a.leftWidth, rightWidth = _a.rightWidth;\n            var offset = position === 'left' ? leftWidth : -rightWidth;\n            this.swipeMove(offset);\n            this.$emit('open', {\n                position: position,\n                name: this.data.name,\n            });\n        },\n        close: function () {\n            this.swipeMove(0);\n        },\n        swipeMove: function (offset) {\n            if (offset === void 0) { offset = 0; }\n            this.offset = (0, utils_1.range)(offset, -this.data.rightWidth, this.data.leftWidth);\n            var transform = \"translate3d(\".concat(this.offset, \"px, 0, 0)\");\n            var transition = this.dragging\n                ? 'none'\n                : 'transform .6s cubic-bezier(0.18, 0.89, 0.32, 1)';\n            this.setData({\n                wrapperStyle: \"\\n        -webkit-transform: \".concat(transform, \";\\n        -webkit-transition: \").concat(transition, \";\\n        transform: \").concat(transform, \";\\n        transition: \").concat(transition, \";\\n      \"),\n            });\n        },\n        swipeLeaveTransition: function () {\n            var _a = this.data, leftWidth = _a.leftWidth, rightWidth = _a.rightWidth;\n            var offset = this.offset;\n            if (rightWidth > 0 && -offset > rightWidth * THRESHOLD) {\n                this.open('right');\n            }\n            else if (leftWidth > 0 && offset > leftWidth * THRESHOLD) {\n                this.open('left');\n            }\n            else {\n                this.swipeMove(0);\n            }\n            this.setData({ catchMove: false });\n        },\n        startDrag: function (event) {\n            if (this.data.disabled) {\n                return;\n            }\n            this.startOffset = this.offset;\n            this.touchStart(event);\n        },\n        noop: function () { },\n        onDrag: function (event) {\n            var _this = this;\n            if (this.data.disabled) {\n                return;\n            }\n            this.touchMove(event);\n            if (this.direction !== 'horizontal') {\n                return;\n            }\n            this.dragging = true;\n            ARRAY.filter(function (item) { return item !== _this && item.offset !== 0; }).forEach(function (item) { return item.close(); });\n            this.setData({ catchMove: true });\n            this.swipeMove(this.startOffset + this.deltaX);\n        },\n        endDrag: function () {\n            if (this.data.disabled) {\n                return;\n            }\n            this.dragging = false;\n            this.swipeLeaveTransition();\n        },\n        onClick: function (event) {\n            var _a = event.currentTarget.dataset.key, position = _a === void 0 ? 'outside' : _a;\n            this.$emit('click', position);\n            if (!this.offset) {\n                return;\n            }\n            if (this.data.asyncClose) {\n                this.$emit('close', {\n                    position: position,\n                    instance: this,\n                    name: this.data.name,\n                });\n            }\n            else {\n                this.swipeMove(0);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/swipe-cell/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/swipe-cell/index.wxml",
    "content": "<view\n  class=\"van-swipe-cell custom-class\"\n  data-key=\"cell\"\n  catchtap=\"onClick\"\n  bindtouchstart=\"startDrag\"\n  catchtouchmove=\"{{ catchMove ? 'noop' : '' }}\"\n  capture-bind:touchmove=\"onDrag\"\n  bindtouchend=\"endDrag\"\n  bindtouchcancel=\"endDrag\"\n>\n  <view style=\"{{ wrapperStyle }}\">\n    <view wx:if=\"{{ leftWidth }}\" class=\"van-swipe-cell__left\" data-key=\"left\" catch:tap=\"onClick\">\n      <slot name=\"left\" />\n    </view>\n    <slot />\n    <view wx:if=\"{{ rightWidth }}\" class=\"van-swipe-cell__right\" data-key=\"right\" catch:tap=\"onClick\">\n      <slot name=\"right\" />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/swipe-cell/index.wxss",
    "content": "@import '../common/index.wxss';.van-swipe-cell{overflow:hidden;position:relative}.van-swipe-cell__left,.van-swipe-cell__right{height:100%;position:absolute;top:0}.van-swipe-cell__left{left:0;transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;transform:translate3d(100%,0,0)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/switch/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/switch/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    field: true,\n    classes: ['node-class'],\n    props: {\n        checked: null,\n        loading: Boolean,\n        disabled: Boolean,\n        activeColor: String,\n        inactiveColor: String,\n        size: {\n            type: String,\n            value: '30',\n        },\n        activeValue: {\n            type: null,\n            value: true,\n        },\n        inactiveValue: {\n            type: null,\n            value: false,\n        },\n    },\n    methods: {\n        onClick: function () {\n            var _a = this.data, activeValue = _a.activeValue, inactiveValue = _a.inactiveValue, disabled = _a.disabled, loading = _a.loading;\n            if (disabled || loading) {\n                return;\n            }\n            var checked = this.data.checked === activeValue;\n            var value = checked ? inactiveValue : activeValue;\n            this.$emit('input', value);\n            this.$emit('change', value);\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/switch/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/switch/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"{{ utils.bem('switch', { on: checked === activeValue, disabled }) }} custom-class\"\n  style=\"{{ computed.rootStyle({ size, checked, activeColor, inactiveColor, activeValue }) }}\"\n  bind:tap=\"onClick\"\n>\n  <view class=\"van-switch__node node-class\">\n    <van-loading\n      wx:if=\"{{ loading }}\"\n      color=\"{{ computed.loadingColor({ checked, activeColor, inactiveColor, activeValue }) }}\"\n      custom-class=\"van-switch__loading\"\n    />\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/switch/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction rootStyle(data) {\n  var currentColor = data.checked === data.activeValue ? data.activeColor : data.inactiveColor;\n\n  return style({\n    'font-size': addUnit(data.size),\n    'background-color': currentColor,\n  });\n}\n\nvar BLUE = '#1989fa';\nvar GRAY_DARK = '#969799';\n\nfunction loadingColor(data) {\n  return data.checked === data.activeValue\n    ? data.activeColor || BLUE\n    : data.inactiveColor || GRAY_DARK;\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n  loadingColor: loadingColor,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/switch/index.wxss",
    "content": "@import '../common/index.wxss';.van-switch{background-color:var(--switch-background-color,#fff);border:var(--switch-border,1px solid rgba(0,0,0,.1));border-radius:var(--switch-node-size,1em);box-sizing:initial;display:inline-block;height:var(--switch-height,1em);position:relative;transition:background-color var(--switch-transition-duration,.3s);width:var(--switch-width,2em)}.van-switch__node{background-color:var(--switch-node-background-color,#fff);border-radius:100%;box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));height:var(--switch-node-size,1em);left:0;position:absolute;top:0;transition:var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);width:var(--switch-node-size,1em);z-index:var(--switch-node-z-index,1)}.van-switch__loading{height:50%;left:25%;position:absolute!important;top:25%;width:50%}.van-switch--on{background-color:var(--switch-on-background-color,#1989fa)}.van-switch--on .van-switch__node{transform:translateX(calc(var(--switch-width, 2em) - var(--switch-node-size, 1em)))}.van-switch--disabled{opacity:var(--switch-disabled-opacity,.4)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tab/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tab/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar relation_1 = require(\"../common/relation\");\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useParent)('tabs'),\n    props: {\n        dot: {\n            type: Boolean,\n            observer: 'update',\n        },\n        info: {\n            type: null,\n            observer: 'update',\n        },\n        title: {\n            type: String,\n            observer: 'update',\n        },\n        disabled: {\n            type: Boolean,\n            observer: 'update',\n        },\n        titleStyle: {\n            type: String,\n            observer: 'update',\n        },\n        name: {\n            type: null,\n            value: '',\n        },\n    },\n    data: {\n        active: false,\n    },\n    methods: {\n        getComputedName: function () {\n            if (this.data.name !== '') {\n                return this.data.name;\n            }\n            return this.index;\n        },\n        updateRender: function (active, parent) {\n            var parentData = parent.data;\n            this.inited = this.inited || active;\n            this.setData({\n                active: active,\n                shouldRender: this.inited || !parentData.lazyRender,\n                shouldShow: active || parentData.animated,\n            });\n        },\n        update: function () {\n            if (this.parent) {\n                this.parent.updateTabs();\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tab/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tab/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"custom-class {{ utils.bem('tab__pane', { active, inactive: !active }) }}\"\n  style=\"{{ shouldShow ? '' : 'display: none;' }}\"\n>\n  <slot wx:if=\"{{ shouldRender }}\" />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tab/index.wxss",
    "content": "@import '../common/index.wxss';:host{box-sizing:border-box;flex-shrink:0;width:100%}.van-tab__pane{-webkit-overflow-scrolling:touch;box-sizing:border-box;overflow-y:auto}.van-tab__pane--active{height:auto}.van-tab__pane--inactive{height:0;overflow:visible}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabbar/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabbar/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\nvar utils_1 = require(\"../common/utils\");\n(0, component_1.VantComponent)({\n    relation: (0, relation_1.useChildren)('tabbar-item', function () {\n        this.updateChildren();\n    }),\n    props: {\n        active: {\n            type: null,\n            observer: 'updateChildren',\n        },\n        activeColor: {\n            type: String,\n            observer: 'updateChildren',\n        },\n        inactiveColor: {\n            type: String,\n            observer: 'updateChildren',\n        },\n        fixed: {\n            type: Boolean,\n            value: true,\n            observer: 'setHeight',\n        },\n        placeholder: {\n            type: Boolean,\n            observer: 'setHeight',\n        },\n        border: {\n            type: Boolean,\n            value: true,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        safeAreaInsetBottom: {\n            type: Boolean,\n            value: true,\n        },\n    },\n    data: {\n        height: 50,\n    },\n    methods: {\n        updateChildren: function () {\n            var children = this.children;\n            if (!Array.isArray(children) || !children.length) {\n                return;\n            }\n            children.forEach(function (child) { return child.updateFromParent(); });\n        },\n        setHeight: function () {\n            var _this = this;\n            if (!this.data.fixed || !this.data.placeholder) {\n                return;\n            }\n            wx.nextTick(function () {\n                (0, utils_1.getRect)(_this, '.van-tabbar').then(function (res) {\n                    _this.setData({ height: res.height });\n                });\n            });\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabbar/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabbar/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ border ? 'van-hairline--top-bottom' : '' }} {{ utils.bem('tabbar', { fixed, safe: safeAreaInsetBottom }) }} custom-class\"\n  style=\"{{ zIndex ? 'z-index: ' + zIndex : '' }}\"\n>\n  <slot />\n</view>\n\n<view wx:if=\"{{ fixed && placeholder }}\" style=\"height: {{ height }}px;\"></view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabbar/index.wxss",
    "content": "@import '../common/index.wxss';.van-tabbar{background-color:var(--tabbar-background-color,#fff);box-sizing:initial;display:flex;height:var(--tabbar-height,50px);width:100%}.van-tabbar--fixed{bottom:0;left:0;position:fixed}.van-tabbar--safe{padding-bottom:env(safe-area-inset-bottom)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabbar-item/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabbar-item/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    props: {\n        info: null,\n        name: null,\n        icon: String,\n        dot: Boolean,\n        url: {\n            type: String,\n            value: '',\n        },\n        linkType: {\n            type: String,\n            value: 'redirectTo',\n        },\n        iconPrefix: {\n            type: String,\n            value: 'van-icon',\n        },\n    },\n    relation: (0, relation_1.useParent)('tabbar'),\n    data: {\n        active: false,\n        activeColor: '',\n        inactiveColor: '',\n    },\n    methods: {\n        onClick: function () {\n            var parent = this.parent;\n            if (parent) {\n                var index = parent.children.indexOf(this);\n                var active = this.data.name || index;\n                if (active !== this.data.active) {\n                    parent.$emit('change', active);\n                }\n            }\n            var _a = this.data, url = _a.url, linkType = _a.linkType;\n            if (url && wx[linkType]) {\n                return wx[linkType]({ url: url });\n            }\n            this.$emit('click');\n        },\n        updateFromParent: function () {\n            var parent = this.parent;\n            if (!parent) {\n                return;\n            }\n            var index = parent.children.indexOf(this);\n            var parentData = parent.data;\n            var data = this.data;\n            var active = (data.name || index) === parentData.active;\n            var patch = {};\n            if (active !== data.active) {\n                patch.active = active;\n            }\n            if (parentData.activeColor !== data.activeColor) {\n                patch.activeColor = parentData.activeColor;\n            }\n            if (parentData.inactiveColor !== data.inactiveColor) {\n                patch.inactiveColor = parentData.inactiveColor;\n            }\n            if (Object.keys(patch).length > 0) {\n                this.setData(patch);\n            }\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabbar-item/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-info\": \"../info/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabbar-item/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n\n<view\n  class=\"{{ utils.bem('tabbar-item', { active }) }} custom-class\"\n  style=\"color: {{ active ? activeColor : inactiveColor }}\"\n  bindtap=\"onClick\"\n>\n  <view class=\"van-tabbar-item__icon\">\n    <van-icon\n      wx:if=\"{{ icon }}\"\n      name=\"{{ icon }}\"\n      class-prefix=\"{{ iconPrefix }}\"\n      custom-class=\"van-tabbar-item__icon__inner\"\n    />\n    <block wx:else>\n      <slot wx:if=\"{{ active }}\" name=\"icon-active\" />\n      <slot wx:else name=\"icon\" />\n    </block>\n    <van-info\n      dot=\"{{ dot }}\"\n      info=\"{{ info }}\"\n      custom-class=\"van-tabbar-item__info\"\n    />\n  </view>\n  <view class=\"van-tabbar-item__text\">\n    <slot />\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabbar-item/index.wxss",
    "content": "@import '../common/index.wxss';:host{flex:1}.van-tabbar-item{align-items:center;color:var(--tabbar-item-text-color,#646566);display:flex;flex-direction:column;font-size:var(--tabbar-item-font-size,12px);height:100%;justify-content:center;line-height:var(--tabbar-item-line-height,1)}.van-tabbar-item__icon{font-size:var(--tabbar-item-icon-size,22px);margin-bottom:var(--tabbar-item-margin-bottom,4px);position:relative}.van-tabbar-item__icon__inner{display:block;min-width:1em}.van-tabbar-item--active{color:var(--tabbar-item-active-color,#1989fa)}.van-tabbar-item__info{margin-top:2px}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabs/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabs/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar touch_1 = require(\"../mixins/touch\");\nvar utils_1 = require(\"../common/utils\");\nvar validator_1 = require(\"../common/validator\");\nvar relation_1 = require(\"../common/relation\");\n(0, component_1.VantComponent)({\n    mixins: [touch_1.touch],\n    classes: [\n        'nav-class',\n        'tab-class',\n        'tab-active-class',\n        'line-class',\n        'wrap-class',\n    ],\n    relation: (0, relation_1.useChildren)('tab', function () {\n        this.updateTabs();\n    }),\n    props: {\n        sticky: Boolean,\n        border: Boolean,\n        swipeable: Boolean,\n        titleActiveColor: String,\n        titleInactiveColor: String,\n        color: String,\n        animated: {\n            type: Boolean,\n            observer: function () {\n                var _this = this;\n                this.children.forEach(function (child, index) {\n                    return child.updateRender(index === _this.data.currentIndex, _this);\n                });\n            },\n        },\n        lineWidth: {\n            type: null,\n            value: 40,\n            observer: 'resize',\n        },\n        lineHeight: {\n            type: null,\n            value: -1,\n        },\n        active: {\n            type: null,\n            value: 0,\n            observer: function (name) {\n                if (name !== this.getCurrentName()) {\n                    this.setCurrentIndexByName(name);\n                }\n            },\n        },\n        type: {\n            type: String,\n            value: 'line',\n        },\n        ellipsis: {\n            type: Boolean,\n            value: true,\n        },\n        duration: {\n            type: Number,\n            value: 0.3,\n        },\n        zIndex: {\n            type: Number,\n            value: 1,\n        },\n        swipeThreshold: {\n            type: Number,\n            value: 5,\n            observer: function (value) {\n                this.setData({\n                    scrollable: this.children.length > value || !this.data.ellipsis,\n                });\n            },\n        },\n        offsetTop: {\n            type: Number,\n            value: 0,\n        },\n        lazyRender: {\n            type: Boolean,\n            value: true,\n        },\n        useBeforeChange: {\n            type: Boolean,\n            value: false,\n        },\n    },\n    data: {\n        tabs: [],\n        scrollLeft: 0,\n        scrollable: false,\n        currentIndex: 0,\n        container: null,\n        skipTransition: true,\n        scrollWithAnimation: false,\n        lineOffsetLeft: 0,\n        inited: false,\n    },\n    mounted: function () {\n        var _this = this;\n        (0, utils_1.requestAnimationFrame)(function () {\n            _this.swiping = true;\n            _this.setData({\n                container: function () { return _this.createSelectorQuery().select('.van-tabs'); },\n            });\n            _this.resize();\n            _this.scrollIntoView();\n        });\n    },\n    methods: {\n        updateTabs: function () {\n            var _a = this, _b = _a.children, children = _b === void 0 ? [] : _b, data = _a.data;\n            this.setData({\n                tabs: children.map(function (child) { return child.data; }),\n                scrollable: this.children.length > data.swipeThreshold || !data.ellipsis,\n            });\n            this.setCurrentIndexByName(data.active || this.getCurrentName());\n        },\n        trigger: function (eventName, child) {\n            var currentIndex = this.data.currentIndex;\n            var data = this.getChildData(currentIndex, child);\n            if (!(0, validator_1.isDef)(data)) {\n                return;\n            }\n            this.$emit(eventName, data);\n        },\n        onTap: function (event) {\n            var _this = this;\n            var index = event.currentTarget.dataset.index;\n            var child = this.children[index];\n            if (child.data.disabled) {\n                this.trigger('disabled', child);\n                return;\n            }\n            this.onBeforeChange(index).then(function () {\n                _this.setCurrentIndex(index);\n                (0, utils_1.nextTick)(function () {\n                    _this.trigger('click');\n                });\n            });\n        },\n        // correct the index of active tab\n        setCurrentIndexByName: function (name) {\n            var _a = this.children, children = _a === void 0 ? [] : _a;\n            var matched = children.filter(function (child) { return child.getComputedName() === name; });\n            if (matched.length) {\n                this.setCurrentIndex(matched[0].index);\n            }\n        },\n        setCurrentIndex: function (currentIndex) {\n            var _this = this;\n            var _a = this, data = _a.data, _b = _a.children, children = _b === void 0 ? [] : _b;\n            if (!(0, validator_1.isDef)(currentIndex) ||\n                currentIndex >= children.length ||\n                currentIndex < 0) {\n                return;\n            }\n            (0, utils_1.groupSetData)(this, function () {\n                children.forEach(function (item, index) {\n                    var active = index === currentIndex;\n                    if (active !== item.data.active || !item.inited) {\n                        item.updateRender(active, _this);\n                    }\n                });\n            });\n            if (currentIndex === data.currentIndex) {\n                if (!data.inited) {\n                    this.resize();\n                }\n                return;\n            }\n            var shouldEmitChange = data.currentIndex !== null;\n            this.setData({ currentIndex: currentIndex });\n            (0, utils_1.requestAnimationFrame)(function () {\n                _this.resize();\n                _this.scrollIntoView();\n            });\n            (0, utils_1.nextTick)(function () {\n                _this.trigger('input');\n                if (shouldEmitChange) {\n                    _this.trigger('change');\n                }\n            });\n        },\n        getCurrentName: function () {\n            var activeTab = this.children[this.data.currentIndex];\n            if (activeTab) {\n                return activeTab.getComputedName();\n            }\n        },\n        resize: function () {\n            var _this = this;\n            if (this.data.type !== 'line') {\n                return;\n            }\n            var _a = this.data, currentIndex = _a.currentIndex, ellipsis = _a.ellipsis, skipTransition = _a.skipTransition;\n            Promise.all([\n                (0, utils_1.getAllRect)(this, '.van-tab'),\n                (0, utils_1.getRect)(this, '.van-tabs__line'),\n            ]).then(function (_a) {\n                var _b = _a[0], rects = _b === void 0 ? [] : _b, lineRect = _a[1];\n                var rect = rects[currentIndex];\n                if (rect == null) {\n                    return;\n                }\n                var lineOffsetLeft = rects\n                    .slice(0, currentIndex)\n                    .reduce(function (prev, curr) { return prev + curr.width; }, 0);\n                lineOffsetLeft +=\n                    (rect.width - lineRect.width) / 2 + (ellipsis ? 0 : 8);\n                _this.setData({ lineOffsetLeft: lineOffsetLeft, inited: true });\n                _this.swiping = true;\n                if (skipTransition) {\n                    // waiting transition end\n                    setTimeout(function () {\n                        _this.setData({ skipTransition: false });\n                    }, _this.data.duration);\n                }\n            });\n        },\n        // scroll active tab into view\n        scrollIntoView: function () {\n            var _this = this;\n            var _a = this.data, currentIndex = _a.currentIndex, scrollable = _a.scrollable, scrollWithAnimation = _a.scrollWithAnimation;\n            if (!scrollable) {\n                return;\n            }\n            Promise.all([\n                (0, utils_1.getAllRect)(this, '.van-tab'),\n                (0, utils_1.getRect)(this, '.van-tabs__nav'),\n            ]).then(function (_a) {\n                var tabRects = _a[0], navRect = _a[1];\n                var tabRect = tabRects[currentIndex];\n                var offsetLeft = tabRects\n                    .slice(0, currentIndex)\n                    .reduce(function (prev, curr) { return prev + curr.width; }, 0);\n                _this.setData({\n                    scrollLeft: offsetLeft - (navRect.width - tabRect.width) / 2,\n                });\n                if (!scrollWithAnimation) {\n                    (0, utils_1.nextTick)(function () {\n                        _this.setData({ scrollWithAnimation: true });\n                    });\n                }\n            });\n        },\n        onTouchScroll: function (event) {\n            this.$emit('scroll', event.detail);\n        },\n        onTouchStart: function (event) {\n            if (!this.data.swipeable)\n                return;\n            this.swiping = true;\n            this.touchStart(event);\n        },\n        onTouchMove: function (event) {\n            if (!this.data.swipeable || !this.swiping)\n                return;\n            this.touchMove(event);\n        },\n        // watch swipe touch end\n        onTouchEnd: function () {\n            var _this = this;\n            if (!this.data.swipeable || !this.swiping)\n                return;\n            var _a = this, direction = _a.direction, deltaX = _a.deltaX, offsetX = _a.offsetX;\n            var minSwipeDistance = 50;\n            if (direction === 'horizontal' && offsetX >= minSwipeDistance) {\n                var index_1 = this.getAvaiableTab(deltaX);\n                if (index_1 !== -1) {\n                    this.onBeforeChange(index_1).then(function () { return _this.setCurrentIndex(index_1); });\n                }\n            }\n            this.swiping = false;\n        },\n        getAvaiableTab: function (direction) {\n            var _a = this.data, tabs = _a.tabs, currentIndex = _a.currentIndex;\n            var step = direction > 0 ? -1 : 1;\n            for (var i = step; currentIndex + i < tabs.length && currentIndex + i >= 0; i += step) {\n                var index = currentIndex + i;\n                if (index >= 0 &&\n                    index < tabs.length &&\n                    tabs[index] &&\n                    !tabs[index].disabled) {\n                    return index;\n                }\n            }\n            return -1;\n        },\n        onBeforeChange: function (index) {\n            var _this = this;\n            var useBeforeChange = this.data.useBeforeChange;\n            if (!useBeforeChange) {\n                return Promise.resolve();\n            }\n            return new Promise(function (resolve, reject) {\n                _this.$emit('before-change', __assign(__assign({}, _this.getChildData(index)), { callback: function (status) { return (status ? resolve() : reject()); } }));\n            });\n        },\n        getChildData: function (index, child) {\n            var currentChild = child || this.children[index];\n            if (!(0, validator_1.isDef)(currentChild)) {\n                return;\n            }\n            return {\n                index: currentChild.index,\n                name: currentChild.getComputedName(),\n                title: currentChild.data.title,\n            };\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabs/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-info\": \"../info/index\",\n    \"van-sticky\": \"../sticky/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabs/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"custom-class {{ utils.bem('tabs') }}\">\n  <van-sticky\n    disabled=\"{{ !sticky }}\"\n    z-index=\"{{ zIndex }}\"\n    offset-top=\"{{ offsetTop }}\"\n    container=\"{{ container }}\"\n    bind:scroll=\"onTouchScroll\"\n  >\n    <view class=\"{{ utils.bem('tabs--') + type }} {{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'van-hairline--top-bottom' : '' }} wrap-class\">\n      <slot name=\"nav-left\" />\n\n      <scroll-view\n        scroll-x=\"{{ scrollable }}\"\n        scroll-with-animation=\"{{ scrollWithAnimation }}\"\n        scroll-left=\"{{ scrollLeft }}\"\n        class=\"{{ utils.bem('tabs__scroll', [type]) }}\"\n        style=\"{{ color ? 'border-color: ' + color : '' }}\"\n      >\n        <view class=\"{{ utils.bem('tabs__nav', [type, { complete: !ellipsis }]) }} nav-class\" style=\"{{ computed.navStyle(color, type) }}\">\n          <view wx:if=\"{{ type === 'line' }}\" class=\"van-tabs__line\" style=\"{{ computed.lineStyle({ color, lineOffsetLeft, lineHeight, skipTransition, duration, lineWidth, inited }) }}\" />\n          <view\n            wx:for=\"{{ tabs }}\"\n            wx:key=\"index\"\n            data-index=\"{{ index }}\"\n            class=\"{{ computed.tabClass(index === currentIndex, ellipsis) }} {{ utils.bem('tab', { active: index === currentIndex, disabled: item.disabled, complete: !ellipsis }) }}\"\n            style=\"{{ computed.tabStyle({ active: index === currentIndex, ellipsis, color, type, disabled: item.disabled, titleActiveColor, titleInactiveColor, swipeThreshold, scrollable }) }}\"\n            bind:tap=\"onTap\"\n          >\n            <view class=\"{{ ellipsis ? 'van-ellipsis' : '' }}\" style=\"{{ item.titleStyle }}\">\n              {{ item.title }}\n              <van-info\n                wx:if=\"{{ item.info !== null || item.dot }}\"\n                info=\"{{ item.info }}\"\n                dot=\"{{ item.dot }}\"\n                custom-class=\"van-tab__title__info\"\n              />\n            </view>\n          </view>\n        </view>\n      </scroll-view>\n\n      <slot name=\"nav-right\" />\n    </view>\n  </van-sticky>\n\n  <view\n    class=\"van-tabs__content\"\n    bind:touchstart=\"onTouchStart\"\n    bind:touchmove=\"onTouchMove\"\n    bind:touchend=\"onTouchEnd\"\n    bind:touchcancel=\"onTouchEnd\"\n  >\n    <view\n      class=\"{{ utils.bem('tabs__track', [{ animated }]) }} van-tabs__track\"\n      style=\"{{ computed.trackStyle({ duration, currentIndex, animated }) }}\"\n    >\n      <slot />\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabs/index.wxs",
    "content": "/* eslint-disable */\nvar utils = require('../wxs/utils.wxs');\nvar style = require('../wxs/style.wxs');\n\nfunction tabClass(active, ellipsis) {\n  var classes = ['tab-class'];\n\n  if (active) {\n    classes.push('tab-active-class');\n  }\n\n  if (ellipsis) {\n    classes.push('van-ellipsis');\n  }\n\n  return classes.join(' ');\n}\n\nfunction tabStyle(data) {\n  var titleColor = data.active\n    ? data.titleActiveColor\n    : data.titleInactiveColor;\n\n  var ellipsis = data.scrollable && data.ellipsis;\n\n  // card theme color\n  if (data.type === 'card') {\n    return style({\n      'border-color': data.color,\n      'background-color': !data.disabled && data.active ? data.color : null,\n      color: titleColor || (!data.disabled && !data.active ? data.color : null),\n      'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,\n    });\n  }\n\n  return style({\n    color: titleColor,\n    'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,\n  });\n}\n\nfunction navStyle(color, type) {\n  return style({\n    'border-color': type === 'card' && color ? color : null,\n  });\n}\n\nfunction trackStyle(data) {\n  if (!data.animated) {\n    return '';\n  }\n\n  return style({\n    left: -100 * data.currentIndex + '%',\n    'transition-duration': data.duration + 's',\n    '-webkit-transition-duration': data.duration + 's',\n  });\n}\n\nfunction lineStyle(data) {\n  return style({\n    width: utils.addUnit(data.lineWidth),\n    opacity: data.inited ? 1 : 0,\n    transform: 'translateX(' + data.lineOffsetLeft + 'px)',\n    '-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',\n    'background-color': data.color,\n    height: data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,\n    'border-radius':\n      data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,\n    'transition-duration': !data.skipTransition ? data.duration + 's' : null,\n    '-webkit-transition-duration': !data.skipTransition\n      ? data.duration + 's'\n      : null,\n  });\n}\n\nmodule.exports = {\n  tabClass: tabClass,\n  tabStyle: tabStyle,\n  trackStyle: trackStyle,\n  lineStyle: lineStyle,\n  navStyle: navStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tabs/index.wxss",
    "content": "@import '../common/index.wxss';.van-tabs{-webkit-tap-highlight-color:transparent;position:relative}.van-tabs__wrap{display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-left:8px;padding-right:8px}.van-tabs__scroll{background-color:var(--tabs-nav-background-color,#fff);overflow:auto}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{border:1px solid var(--tabs-default-color,#ee0a24);border-radius:2px;box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{box-sizing:border-box;height:var(--tabs-card-height,30px)}.van-tabs__nav--card .van-tab{border-right:1px solid var(--tabs-default-color,#ee0a24);color:var(--tabs-default-color,#ee0a24);line-height:calc(var(--tabs-card-height, 30px) - 2px)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{background-color:var(--tabs-default-color,#ee0a24);color:#fff}.van-tabs__nav--card .van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tabs__line{background-color:var(--tabs-bottom-bar-color,#ee0a24);border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.van-tabs__track{height:100%;position:relative;width:100%}.van-tabs__track--animated{display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line{height:var(--tabs-line-height,44px)}.van-tabs--card{height:var(--tabs-card-height,30px)}.van-tab{box-sizing:border-box;color:var(--tab-text-color,#646566);cursor:pointer;flex:1;font-size:var(--tab-font-size,14px);line-height:var(--tabs-line-height,44px);min-width:0;padding:0 5px;position:relative;text-align:center}.van-tab--active{color:var(--tab-active-text-color,#323233);font-weight:var(--font-weight-bold,500)}.van-tab--disabled{color:var(--tab-disabled-text-color,#c8c9cc)}.van-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tag/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tag/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        size: String,\n        mark: Boolean,\n        color: String,\n        plain: Boolean,\n        round: Boolean,\n        textColor: String,\n        type: {\n            type: String,\n            value: 'default',\n        },\n        closeable: Boolean,\n    },\n    methods: {\n        onClose: function () {\n            this.$emit('close');\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tag/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tag/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  class=\"custom-class {{ utils.bem('tag', [type, size, { mark, plain, round }]) }}\"\n  style=\"{{ computed.rootStyle({ plain, color, textColor }) }}\"\n>\n  <slot />\n  <van-icon\n    wx:if=\"{{ closeable }}\"\n    name=\"cross\"\n    custom-class=\"van-tag__close\"\n    bind:click=\"onClose\"\n  />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tag/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction rootStyle(data) {\n  return style({\n    'background-color': data.plain ? '' : data.color,\n    color: data.textColor || data.plain ? data.textColor || data.color : '',\n  });\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tag/index.wxss",
    "content": "@import '../common/index.wxss';.van-tag{align-items:center;border-radius:var(--tag-border-radius,2px);color:var(--tag-text-color,#fff);display:inline-flex;font-size:var(--tag-font-size,12px);line-height:var(--tag-line-height,16px);padding:var(--tag-padding,0 4px);position:relative}.van-tag--default{background-color:var(--tag-default-color,#969799)}.van-tag--default.van-tag--plain{color:var(--tag-default-color,#969799)}.van-tag--danger{background-color:var(--tag-danger-color,#ee0a24)}.van-tag--danger.van-tag--plain{color:var(--tag-danger-color,#ee0a24)}.van-tag--primary{background-color:var(--tag-primary-color,#1989fa)}.van-tag--primary.van-tag--plain{color:var(--tag-primary-color,#1989fa)}.van-tag--success{background-color:var(--tag-success-color,#07c160)}.van-tag--success.van-tag--plain{color:var(--tag-success-color,#07c160)}.van-tag--warning{background-color:var(--tag-warning-color,#ff976a)}.van-tag--warning.van-tag--plain{color:var(--tag-warning-color,#ff976a)}.van-tag--plain{background-color:var(--tag-plain-background-color,#fff)}.van-tag--plain:before{border:1px solid;border-radius:inherit;bottom:0;content:\"\";left:0;pointer-events:none;position:absolute;right:0;top:0}.van-tag--medium{padding:var(--tag-medium-padding,2px 6px)}.van-tag--large{border-radius:var(--tag-large-border-radius,4px);font-size:var(--tag-large-font-size,14px);padding:var(--tag-large-padding,4px 8px)}.van-tag--mark{border-radius:0 var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) 0}.van-tag--mark:after{content:\"\";display:block;width:2px}.van-tag--round{border-radius:var(--tag-round-border-radius,999px)}.van-tag__close{margin-left:2px;min-width:1em}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/toast/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/toast/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    props: {\n        show: Boolean,\n        mask: Boolean,\n        message: String,\n        forbidClick: Boolean,\n        zIndex: {\n            type: Number,\n            value: 1000,\n        },\n        type: {\n            type: String,\n            value: 'text',\n        },\n        loadingType: {\n            type: String,\n            value: 'circular',\n        },\n        position: {\n            type: String,\n            value: 'middle',\n        },\n    },\n    methods: {\n        // for prevent touchmove\n        noop: function () { },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/toast/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\",\n    \"van-overlay\": \"../overlay/index\",\n    \"van-transition\": \"../transition/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/toast/index.wxml",
    "content": "<van-overlay\n  wx:if=\"{{ mask || forbidClick }}\"\n  show=\"{{ show }}\"\n  z-index=\"{{ zIndex }}\"\n  custom-style=\"{{ mask ? '' : 'background-color: transparent;' }}\"\n/>\n<van-transition\n  show=\"{{ show }}\"\n  custom-style=\"z-index: {{ zIndex }}\"\n  custom-class=\"van-toast__container\"\n>\n  <view\n    class=\"van-toast van-toast--{{ (type === 'text' || type === 'html') ? 'text' : 'icon' }} van-toast--{{ position }}\"\n    catch:touchmove=\"noop\"\n  >\n    <!-- text only -->\n    <text wx:if=\"{{ type === 'text' }}\">{{ message }}</text>\n\n    <!-- html only -->\n    <rich-text wx:elif=\"{{ type === 'html' }}\" nodes=\"{{ message }}\"></rich-text>\n\n    <!-- with icon -->\n    <block wx:else>\n      <van-loading\n        wx:if=\"{{ type === 'loading' }}\"\n        color=\"white\"\n        type=\"{{ loadingType }}\"\n        custom-class=\"van-toast__loading\"\n      />\n      <van-icon wx:else class=\"van-toast__icon\" name=\"{{ type }}\" />\n      <text wx:if=\"{{ message }}\" class=\"van-toast__text\">{{ message }}</text>\n    </block>\n\n    <slot />\n  </view>\n</van-transition>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/toast/index.wxss",
    "content": "@import '../common/index.wxss';.van-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,8px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.van-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.van-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.van-toast--icon .van-toast__icon{font-size:var(--toast-icon-size,36px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{transform:translateY(-30vh)}.van-toast--bottom{transform:translateY(30vh)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/toast/toast.d.ts",
    "content": "/// <reference types=\"miniprogram-api-typings\" />\n/// <reference types=\"miniprogram-api-typings\" />\ntype ToastMessage = string | number;\ntype ToastContext = WechatMiniprogram.Component.TrivialInstance | WechatMiniprogram.Page.TrivialInstance;\ninterface ToastOptions {\n    show?: boolean;\n    type?: string;\n    mask?: boolean;\n    zIndex?: number;\n    context?: (() => ToastContext) | ToastContext;\n    position?: string;\n    duration?: number;\n    selector?: string;\n    forbidClick?: boolean;\n    loadingType?: string;\n    message?: ToastMessage;\n    onClose?: () => void;\n}\ndeclare function Toast(toastOptions: ToastOptions | ToastMessage): WechatMiniprogram.Component.TrivialInstance | undefined;\ndeclare namespace Toast {\n    var loading: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;\n    var success: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;\n    var fail: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;\n    var clear: () => void;\n    var setDefaultOptions: (options: ToastOptions) => void;\n    var resetDefaultOptions: () => void;\n}\nexport default Toast;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/toast/toast.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar validator_1 = require(\"../common/validator\");\nvar defaultOptions = {\n    type: 'text',\n    mask: false,\n    message: '',\n    show: true,\n    zIndex: 1000,\n    duration: 2000,\n    position: 'middle',\n    forbidClick: false,\n    loadingType: 'circular',\n    selector: '#van-toast',\n};\nvar queue = [];\nvar currentOptions = __assign({}, defaultOptions);\nfunction parseOptions(message) {\n    return (0, validator_1.isObj)(message) ? message : { message: message };\n}\nfunction getContext() {\n    var pages = getCurrentPages();\n    return pages[pages.length - 1];\n}\nfunction Toast(toastOptions) {\n    var options = __assign(__assign({}, currentOptions), parseOptions(toastOptions));\n    var context = (typeof options.context === 'function'\n        ? options.context()\n        : options.context) || getContext();\n    var toast = context.selectComponent(options.selector);\n    if (!toast) {\n        console.warn('未找到 van-toast 节点，请确认 selector 及 context 是否正确');\n        return;\n    }\n    delete options.context;\n    delete options.selector;\n    toast.clear = function () {\n        toast.setData({ show: false });\n        if (options.onClose) {\n            options.onClose();\n        }\n    };\n    queue.push(toast);\n    toast.setData(options);\n    clearTimeout(toast.timer);\n    if (options.duration != null && options.duration > 0) {\n        toast.timer = setTimeout(function () {\n            toast.clear();\n            queue = queue.filter(function (item) { return item !== toast; });\n        }, options.duration);\n    }\n    return toast;\n}\nvar createMethod = function (type) { return function (options) {\n    return Toast(__assign({ type: type }, parseOptions(options)));\n}; };\nToast.loading = createMethod('loading');\nToast.success = createMethod('success');\nToast.fail = createMethod('fail');\nToast.clear = function () {\n    queue.forEach(function (toast) {\n        toast.clear();\n    });\n    queue = [];\n};\nToast.setDefaultOptions = function (options) {\n    Object.assign(currentOptions, options);\n};\nToast.resetDefaultOptions = function () {\n    currentOptions = __assign({}, defaultOptions);\n};\nexports.default = Toast;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/transition/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/transition/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar transition_1 = require(\"../mixins/transition\");\n(0, component_1.VantComponent)({\n    classes: [\n        'enter-class',\n        'enter-active-class',\n        'enter-to-class',\n        'leave-class',\n        'leave-active-class',\n        'leave-to-class',\n    ],\n    mixins: [(0, transition_1.transition)(true)],\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/transition/index.json",
    "content": "{\n  \"component\": true\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/transition/index.wxml",
    "content": "<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view\n  wx:if=\"{{ inited }}\"\n  class=\"van-transition custom-class {{ classes }}\"\n  style=\"{{ computed.rootStyle({ currentDuration, display, customStyle }) }}\"\n  bind:transitionend=\"onTransitionEnd\"\n>\n  <slot />\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/transition/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\n\nfunction rootStyle(data) {\n  return style([\n    {\n      '-webkit-transition-duration': data.currentDuration + 'ms',\n      'transition-duration': data.currentDuration + 'ms',\n    },\n    data.display ? null : 'display: none',\n    data.customStyle,\n  ]);\n}\n\nmodule.exports = {\n  rootStyle: rootStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/transition/index.wxss",
    "content": "@import '../common/index.wxss';.van-transition{transition-timing-function:ease}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-fade-down-enter-active,.van-fade-down-leave-active,.van-fade-left-enter-active,.van-fade-left-leave-active,.van-fade-right-enter-active,.van-fade-right-leave-active,.van-fade-up-enter-active,.van-fade-up-leave-active{transition-property:opacity,transform}.van-fade-up-enter,.van-fade-up-leave-to{opacity:0;transform:translate3d(0,100%,0)}.van-fade-down-enter,.van-fade-down-leave-to{opacity:0;transform:translate3d(0,-100%,0)}.van-fade-left-enter,.van-fade-left-leave-to{opacity:0;transform:translate3d(-100%,0,0)}.van-fade-right-enter,.van-fade-right-leave-to{opacity:0;transform:translate3d(100%,0,0)}.van-slide-down-enter-active,.van-slide-down-leave-active,.van-slide-left-enter-active,.van-slide-left-leave-active,.van-slide-right-enter-active,.van-slide-right-leave-active,.van-slide-up-enter-active,.van-slide-up-leave-active{transition-property:transform}.van-slide-up-enter,.van-slide-up-leave-to{transform:translate3d(0,100%,0)}.van-slide-down-enter,.van-slide-down-leave-to{transform:translate3d(0,-100%,0)}.van-slide-left-enter,.van-slide-left-leave-to{transform:translate3d(-100%,0,0)}.van-slide-right-enter,.van-slide-right-leave-to{transform:translate3d(100%,0,0)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tree-select/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tree-select/index.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\n(0, component_1.VantComponent)({\n    classes: [\n        'main-item-class',\n        'content-item-class',\n        'main-active-class',\n        'content-active-class',\n        'main-disabled-class',\n        'content-disabled-class',\n    ],\n    props: {\n        items: {\n            type: Array,\n            observer: 'updateSubItems',\n        },\n        activeId: null,\n        mainActiveIndex: {\n            type: Number,\n            value: 0,\n            observer: 'updateSubItems',\n        },\n        height: {\n            type: null,\n            value: 300,\n        },\n        max: {\n            type: Number,\n            value: Infinity,\n        },\n        selectedIcon: {\n            type: String,\n            value: 'success',\n        },\n    },\n    data: {\n        subItems: [],\n    },\n    methods: {\n        // 当一个子项被选择时\n        onSelectItem: function (event) {\n            var item = event.currentTarget.dataset.item;\n            var isArray = Array.isArray(this.data.activeId);\n            // 判断有没有超出右侧选择的最大数\n            var isOverMax = isArray && this.data.activeId.length >= this.data.max;\n            // 判断该项有没有被选中, 如果有被选中，则忽视是否超出的条件\n            var isSelected = isArray\n                ? this.data.activeId.indexOf(item.id) > -1\n                : this.data.activeId === item.id;\n            if (!item.disabled && (!isOverMax || isSelected)) {\n                this.$emit('click-item', item);\n            }\n        },\n        // 当一个导航被点击时\n        onClickNav: function (event) {\n            var index = event.detail;\n            var item = this.data.items[index];\n            if (!item.disabled) {\n                this.$emit('click-nav', { index: index });\n            }\n        },\n        // 更新子项列表\n        updateSubItems: function () {\n            var _a = this.data, items = _a.items, mainActiveIndex = _a.mainActiveIndex;\n            var _b = (items[mainActiveIndex] || {}).children, children = _b === void 0 ? [] : _b;\n            this.setData({ subItems: children });\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tree-select/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-sidebar\": \"../sidebar/index\",\n    \"van-sidebar-item\": \"../sidebar-item/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tree-select/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"wxs\" />\n\n<view\n  class=\"van-tree-select\"\n  style=\"height: {{ utils.addUnit(height) }}\"\n>\n  <scroll-view scroll-y class=\"van-tree-select__nav\">\n    <van-sidebar active-key=\"{{ mainActiveIndex }}\" bind:change=\"onClickNav\" custom-class=\"van-tree-select__nav__inner\">\n      <van-sidebar-item\n        wx:for=\"{{ items }}\"\n        wx:key=\"index\"\n        custom-class=\"main-item-class\"\n        active-class=\"main-active-class\"\n        disabled-class=\"main-disabled-class\"\n        badge=\"{{ item.badge }}\"\n        dot=\"{{ item.dot }}\"\n        title=\"{{ item.text }}\"\n        disabled=\"{{ item.disabled }}\"\n      />\n    </van-sidebar>\n  </scroll-view>\n  <scroll-view scroll-y class=\"van-tree-select__content\">\n    <slot name=\"content\" />\n    <view\n      wx:for=\"{{ subItems }}\"\n      wx:key=\"id\"\n      class=\"van-ellipsis content-item-class {{ utils.bem('tree-select__item', { active: wxs.isActive(activeId, item.id), disabled: item.disabled }) }} {{ wxs.isActive(activeId, item.id) ? 'content-active-class' : '' }} {{ item.disabled ? 'content-disabled-class' : '' }}\"\n      data-item=\"{{ item }}\"\n      bind:tap=\"onSelectItem\"\n    >\n      {{ item.text }}\n      <van-icon\n        wx:if=\"{{ wxs.isActive(activeId, item.id) }}\"\n        name=\"{{ selectedIcon }}\"\n        size=\"16px\"\n        class=\"van-tree-select__selected\"\n      />\n    </view>\n  </scroll-view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tree-select/index.wxs",
    "content": "/* eslint-disable */\nvar array = require('../wxs/array.wxs');\n\nfunction isActive (activeList, itemId) {\n  if (array.isArray(activeList)) {\n    return activeList.indexOf(itemId) > -1;\n  }\n\n  return activeList === itemId;\n}\n\nmodule.exports.isActive = isActive;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/tree-select/index.wxss",
    "content": "@import '../common/index.wxss';.van-tree-select{display:flex;font-size:var(--tree-select-font-size,14px);position:relative;-webkit-user-select:none;user-select:none}.van-tree-select__nav{--sidebar-padding:12px 8px 12px 12px;background-color:var(--tree-select-nav-background-color,#f7f8fa);flex:1}.van-tree-select__nav__inner{height:100%;width:100%!important}.van-tree-select__content{background-color:var(--tree-select-content-background-color,#fff);flex:2}.van-tree-select__item{font-weight:700;line-height:var(--tree-select-item-height,44px);padding:0 32px 0 var(--padding-md,16px);position:relative}.van-tree-select__item--active{color:var(--tree-select-item-active-color,#ee0a24)}.van-tree-select__item--disabled{color:var(--tree-select-item-disabled-color,#c8c9cc)}.van-tree-select__selected{position:absolute;right:var(--padding-md,16px);top:50%;transform:translateY(-50%)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/uploader/index.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/uploader/index.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar component_1 = require(\"../common/component\");\nvar validator_1 = require(\"../common/validator\");\nvar shared_1 = require(\"./shared\");\nvar utils_1 = require(\"./utils\");\n(0, component_1.VantComponent)({\n    props: __assign(__assign(__assign(__assign({ disabled: Boolean, multiple: Boolean, uploadText: String, useBeforeRead: Boolean, afterRead: null, beforeRead: null, previewSize: {\n            type: null,\n            value: 80,\n        }, name: {\n            type: null,\n            value: '',\n        }, accept: {\n            type: String,\n            value: 'image',\n        }, fileList: {\n            type: Array,\n            value: [],\n            observer: 'formatFileList',\n        }, maxSize: {\n            type: Number,\n            value: Number.MAX_VALUE,\n        }, maxCount: {\n            type: Number,\n            value: 100,\n        }, deletable: {\n            type: Boolean,\n            value: true,\n        }, showUpload: {\n            type: Boolean,\n            value: true,\n        }, previewImage: {\n            type: Boolean,\n            value: true,\n        }, previewFullImage: {\n            type: Boolean,\n            value: true,\n        }, videoFit: {\n            type: String,\n            value: 'contain',\n        }, imageFit: {\n            type: String,\n            value: 'scaleToFill',\n        }, uploadIcon: {\n            type: String,\n            value: 'photograph',\n        } }, shared_1.imageProps), shared_1.videoProps), shared_1.mediaProps), shared_1.messageFileProps),\n    data: {\n        lists: [],\n        isInCount: true,\n    },\n    methods: {\n        formatFileList: function () {\n            var _a = this.data, _b = _a.fileList, fileList = _b === void 0 ? [] : _b, maxCount = _a.maxCount;\n            var lists = fileList.map(function (item) { return (__assign(__assign({}, item), { isImage: (0, utils_1.isImageFile)(item), isVideo: (0, utils_1.isVideoFile)(item), deletable: (0, validator_1.isBoolean)(item.deletable) ? item.deletable : true })); });\n            this.setData({ lists: lists, isInCount: lists.length < maxCount });\n        },\n        getDetail: function (index) {\n            return {\n                name: this.data.name,\n                index: index == null ? this.data.fileList.length : index,\n            };\n        },\n        startUpload: function () {\n            var _this = this;\n            var _a = this.data, maxCount = _a.maxCount, multiple = _a.multiple, lists = _a.lists, disabled = _a.disabled;\n            if (disabled)\n                return;\n            (0, utils_1.chooseFile)(__assign(__assign({}, this.data), { maxCount: maxCount - lists.length }))\n                .then(function (res) {\n                _this.onBeforeRead(multiple ? res : res[0]);\n            })\n                .catch(function (error) {\n                _this.$emit('error', error);\n            });\n        },\n        onBeforeRead: function (file) {\n            var _this = this;\n            var _a = this.data, beforeRead = _a.beforeRead, useBeforeRead = _a.useBeforeRead;\n            var res = true;\n            if (typeof beforeRead === 'function') {\n                res = beforeRead(file, this.getDetail());\n            }\n            if (useBeforeRead) {\n                res = new Promise(function (resolve, reject) {\n                    _this.$emit('before-read', __assign(__assign({ file: file }, _this.getDetail()), { callback: function (ok) {\n                            ok ? resolve() : reject();\n                        } }));\n                });\n            }\n            if (!res) {\n                return;\n            }\n            if ((0, validator_1.isPromise)(res)) {\n                res.then(function (data) { return _this.onAfterRead(data || file); });\n            }\n            else {\n                this.onAfterRead(file);\n            }\n        },\n        onAfterRead: function (file) {\n            var _a = this.data, maxSize = _a.maxSize, afterRead = _a.afterRead;\n            var oversize = Array.isArray(file)\n                ? file.some(function (item) { return item.size > maxSize; })\n                : file.size > maxSize;\n            if (oversize) {\n                this.$emit('oversize', __assign({ file: file }, this.getDetail()));\n                return;\n            }\n            if (typeof afterRead === 'function') {\n                afterRead(file, this.getDetail());\n            }\n            this.$emit('after-read', __assign({ file: file }, this.getDetail()));\n        },\n        deleteItem: function (event) {\n            var index = event.currentTarget.dataset.index;\n            this.$emit('delete', __assign(__assign({}, this.getDetail(index)), { file: this.data.fileList[index] }));\n        },\n        onPreviewImage: function (event) {\n            if (!this.data.previewFullImage)\n                return;\n            var index = event.currentTarget.dataset.index;\n            var _a = this.data, lists = _a.lists, showmenu = _a.showmenu;\n            var item = lists[index];\n            wx.previewImage({\n                urls: lists.filter(function (item) { return (0, utils_1.isImageFile)(item); }).map(function (item) { return item.url; }),\n                current: item.url,\n                showmenu: showmenu,\n                fail: function () {\n                    wx.showToast({ title: '预览图片失败', icon: 'none' });\n                },\n            });\n        },\n        onPreviewVideo: function (event) {\n            if (!this.data.previewFullImage)\n                return;\n            var index = event.currentTarget.dataset.index;\n            var lists = this.data.lists;\n            var sources = [];\n            var current = lists.reduce(function (sum, cur, curIndex) {\n                if (!(0, utils_1.isVideoFile)(cur)) {\n                    return sum;\n                }\n                sources.push(__assign(__assign({}, cur), { type: 'video' }));\n                if (curIndex < index) {\n                    sum++;\n                }\n                return sum;\n            }, 0);\n            wx.previewMedia({\n                sources: sources,\n                current: current,\n                fail: function () {\n                    wx.showToast({ title: '预览视频失败', icon: 'none' });\n                },\n            });\n        },\n        onPreviewFile: function (event) {\n            if (!this.data.previewFile)\n                return;\n            var index = event.currentTarget.dataset.index;\n            wx.openDocument({\n                filePath: this.data.lists[index].url,\n                showMenu: true,\n            });\n        },\n        onClickPreview: function (event) {\n            var index = event.currentTarget.dataset.index;\n            var item = this.data.lists[index];\n            this.$emit('click-preview', __assign(__assign({}, item), this.getDetail(index)));\n        },\n    },\n});\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/uploader/index.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"van-icon\": \"../icon/index\",\n    \"van-loading\": \"../loading/index\"\n  }\n}\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/uploader/index.wxml",
    "content": "<wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n<wxs src=\"./index.wxs\" module=\"computed\" />\n\n<view class=\"van-uploader\">\n  <view class=\"van-uploader__wrapper\">\n    <!-- 预览样式 -->\n    <view\n      wx:if=\"{{ previewImage }}\"\n      wx:for=\"{{ lists }}\"\n      wx:key=\"index\"\n      class=\"van-uploader__preview\"\n      data-index=\"{{ index }}\"\n      bindtap=\"onClickPreview\"\n    >\n      <image\n        wx:if=\"{{ item.isImage }}\"\n        mode=\"{{ imageFit }}\"\n        src=\"{{ item.thumb || item.url }}\"\n        alt=\"{{ item.name || ('图片' + index) }}\"\n        class=\"van-uploader__preview-image\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        data-index=\"{{ index }}\"\n        bindtap=\"onPreviewImage\"\n      />\n      <video\n        wx:elif=\"{{ item.isVideo }}\"\n        src=\"{{ item.url }}\"\n        title=\"{{ item.name || ('视频' + index) }}\"\n        poster=\"{{ item.thumb }}\"\n        autoplay=\"{{ item.autoplay }}\"\n        object-fit=\"{{videoFit}}\"\n        referrer-policy=\"{{ referrerPolicy }}\"\n        class=\"van-uploader__preview-image\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        data-index=\"{{ index }}\"\n        bindtap=\"onPreviewVideo\"\n      >\n      </video>\n      <view\n        wx:else\n        class=\"van-uploader__file\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        data-index=\"{{ index }}\"\n        bindtap=\"onPreviewFile\"\n      >\n        <van-icon name=\"description\" class=\"van-uploader__file-icon\" />\n        <view class=\"van-uploader__file-name van-ellipsis\">{{ item.name || item.url }}</view>\n      </view>\n      <view\n        wx:if=\"{{ item.status === 'uploading' || item.status === 'failed' }}\"\n        class=\"van-uploader__mask\"\n      >\n       <van-icon wx:if=\"{{ item.status === 'failed' }}\" name=\"close\" class=\"van-uploader__mask-icon\" />\n       <van-loading wx:else custom-class=\"van-uploader__loading\" />\n       <text wx:if=\"{{ item.message }}\" class=\"van-uploader__mask-message\">{{ item.message }}</text>\n      </view>\n      <view\n        wx:if=\"{{ deletable && item.deletable }}\"\n        data-index=\"{{ index }}\"\n        class=\"van-uploader__preview-delete\"\n        catch:tap=\"deleteItem\"\n      >\n        <van-icon name=\"cross\" class=\"van-uploader__preview-delete-icon\" />\n      </view>\n    </view>\n\n    <!-- 上传样式 -->\n    <block wx:if=\"{{ isInCount }}\">\n      <view class=\"van-uploader__slot\" bindtap=\"startUpload\">\n        <slot />\n      </view>\n\n      <!-- 默认上传样式 -->\n      <view\n        wx:if=\"{{ showUpload }}\"\n        class=\"van-uploader__upload {{ disabled ? 'van-uploader__upload--disabled': ''}}\"\n        style=\"{{ computed.sizeStyle({ previewSize }) }}\"\n        bindtap=\"startUpload\"\n      >\n        <van-icon name=\"{{ uploadIcon }}\" class=\"van-uploader__upload-icon\" />\n        <text wx:if=\"{{ uploadText }}\" class=\"van-uploader__upload-text\">{{ uploadText }}</text>\n      </view>\n    </block>\n  </view>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/uploader/index.wxs",
    "content": "/* eslint-disable */\nvar style = require('../wxs/style.wxs');\nvar addUnit = require('../wxs/add-unit.wxs');\n\nfunction sizeStyle(data) {\n  return \"Array\" === data.previewSize.constructor ? style({\n    width: addUnit(data.previewSize[0]),\n    height: addUnit(data.previewSize[1]),\n  }) : style({\n    width: addUnit(data.previewSize),\n    height: addUnit(data.previewSize),\n  });\n}\n\nmodule.exports = {\n  sizeStyle: sizeStyle,\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/uploader/index.wxss",
    "content": "@import '../common/index.wxss';.van-uploader{display:inline-block;position:relative}.van-uploader__wrapper{display:flex;flex-wrap:wrap}.van-uploader__slot:empty{display:none}.van-uploader__slot:not(:empty)+.van-uploader__upload{display:none!important}.van-uploader__upload{align-items:center;background-color:var(--uploader-upload-background-color,#f7f8fa);box-sizing:border-box;display:flex;flex-direction:column;height:var(--uploader-size,80px);justify-content:center;margin:0 8px 8px 0;position:relative;width:var(--uploader-size,80px)}.van-uploader__upload:active{background-color:var(--uploader-upload-active-color,#f2f3f5)}.van-uploader__upload-icon{color:var(--uploader-icon-color,#dcdee0);font-size:var(--uploader-icon-size,24px)}.van-uploader__upload-text{color:var(--uploader-text-color,#969799);font-size:var(--uploader-text-font-size,12px);margin-top:var(--padding-xs,8px)}.van-uploader__upload--disabled{opacity:var(--uploader-disabled-opacity,.5)}.van-uploader__preview{cursor:pointer;margin:0 8px 8px 0;position:relative}.van-uploader__preview-image{display:block;height:var(--uploader-size,80px);overflow:hidden;width:var(--uploader-size,80px)}.van-uploader__preview-delete,.van-uploader__preview-delete:after{height:var(--uploader-delete-icon-size,14px);position:absolute;right:0;top:0;width:var(--uploader-delete-icon-size,14px)}.van-uploader__preview-delete:after{background-color:var(--uploader-delete-background-color,rgba(0,0,0,.7));border-radius:0 0 0 12px;content:\"\"}.van-uploader__preview-delete-icon{color:var(--uploader-delete-color,#fff);font-size:var(--uploader-delete-icon-size,14px);position:absolute;right:0;top:0;transform:scale(.7) translate(10%,-10%);z-index:1}.van-uploader__file{align-items:center;background-color:var(--uploader-file-background-color,#f7f8fa);display:flex;flex-direction:column;height:var(--uploader-size,80px);justify-content:center;width:var(--uploader-size,80px)}.van-uploader__file-icon{color:var(--uploader-file-icon-color,#646566);font-size:var(--uploader-file-icon-size,20px)}.van-uploader__file-name{box-sizing:border-box;color:var(--uploader-file-name-text-color,#646566);font-size:var(--uploader-file-name-font-size,12px);margin-top:var(--uploader-file-name-margin-top,8px);padding:var(--uploader-file-name-padding,0 4px);text-align:center;width:100%}.van-uploader__mask{align-items:center;background-color:var(--uploader-mask-background-color,rgba(50,50,51,.88));bottom:0;color:#fff;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;right:0;top:0}.van-uploader__mask-icon{font-size:var(--uploader-mask-icon-size,22px)}.van-uploader__mask-message{font-size:var(--uploader-mask-message-font-size,12px);line-height:var(--uploader-mask-message-line-height,14px);margin-top:6px;padding:0 var(--padding-base,4px)}.van-uploader__loading{color:var(--uploader-loading-icon-color,#fff)!important;height:var(--uploader-loading-icon-size,22px);width:var(--uploader-loading-icon-size,22px)}"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/uploader/shared.d.ts",
    "content": "export declare const imageProps: {\n    sizeType: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    capture: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    showmenu: {\n        type: BooleanConstructor;\n        value: boolean;\n    };\n};\nexport declare const videoProps: {\n    capture: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    compressed: {\n        type: BooleanConstructor;\n        value: boolean;\n    };\n    maxDuration: {\n        type: NumberConstructor;\n        value: number;\n    };\n    camera: {\n        type: StringConstructor;\n        value: string;\n    };\n    referrerPolicy: {\n        type: StringConstructor;\n        value: string;\n    };\n};\nexport declare const mediaProps: {\n    capture: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    mediaType: {\n        type: ArrayConstructor;\n        value: string[];\n    };\n    maxDuration: {\n        type: NumberConstructor;\n        value: number;\n    };\n    camera: {\n        type: StringConstructor;\n        value: string;\n    };\n};\nexport declare const messageFileProps: {\n    extension: null;\n    previewFile: {\n        type: BooleanConstructor;\n        value: boolean;\n    };\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/uploader/shared.js",
    "content": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.messageFileProps = exports.mediaProps = exports.videoProps = exports.imageProps = void 0;\n// props for image\nexports.imageProps = {\n    sizeType: {\n        type: Array,\n        value: ['original', 'compressed'],\n    },\n    capture: {\n        type: Array,\n        value: ['album', 'camera'],\n    },\n    showmenu: {\n        type: Boolean,\n        value: true,\n    },\n};\n// props for video\nexports.videoProps = {\n    capture: {\n        type: Array,\n        value: ['album', 'camera'],\n    },\n    compressed: {\n        type: Boolean,\n        value: true,\n    },\n    maxDuration: {\n        type: Number,\n        value: 60,\n    },\n    camera: {\n        type: String,\n        value: 'back',\n    },\n    referrerPolicy: {\n        type: String,\n        value: 'no-referrer',\n    },\n};\n// props for media\nexports.mediaProps = {\n    capture: {\n        type: Array,\n        value: ['album', 'camera'],\n    },\n    mediaType: {\n        type: Array,\n        value: ['image', 'video', 'mix'],\n    },\n    maxDuration: {\n        type: Number,\n        value: 60,\n    },\n    camera: {\n        type: String,\n        value: 'back',\n    },\n};\n// props for file\nexports.messageFileProps = {\n    extension: null,\n    previewFile: {\n        type: Boolean,\n        value: true,\n    },\n};\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/uploader/utils.d.ts",
    "content": "export interface File {\n    url: string;\n    size?: number;\n    name?: string;\n    type: string;\n    duration?: number;\n    time?: number;\n    isImage?: boolean;\n    isVideo?: boolean;\n}\nexport declare function isImageFile(item: File): boolean;\nexport declare function isVideoFile(item: File): boolean;\nexport declare function chooseFile({ accept, multiple, capture, compressed, maxDuration, sizeType, camera, maxCount, mediaType, extension, }: {\n    accept: any;\n    multiple: any;\n    capture: any;\n    compressed: any;\n    maxDuration: any;\n    sizeType: any;\n    camera: any;\n    maxCount: any;\n    mediaType: any;\n    extension: any;\n}): Promise<File | File[]>;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/uploader/utils.js",
    "content": "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.chooseFile = exports.isVideoFile = exports.isImageFile = void 0;\nvar utils_1 = require(\"../common/utils\");\nvar validator_1 = require(\"../common/validator\");\nfunction isImageFile(item) {\n    if (item.isImage != null) {\n        return item.isImage;\n    }\n    if (item.type) {\n        return item.type === 'image';\n    }\n    if (item.url) {\n        return (0, validator_1.isImageUrl)(item.url);\n    }\n    return false;\n}\nexports.isImageFile = isImageFile;\nfunction isVideoFile(item) {\n    if (item.isVideo != null) {\n        return item.isVideo;\n    }\n    if (item.type) {\n        return item.type === 'video';\n    }\n    if (item.url) {\n        return (0, validator_1.isVideoUrl)(item.url);\n    }\n    return false;\n}\nexports.isVideoFile = isVideoFile;\nfunction formatImage(res) {\n    return res.tempFiles.map(function (item) { return (__assign(__assign({}, (0, utils_1.pickExclude)(item, ['path'])), { type: 'image', url: item.tempFilePath || item.path, thumb: item.tempFilePath || item.path })); });\n}\nfunction formatVideo(res) {\n    return [\n        __assign(__assign({}, (0, utils_1.pickExclude)(res, ['tempFilePath', 'thumbTempFilePath', 'errMsg'])), { type: 'video', url: res.tempFilePath, thumb: res.thumbTempFilePath }),\n    ];\n}\nfunction formatMedia(res) {\n    return res.tempFiles.map(function (item) { return (__assign(__assign({}, (0, utils_1.pickExclude)(item, ['fileType', 'thumbTempFilePath', 'tempFilePath'])), { type: item.fileType, url: item.tempFilePath, thumb: item.fileType === 'video' ? item.thumbTempFilePath : item.tempFilePath })); });\n}\nfunction formatFile(res) {\n    return res.tempFiles.map(function (item) { return (__assign(__assign({}, (0, utils_1.pickExclude)(item, ['path'])), { url: item.path })); });\n}\nfunction chooseFile(_a) {\n    var accept = _a.accept, multiple = _a.multiple, capture = _a.capture, compressed = _a.compressed, maxDuration = _a.maxDuration, sizeType = _a.sizeType, camera = _a.camera, maxCount = _a.maxCount, mediaType = _a.mediaType, extension = _a.extension;\n    return new Promise(function (resolve, reject) {\n        switch (accept) {\n            case 'image':\n                if (utils_1.isPC || utils_1.isWxWork) {\n                    wx.chooseImage({\n                        count: multiple ? Math.min(maxCount, 9) : 1,\n                        sourceType: capture,\n                        sizeType: sizeType,\n                        success: function (res) { return resolve(formatImage(res)); },\n                        fail: reject,\n                    });\n                }\n                else {\n                    wx.chooseMedia({\n                        count: multiple ? Math.min(maxCount, 9) : 1,\n                        mediaType: ['image'],\n                        sourceType: capture,\n                        maxDuration: maxDuration,\n                        sizeType: sizeType,\n                        camera: camera,\n                        success: function (res) { return resolve(formatImage(res)); },\n                        fail: reject,\n                    });\n                }\n                break;\n            case 'media':\n                wx.chooseMedia({\n                    count: multiple ? Math.min(maxCount, 9) : 1,\n                    mediaType: mediaType,\n                    sourceType: capture,\n                    maxDuration: maxDuration,\n                    sizeType: sizeType,\n                    camera: camera,\n                    success: function (res) { return resolve(formatMedia(res)); },\n                    fail: reject,\n                });\n                break;\n            case 'video':\n                wx.chooseVideo({\n                    sourceType: capture,\n                    compressed: compressed,\n                    maxDuration: maxDuration,\n                    camera: camera,\n                    success: function (res) { return resolve(formatVideo(res)); },\n                    fail: reject,\n                });\n                break;\n            default:\n                wx.chooseMessageFile(__assign(__assign({ count: multiple ? maxCount : 1, type: accept }, (extension ? { extension: extension } : {})), { success: function (res) { return resolve(formatFile(res)); }, fail: reject }));\n                break;\n        }\n    });\n}\nexports.chooseFile = chooseFile;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/wxs/add-unit.wxs",
    "content": "/* eslint-disable */\nvar REGEXP = getRegExp('^-?\\d+(\\.\\d+)?$');\n\nfunction addUnit(value) {\n  if (value == null) {\n    return undefined;\n  }\n\n  return REGEXP.test('' + value) ? value + 'px' : value;\n}\n\nmodule.exports = addUnit;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/wxs/array.wxs",
    "content": "function isArray(array) {\n  return array && array.constructor === 'Array';\n}\n\nmodule.exports.isArray = isArray;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/wxs/bem.wxs",
    "content": "/* eslint-disable */\nvar array = require('./array.wxs');\nvar object = require('./object.wxs');\nvar PREFIX = 'van-';\n\nfunction join(name, mods) {\n  name = PREFIX + name;\n  mods = mods.map(function(mod) {\n    return name + '--' + mod;\n  });\n  mods.unshift(name);\n  return mods.join(' ');\n}\n\nfunction traversing(mods, conf) {\n  if (!conf) {\n    return;\n  }\n\n  if (typeof conf === 'string' || typeof conf === 'number') {\n    mods.push(conf);\n  } else if (array.isArray(conf)) {\n    conf.forEach(function(item) {\n      traversing(mods, item);\n    });\n  } else if (typeof conf === 'object') {\n    object.keys(conf).forEach(function(key) {\n      conf[key] && mods.push(key);\n    });\n  }\n}\n\nfunction bem(name, conf) {\n  var mods = [];\n  traversing(mods, conf);\n  return join(name, mods);\n}\n\nmodule.exports = bem;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/wxs/memoize.wxs",
    "content": "/**\n * Simple memoize\n * wxs doesn't support fn.apply, so this memoize only support up to 2 args\n */\n/* eslint-disable */\n\nfunction isPrimitive(value) {\n  var type = typeof value;\n  return (\n    type === 'boolean' ||\n    type === 'number' ||\n    type === 'string' ||\n    type === 'undefined' ||\n    value === null\n  );\n}\n\n// mock simple fn.call in wxs\nfunction call(fn, args) {\n  if (args.length === 2) {\n    return fn(args[0], args[1]);\n  }\n\n  if (args.length === 1) {\n    return fn(args[0]);\n  }\n\n  return fn();\n}\n\nfunction serializer(args) {\n  if (args.length === 1 && isPrimitive(args[0])) {\n    return args[0];\n  }\n  var obj = {};\n  for (var i = 0; i < args.length; i++) {\n    obj['key' + i] = args[i];\n  }\n  return JSON.stringify(obj);\n}\n\nfunction memoize(fn) {\n  var cache = {};\n\n  return function() {\n    var key = serializer(arguments);\n    if (cache[key] === undefined) {\n      cache[key] = call(fn, arguments);\n    }\n\n    return cache[key];\n  };\n}\n\nmodule.exports = memoize;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/wxs/object.wxs",
    "content": "/* eslint-disable */\nvar REGEXP = getRegExp('{|}|\"', 'g');\n\nfunction keys(obj) {\n  return JSON.stringify(obj)\n    .replace(REGEXP, '')\n    .split(',')\n    .map(function(item) {\n      return item.split(':')[0];\n    });\n}\n\nmodule.exports.keys = keys;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/wxs/style.wxs",
    "content": "/* eslint-disable */\nvar object = require('./object.wxs');\nvar array = require('./array.wxs');\n\nfunction kebabCase(word) {\n  var newWord = word\n    .replace(getRegExp(\"[A-Z]\", 'g'), function (i) {\n      return '-' + i;\n    })\n    .toLowerCase()\n\n  return newWord;\n}\n\nfunction style(styles) {\n  if (array.isArray(styles)) {\n    return styles\n      .filter(function (item) {\n        return item != null && item !== '';\n      })\n      .map(function (item) {\n        return style(item);\n      })\n      .join(';');\n  }\n\n  if ('Object' === styles.constructor) {\n    return object\n      .keys(styles)\n      .filter(function (key) {\n        return styles[key] != null && styles[key] !== '';\n      })\n      .map(function (key) {\n        return [kebabCase(key), [styles[key]]].join(':');\n      })\n      .join(';');\n  }\n\n  return styles;\n}\n\nmodule.exports = style;\n"
  },
  {
    "path": "miniprogram_npm/@vant/weapp/wxs/utils.wxs",
    "content": "/* eslint-disable */\nvar bem = require('./bem.wxs');\nvar memoize = require('./memoize.wxs');\nvar addUnit = require('./add-unit.wxs');\n\nmodule.exports = {\n  bem: memoize(bem),\n  memoize: memoize,\n  addUnit: addUnit\n};\n"
  },
  {
    "path": "miniprogram_npm/apifm-wxapi/index.js",
    "content": "module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/* eslint-disable */\n// 小程序开发api接口工具包，https://github.com/gooking/wxapi\nvar API_BASE_URL = 'https://api.it120.cc';\nvar COMMON_BASE_URL = 'https://common.apifm.com/';\nvar CMS_BASE_URL = 'https://cms.apifm.com/';\nvar subDomain = '-';\nvar merchantId = '0';\n\nvar request = function request(url, needSubDomain, method, data) {\n  var _url = API_BASE_URL + (needSubDomain ? '/' + subDomain : '') + url;\n  if (url.indexOf(\"http\") == 0) {\n    _url = url;\n  }\n  var header = {\n    'Content-Type': 'application/x-www-form-urlencoded'\n  };\n  return new Promise(function (resolve, reject) {\n    wx.request({\n      url: _url,\n      method: method,\n      data: data,\n      header: header,\n      success: function success(request) {\n        resolve(request.data);\n      },\n      fail: function fail(error) {\n        reject(error);\n      },\n      complete: function complete(aaa) {\n        // 加载完成\n      }\n    });\n  });\n};\n\n/**\n * 小程序的promise没有finally方法，自己扩展下\n */\n// Promise.prototype.finally = function (callback) {\n//   var Promise = this.constructor;\n//   return this.then(\n//     function (value) {\n//       Promise.resolve(callback()).then(\n//         function () {\n//           return value;\n//         }\n//       );\n//     },\n//     function (reason) {\n//       Promise.resolve(callback()).then(\n//         function () {\n//           throw reason;\n//         }\n//       );\n//     }\n//   );\n// }\n\nmodule.exports = {\n  init2: function init2(a, b) {\n    API_BASE_URL = a;\n    subDomain = b;\n  },\n  init: function init(b) {\n    subDomain = b;\n  },\n  setMerchantId: function setMerchantId(mchid) {\n    merchantId = mchid;\n  },\n  init3: function init3(_ref) {\n    var _ref$apiBaseUrl = _ref.apiBaseUrl,\n        apiBaseUrl = _ref$apiBaseUrl === undefined ? API_BASE_URL : _ref$apiBaseUrl,\n        subD = _ref.subDomain,\n        req = _ref.request;\n\n    // 某些需求需要定制化 request，需要保证传入自定义 reuqest 与默认 request 参数一致\n    if (req) {\n      request = req;\n    }\n    API_BASE_URL = apiBaseUrl;\n    subDomain = subD;\n  },\n  request: request,\n  queryMobileLocation: function queryMobileLocation() {\n    var mobile = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request('/common/mobile-segment/location', false, 'get', { mobile: mobile });\n  },\n  nextMobileSegment: function nextMobileSegment(data) {\n    return request('/common/mobile-segment/next', false, 'post', data);\n  },\n  queryMobileLocationV2: function queryMobileLocationV2() {\n    var mobile = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request(COMMON_BASE_URL + subDomain + '/common/mobile-segment/location', false, 'get', { mobile: mobile });\n  },\n  nextMobileSegmentV2: function nextMobileSegmentV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/common/mobile-segment/next', false, 'post', data);\n  },\n  gpsDistance: function gpsDistance(data) {\n    return request('/common/map/qq/distance', false, 'post', data);\n  },\n  commonIP: function commonIP(ip) {\n    return request('/common/ip', false, 'get', { ip: ip });\n  },\n  commonIPV2: function commonIPV2() {\n    var ip = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request(COMMON_BASE_URL + subDomain + '/common/ip', false, 'get', { ip: ip });\n  },\n  commonIPV3: function commonIPV3() {\n    var ip = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request(COMMON_BASE_URL + subDomain + '/common/ip/v2', false, 'get', { ip: ip });\n  },\n  forexRate: function forexRate(fromCode, toCode) {\n    return request('/forex/rate', true, 'get', { fromCode: fromCode, toCode: toCode });\n  },\n  queryConfigValue: function queryConfigValue(key) {\n    return request(COMMON_BASE_URL + subDomain + '/config/value', true, 'get', { key: key });\n  },\n  queryConfigBatch: function queryConfigBatch(keys) {\n    return request(COMMON_BASE_URL + subDomain + '/config/values', true, 'get', { keys: keys });\n  },\n  scoreRules: function scoreRules(data) {\n    return request('/score/send/rule', true, 'post', data);\n  },\n  scoreSignRules: function scoreSignRules() {\n    return request('/score/sign/rules', true, 'get', {});\n  },\n  scoreSign: function scoreSign(token) {\n    return request('/score/sign', true, 'post', {\n      token: token\n    });\n  },\n  scoreSignLogs: function scoreSignLogs(data) {\n    return request('/score/sign/logs', true, 'post', data);\n  },\n  scoreTodaySignedInfo: function scoreTodaySignedInfo(token) {\n    return request('/score/today-signed', true, 'get', {\n      token: token\n    });\n  },\n  scoreExchange: function scoreExchange(token, number) {\n    return request('/score/exchange', true, 'post', {\n      number: number,\n      token: token\n    });\n  },\n  scoreExchangeCash: function scoreExchangeCash(token, deductionScore) {\n    return request(COMMON_BASE_URL + subDomain + '/score/exchange/cash', false, 'post', {\n      deductionScore: deductionScore,\n      token: token\n    });\n  },\n  scoreLogs: function scoreLogs(data) {\n    return request('/score/logs', true, 'post', data);\n  },\n  scoreDynamics: function scoreDynamics() {\n    return request('/score/dynamics', true, 'get');\n  },\n  shareGroupGetScore: function shareGroupGetScore(code, referrer, encryptedData, iv) {\n    return request('/score/share/wxa/group', true, 'post', {\n      code: code,\n      referrer: referrer,\n      encryptedData: encryptedData,\n      iv: iv\n    });\n  },\n  scoreDeductionRules: function scoreDeductionRules() {\n    var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request(COMMON_BASE_URL + subDomain + '/score/deduction/rules', false, 'get', { type: type });\n  },\n  scoreDailyFixedNum: function scoreDailyFixedNum(token) {\n    return request('/score/dailyFixedNum', true, 'post', { token: token });\n  },\n  scoreRank: function scoreRank(data) {\n    return request('/score/rank', true, 'get', data);\n  },\n  scoreRankBydate: function scoreRankBydate(data) {\n    return request('/score/rankBydate', true, 'get', data);\n  },\n  scoreMyStatistics: function scoreMyStatistics(data) {\n    return request('/score/myStatistics', true, 'get', data);\n  },\n  expireScorestatistics: function expireScorestatistics(data) {\n    return request('/score/expireScorestatistics', true, 'post', data);\n  },\n  scoreTaskList: function scoreTaskList(token) {\n    return request(COMMON_BASE_URL + subDomain + '/score/taskList', false, 'get', { token: token });\n  },\n  scoreTaskSuccess: function scoreTaskSuccess(token, type) {\n    return request(COMMON_BASE_URL + subDomain + '/score/taskSuccess', false, 'post', { token: token, type: type });\n  },\n  kanjiaSet: function kanjiaSet(goodsId) {\n    return request('/shop/goods/kanjia/set/v2', true, 'get', { goodsId: goodsId });\n  },\n  kanjiaJoin: function kanjiaJoin(token, kjid) {\n    return request('/shop/goods/kanjia/join', true, 'post', {\n      kjid: kjid,\n      token: token\n    });\n  },\n  kanjiaDetail: function kanjiaDetail(kjid, joiner) {\n    return request('/shop/goods/kanjia/info', true, 'get', {\n      kjid: kjid,\n      joiner: joiner\n    });\n  },\n  kanjiaHelp: function kanjiaHelp(token, kjid, joiner) {\n    var remark = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n\n    return request('/shop/goods/kanjia/help', true, 'post', {\n      kjid: kjid,\n      joinerUser: joiner,\n      token: token,\n      remark: remark\n    });\n  },\n  kanjiaClear: function kanjiaClear(token, kjid) {\n    return request('/shop/goods/kanjia/clear', true, 'post', {\n      kjid: kjid,\n      token: token\n    });\n  },\n  kanjiaMyJoinInfo: function kanjiaMyJoinInfo(token, kjid) {\n    return request('/shop/goods/kanjia/my', true, 'get', {\n      kjid: kjid,\n      token: token\n    });\n  },\n  kanjiaHelpDetail: function kanjiaHelpDetail(token, kjid, joiner) {\n    return request('/shop/goods/kanjia/myHelp', true, 'get', {\n      kjid: kjid,\n      joinerUser: joiner,\n      token: token\n    });\n  },\n  checkToken: function checkToken(token) {\n    return request('/user/check-token', true, 'get', {\n      token: token\n    });\n  },\n  checkReferrer: function checkReferrer(referrer) {\n    return request('/user/check-referrer', true, 'get', {\n      referrer: referrer\n    });\n  },\n  addTempleMsgFormid: function addTempleMsgFormid(token, type, formId) {\n    return request('/template-msg/wxa/formId', true, 'post', {\n      token: token, type: type, formId: formId\n    });\n  },\n  sendTempleMsg: function sendTempleMsg(data) {\n    return request('/template-msg/put', true, 'post', data);\n  },\n  payVariableUrl: function payVariableUrl(url, data) {\n    return request(url, true, 'post', data);\n  },\n  wxpay: function wxpay(data) {\n    return request('/pay/wx/wxapp', true, 'post', data);\n  },\n  wxpayH5: function wxpayH5(data) {\n    return request('/pay/wx/h5', true, 'post', data);\n  },\n  wxpayJsapi: function wxpayJsapi(data) {\n    return request('/pay/wx/jsapi', true, 'post', data);\n  },\n  wxpayQrcode: function wxpayQrcode(data) {\n    return request('/pay/wx/qrcode', true, 'post', data);\n  },\n  wxpayCode: function wxpayCode(data) {\n    return request('/pay/wx/paymentCode', true, 'post', data);\n  },\n  wxpayApp: function wxpayApp(data) {\n    return request('/pay/wx/app', true, 'post', data);\n  },\n  wxpayRequestMerchantTransfer: function wxpayRequestMerchantTransfer(data) {\n    return request('/pay/wx/requestMerchantTransfer', true, 'get', data);\n  },\n  wxpayFOMO: function wxpayFOMO(data) {\n    return request('/pay/fomo/wxapp', true, 'post', data);\n  },\n  payNow: function payNow(data) {\n    return request('/pay/fomo/payNow', true, 'post', data);\n  },\n  fomoCheckout: function fomoCheckout(data) {\n    return request('/pay/fomo/checkout', true, 'post', data);\n  },\n  wxpayFWS: function wxpayFWS(data) {\n    return request('/pay/wxfws/wxapp', true, 'post', data);\n  },\n  ttpay: function ttpay(data) {\n    return request('/pay/tt/microapp', true, 'post', data);\n  },\n  ttEcpay: function ttEcpay(data) {\n    return request('/pay/tt/ecpay', true, 'post', data);\n  },\n  payQuery: function payQuery(token, outTradeId) {\n    return request('/pay/query', true, 'get', { token: token, outTradeId: outTradeId });\n  },\n  wxpaySaobei: function wxpaySaobei(data) {\n    return request('/pay/lcsw/wxapp', true, 'post', data);\n  },\n  wxpayWepayez: function wxpayWepayez(data) {\n    return request('/pay/wepayez/wxapp', true, 'post', data);\n  },\n  wxpayxpert: function wxpayxpert(data) {\n    return request('/pay/payxpert/wxapp', true, 'post', data);\n  },\n  wxpayIPaynow: function wxpayIPaynow(data) {\n    return request('/pay/ipaynow/wxapp', true, 'post', data);\n  },\n  ccvvPayWxapp: function ccvvPayWxapp(data) {\n    return request('/pay/ccvv/wxapp', true, 'post', data);\n  },\n  wxpayAirwallex: function wxpayAirwallex(data) {\n    return request('/pay/airwallex/wxapp', true, 'post', data);\n  },\n  wxSphGetpaymentparams: function wxSphGetpaymentparams(token, orderId) {\n    return request('/pay/wxsph/getpaymentparams', true, 'post', { token: token, orderId: orderId });\n  },\n  paypalCheckout: function paypalCheckout(data) {\n    return request('/pay/paypal/checkout', true, 'post', data);\n  },\n  alipay: function alipay(data) {\n    return request('/pay/alipay/semiAutomatic/payurl', true, 'post', data);\n  },\n  alipayMP: function alipayMP(data) {\n    return request('/pay/alipay/gate/mp', true, 'post', data);\n  },\n  alipayAPP: function alipayAPP(data) {\n    return request('/pay/alipay/gate/app', true, 'post', data);\n  },\n  alipayQrcode: function alipayQrcode(data) {\n    return request('/pay/alipay/gate/qrcode', true, 'post', data);\n  },\n  alipayQrcode2: function alipayQrcode2(data) {\n    return request('/pay/alipay/gate/paymentCode', true, 'post', data);\n  },\n  alipayH5: function alipayH5(data) {\n    return request('/pay/alipay/gate/h5', true, 'post', data);\n  },\n  alipayPC: function alipayPC(data) {\n    return request('/pay/alipay/gate/pc', true, 'post', data);\n  },\n  kasipayH5: function kasipayH5(data) {\n    return request('/pay/kasipay/h5', true, 'post', data);\n  },\n  hmpayJsapi: function hmpayJsapi(data) {\n    return request('/pay/sandpay/hmpay/jsapi', true, 'post', data);\n  },\n  login_wx: function login_wx(code) {\n    return request('/user/wxapp/login', true, 'post', {\n      code: code,\n      type: 2\n    });\n  },\n  loginWxV2: function loginWxV2(code, appid) {\n    return request('/user/wxapp/login/v2', true, 'post', {\n      code: code,\n      appid: appid\n    });\n  },\n  login_tt: function login_tt(code) {\n    return request(COMMON_BASE_URL + subDomain + '/user/tt/miniapp/login', false, 'post', {\n      code: code\n    });\n  },\n  login_q: function login_q(code) {\n    return request(COMMON_BASE_URL + subDomain + '/user/q/login', false, 'post', {\n      code: code,\n      type: 2\n    });\n  },\n  loginWxaMobile: function loginWxaMobile(code, encryptedData, iv) {\n    return request('/user/wxapp/login/mobile', true, 'post', {\n      code: code,\n      encryptedData: encryptedData,\n      iv: iv\n    });\n  },\n  loginWxaMobileV2: function loginWxaMobileV2(data) {\n    return request('/user/wxapp/login/mobile', true, 'post', data);\n  },\n  loginWxaMobileV3: function loginWxaMobileV3(data) {\n    return request('/user/wxapp/login/mobile/v2', true, 'post', data);\n  },\n  fetchWxaMobile: function fetchWxaMobile(code) {\n    return request('/user/wxapp/getMobile', true, 'get', { code: code });\n  },\n  login_username: function login_username(data) {\n    return request('/user/username/login', true, 'post', data);\n  },\n  bindUsername: function bindUsername(token, username) {\n    var pwd = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/user/username/bindUsername', true, 'post', {\n      token: token, username: username, pwd: pwd\n    });\n  },\n  login_mobile: function login_mobile(mobile, pwd) {\n    var deviceId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n    var deviceName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n\n    return request('/user/m/login', true, 'post', {\n      mobile: mobile, pwd: pwd, deviceId: deviceId, deviceName: deviceName\n    });\n  },\n  loginMobileV2: function loginMobileV2(data) {\n    return request('/user/m/login', true, 'post', data);\n  },\n  loginMobileSmsCode: function loginMobileSmsCode(data) {\n    return request('/user/m/loginMobile', true, 'post', data);\n  },\n  resetPwdUseMobileCode: function resetPwdUseMobileCode(mobile, pwd, code) {\n    return request('/user/m/reset-pwd', true, 'post', {\n      mobile: mobile, pwd: pwd, code: code\n    });\n  },\n  resetPwdUseEmailCode: function resetPwdUseEmailCode(email, pwd, code) {\n    return request('/user/email/reset-pwd', true, 'post', {\n      email: email, pwd: pwd, code: code\n    });\n  },\n  wxmpAuth: function wxmpAuth(data) {\n    return request('/user/wxmp/auth', true, 'post', data);\n  },\n  register_complex: function register_complex(data) {\n    return request('/user/wxapp/register/complex', true, 'post', data);\n  },\n  register_tt: function register_tt(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/tt/miniapp/register', false, 'post', data);\n  },\n  registerQ: function registerQ(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/q/register', false, 'post', data);\n  },\n  qqAuthorize: function qqAuthorize(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/q/authorize', false, 'post', data);\n  },\n  qqQrcode: function qqQrcode(content) {\n    return request(COMMON_BASE_URL + subDomain + '/user/q/qrcode', false, 'post', { content: content });\n  },\n  register_simple: function register_simple(data) {\n    return request('/user/wxapp/register/simple', true, 'post', data);\n  },\n  authorize: function authorize(data) {\n    return request('/user/wxapp/authorize', true, 'post', data);\n  },\n  ttAuthorize: function ttAuthorize(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/tt/miniapp/authorize', false, 'post', data);\n  },\n  register_username: function register_username(data) {\n    return request('/user/username/register', true, 'post', data);\n  },\n  register_mobile: function register_mobile(data) {\n    return request('/user/m/register', true, 'post', data);\n  },\n  bannerTypes: function bannerTypes() {\n    return request('/banner/types', true, 'get');\n  },\n  banners: function banners(data) {\n    return request('/banner/list', true, 'get', data);\n  },\n  goodsCategory: function goodsCategory() {\n    return request('/shop/goods/category/all', true, 'get');\n  },\n  goodsCategoryV2: function goodsCategoryV2() {\n    var shopId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request('/shop/goods/category/all', true, 'get', { shopId: shopId });\n  },\n  goodsCategoryDetail: function goodsCategoryDetail(id) {\n    return request('/shop/goods/category/info', true, 'get', { id: id });\n  },\n  goodsCategoryDetailV2: function goodsCategoryDetailV2(data) {\n    return request('/shop/goods/category/info', true, 'get', data);\n  },\n  goods: function goods(data) {\n    if (!data) {\n      data = {};\n    }\n    var shopIds = wx.getStorageSync('shopIds');\n    if (shopIds) {\n      data.shopId = shopIds;\n    }\n    return request('/shop/goods/list', true, 'post', data);\n  },\n  goodsv2: function goodsv2(data) {\n    if (!data) {\n      data = {};\n    }\n    var shopIds = wx.getStorageSync('shopIds');\n    if (shopIds) {\n      data.shopId = shopIds;\n    }\n    return request('/shop/goods/list/v2', true, 'post', data);\n  },\n  goodsDetail: function goodsDetail(id) {\n    var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request('/shop/goods/detail', true, 'get', {\n      id: id, token: token\n    });\n  },\n  goodsDetailV2: function goodsDetailV2(data) {\n    return request('/shop/goods/detail', true, 'get', data);\n  },\n  goodsLimitations: function goodsLimitations(goodsId) {\n    var priceId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request('/shop/goods/limitation', true, 'get', {\n      goodsId: goodsId, priceId: priceId\n    });\n  },\n  goodsLimitationsV2: function goodsLimitationsV2(goodsId) {\n    var propertyChildIds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request('/shop/goods/limitation', true, 'get', {\n      goodsId: goodsId, propertyChildIds: propertyChildIds\n    });\n  },\n  goodsAddition: function goodsAddition(goodsId) {\n    return request('/shop/goods/goodsAddition', true, 'get', {\n      goodsId: goodsId\n    });\n  },\n  goodsShopStores: function goodsShopStores(goodsId) {\n    return request('/shop/goods/goodsShopStores', true, 'get', {\n      goodsId: goodsId\n    });\n  },\n  goodsVideoEpisodesList: function goodsVideoEpisodesList(goodsId) {\n    var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request('/goodsVideoEpisodes/list', true, 'get', {\n      goodsId: goodsId, token: token\n    });\n  },\n  goodsVideoEpisodesBuy: function goodsVideoEpisodesBuy(goodsId, number, token) {\n    return request('/goodsVideoEpisodes/buy', true, 'post', {\n      goodsId: goodsId, number: number, token: token\n    });\n  },\n  goodsStatistics: function goodsStatistics(data) {\n    return request('/shop/goods/statistics/days', true, 'post', data);\n  },\n  goodsUseless: function goodsUseless(data) {\n    return request('/shop/goods/useful', true, 'post', data);\n  },\n  pushNewGoods: function pushNewGoods(data) {\n    return request('/shop/goods/putOrUpdate', true, 'post', data);\n  },\n  mygoods: function mygoods(data) {\n    return request('/shop/goods/mygoods', true, 'post', data);\n  },\n  deleteMyGoods: function deleteMyGoods(token, id) {\n    return request('/shop/goods/del', true, 'post', { token: token, id: id });\n  },\n  goodsPrice: function goodsPrice(goodsId, propertyChildIds) {\n    return request('/shop/goods/price', true, 'post', {\n      goodsId: goodsId, propertyChildIds: propertyChildIds\n    });\n  },\n  goodsPriceV2: function goodsPriceV2(data) {\n    return request('/shop/goods/price', true, 'post', data);\n  },\n  goodsPriceDaily: function goodsPriceDaily(goodsId) {\n    var priceId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request('/shop/goods/price/day', true, 'get', {\n      goodsId: goodsId, priceId: priceId\n    });\n  },\n  goodsPriceFreight: function goodsPriceFreight(data) {\n    return request('/shop/goods/price/freight', true, 'get', data);\n  },\n  goodsPriceMultilevels: function goodsPriceMultilevels(data) {\n    return request('/shop/goods/priceMultilevels', true, 'get', data);\n  },\n  goodsRebate: function goodsRebate(token, goodsId) {\n    return request(COMMON_BASE_URL + subDomain + '/shop/goods/rebate/v2', false, 'get', {\n      token: token, goodsId: goodsId\n    });\n  },\n  goodsReputation: function goodsReputation(data) {\n    return request('/shop/goods/reputation', true, 'post', data);\n  },\n  goodsReputationV2: function goodsReputationV2(data) {\n    return request('/shop/goods/reputation/v2', true, 'post', data);\n  },\n  myBuyGoodsHis: function myBuyGoodsHis(data) {\n    return request('/shop/goods/his/list', true, 'post', data);\n  },\n  myBuyGoodsHisDelete: function myBuyGoodsHisDelete(token) {\n    var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n    var goodsId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/shop/goods/his/delete', true, 'post', {\n      token: token, id: id, goodsId: goodsId\n    });\n  },\n  myBuyGoodsHisV2: function myBuyGoodsHisV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/shop/goods/his/list', false, 'post', data);\n  },\n  myBuyGoodsHisDeleteV2: function myBuyGoodsHisDeleteV2(token) {\n    var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n    var goodsId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request(COMMON_BASE_URL + subDomain + '/shop/goods/his/delete', false, 'post', {\n      token: token, id: id, goodsId: goodsId\n    });\n  },\n  goodsFavList: function goodsFavList(data) {\n    return request('/shop/goods/fav/list', true, 'post', data);\n  },\n  goodsFavListV2: function goodsFavListV2(data) {\n    return request('/shop/goods/fav/list/v2', true, 'post', data);\n  },\n  goodsFavPut: function goodsFavPut(token, goodsId) {\n    return request('/shop/goods/fav/add', true, 'post', {\n      token: token, goodsId: goodsId\n    });\n  },\n  goodsFavAdd: function goodsFavAdd(data) {\n    return request('/shop/goods/fav/add', true, 'post', data);\n  },\n  goodsFavCheck: function goodsFavCheck(token, goodsId) {\n    return request('/shop/goods/fav/check', true, 'get', {\n      token: token, goodsId: goodsId\n    });\n  },\n  goodsFavCheckV2: function goodsFavCheckV2(data) {\n    return request('/shop/goods/fav/check', true, 'get', data);\n  },\n  goodsFavDelete: function goodsFavDelete(token) {\n    var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n    var goodsId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/shop/goods/fav/delete', true, 'post', {\n      token: token, id: id, goodsId: goodsId\n    });\n  },\n  goodsFavDeleteV2: function goodsFavDeleteV2(data) {\n    return request('/shop/goods/fav/delete', true, 'post', data);\n  },\n  goodsSeckillGrab: function goodsSeckillGrab(token, goodsId, seconds) {\n    return request('/goods/seckill/grab', true, 'post', { token: token, goodsId: goodsId, seconds: seconds });\n  },\n  coupons: function coupons(data) {\n    return request('/discounts/coupons', true, 'get', data);\n  },\n  couponDetail: function couponDetail(id) {\n    return request('/discounts/detail', true, 'get', {\n      id: id\n    });\n  },\n  couponStatistics: function couponStatistics(token) {\n    return request('/discounts/statistics', true, 'get', { token: token });\n  },\n  myCoupons: function myCoupons(data) {\n    return request('/discounts/my', true, 'get', data);\n  },\n  mergeCouponsRules: function mergeCouponsRules() {\n    return request('/discounts/merge/list', true, 'get');\n  },\n  mergeCoupons: function mergeCoupons(data) {\n    return request('/discounts/merge', true, 'post', data);\n  },\n  fetchCoupons: function fetchCoupons(data) {\n    return request('/discounts/fetch', true, 'post', data);\n  },\n  sendCoupons: function sendCoupons(data) {\n    return request('/discounts/send', true, 'post', data);\n  },\n  exchangeCoupons: function exchangeCoupons(token, number, pwd) {\n    var extJsonStr = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n\n    return request('/discounts/exchange', true, 'post', {\n      token: token, number: number, pwd: pwd, extJsonStr: extJsonStr\n    });\n  },\n  couponsShareOpen: function couponsShareOpen(token, id) {\n    return request('/discounts/share/open', true, 'post', { token: token, id: id });\n  },\n  couponsShareClose: function couponsShareClose(token, id) {\n    return request('/discounts/share/close', true, 'post', { token: token, id: id });\n  },\n  couponsShareFetch: function couponsShareFetch(token, id, shareToken) {\n    return request('/discounts/share/fetch', true, 'post', { token: token, id: id, shareToken: shareToken });\n  },\n  couponsHX: function couponsHX(data) {\n    return request('/discounts/hx', true, 'post', data);\n  },\n  noticeList: function noticeList(data) {\n    return request('/notice/list', true, 'post', data);\n  },\n  noticeLastOne: function noticeLastOne() {\n    var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request('/notice/last-one', true, 'get', {\n      type: type\n    });\n  },\n  noticeDetail: function noticeDetail(id) {\n    return request('/notice/detail', true, 'get', {\n      id: id\n    });\n  },\n  addAddress: function addAddress(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/shipping-address/add', false, 'post', data);\n  },\n  updateAddress: function updateAddress(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/shipping-address/update', false, 'post', data);\n  },\n  deleteAddress: function deleteAddress(token, id) {\n    return request(COMMON_BASE_URL + subDomain + '/user/shipping-address/delete', false, 'post', {\n      id: id,\n      token: token\n    });\n  },\n  queryAddress: function queryAddress(token) {\n    return request('/user/shipping-address/list', true, 'get', {\n      token: token\n    });\n  },\n  queryAddressV2: function queryAddressV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/shipping-address/list/v2', false, 'post', data);\n  },\n  defaultAddress: function defaultAddress(token) {\n    return request(COMMON_BASE_URL + subDomain + '/user/shipping-address/default/v2', false, 'get', {\n      token: token\n    });\n  },\n  addressDetail: function addressDetail(token, id) {\n    return request(COMMON_BASE_URL + subDomain + '/user/shipping-address/detail/v2', false, 'get', {\n      id: id,\n      token: token\n    });\n  },\n  pingtuanSet: function pingtuanSet(goodsId) {\n    return request('/shop/goods/pingtuan/set', true, 'get', {\n      goodsId: goodsId\n    });\n  },\n  pingtuanSets: function pingtuanSets(goodsIdArray) {\n    return request('/shop/goods/pingtuan/sets', true, 'get', {\n      goodsId: goodsIdArray.join()\n    });\n  },\n  goodsDefaultPingtuan: function goodsDefaultPingtuan(goodsId) {\n    return request('/shop/goods/pingtuan/default', true, 'get', {\n      goodsId: goodsId\n    });\n  },\n  pingtuanMultilevel: function pingtuanMultilevel(goodsId) {\n    return request('/shop/goods/pingtuanMultilevel', true, 'get', {\n      goodsId: goodsId\n    });\n  },\n  pingtuanOpen: function pingtuanOpen(token, goodsId) {\n    var extJsonStr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/shop/goods/pingtuan/open', true, 'post', {\n      goodsId: goodsId,\n      token: token,\n      extJsonStr: extJsonStr\n    });\n  },\n  pingtuanTuanInfo: function pingtuanTuanInfo(tuanId) {\n    return request('/shop/goods/pingtuan/tuanInfo', true, 'get', {\n      tuanId: tuanId\n    });\n  },\n  pingtuanList: function pingtuanList(data) {\n    return request('/shop/goods/pingtuan/list/v2', true, 'post', data);\n  },\n  pingtuanJoinUsers: function pingtuanJoinUsers(tuanId) {\n    return request('/shop/goods/pingtuan/joiner', true, 'get', { tuanId: tuanId });\n  },\n  pingtuanMyJoined: function pingtuanMyJoined(data) {\n    return request('/shop/goods/pingtuan/my-join-list', true, 'post', data);\n  },\n  friendlyPartnerList: function friendlyPartnerList() {\n    var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request('/friendly-partner/list', true, 'post', {\n      type: type\n    });\n  },\n  friendList: function friendList(data) {\n    return request('/user/friend/list', true, 'post', data);\n  },\n  addFriend: function addFriend(token, uid) {\n    return request('/user/friend/add', true, 'post', { token: token, uid: uid });\n  },\n  deleteFriend: function deleteFriend(token, uid) {\n    return request('/user/friend/delete', true, 'post', { token: token, uid: uid });\n  },\n  friendUserDetail: function friendUserDetail(token, uid) {\n    return request('/user/friend/detail', true, 'get', { token: token, uid: uid });\n  },\n  userImList: function userImList(data) {\n    return request('/userIm/list', true, 'post', data);\n  },\n  userImSendmessage: function userImSendmessage(token, uid, content) {\n    return request('/userIm/sendmessage', true, 'post', { token: token, uid: uid, content: content });\n  },\n  userImEmpty: function userImEmpty(token, uid) {\n    return request('/userIm/empty', true, 'post', { token: token, uid: uid });\n  },\n  videoDetail: function videoDetail(videoId) {\n    return request(COMMON_BASE_URL + subDomain + '/media/video/detail', false, 'get', {\n      videoId: videoId\n    });\n  },\n  bindMobileWxa: function bindMobileWxa(token, encryptedData, iv) {\n    var pwd = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n\n    return request('/user/wxapp/bindMobile', true, 'post', {\n      token: token, encryptedData: encryptedData, iv: iv, pwd: pwd\n    });\n  },\n  bindMobileWxapp: function bindMobileWxapp(token, code, encryptedData, iv) {\n    var pwd = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';\n\n    return request('/user/wxapp/bindMobile', true, 'post', {\n      token: token, code: code, encryptedData: encryptedData, iv: iv, pwd: pwd\n    });\n  },\n  bindMobileWxappV2: function bindMobileWxappV2(token, code) {\n    var pwd = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/user/wxapp/bindMobile/v2', true, 'post', {\n      token: token, code: code, pwd: pwd\n    });\n  },\n  bindMobileTta: function bindMobileTta(token, encryptedData, iv) {\n    var pwd = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n\n    return request(COMMON_BASE_URL + subDomain + '/user/tt/miniapp/bindMobile', false, 'post', {\n      token: token, encryptedData: encryptedData, iv: iv, pwd: pwd\n    });\n  },\n  bindMobileSms: function bindMobileSms(token, mobile, code) {\n    var pwd = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n\n    return request('/user/m/bind-mobile', true, 'post', {\n      token: token, mobile: mobile, code: code, pwd: pwd\n    });\n  },\n  userDetail: function userDetail(token) {\n    return request('/user/detail', true, 'get', {\n      token: token\n    });\n  },\n  randomNick: function randomNick() {\n    var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request('/user/randomNick', true, 'get', {\n      len: len\n    });\n  },\n  userDetailSpreadUser: function userDetailSpreadUser(token, uid) {\n    return request('/user/detail/spreadUser', true, 'get', {\n      token: token, uid: uid\n    });\n  },\n  userWxinfo: function userWxinfo(token) {\n    return request('/user/wxinfo', true, 'get', {\n      token: token\n    });\n  },\n  userAliappInfo: function userAliappInfo(token) {\n    return request('/user/aliappInfo', true, 'get', {\n      token: token\n    });\n  },\n  userAmount: function userAmount(token) {\n    return request('/user/amount', true, 'get', {\n      token: token\n    });\n  },\n  userAmountV2: function userAmountV2(token) {\n    return request(COMMON_BASE_URL + subDomain + '/user/amount', false, 'get', {\n      token: token\n    });\n  },\n  orderCreate: function orderCreate(data) {\n    return request('/order/create', true, 'post', data);\n  },\n  orderList: function orderList(data) {\n    return request('/order/list', true, 'post', data);\n  },\n  orderDetail: function orderDetail(token, id) {\n    var hxNumber = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n    var peisongOrderId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n\n    return request('/order/detail', true, 'get', {\n      id: id,\n      token: token,\n      hxNumber: hxNumber,\n      peisongOrderId: peisongOrderId\n    });\n  },\n  orderMtLocation: function orderMtLocation(id) {\n    return request('/order/mtlocation', true, 'get', {\n      id: id\n    });\n  },\n  orderDelivery: function orderDelivery(token, orderId) {\n    return request('/order/delivery', true, 'post', {\n      orderId: orderId,\n      token: token\n    });\n  },\n  orderReputation: function orderReputation(data) {\n    return request('/order/reputation', true, 'post', data);\n  },\n  orderReputationList: function orderReputationList(data) {\n    return request('/order/listReputation', true, 'post', data);\n  },\n  orderReputationDelete: function orderReputationDelete(data) {\n    return request('/order/reputation/delete', true, 'post', data);\n  },\n  orderReputationModify: function orderReputationModify(data) {\n    return request('/order/reputation/modify', true, 'post', data);\n  },\n  orderClose: function orderClose(token, orderId) {\n    return request('/order/close', true, 'post', {\n      orderId: orderId,\n      token: token\n    });\n  },\n  orderCloseV2: function orderCloseV2(data) {\n    return request('/order/close', true, 'post', data);\n  },\n  orderDelete: function orderDelete(token, orderId) {\n    return request('/order/delete', true, 'post', {\n      orderId: orderId,\n      token: token\n    });\n  },\n  orderPay: function orderPay(token, orderId) {\n    return request('/order/pay', true, 'post', {\n      orderId: orderId,\n      token: token\n    });\n  },\n  orderPayV2: function orderPayV2(data) {\n    return request('/order/pay', true, 'post', data);\n  },\n  jdjlOrderPay: function jdjlOrderPay(token, _token) {\n    var couponId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/jdjl/payOrder', true, 'post', {\n      _token: _token,\n      token: token,\n      couponId: couponId\n    });\n  },\n  orderHX: function orderHX(hxNumber) {\n    return request('/order/hx', true, 'post', {\n      hxNumber: hxNumber\n    });\n  },\n  orderHXV2: function orderHXV2(data) {\n    return request('/order/hx', true, 'post', data);\n  },\n  orderSet: function orderSet() {\n    return request('/order/set', true, 'get');\n  },\n  orderRefunds: function orderRefunds(token, orderId) {\n    return request('/order/refund', true, 'get', {\n      token: token,\n      orderId: orderId\n    });\n  },\n  withDrawApply: function withDrawApply(token, money) {\n    return request('/user/withDraw/apply', true, 'post', {\n      money: money,\n      token: token\n    });\n  },\n  withDrawApplyV2: function withDrawApplyV2(data) {\n    return request('/user/withDraw/apply', true, 'post', data);\n  },\n  withDrawDetail: function withDrawDetail(token, id) {\n    return request('/user/withDraw/detail', true, 'get', {\n      token: token,\n      id: id\n    });\n  },\n  withDrawLogs: function withDrawLogs(data) {\n    return request('/user/withDraw/list', true, 'post', data);\n  },\n  withDrawSetting: function withDrawSetting() {\n    return request('/user/withDraw/setting', true, 'get');\n  },\n  withDrawApplyV3: function withDrawApplyV3(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/withdrawal/apply', true, 'post', data);\n  },\n  withDrawDetailV2: function withDrawDetailV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/withdrawal/detail', true, 'get', data);\n  },\n  withDrawLogsV2: function withDrawLogsV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/withdrawal/list', true, 'post', data);\n  },\n  withDrawSettingV2: function withDrawSettingV2() {\n    return request(COMMON_BASE_URL + subDomain + '/user/withdrawal/setting', true, 'get');\n  },\n  wxpayRequestMerchantTransferV2: function wxpayRequestMerchantTransferV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/withdrawal/requestMerchantTransfer', true, 'get', data);\n  },\n  province: function province() {\n    return request('/common/region/v2/province', false, 'get');\n  },\n  city: function city() {\n    return request('/common/region/v2/city', false, 'get');\n  },\n  districts: function districts() {\n    return request('/common/region/v2/districts', false, 'get');\n  },\n  streets: function streets() {\n    return request('/common/region/v2/streets', false, 'get');\n  },\n  nextRegion: function nextRegion(pid) {\n    return request('/common/region/v2/child', false, 'get', {\n      pid: pid\n    });\n  },\n  regionInfo: function regionInfo(id) {\n    return request('/common/region/v2/info', false, 'get', {\n      id: id\n    });\n  },\n  regionInfoBatch: function regionInfoBatch(ids) {\n    return request('/common/region/v2/infoBatch', false, 'get', {\n      ids: ids\n    });\n  },\n  regionSearch: function regionSearch(data) {\n    return request('/common/region/v2/search', false, 'post', data);\n  },\n  provinceV2: function provinceV2() {\n    return request(COMMON_BASE_URL + subDomain + '/region/province', false, 'get');\n  },\n  cityV2: function cityV2() {\n    return request(COMMON_BASE_URL + subDomain + '/region/city', false, 'get');\n  },\n  districtsV2: function districtsV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/region/districts', false, 'post', data);\n  },\n  streetsV2: function streetsV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/region/streets', false, 'post', data);\n  },\n  nextRegionV2: function nextRegionV2(pid) {\n    return request(COMMON_BASE_URL + subDomain + '/region/child', false, 'get', { pid: pid });\n  },\n  regionInfoV2: function regionInfoV2(id) {\n    return request(COMMON_BASE_URL + subDomain + '/region/info', false, 'get', { id: id });\n  },\n  regionInfoBatchV2: function regionInfoBatchV2(ids) {\n    return request(COMMON_BASE_URL + subDomain + '/region/infoBatch', false, 'get', { ids: ids });\n  },\n  regionSearchV2: function regionSearchV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/region/search', false, 'post', data);\n  },\n  regionAnalysis: function regionAnalysis(address) {\n    return request(COMMON_BASE_URL + subDomain + '/region/analysis', false, 'post', { address: address });\n  },\n  cashLogs: function cashLogs(data) {\n    return request('/user/cashLog', true, 'post', data);\n  },\n  cashLogsV2: function cashLogsV2(data) {\n    return request('/user/cashLog/v2', true, 'post', data);\n  },\n  cashLogsV3: function cashLogsV3(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/cashLog/v2', false, 'post', data);\n  },\n  statisticsComingOut: function statisticsComingOut(data) {\n    return request('/user/statisticsComingOut', true, 'post', data);\n  },\n  statisticsComingOutV2: function statisticsComingOutV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/statisticsComingOut', false, 'post', data);\n  },\n  payLogs: function payLogs(data) {\n    return request('/user/payLogs', true, 'post', data);\n  },\n  rechargeSendRules: function rechargeSendRules() {\n    return request('/user/recharge/send/rule', true, 'get');\n  },\n  payBillDiscounts: function payBillDiscounts() {\n    return request('/payBill/discounts', true, 'get');\n  },\n  payBill: function payBill(token, money) {\n    var pwd = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/payBill/pay', true, 'post', { token: token, money: money, pwd: pwd });\n  },\n  payBillV2: function payBillV2(data) {\n    return request('/payBill/pay', true, 'post', data);\n  },\n  vipLevel: function vipLevel() {\n    return request('/config/vipLevel', true, 'get');\n  },\n  fxApply: function fxApply(token, name, mobile) {\n    return request('/saleDistribution/apply', true, 'post', { token: token, name: name, mobile: mobile });\n  },\n  fxApplyV2: function fxApplyV2(data) {\n    return request('/saleDistribution/apply/v2', true, 'post', data);\n  },\n  fxSetting: function fxSetting() {\n    return request(COMMON_BASE_URL + subDomain + '/saleDistribution/setting', true, 'get');\n  },\n  fxBuy: function fxBuy(token) {\n    return request('/saleDistribution/buy', true, 'post', { token: token });\n  },\n  fxApplyProgress: function fxApplyProgress(token) {\n    return request('/saleDistribution/apply/progress', true, 'get', { token: token });\n  },\n  fxApplyProgressV2: function fxApplyProgressV2(token) {\n    return request('/saleDistribution/apply/progress/v2', true, 'get', { token: token });\n  },\n  fxMembers: function fxMembers(data) {\n    return request('/saleDistribution/members', true, 'post', data);\n  },\n  fxCommisionLog: function fxCommisionLog(data) {\n    return request('/saleDistribution/commision/log', true, 'post', data);\n  },\n  fxCommisionFreezeAmount: function fxCommisionFreezeAmount(token) {\n    return request('/saleDistribution/commission/freeze', true, 'get', { token: token });\n  },\n  fxSaleroomRankTotal: function fxSaleroomRankTotal(page, pageSize) {\n    return request('/saleDistribution/sale-room-rank/total', true, 'get', {\n      page: page, pageSize: pageSize\n    });\n  },\n  fxSaleroomRankTotalTeam: function fxSaleroomRankTotalTeam(page, pageSize) {\n    return request('/saleDistribution/sale-room-rank/team/total', true, 'get', {\n      page: page, pageSize: pageSize\n    });\n  },\n  fxSaleroomRankDaily: function fxSaleroomRankDaily(page, pageSize, day) {\n    return request(COMMON_BASE_URL + subDomain + '/saleDistribution/sale-room-rank/daily', false, 'get', {\n      page: page, pageSize: pageSize, day: day\n    });\n  },\n  fxStatisticsDays: function fxStatisticsDays(data) {\n    return request(COMMON_BASE_URL + subDomain + '/saleDistribution/statistics/days', false, 'get', data);\n  },\n  fxUpgrade: function fxUpgrade(token) {\n    return request(COMMON_BASE_URL + subDomain + '/saleDistribution/upgrade', false, 'post', { token: token });\n  },\n  fxMembersStatistics: function fxMembersStatistics(token) {\n    return request('/saleDistribution/members/statistics', true, 'get', { token: token });\n  },\n  fxMyCommisionStatistics: function fxMyCommisionStatistics(token, days) {\n    return request(COMMON_BASE_URL + subDomain + '/saleDistribution/my/commision', false, 'get', { token: token, days: days });\n  },\n  fxGoods: function fxGoods(data) {\n    return request('/saleDistribution/goods', true, 'post', data);\n  },\n  fxTeamReport: function fxTeamReport(data) {\n    return request('/saleDistribution/team/report', true, 'post', data);\n  },\n  fxCities: function fxCities(token) {\n    return request('/saleDistribution/city/list', true, 'get', { token: token });\n  },\n  fxCityReport: function fxCityReport(data) {\n    return request('/saleDistribution/city/report', true, 'post', data);\n  },\n  goodsSellNumberStatistics: function goodsSellNumberStatistics(page, pageSize) {\n    var goodsId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request(COMMON_BASE_URL + subDomain + '/site/goods/statistics', false, 'get', {\n      page: page, pageSize: pageSize, goodsId: goodsId\n    });\n  },\n  wxaQrcode: function wxaQrcode(data) {\n    return request('https://oss.apifm.com/' + subDomain + '/qrcode/wxa/unlimit', true, 'post', data);\n  },\n  ttaQrcode: function ttaQrcode(paramsJson, expireHours) {\n    return request(COMMON_BASE_URL + subDomain + '/user/tt/miniapp/qrcode', false, 'post', {\n      content: JSON.stringify(paramsJson),\n      expireHours: expireHours\n    });\n  },\n  commonQrcode: function commonQrcode(data) {\n    return request('https://oss.apifm.com/' + subDomain + '/qrcode/content', true, 'post', data);\n  },\n  uploadFile: function uploadFile(token, tempFilePath) {\n    var expireHours = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    var uploadUrl = API_BASE_URL + '/' + subDomain + '/dfs/upload/file';\n    return new Promise(function (resolve, reject) {\n      wx.uploadFile({\n        url: uploadUrl,\n        filePath: tempFilePath,\n        name: 'upfile',\n        formData: {\n          'token': token,\n          expireHours: expireHours\n        },\n        success: function success(res) {\n          resolve(JSON.parse(res.data));\n        },\n        fail: function fail(error) {\n          reject(error);\n        },\n        complete: function complete(aaa) {\n          // 加载完成\n        }\n      });\n    });\n  },\n  uploadFileV2: function uploadFileV2(token, tempFilePath) {\n    var expireHours = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return new Promise(function (resolve, reject) {\n      wx.uploadFile({\n        url: 'https://oss.apifm.com/upload2',\n        filePath: tempFilePath,\n        name: 'upfile',\n        formData: {\n          token: token,\n          subDomain: subDomain,\n          expireHours: expireHours\n        },\n        success: function success(res) {\n          resolve(JSON.parse(res.data));\n        },\n        fail: function fail(error) {\n          reject(error);\n        },\n        complete: function complete(aaa) {\n          // 加载完成\n        }\n      });\n    });\n  },\n  uploadFileV22: function uploadFileV22(token, tempFilePath) {\n    var expireHours = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return new Promise(function (resolve, reject) {\n      tt.uploadFile({\n        url: 'https://dfs.apifm.com/upload2',\n        filePath: tempFilePath,\n        name: 'upfile',\n        formData: {\n          token: token,\n          subDomain: subDomain,\n          expireHours: expireHours\n        },\n        success: function success(res) {\n          resolve(JSON.parse(res.data));\n        },\n        fail: function fail(error) {\n          reject(error);\n        },\n        complete: function complete(aaa) {\n          // 加载完成\n        }\n      });\n    });\n  },\n  uploadFileFromUrl: function uploadFileFromUrl() {\n    var remoteFileUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n    var ext = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request('/dfs/upload/url', true, 'post', { remoteFileUrl: remoteFileUrl, ext: ext });\n  },\n  uploadFileFromUrlV2: function uploadFileFromUrlV2(data) {\n    var _data = Object.assign(data, { subDomain: subDomain });\n    return request('https://oss.apifm.com/uploadByUrl', false, 'post', _data);\n  },\n  uploadFileFromUrlV22: function uploadFileFromUrlV22(data) {\n    var _data = Object.assign(data, { subDomain: subDomain });\n    return request('https://dfs.apifm.com/uploadByUrl', false, 'post', _data);\n  },\n  uploadFileList: function uploadFileList() {\n    var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request('/dfs/upload/list', true, 'post', { path: path });\n  },\n  uploadFileListV2: function uploadFileListV2(data) {\n    return request('/dfs/upload/list/v2', true, 'post', data);\n  },\n  galleryList: function galleryList(data) {\n    return request('/dfs/gallery', true, 'post', data);\n  },\n  refundApply: function refundApply(data) {\n    return request('/order/refundApply/apply', true, 'post', data);\n  },\n  refundApplyDetail: function refundApplyDetail(token, orderId) {\n    var orderGoodsId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/order/refundApply/info', true, 'get', {\n      token: token,\n      orderId: orderId,\n      orderGoodsId: orderGoodsId\n    });\n  },\n  refundApplyCancel: function refundApplyCancel(token, orderId) {\n    var orderGoodsId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/order/refundApply/cancel', true, 'post', {\n      token: token,\n      orderId: orderId,\n      orderGoodsId: orderGoodsId\n    });\n  },\n  refundApplySetBackLogistics: function refundApplySetBackLogistics(data) {\n    return request('/order/refundApply/setBackLogistics', true, 'post', data);\n  },\n  cmsCategories: function cmsCategories() {\n    return request(COMMON_BASE_URL + subDomain + '/cms/category/list', false, 'get', {});\n  },\n  cmsCategoryDetail: function cmsCategoryDetail(id) {\n    return request(COMMON_BASE_URL + subDomain + '/cms/category/info', false, 'get', { id: id });\n  },\n  cmsArticles: function cmsArticles(data) {\n    return request('/cms/news/list', true, 'post', data);\n  },\n  cmsArticlesV2: function cmsArticlesV2(data) {\n    return request('/cms/news/list/v2', true, 'post', data);\n  },\n  cmsArticlesV3: function cmsArticlesV3(data) {\n    return request(CMS_BASE_URL + merchantId + '/cms/news/list/v2', true, 'post', data);\n  },\n  cmsArticleUsefulLogs: function cmsArticleUsefulLogs(data) {\n    return request(CMS_BASE_URL + merchantId + '/cms/news/useful/logs', false, 'post', data);\n  },\n  cmsArticleDetail: function cmsArticleDetail(id) {\n    return request('/cms/news/detail', true, 'get', { id: id });\n  },\n  cmsArticleDetailV2: function cmsArticleDetailV2(id) {\n    var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request('/cms/news/detail/v2', true, 'get', { id: id, token: token });\n  },\n  cmsArticleDetailV3: function cmsArticleDetailV3(data) {\n    return request(CMS_BASE_URL + merchantId + '/cms/news/detail/v2', true, 'get', data);\n  },\n  cmsArticlePreNext: function cmsArticlePreNext(id) {\n    return request('/cms/news/preNext', true, 'get', { id: id });\n  },\n  cmsArticlePreNextV2: function cmsArticlePreNextV2(id) {\n    return request(CMS_BASE_URL + merchantId + '/cms/news/preNext', true, 'get', { id: id });\n  },\n  cmsArticleCreate: function cmsArticleCreate(data) {\n    return request('/cms/news/put', true, 'post', data);\n  },\n  cmsArticleCreateV2: function cmsArticleCreateV2(data) {\n    return request(CMS_BASE_URL + merchantId + '/cms/news/put', true, 'post', data);\n  },\n  cmsArticleDelete: function cmsArticleDelete(token, id) {\n    return request('/cms/news/del', true, 'post', { token: token, id: id });\n  },\n  cmsArticleDeleteV2: function cmsArticleDeleteV2(token, id) {\n    return request(CMS_BASE_URL + merchantId + '/cms/news/del', true, 'post', { token: token, id: id });\n  },\n  cmsArticleUseless: function cmsArticleUseless(data) {\n    return request(CMS_BASE_URL + merchantId + '/cms/news/useful', false, 'post', data);\n  },\n  cmsArticleModifyExtNumber: function cmsArticleModifyExtNumber(data) {\n    return request('/cms/news/modifyExtNumber', true, 'post', data);\n  },\n  cmsArticleModifyExtNumberV2: function cmsArticleModifyExtNumberV2(data) {\n    return request(CMS_BASE_URL + merchantId + '/cms/news/modifyExtNumber', true, 'post', data);\n  },\n  newsOwnerUserViewStatistics: function newsOwnerUserViewStatistics(data) {\n    return request('/newsOwnerUserViewStatistics/list', true, 'post', data);\n  },\n  cmsPage: function cmsPage(key) {\n    return request(COMMON_BASE_URL + subDomain + '/cms/page/info/v2', true, 'get', { key: key });\n  },\n  cmsTags: function cmsTags() {\n    return request('/cms/tags/list', true, 'get', {});\n  },\n  cmsTagsV2: function cmsTagsV2(data) {\n    return request(CMS_BASE_URL + merchantId + '/newsTag/list', true, 'post', data);\n  },\n  cmsNewsSignUsers: function cmsNewsSignUsers(data) {\n    return request('/newsSign/signUsers', true, 'post', data);\n  },\n  cmsNewsSignOnline: function cmsNewsSignOnline(data) {\n    return request('/newsSign/signOnline', true, 'post', data);\n  },\n  cmsNewsSignOffline: function cmsNewsSignOffline(data) {\n    return request('/newsSign/signOffline', true, 'post', data);\n  },\n  cmsNewsSignCheck: function cmsNewsSignCheck(token, newsId) {\n    return request('/newsSign/check', true, 'get', { token: token, newsId: newsId });\n  },\n  invoiceList: function invoiceList(data) {\n    return request('/invoice/list', true, 'post', data);\n  },\n  invoiceApply: function invoiceApply(data) {\n    return request('/invoice/apply', true, 'post', data);\n  },\n  invoiceDetail: function invoiceDetail(token, id) {\n    return request('/invoice/info', true, 'get', { token: token, id: id });\n  },\n  depositList: function depositList(data) {\n    return request('/deposit/list', true, 'post', data);\n  },\n  payDeposit: function payDeposit(data) {\n    return request('/deposit/pay', true, 'post', data);\n  },\n  depositInfo: function depositInfo(token, id) {\n    return request('/deposit/info', true, 'get', { token: token, id: id });\n  },\n  depositBackApply: function depositBackApply(token, id) {\n    return request('/deposit/back/apply', true, 'post', { token: token, id: id });\n  },\n  depositListV2: function depositListV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/deposit/list', false, 'post', data);\n  },\n  payDepositV2: function payDepositV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/deposit/pay', false, 'post', data);\n  },\n  payStatusDepositV2: function payStatusDepositV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/deposit/payStatus', false, 'post', data);\n  },\n  depositInfoV2: function depositInfoV2(token, id) {\n    return request(COMMON_BASE_URL + subDomain + '/deposit/info', false, 'get', { token: token, id: id });\n  },\n  depositBackApplyV2: function depositBackApplyV2(token, id) {\n    return request(COMMON_BASE_URL + subDomain + '/deposit/back/apply', false, 'post', { token: token, id: id });\n  },\n  shopAreaCities: function shopAreaCities() {\n    return request('/shopArea/cities', true, 'get');\n  },\n  shopAreaList: function shopAreaList(data) {\n    return request('/shopArea/list', true, 'post', data);\n  },\n  shopAreaDetail: function shopAreaDetail(id) {\n    return request('/shopArea/detail', true, 'get', { id: id });\n  },\n  fetchShopsCities: function fetchShopsCities() {\n    return request('/shop/subshop/cities', true, 'get');\n  },\n  fetchShops: function fetchShops(data) {\n    return request('/shop/subshop/list', true, 'post', data);\n  },\n  fetchShopsV2: function fetchShopsV2(data) {\n    return request('/shop/subshop/list/v2', true, 'post', data);\n  },\n  fetchMyShops: function fetchMyShops(token) {\n    return request('/shop/subshop/my', true, 'get', { token: token });\n  },\n  shopSubdetail: function shopSubdetail(id) {\n    return request('/shop/subshop/detail/v2', true, 'get', { id: id });\n  },\n  shopSubApply: function shopSubApply(data) {\n    return request('/shop/subshop/apply', true, 'post', data);\n  },\n  pickPoints: function pickPoints(data) {\n    return request('/shop/subshop/pickPoints', true, 'post', data);\n  },\n  shopReputationList: function shopReputationList(data) {\n    return request('/shop/subshop/listReputation', true, 'post', data);\n  },\n  shopPicList: function shopPicList(data) {\n    return request('/shop/subshop/shopPics', true, 'post', data);\n  },\n  shopFavPut: function shopFavPut(token, shopId) {\n    return request('/shop/fav/add', true, 'post', { token: token, shopId: shopId });\n  },\n  shopFavCheck: function shopFavCheck(token, shopId) {\n    return request('/shop/fav/check', true, 'get', { token: token, shopId: shopId });\n  },\n  shopFavList: function shopFavList(data) {\n    return request('/shop/fav/list', true, 'post', data);\n  },\n  shopFavDelete: function shopFavDelete(token, shopId) {\n    return request('/shop/fav/delete', true, 'post', { token: token, shopId: shopId });\n  },\n  userAttendantFavPut: function userAttendantFavPut(token, attendantId) {\n    return request('/userAttendantFav/add', true, 'post', { token: token, attendantId: attendantId });\n  },\n  userAttendantFavCheck: function userAttendantFavCheck(token, attendantId) {\n    return request('/userAttendantFav/check', true, 'get', { token: token, attendantId: attendantId });\n  },\n  userAttendantFavList: function userAttendantFavList(data) {\n    return request('/userAttendantFav/list', true, 'post', data);\n  },\n  userAttendantFavDelete: function userAttendantFavDelete(token, attendantId) {\n    return request('/userAttendantFav/delete', true, 'post', { token: token, attendantId: attendantId });\n  },\n  addComment: function addComment(data) {\n    return request(COMMON_BASE_URL + subDomain + '/comment/add', false, 'post', data);\n  },\n  commentList: function commentList(data) {\n    return request('/comment/list', true, 'post', data);\n  },\n  commentListV2: function commentListV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/comment/list/v2', false, 'post', data);\n  },\n  delComment: function delComment(data) {\n    return request(COMMON_BASE_URL + subDomain + '/comment/del', false, 'post', data);\n  },\n  modifyUserInfo: function modifyUserInfo(data) {\n    return request('/user/modify', true, 'post', data);\n  },\n  modifyUserInfoV2: function modifyUserInfoV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/modify', false, 'post', data);\n  },\n  bindSaleman: function bindSaleman(data) {\n    return request('/user/bindSaleman', true, 'post', data);\n  },\n  modifyUserPassword: function modifyUserPassword(token, pwdOld, pwdNew) {\n    return request('/user/modify/password', true, 'post', { token: token, pwdOld: pwdOld, pwdNew: pwdNew });\n  },\n  modifyUserPasswordByUserName: function modifyUserPasswordByUserName(data) {\n    return request('/user/username/modifyPassword', true, 'post', data);\n  },\n  anonymousUserInfo: function anonymousUserInfo(id) {\n    return request('/user/anonymous/info', true, 'get', { id: id });\n  },\n  uniqueId: function uniqueId() {\n    var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request('/uniqueId/get', true, 'get', { type: type });\n  },\n  sequence: function sequence() {\n    var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n    var defValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request(COMMON_BASE_URL + subDomain + '/uniqueId/sequence', false, 'get', { type: type, defValue: defValue });\n  },\n  queryBarcode: function queryBarcode() {\n    var barcode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request('/barcode/info', true, 'get', { barcode: barcode });\n  },\n  luckyInfo: function luckyInfo(id) {\n    return request('/luckyInfo/info/v2', true, 'get', { id: id });\n  },\n  luckyInfoJoin: function luckyInfoJoin(id, token) {\n    return request('/luckyInfo/join', true, 'post', { id: id, token: token });\n  },\n  luckyInfoJoinMy: function luckyInfoJoinMy(id, token) {\n    return request('/luckyInfo/join/my', true, 'get', { id: id, token: token });\n  },\n  luckyInfoJoinLogs: function luckyInfoJoinLogs(data) {\n    return request('/luckyInfo/join/logs', true, 'post', data);\n  },\n  jsonList: function jsonList(data) {\n    return request('/json/list', true, 'post', data);\n  },\n  jsonListV2: function jsonListV2(data) {\n    return request('/json/list/v2', true, 'post', data);\n  },\n  jsonSet: function jsonSet(data) {\n    return request('/json/set', true, 'post', data);\n  },\n  jsonDelete: function jsonDelete(token, id) {\n    return request('/json/delete', true, 'post', { token: token, id: id });\n  },\n  jsonTop: function jsonTop(token, id, isTop) {\n    return request('/json/top', true, 'post', { token: token, id: id, isTop: isTop });\n  },\n  jsonHighlight: function jsonHighlight(token, id, isHighlight) {\n    return request('/json/highlight', true, 'post', { token: token, id: id, isHighlight: isHighlight });\n  },\n  jsonListV3: function jsonListV3(data) {\n    return request(COMMON_BASE_URL + subDomain + '/json/list', true, 'post', data);\n  },\n  jsonSetV2: function jsonSetV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/json/set', true, 'post', data);\n  },\n  jsonDeleteV2: function jsonDeleteV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/json/delete', true, 'post', data);\n  },\n  jsonTopv2: function jsonTopv2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/json/top', true, 'post', data);\n  },\n  jsonHighlightv2: function jsonHighlightv2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/json/highlight', true, 'post', data);\n  },\n  graphValidateCodeUrl: function graphValidateCodeUrl() {\n    var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Math.random();\n\n    var _url = API_BASE_URL + '/' + subDomain + '/verification/pic/get?key=' + key;\n    return _url;\n  },\n  graphValidateCodeCheck: function graphValidateCodeCheck() {\n    var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Math.random();\n    var code = arguments[1];\n\n    return request('/verification/pic/check', true, 'post', { key: key, code: code });\n  },\n  shortUrl: function shortUrl() {\n    var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request('/common/short-url/shorten', false, 'post', { url: url });\n  },\n  shortUrlV2: function shortUrlV2(content) {\n    return request('/common/short-url/shorten/v2', false, 'post', { content: content });\n  },\n  shortUrlExpand: function shortUrlExpand(suffix) {\n    return request('/common/short-url/expand', false, 'post', { suffix: suffix });\n  },\n  smsValidateCode: function smsValidateCode(mobile) {\n    var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n    var picCode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/verification/sms/get', true, 'get', { mobile: mobile, key: key, picCode: picCode });\n  },\n  smsValidateCodeByToken: function smsValidateCodeByToken(token) {\n    return request('/verification/sms/get-by-token', true, 'get', { token: token });\n  },\n  smsValidateCodeCheck: function smsValidateCodeCheck(mobile, code) {\n    return request('/verification/sms/check', true, 'post', { mobile: mobile, code: code });\n  },\n  mailValidateCode: function mailValidateCode(mail) {\n    return request('/verification/mail/get', true, 'get', { mail: mail });\n  },\n  mailValidateCodeCheck: function mailValidateCodeCheck(mail, code) {\n    return request('/verification/mail/check', true, 'post', { mail: mail, code: code });\n  },\n  mapDistance: function mapDistance(lat1, lng1, lat2, lng2) {\n    return request('/common/map/distance', false, 'get', { lat1: lat1, lng1: lng1, lat2: lat2, lng2: lng2 });\n  },\n  mapDistanceNavigation: function mapDistanceNavigation(key, mode, from, to) {\n    return request('/common/map/qq/distance', false, 'post', { key: key, mode: mode, from: from, to: to });\n  },\n  mapQQAddress: function mapQQAddress() {\n    var location = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n    var coord_type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '5';\n\n    return request('/common/map/qq/address', false, 'get', { location: location, coord_type: coord_type });\n  },\n  mapQQAddressV2: function mapQQAddressV2(key, location) {\n    var coord_type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '5';\n\n    return request('/common/map/qq/address', false, 'get', { key: key, location: location, coord_type: coord_type });\n  },\n  mapQQSearch: function mapQQSearch(data) {\n    return request('/common/map/qq/search', false, 'post', data);\n  },\n  mapQQSearchV2: function mapQQSearchV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/map/qq/search', false, 'post', data);\n  },\n  mapDistanceNavigationV2: function mapDistanceNavigationV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/map/qq/distance', false, 'post', data);\n  },\n  mapQQAddressV3: function mapQQAddressV3(data) {\n    return request(COMMON_BASE_URL + subDomain + '/map/qq/address', false, 'post', data);\n  },\n  mapGeocoder: function mapGeocoder(data) {\n    return request(COMMON_BASE_URL + subDomain + '/map/geocoder', false, 'post', data);\n  },\n  mapDrive: function mapDrive(data) {\n    return request(COMMON_BASE_URL + subDomain + '/map/drive', false, 'post', data);\n  },\n  mapAddressToGps: function mapAddressToGps(data) {\n    return request(COMMON_BASE_URL + subDomain + '/map/addressToGps', false, 'post', data);\n  },\n  virtualTraderList: function virtualTraderList(data) {\n    return request('/virtualTrader/list', true, 'post', data);\n  },\n  virtualTraderDetail: function virtualTraderDetail(token, id) {\n    return request('/virtualTrader/info', true, 'get', { token: token, id: id });\n  },\n  virtualTraderBuy: function virtualTraderBuy(token, id) {\n    return request('/virtualTrader/buy', true, 'post', { token: token, id: id });\n  },\n  virtualTraderMyBuyLogs: function virtualTraderMyBuyLogs(data) {\n    return request('/virtualTrader/buy/logs', true, 'post', data);\n  },\n  virtualTraderListV2: function virtualTraderListV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/virtualTrader/list', false, 'post', data);\n  },\n  virtualTraderDetailV2: function virtualTraderDetailV2(token, id) {\n    return request(COMMON_BASE_URL + subDomain + '/virtualTrader/info', false, 'get', { token: token, id: id });\n  },\n  virtualTraderBuyV2: function virtualTraderBuyV2(token, id) {\n    return request(COMMON_BASE_URL + subDomain + '/virtualTrader/buy', false, 'post', { token: token, id: id });\n  },\n  virtualTraderMyBuyLogsV2: function virtualTraderMyBuyLogsV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/virtualTrader/buy/logs', false, 'post', data);\n  },\n  queuingTypes: function queuingTypes() {\n    var status = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request('/queuing/types', true, 'get', { status: status });\n  },\n  queuingGet: function queuingGet(token, typeId) {\n    var mobile = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/queuing/get', true, 'post', { token: token, typeId: typeId, mobile: mobile });\n  },\n  queuingMy: function queuingMy(token) {\n    var typeId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n    var status = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/queuing/my', true, 'get', { token: token, typeId: typeId, status: status });\n  },\n  idcardCheck: function idcardCheck(token, name, idCardNo) {\n    return request('/user/idcard', true, 'post', { token: token, name: name, idCardNo: idCardNo });\n  },\n  idcardCheckManualReview: function idcardCheckManualReview(data) {\n    return request('/user/idcard/manualReview', true, 'post', data);\n  },\n  idcardCheckManualReviewInfo: function idcardCheckManualReviewInfo(token) {\n    return request('/user/idcard/manualReview/info', true, 'get', { token: token });\n  },\n  userTagList: function userTagList(data) {\n    return request(COMMON_BASE_URL + subDomain + '/userTag/list', false, 'post', data);\n  },\n  userTagCertificateQuery: function userTagCertificateQuery(token) {\n    return request('/userTag/certificate/query', true, 'get', { token: token });\n  },\n  userTagCertificate: function userTagCertificate(data) {\n    return request('/userTag/certificate', true, 'post', data);\n  },\n  bindSeller: function bindSeller(data) {\n    return request('/user/bindSeller', true, 'post', data);\n  },\n  loginout: function loginout(token) {\n    return request('/user/loginout', true, 'get', { token: token });\n  },\n  userLogedList: function userLogedList(token) {\n    return request('/user/logedUserList', true, 'get', { token: token });\n  },\n  userDelete: function userDelete(token) {\n    return request('/user/delete', true, 'post', { token: token });\n  },\n  dynamicUserCode: function dynamicUserCode(token) {\n    return request(COMMON_BASE_URL + subDomain + '/user/dynamicUserCode', false, 'get', { token: token });\n  },\n  userLevelList: function userLevelList(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/level/list', false, 'post', data);\n  },\n  userLevelDetail: function userLevelDetail(levelId) {\n    return request(COMMON_BASE_URL + subDomain + '/user/level/info', false, 'get', { id: levelId });\n  },\n  userLevelPrices: function userLevelPrices(levelId) {\n    return request(COMMON_BASE_URL + subDomain + '/user/level/prices', false, 'get', { levelId: levelId });\n  },\n  userLevelBuy: function userLevelBuy(token, priceId) {\n    var isAutoRenew = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n    var remark = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n\n    return request(COMMON_BASE_URL + subDomain + '/user/level/buy', false, 'post', {\n      token: token,\n      userLevelPriceId: priceId,\n      isAutoRenew: isAutoRenew,\n      remark: remark\n    });\n  },\n  userLevelBuyLogs: function userLevelBuyLogs(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/level/buyLogs', false, 'post', data);\n  },\n  messageList: function messageList(data) {\n    return request('/user/message/list', true, 'post', data);\n  },\n  messageRead: function messageRead(token, id) {\n    return request('/user/message/read', true, 'post', { token: token, id: id });\n  },\n  messageDelete: function messageDelete(token, id) {\n    return request('/user/message/del', true, 'post', { token: token, id: id });\n  },\n  bindOpenid: function bindOpenid(token, code) {\n    // SDK文档到这里\n    return request('/user/wxapp/bindOpenid', true, 'post', {\n      token: token, code: code,\n      type: 2\n    });\n  },\n  bindOpenidV2: function bindOpenidV2(token, code, appid) {\n    return request('/user/wxapp/bindOpenid/v2', true, 'post', {\n      token: token, code: code, appid: appid\n    });\n  },\n  bindOpenidV11: function bindOpenidV11(data) {\n    return request('/user/wxapp/bindOpenid', true, 'post', data);\n  },\n  encryptedData: function encryptedData(code, _encryptedData, iv) {\n    return request('/user/wxapp/decode/encryptedData', true, 'post', {\n      code: code, encryptedData: _encryptedData, iv: iv\n    });\n  },\n  voteItems: function voteItems(data) {\n    return request(COMMON_BASE_URL + subDomain + '/vote/items', false, 'post', data);\n  },\n  voteItemDetail: function voteItemDetail(id) {\n    return request(COMMON_BASE_URL + subDomain + '/vote/info', false, 'get', { id: id });\n  },\n  vote: function vote(token, voteId, items, remark) {\n    return request(COMMON_BASE_URL + subDomain + '/vote/vote', false, 'post', {\n      token: token, voteId: voteId,\n      items: items.join(),\n      remark: remark\n    });\n  },\n  voteCategory: function voteCategory(data) {\n    return request(COMMON_BASE_URL + subDomain + '/vote/vote/category', false, 'post', data);\n  },\n  myVote: function myVote(token, voteId) {\n    return request(COMMON_BASE_URL + subDomain + '/vote/vote/info', false, 'get', {\n      token: token, voteId: voteId\n    });\n  },\n  myVoteV2: function myVoteV2(token, voteId) {\n    return request(COMMON_BASE_URL + subDomain + '/vote/vote/info/v2', false, 'get', {\n      token: token, voteId: voteId\n    });\n  },\n  voteLogs: function voteLogs(data) {\n    return request(COMMON_BASE_URL + subDomain + '/vote/vote/list', false, 'post', data);\n  },\n  voteGroups: function voteGroups(data) {\n    return request(COMMON_BASE_URL + subDomain + '/vote/vote/groups', false, 'post', data);\n  },\n  voteGroupsDetail: function voteGroupsDetail(data) {\n    return request(COMMON_BASE_URL + subDomain + '/vote/vote/groups/detail', false, 'get', data);\n  },\n  myInviteVoteJoinList: function myInviteVoteJoinList(data) {\n    return request(COMMON_BASE_URL + subDomain + '/vote/myInviteLoinList', false, 'post', data);\n  },\n  yuyueItemPublish: function yuyueItemPublish(data) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/publish', false, 'post', data);\n  },\n  yuyueItems: function yuyueItems(data) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/items', false, 'post', data);\n  },\n  yuyueItemDetail: function yuyueItemDetail(id) {\n    var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/info', false, 'get', { id: id, token: token });\n  },\n  yuyueItemDelete: function yuyueItemDelete(token, id) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/del', false, 'post', { token: token, id: id });\n  },\n  yuyueJoin: function yuyueJoin(data) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/join', false, 'post', data);\n  },\n  yuyueJoinPay: function yuyueJoinPay(token, joinId) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/pay', false, 'post', {\n      token: token, joinId: joinId\n    });\n  },\n  yuyueJoinUpdate: function yuyueJoinUpdate(token, joinId, extJsonStr) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/join/update', false, 'post', {\n      token: token, joinId: joinId, extJsonStr: extJsonStr\n    });\n  },\n  yuyueLike: function yuyueLike(data) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/like', false, 'post', data);\n  },\n  yuyueJoinDelete: function yuyueJoinDelete(token, joinId) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/delJoin', false, 'post', {\n      token: token, id: joinId\n    });\n  },\n  yuyueServered: function yuyueServered(data) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/servered', false, 'post', data);\n  },\n  yuyueMyJoinInfo: function yuyueMyJoinInfo(token, joinId) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/join/info', false, 'post', {\n      token: token, joinId: joinId\n    });\n  },\n  yuyueMyJoinLogs: function yuyueMyJoinLogs(data) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/join/list', false, 'post', data);\n  },\n  yuyueTeams: function yuyueTeams(data) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/info/teams', false, 'post', data);\n  },\n  yuyueTeamDetail: function yuyueTeamDetail(teamId) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/info/team', false, 'get', { teamId: teamId });\n  },\n  yuyueTeamMembers: function yuyueTeamMembers(data) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/info/team/members', false, 'post', data);\n  },\n  yuyueTeamDeleteMember: function yuyueTeamDeleteMember(data) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/info/team/members/del', false, 'post', data);\n  },\n  yuyueFavList: function yuyueFavList(data) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/fav/list', false, 'post', data);\n  },\n  yuyueFavAdd: function yuyueFavAdd(data) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/fav/add', false, 'post', data);\n  },\n  yuyueFavDelete: function yuyueFavDelete(data) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/fav/delete', false, 'post', data);\n  },\n  yuyueFavCheck: function yuyueFavCheck(data) {\n    return request(COMMON_BASE_URL + subDomain + '/yuyue/fav/check', false, 'get', data);\n  },\n  register_email: function register_email(data) {\n    return request('/user/email/register', true, 'post', data);\n  },\n  login_email: function login_email(data) {\n    return request('/user/email/login', true, 'post', data);\n  },\n  bindEmail: function bindEmail(token, email, code) {\n    var pwd = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n\n    return request('/user/email/bindEmail', true, 'post', {\n      token: token, email: email, code: code, pwd: pwd\n    });\n  },\n  goodsDynamic: function goodsDynamic(type) {\n    return request(COMMON_BASE_URL + subDomain + '/site/goods/dynamic', false, 'get', { type: type });\n  },\n  goodsDynamicV2: function goodsDynamicV2(data) {\n    return request('/site/goods/dynamic/v2', true, 'get', data);\n  },\n  usersDynamic: function usersDynamic(type) {\n    return request(COMMON_BASE_URL + subDomain + '/site/user/dynamic', false, 'get', { type: type });\n  },\n  fetchSubDomainByWxappAppid: function fetchSubDomainByWxappAppid(appid) {\n    return request('/subdomain/appid/wxapp', false, 'get', { appid: appid });\n  },\n  cmsArticleFavPut: function cmsArticleFavPut(token, newsId) {\n    return request('/cms/news/fav/add', true, 'post', { token: token, newsId: newsId });\n  },\n  cmsArticleFavCheck: function cmsArticleFavCheck(token, newsId) {\n    return request('/cms/news/fav/check', true, 'get', { token: token, newsId: newsId });\n  },\n  cmsArticleFavList: function cmsArticleFavList(data) {\n    return request('/cms/news/fav/list', true, 'post', data);\n  },\n  cmsArticleFavListV2: function cmsArticleFavListV2(data) {\n    return request('/cms/news/fav/list/v2', true, 'post', data);\n  },\n  cmsArticleFavDeleteById: function cmsArticleFavDeleteById(token, id) {\n    return request('/cms/news/fav/delete', true, 'post', { token: token, id: id });\n  },\n  cmsArticleFavDeleteByNewsId: function cmsArticleFavDeleteByNewsId(token, newsId) {\n    return request('/cms/news/fav/delete', true, 'post', { token: token, newsId: newsId });\n  },\n  shippingCarInfo: function shippingCarInfo(token) {\n    var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request('/shopping-cart/info', true, 'get', {\n      token: token, type: type\n    });\n  },\n  shippingCarInfoAddItem: function shippingCarInfoAddItem(token, goodsId, number, sku, addition) {\n    var type = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : '';\n\n    return request('/shopping-cart/add', true, 'post', {\n      token: token,\n      goodsId: goodsId,\n      number: number,\n      sku: sku && sku.length > 0 ? JSON.stringify(sku) : '',\n      addition: addition && addition.length > 0 ? JSON.stringify(addition) : '',\n      type: type\n    });\n  },\n  shippingCarInfoAddItemV2: function shippingCarInfoAddItemV2(data) {\n    return request('/shopping-cart/add', true, 'post', data);\n  },\n  shippingCarInfoModifyNumber: function shippingCarInfoModifyNumber(token, key, number) {\n    var type = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n\n    return request('/shopping-cart/modifyNumber', true, 'post', {\n      token: token, key: key, number: number, type: type\n    });\n  },\n  shippingCarInfoRemoveItem: function shippingCarInfoRemoveItem(token, key) {\n    var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/shopping-cart/remove', true, 'post', {\n      token: token, key: key, type: type\n    });\n  },\n  shippingCartSelected: function shippingCartSelected(token, key, selected) {\n    var type = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n\n    return request('/shopping-cart/select', true, 'post', {\n      token: token, key: key, selected: selected, type: type\n    });\n  },\n  shippingCarInfoRemoveAll: function shippingCarInfoRemoveAll(token) {\n    var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request('/shopping-cart/empty', true, 'post', {\n      token: token, type: type\n    });\n  },\n  growthLogs: function growthLogs(data) {\n    return request('/growth/logs', true, 'post', data);\n  },\n  exchangeScoreToGrowth: function exchangeScoreToGrowth(token, deductionScore) {\n    return request('/growth/exchange', true, 'post', {\n      token: token, deductionScore: deductionScore\n    });\n  },\n  growthLogsV2: function growthLogsV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/growthLog/logs', true, 'post', data);\n  },\n  exchangeScoreToGrowthV2: function exchangeScoreToGrowthV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/growthLog/exchange', true, 'post', data);\n  },\n  wxaMpLiveRooms: function wxaMpLiveRooms() {\n    return request('/wx/live/rooms', true, 'get');\n  },\n  wxaMpLiveRoomHisVedios: function wxaMpLiveRoomHisVedios(roomId) {\n    return request('/wx/live/his', true, 'get', {\n      roomId: roomId\n    });\n  },\n  peisonFeeList: function peisonFeeList() {\n    return request('/fee/peisong/list', true, 'get');\n  },\n  peisongMembers: function peisongMembers(data) {\n    return request('/peisong/member/list', true, 'post', data);\n  },\n  peisongMemberInfo: function peisongMemberInfo(token) {\n    return request('/peisong/member/info', true, 'get', {\n      token: token\n    });\n  },\n  peisongMemberChangeWorkStatus: function peisongMemberChangeWorkStatus(token) {\n    return request('/peisong/member/change-work-status', true, 'post', {\n      token: token\n    });\n  },\n  peisongOrdersGrabbing: function peisongOrdersGrabbing(token) {\n    return request('/peisong/order/grabbing', true, 'get', { token: token });\n  },\n  peisongOrders: function peisongOrders(data) {\n    return request('/peisong/order/list', true, 'post', data);\n  },\n  peisongOrderGrab: function peisongOrderGrab(data) {\n    return request('/peisong/order/grab', true, 'post', data);\n  },\n  peisongOrderDetail: function peisongOrderDetail(token, id) {\n    return request('/peisong/order/detail', true, 'get', { token: token, id: id });\n  },\n  peisongOrderEstimatedCompletionTime: function peisongOrderEstimatedCompletionTime(data) {\n    return request('/peisong/order/estimatedCompletionTime', true, 'post', data);\n  },\n  peisongStartService: function peisongStartService(data) {\n    return request('/peisong/order/start-service', true, 'post', data);\n  },\n  peisongEndService: function peisongEndService(data) {\n    return request('/peisong/order/end-service', true, 'post', data);\n  },\n  peisongEndServiceRemark: function peisongEndServiceRemark(token, id, remarkEnd) {\n    return request('/peisong/order/end-service/remarkEnd', true, 'post', { token: token, id: id, remarkEnd: remarkEnd });\n  },\n  peisongOrderAllocation: function peisongOrderAllocation(token, id, uid) {\n    return request('/peisong/order/allocation', true, 'post', {\n      token: token, id: id, uid: uid\n    });\n  },\n  siteStatistics: function siteStatistics() {\n    return request(COMMON_BASE_URL + subDomain + '/site/statistics', false, 'get');\n  },\n  orderStatistics: function orderStatistics(token) {\n    return request('/order/statistics', true, 'get', {\n      token: token\n    });\n  },\n  orderStatisticsv2: function orderStatisticsv2(data) {\n    return request('/order/statistics', true, 'get', data);\n  },\n  siteStatisticsSaleroom: function siteStatisticsSaleroom(data) {\n    return request(COMMON_BASE_URL + subDomain + '/site/statistics/saleroom', false, 'get', data);\n  },\n  siteStatisticsSaleroomYear: function siteStatisticsSaleroomYear() {\n    var year = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n    return request(COMMON_BASE_URL + subDomain + '/site/statistics/saleroom/year', false, 'get', { year: year });\n  },\n  bonusLog: function bonusLog(data) {\n    return request('/bonusLog/list', true, 'post', data);\n  },\n  bonusLogV2: function bonusLogV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/bonusLog/list', false, 'post', data);\n  },\n  mtjAsset: function mtjAsset(token) {\n    return request('/mtj/asset', true, 'get', { token: token });\n  },\n  mtjSetting: function mtjSetting() {\n    return request('/mtj/setting', true, 'get');\n  },\n  mtjLogs: function mtjLogs(data) {\n    return request('/mtj/logs', true, 'post', data);\n  },\n  mtjStatistics: function mtjStatistics() {\n    return request('/site/statistics/mjt', true, 'get');\n  },\n  mtjTransfer: function mtjTransfer(data) {\n    return request('/mtj/transfer', true, 'post', data);\n  },\n  mtjTransferLogs: function mtjTransferLogs(data) {\n    return request('/mtj/transfer/logs', true, 'post', data);\n  },\n  mtjAssetV2: function mtjAssetV2(token) {\n    return request(COMMON_BASE_URL + subDomain + '/mtj/asset', true, 'get', { token: token });\n  },\n  mtjSettingV2: function mtjSettingV2() {\n    return request(COMMON_BASE_URL + subDomain + '/mtj/setting', true, 'get');\n  },\n  mtjLogsV2: function mtjLogsV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/mtj/logs', true, 'post', data);\n  },\n  mtjStatisticsV2: function mtjStatisticsV2() {\n    return request(COMMON_BASE_URL + subDomain + '/site/statistics/mjt', true, 'get');\n  },\n  mtjTransferV2: function mtjTransferV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/mtj/transfer', true, 'post', data);\n  },\n  mtjTransferLogsV2: function mtjTransferLogsV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/mtj/transfer/logs', true, 'post', data);\n  },\n  wxOpenAuthorization: function wxOpenAuthorization(data) {\n    return request('/user/wxsns/authorization', true, 'post', data);\n  },\n  wxOpenRegister: function wxOpenRegister(data) {\n    return request('/user/wxsns/register', true, 'post', data);\n  },\n  wxOpenBindOpenid: function wxOpenBindOpenid(data) {\n    return request('/user/wxsns/bindOpenid/v2', true, 'post', data);\n  },\n  wxOpenLogin: function wxOpenLogin(data) {\n    return request('/user/wxsns/login', true, 'post', data);\n  },\n  userAttentioncheck: function userAttentioncheck(token, uid) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attention/check', false, 'get', {\n      token: token, uid: uid\n    });\n  },\n  userAttentionAdd: function userAttentionAdd(token, uid) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attention/add', false, 'post', {\n      token: token, uid: uid\n    });\n  },\n  userAttentionRemove: function userAttentionRemove(token, uid) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attention/remove', false, 'post', {\n      token: token, uid: uid\n    });\n  },\n  userAttentionMeList: function userAttentionMeList(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attention/attention-me', false, 'post', data);\n  },\n  userMyAttentionList: function userMyAttentionList(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attention/my-attention', false, 'post', data);\n  },\n  userAttentionDetail: function userAttentionDetail(token, uid) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attention/detail', false, 'get', {\n      token: token, uid: uid\n    });\n  },\n  userAttentionStatistics: function userAttentionStatistics(token) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attention/statistics', false, 'get', {\n      token: token\n    });\n  },\n  cyTableToken: function cyTableToken(tableId, key) {\n    return request('/cyTable/token', true, 'post', {\n      id: tableId,\n      k: key\n    });\n  },\n  cyTableAddOrder: function cyTableAddOrder(data) {\n    return request('/cyTable/add-order', true, 'post', data);\n  },\n  cyTablePayOrder: function cyTablePayOrder(data) {\n    return request('/cyTable/pay-order', true, 'post', data);\n  },\n  cyTableInfo: function cyTableInfo(id) {\n    return request('/cyTable/info', true, 'get', { id: id });\n  },\n  cyTableList: function cyTableList(data) {\n    return request('/cyTable/list', true, 'post', data);\n  },\n  goodsTimesSchedule: function goodsTimesSchedule() {\n    var goodsId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n    var propertyChildIds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n    var brandId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n    var categoryId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n\n    return request('/shop/goods/times/schedule', true, 'post', { goodsId: goodsId, propertyChildIds: propertyChildIds, brandId: brandId, categoryId: categoryId });\n  },\n  goodsTimesDays: function goodsTimesDays(goodsId) {\n    var propertyChildIds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request('/shop/goods/times/days', true, 'post', { goodsId: goodsId, propertyChildIds: propertyChildIds });\n  },\n  goodsTimesDayItems: function goodsTimesDayItems(day, goodsId) {\n    var propertyChildIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/shop/goods/times/items', true, 'post', { day: day, goodsId: goodsId, propertyChildIds: propertyChildIds });\n  },\n  goodsBrandList: function goodsBrandList(data) {\n    return request('/shop/goods/brand/list', true, 'post', data);\n  },\n  goodsBrandDetail: function goodsBrandDetail(id) {\n    return request('/shop/goods/brand/detail', true, 'get', { id: id });\n  },\n  wxappServiceLogin: function wxappServiceLogin(data) {\n    return request('/user/wxappService/login', true, 'post', data);\n  },\n  wxappServiceLoginWxaMobile: function wxappServiceLoginWxaMobile(data) {\n    return request('/user/wxappService/login/mobile', true, 'post', data);\n  },\n  wxappServiceRegisterComplex: function wxappServiceRegisterComplex(data) {\n    return request('/user/wxappService/register/complex', true, 'post', data);\n  },\n  wxappServiceRegisterSimple: function wxappServiceRegisterSimple(data) {\n    return request('/user/wxappService/register/simple', true, 'post', data);\n  },\n  wxappServiceAuthorize: function wxappServiceAuthorize(data) {\n    return request('/user/wxappService/authorize', true, 'post', data);\n  },\n  wxappServiceBindMobile: function wxappServiceBindMobile(data) {\n    return request('/user/wxappService/bindMobile', true, 'post', data);\n  },\n  wxappServiceBindMobileV2: function wxappServiceBindMobileV2(data) {\n    return request('/user/wxappService/bindMobile/v2', true, 'post', data);\n  },\n  wxappServiceBindOpenid: function wxappServiceBindOpenid(data) {\n    return request('/user/wxappService/bindOpenid', true, 'post', data);\n  },\n  wxappServiceEncryptedData: function wxappServiceEncryptedData(data) {\n    return request('/user/wxappService/decode/encryptedData', true, 'post', data);\n  },\n  trtcUserSig: function trtcUserSig(token) {\n    return request('/trtc/userSig', true, 'get', { token: token });\n  },\n  setPayPassword: function setPayPassword(token, pwd) {\n    return request('/user/paypwd/set', true, 'post', { token: token, pwd: pwd });\n  },\n  modifyPayPassword: function modifyPayPassword(token, pwdOld, pwdNew) {\n    return request('/user/paypwd/modify', true, 'post', { token: token, pwdOld: pwdOld, pwdNew: pwdNew });\n  },\n  resetPayPassword: function resetPayPassword(mobile, code, pwd) {\n    return request('/user/paypwd/reset', true, 'post', { mobile: mobile, code: code, pwd: pwd });\n  },\n  adPosition: function adPosition(key) {\n    return request('/site/adPosition/info', true, 'get', { key: key });\n  },\n  adPositionBatch: function adPositionBatch(keys) {\n    return request('/site/adPosition/batch', true, 'get', { keys: keys });\n  },\n  momentsCategory: function momentsCategory() {\n    return request('/momentsCategory/list', true, 'get');\n  },\n  momentsList: function momentsList(data) {\n    return request('/moments/list', true, 'post', data);\n  },\n  momentsdetail: function momentsdetail(id) {\n    return request('/moments/detail', true, 'get', { id: id });\n  },\n  goodsVisitLog: function goodsVisitLog(data) {\n    return request('/goods/visitLog', true, 'post', data);\n  },\n  goodsVisitLogAdd: function goodsVisitLogAdd(data) {\n    return request('/goods/visitLog/add', true, 'post', data);\n  },\n  goodsVisitLogDelete: function goodsVisitLogDelete(data) {\n    return request('/goods/visitLog/delete', true, 'post', data);\n  },\n  goodsVisitLogClear: function goodsVisitLogClear(token) {\n    return request('/goods/visitLog/clear', true, 'post', { token: token });\n  },\n  goodsVisitLogV2: function goodsVisitLogV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/goods/visitLog', false, 'post', data);\n  },\n  goodsVisitLogAddV2: function goodsVisitLogAddV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/goods/visitLog/add', false, 'post', data);\n  },\n  goodsVisitLogDeleteV2: function goodsVisitLogDeleteV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/goods/visitLog/delete', false, 'post', data);\n  },\n  goodsVisitLogClearV2: function goodsVisitLogClearV2(token) {\n    return request(COMMON_BASE_URL + subDomain + '/goods/visitLog/clear', false, 'post', { token: token });\n  },\n  channelDataPush: function channelDataPush(key, content) {\n    return request('/channelData/push', true, 'post', { key: key, content: content });\n  },\n  channelDataPull: function channelDataPull(key) {\n    return request('/channelData/pull', true, 'get', { key: key });\n  },\n  bindPartner: function bindPartner(token, partnerId) {\n    return request('/user/bindPartner', true, 'post', { token: token, uid: partnerId });\n  },\n  partnerSetting: function partnerSetting() {\n    return request('/partner/setting', true, 'get');\n  },\n  partnerBindTeamLeader: function partnerBindTeamLeader(token, uid) {\n    return request('/partner/bindTeamLeader', true, 'post', { token: token, uid: uid });\n  },\n  partnerBuyTeamLeader: function partnerBuyTeamLeader(token) {\n    return request('/partner/buy', true, 'post', { token: token });\n  },\n  partnerMembersStatistics: function partnerMembersStatistics(token) {\n    return request(COMMON_BASE_URL + subDomain + '/partner/members/statistics', false, 'get', { token: token });\n  },\n  partnerMembers: function partnerMembers(data) {\n    return request(COMMON_BASE_URL + subDomain + '/partner/members', false, 'post', data);\n  },\n  myLiveRooms: function myLiveRooms(data) {\n    return request('/liveRooms/my', true, 'post', data);\n  },\n  liveRooms: function liveRooms(data) {\n    return request('/liveRooms/list', true, 'post', data);\n  },\n  myLiveRoomsInfo: function myLiveRoomsInfo(token, id) {\n    return request('/liveRooms/my/info', true, 'get', { token: token, id: id });\n  },\n  liveRoomsInfo: function liveRoomsInfo(token, id) {\n    return request('/liveRooms/info', true, 'get', { token: token, id: id });\n  },\n  liveRoomGoodsMainly: function liveRoomGoodsMainly(data) {\n    return request('/liveRooms/goods/mainly', true, 'post', data);\n  },\n  stopLiveRoom: function stopLiveRoom(token, id) {\n    return request('/liveRooms/my/stop', true, 'post', { token: token, id: id });\n  },\n  likeLiveRoom: function likeLiveRoom(token, id) {\n    return request('/liveRooms/like', true, 'post', { token: token, id: id });\n  },\n  liveRoomOnlineUsers: function liveRoomOnlineUsers(token, roomId) {\n    return request('/websocket/rest/liveRoom/onlines', false, 'get', { token: token, roomId: roomId });\n  },\n  liveRoomKickOutUser: function liveRoomKickOutUser(token, roomId, uid) {\n    return request('/websocket/rest/liveRoom/kickOut', false, 'post', { token: token, roomId: roomId, uid: uid });\n  },\n  mockApi: function mockApi(groupName, apiName, method) {\n    return request('/mock/' + groupName + '/' + apiName, true, method);\n  },\n  tourJourneyList: function tourJourneyList(type, refId) {\n    return request('/tourJourney/list', true, 'get', { type: type, refId: refId });\n  },\n  userBankSelectBanks: function userBankSelectBanks() {\n    return request('/userBank/banks', true, 'get');\n  },\n  userBankInfo: function userBankInfo(token) {\n    return request('/userBank/info', true, 'get', { token: token });\n  },\n  userBankBind: function userBankBind(data) {\n    return request('/userBank/bind', true, 'post', data);\n  },\n  userBankUnBind: function userBankUnBind(token) {\n    return request('/userBank/unbind', true, 'post', { token: token });\n  },\n  // 京东VOP相关接口\n  jdvopGoodsList: function jdvopGoodsList(data) {\n    return request('/jdvop/' + merchantId + '/goods/list', false, 'post', data);\n  },\n  jdvopGoodsListV2: function jdvopGoodsListV2(data) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/goods/list', false, 'post', data);\n  },\n  jdvopGoodsListV3: function jdvopGoodsListV3(data) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/goods/v2/list', false, 'post', data);\n  },\n  jdvopGoodsCheckCanBuy: function jdvopGoodsCheckCanBuy(data) {\n    return request('/jdvop/' + merchantId + '/goods/checkCanBuy', false, 'post', data);\n  },\n  jdvopGoodsCheckCanBuyV2: function jdvopGoodsCheckCanBuyV2(data) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/goods/checkCanBuy', false, 'post', data);\n  },\n  jdvopGoodsCheckCanBuyV3: function jdvopGoodsCheckCanBuyV3(data) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/goods/v2/getSkusAllSaleState', false, 'post', data);\n  },\n  jdvopGoodsDetail: function jdvopGoodsDetail(goodsId) {\n    return request('/jdvop/' + merchantId + '/goods/detail', false, 'get', {\n      skuId: goodsId,\n      queryExts: 'wxintroduction'\n    });\n  },\n  jdvopGoodsDetailV2: function jdvopGoodsDetailV2(goodsId) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/goods/detail', false, 'get', {\n      skuId: goodsId,\n      queryExts: 'wxintroduction'\n    });\n  },\n  jdvopGoodsDetailV3: function jdvopGoodsDetailV3(data) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/goods/v2/detail', false, 'get', data);\n  },\n  jdvopGoodsSkuImages: function jdvopGoodsSkuImages(goodsId) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/goods/skuImages', false, 'get', {\n      skuId: goodsId\n    });\n  },\n  jdvopGoodsSkuImagesV2: function jdvopGoodsSkuImagesV2(goodsId) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/goods/v2/skuImages', false, 'get', {\n      skuId: goodsId\n    });\n  },\n  jdVopSkuGoodsSaleRule: function jdVopSkuGoodsSaleRule(skuId) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/goods/v2/checkSkuSaleList', false, 'get', { skuId: skuId });\n  },\n  jdvopCartInfo: function jdvopCartInfo(token) {\n    return request('/jdvop/' + merchantId + '/shopping-cart/info', false, 'get', {\n      token: token\n    });\n  },\n  jdvopCartAdd: function jdvopCartAdd(data) {\n    return request('/jdvop/' + merchantId + '/shopping-cart/add', false, 'post', data);\n  },\n  jdvopCartModifyNumber: function jdvopCartModifyNumber(token, key, number) {\n    return request('/jdvop/' + merchantId + '/shopping-cart/modifyNumber', false, 'post', {\n      token: token, key: key, number: number\n    });\n  },\n  jdvopCartSelect: function jdvopCartSelect(token, key, selected) {\n    return request('/jdvop/' + merchantId + '/shopping-cart/select', false, 'post', {\n      token: token, key: key, selected: selected\n    });\n  },\n  jdvopCartRemove: function jdvopCartRemove(token, key) {\n    return request('/jdvop/' + merchantId + '/shopping-cart/remove', false, 'post', {\n      token: token, key: key\n    });\n  },\n  jdvopCartEmpty: function jdvopCartEmpty(token) {\n    return request('/jdvop/' + merchantId + '/shopping-cart/empty', false, 'post', {\n      token: token\n    });\n  },\n  jdvopCartInfoV2: function jdvopCartInfoV2(token) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/shopping-cart/info', false, 'get', {\n      token: token\n    });\n  },\n  jdvopCartAddV2: function jdvopCartAddV2(data) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/shopping-cart/add', false, 'post', data);\n  },\n  jdvopCartModifyNumberV2: function jdvopCartModifyNumberV2(token, key, number) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/shopping-cart/modifyNumber', false, 'post', {\n      token: token, key: key, number: number\n    });\n  },\n  jdvopCartSelectV2: function jdvopCartSelectV2(token, key, selected) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/shopping-cart/select', false, 'post', {\n      token: token, key: key, selected: selected\n    });\n  },\n  jdvopCartRemoveV2: function jdvopCartRemoveV2(token, key) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/shopping-cart/remove', false, 'post', {\n      token: token, key: key\n    });\n  },\n  jdvopCartEmptyV2: function jdvopCartEmptyV2(token) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/shopping-cart/empty', false, 'post', {\n      token: token\n    });\n  },\n  jdvopCategory: function jdvopCategory(pid) {\n    return request('https://jdvop.apifm.com/jdvop/' + merchantId + '/category/list', false, 'get', {\n      pid: pid\n    });\n  },\n  jdvopCategory46: function jdvopCategory46(pid) {\n    return request('https://jdvop.apifm.com/jdvop/46/category/list', false, 'get', {\n      pid: pid\n    });\n  },\n  // 商家从区管进货\n  jdvopJinhuoGoods: function jdvopJinhuoGoods(data) {\n    return request('/vop/goods/list', true, 'post', data);\n  },\n  jdvopJinhuoGoodsDetail: function jdvopJinhuoGoodsDetail(token, skuId) {\n    return request('/vop/goods/detail', true, 'get', { token: token, skuId: skuId });\n  },\n  // cps\n  cpsJdGoodsCategory: function cpsJdGoodsCategory(parentId, grade) {\n    return request('/cpsJdGoods/category', true, 'get', { parentId: parentId, grade: grade });\n  },\n  cpsJdGoodsSearch: function cpsJdGoodsSearch(data) {\n    return request('/cpsJdGoods/search', true, 'post', data);\n  },\n  cpsJdGoodsDetail: function cpsJdGoodsDetail(data) {\n    return request('/cpsJdGoods/detail', true, 'get', data);\n  },\n  cpsJdGoodsSetExt: function cpsJdGoodsSetExt(data) {\n    return request('/cpsJdGoods/ext/set', true, 'post', data);\n  },\n  cpsJdGoodsQueryExt: function cpsJdGoodsQueryExt(skuId) {\n    return request('/cpsJdGoods/ext/query', true, 'get', { skuId: skuId });\n  },\n  cpsJdGoodsShotUrl: function cpsJdGoodsShotUrl(token, skuId) {\n    return request('/cpsJdGoods/shotUrl', true, 'get', { token: token, skuId: skuId });\n  },\n  cpsJdGoodsShotUrlSite: function cpsJdGoodsShotUrlSite(token, materialUrl, couponUrl) {\n    return request('/cpsJdGoods/shotUrl/site', true, 'post', { token: token, materialUrl: materialUrl, couponUrl: couponUrl });\n  },\n  cpsJdOrders: function cpsJdOrders(data) {\n    return request('/cpsJdOrder/list', true, 'post', data);\n  },\n  cpsJdOrderDetail: function cpsJdOrderDetail(token, id) {\n    return request('/cpsJdOrder/detail', true, 'get', { token: token, id: id });\n  },\n  cpsPddBeian: function cpsPddBeian(token) {\n    return request('/cpsPddGoods/beian', true, 'get', { token: token });\n  },\n  cpsPddGoodsDetail: function cpsPddGoodsDetail(data) {\n    return request('/cpsPddGoods/detail', true, 'get', data);\n  },\n  cpsPddGoodsShotUrl: function cpsPddGoodsShotUrl(token, goodsSign) {\n    return request('/cpsPddGoods/shotUrl', true, 'get', { token: token, goodsSign: goodsSign });\n  },\n  cpsPddOrders: function cpsPddOrders(data) {\n    return request('/cpsPddOrder/list', true, 'post', data);\n  },\n  cpsPddOrderDetail: function cpsPddOrderDetail(token, id) {\n    return request('/cpsPddOrder/detail', true, 'get', { token: token, id: id });\n  },\n  cpsTaobaoGoodsDetail: function cpsTaobaoGoodsDetail(data) {\n    return request('/cpsTaobaoGoods/detail', true, 'get', data);\n  },\n  cpsTaobaoGoodsShotUrl: function cpsTaobaoGoodsShotUrl(token, content) {\n    return request('/cpsTaobaoGoods/shotUrl', true, 'post', { token: token, content: content });\n  },\n  cpsTaobaoGoodsKouling: function cpsTaobaoGoodsKouling(token, content) {\n    return request('/cpsTaobaoGoods/kouling', true, 'post', { token: token, content: content });\n  },\n  // 回收\n  recycleOrders: function recycleOrders(data) {\n    return request('/recycleOrder/list', true, 'post', data);\n  },\n  recycleOrderApply: function recycleOrderApply(data) {\n    return request('/recycleOrder/apply', true, 'post', data);\n  },\n  recycleOrderDetail: function recycleOrderDetail(token, id) {\n    return request('/recycleOrder/detail', true, 'get', { token: token, id: id });\n  },\n  recycleOrderFahuo: function recycleOrderFahuo(data) {\n    return request('/recycleOrder/fahuo', true, 'post', data);\n  },\n  recycleOrderClose: function recycleOrderClose(token, id) {\n    return request('/recycleOrder/close', true, 'post', { token: token, id: id });\n  },\n  recycleOrderDelete: function recycleOrderDelete(token, id) {\n    return request('/recycleOrder/del', true, 'post', { token: token, id: id });\n  },\n  // 会员卡\n  cardList: function cardList(data) {\n    return request('/card/list', true, 'get', data);\n  },\n  cardInfo: function cardInfo(id) {\n    return request('/card/info', true, 'get', { id: id });\n  },\n  cardBuy: function cardBuy(token, id) {\n    return request('/card/buy', true, 'post', { token: token, id: id });\n  },\n  cardMyList: function cardMyList(token) {\n    return request('/card/my', true, 'get', { token: token });\n  },\n  cardMyLogs: function cardMyLogs(data) {\n    return request('/card/logs', true, 'post', data);\n  },\n  cardExchangeFromPwd: function cardExchangeFromPwd(data) {\n    return request('/card/exchange', true, 'post', data);\n  },\n  cardShareOpen: function cardShareOpen(data) {\n    return request('/card/share/open', true, 'post', data);\n  },\n  cardShareClose: function cardShareClose(data) {\n    return request('/card/share/close', true, 'post', data);\n  },\n  cardShareFetch: function cardShareFetch(data) {\n    return request('/card/share/fetch', true, 'post', data);\n  },\n  // 收藏卡片\n  collectCardHis: function collectCardHis(data) {\n    return request('/collectCard/del', true, 'post', data);\n  },\n  collectCardInfo: function collectCardInfo(number) {\n    return request('/collectCard/cardInfo', true, 'get', { number: number });\n  },\n  collectCardHisInfo: function collectCardHisInfo(token, id) {\n    return request('/collectCard/hisInfo', true, 'get', { token: token, id: id });\n  },\n  collectCardBind: function collectCardBind(data) {\n    return request('/collectCard/bind', true, 'post', data);\n  },\n  collectCardUnBind: function collectCardUnBind(token, id, smsCode) {\n    return request('/collectCard/bind', true, 'post', { token: token, id: id, smsCode: smsCode });\n  },\n  // 其他\n  bengenSaleTongjiList: function bengenSaleTongjiList(data) {\n    return request('/bengenSaleTongji/list', true, 'post', data);\n  },\n  bengenSaleTongjiRank: function bengenSaleTongjiRank(data) {\n    return request('/bengenSaleTongji/rank', true, 'get', data);\n  },\n  // 购买课程\n  courseInfoList: function courseInfoList(data) {\n    return request('/courseInfo/list', true, 'post', data);\n  },\n  courseInfo: function courseInfo(id) {\n    return request('/courseInfo/info', true, 'get', { id: id });\n  },\n  courseBuyLogPublic: function courseBuyLogPublic(data) {\n    return request('/courseBuyLog/public', true, 'post', data);\n  },\n  courseBuyLogMy: function courseBuyLogMy(data) {\n    return request('/courseBuyLog/my', true, 'post', data);\n  },\n  courseInfoBuy: function courseInfoBuy(data) {\n    return request('/courseBuyLog/buy', true, 'post', data);\n  },\n  courseInfoBuyLogPay: function courseInfoBuyLogPay(token, orderId) {\n    return request('/courseBuyLog/pay', true, 'post', { token: token, orderId: orderId });\n  },\n  courseInfoBuyLogDetail: function courseInfoBuyLogDetail(token, id) {\n    var hxNumber = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request('/courseBuyLog/detail', true, 'get', { token: token, id: id, hxNumber: hxNumber });\n  },\n  courseInfoBuyLogClose: function courseInfoBuyLogClose(token, orderId) {\n    return request('/courseBuyLog/close', true, 'post', { token: token, orderId: orderId });\n  },\n  courseInfoBuyLogDelete: function courseInfoBuyLogDelete(token, orderId) {\n    return request('/courseBuyLog/del', true, 'post', { token: token, orderId: orderId });\n  },\n  courseInfoListV2: function courseInfoListV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/courseInfo/list', false, 'post', data);\n  },\n  courseInfoV2: function courseInfoV2(id) {\n    return request(COMMON_BASE_URL + subDomain + '/courseInfo/info', false, 'get', { id: id });\n  },\n  courseBuyLogPublicV2: function courseBuyLogPublicV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/courseBuyLog/public', false, 'post', data);\n  },\n  courseBuyLogMyV2: function courseBuyLogMyV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/courseBuyLog/my', false, 'post', data);\n  },\n  courseInfoBuyV2: function courseInfoBuyV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/courseBuyLog/buy', false, 'post', data);\n  },\n  courseInfoBuyLogPayV2: function courseInfoBuyLogPayV2(token, orderId) {\n    return request(COMMON_BASE_URL + subDomain + '/courseBuyLog/pay', false, 'post', { token: token, orderId: orderId });\n  },\n  courseInfoBuyLogDetailV2: function courseInfoBuyLogDetailV2(token, id) {\n    var hxNumber = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n    return request(COMMON_BASE_URL + subDomain + '/courseBuyLog/detail', false, 'get', { token: token, id: id, hxNumber: hxNumber });\n  },\n  courseInfoBuyLogCloseV2: function courseInfoBuyLogCloseV2(token, orderId) {\n    return request(COMMON_BASE_URL + subDomain + '/courseBuyLog/close', false, 'post', { token: token, orderId: orderId });\n  },\n  courseInfoBuyLogDeleteV2: function courseInfoBuyLogDeleteV2(token, orderId) {\n    return request(COMMON_BASE_URL + subDomain + '/courseBuyLog/del', false, 'post', { token: token, orderId: orderId });\n  },\n  // 橱窗\n  chuchuanSettingInfo: function chuchuanSettingInfo(uid) {\n    return request('/chuchuan/info', true, 'get', { uid: uid });\n  },\n  chuchuanSettingModify: function chuchuanSettingModify(data) {\n    return request('/chuchuan/modify', true, 'post', data);\n  },\n  chuchuanGoodsList: function chuchuanGoodsList(data) {\n    return request('/chuchuanGoods/list', true, 'post', data);\n  },\n  chuchuanGoodsAdd: function chuchuanGoodsAdd(data) {\n    return request('/chuchuanGoods/add', true, 'post', data);\n  },\n  chuchuanGoodsRemove: function chuchuanGoodsRemove(token, goodsId) {\n    return request('/chuchuanGoods/remove', true, 'post', { token: token, goodsId: goodsId });\n  },\n  chuchuanGoodsCheck: function chuchuanGoodsCheck(token, goodsId) {\n    return request('/chuchuanGoods/check', true, 'get', { token: token, goodsId: goodsId });\n  },\n  // 寄存\n  jicunGoodsList: function jicunGoodsList(data) {\n    return request('/jicunGoods/list', true, 'post', data);\n  },\n  jicunGoodsDetail: function jicunGoodsDetail(data) {\n    return request('/jicunGoods/detail', true, 'get', data);\n  },\n  // stripe\n  stripeAddCard: function stripeAddCard(data) {\n    return request('/pay/stripe/addCard', true, 'post', data);\n  },\n  stripeCardList: function stripeCardList(token) {\n    return request('/pay/stripe/cardList', true, 'get', { token: token });\n  },\n  stripeDelCard: function stripeDelCard(token, cardId) {\n    return request('/pay/stripe/deleteCard', true, 'post', { token: token, cardId: cardId });\n  },\n  stripeCharge: function stripeCharge(data) {\n    return request('/pay/stripe/charge', true, 'post', data);\n  },\n  // ocr\n  ocrBusinessLicense: function ocrBusinessLicense(imageUrl) {\n    return request(COMMON_BASE_URL + subDomain + '/ocr/businessLicense', false, 'post', { imageUrl: imageUrl });\n  },\n  ocrIdcard: function ocrIdcard(imageUrl) {\n    return request(COMMON_BASE_URL + subDomain + '/ocr/idcard', false, 'post', { imageUrl: imageUrl });\n  },\n  ocrBankcard: function ocrBankcard(imageUrl) {\n    return request(COMMON_BASE_URL + subDomain + '/ocr/bankcard', false, 'post', { imageUrl: imageUrl });\n  },\n  ocrDriverLicense: function ocrDriverLicense(imageUrl) {\n    return request(COMMON_BASE_URL + subDomain + '/ocr/driverLicense', false, 'post', { imageUrl: imageUrl });\n  },\n  // 朋友圈\n  momentsPublish: function momentsPublish(data) {\n    return request('/user/moments/publish', true, 'post', data);\n  },\n  userMomentsList: function userMomentsList(data) {\n    return request('/user/moments/list', true, 'get', data);\n  },\n  momentsDetail: function momentsDetail(token, momentsId) {\n    return request('/user/moments/detail', true, 'get', { token: token, momentsId: momentsId });\n  },\n  momentsDelete: function momentsDelete(token, momentsId) {\n    return request('/user/moments/del', true, 'post', { token: token, momentsId: momentsId });\n  },\n  momentsDeleteComment: function momentsDeleteComment(token, commentId) {\n    return request('/user/moments/delCommon', true, 'post', { token: token, commentId: commentId });\n  },\n  momentsLike: function momentsLike(token, momentsId) {\n    return request('/user/moments/like', true, 'post', { token: token, momentsId: momentsId });\n  },\n  momentsComment: function momentsComment(token, momentsId) {\n    var uid = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n    var content = arguments[3];\n\n    return request('/user/moments/comment', true, 'post', { token: token, momentsId: momentsId, uid: uid, content: content });\n  },\n  momentsCommentLogs: function momentsCommentLogs(data) {\n    return request('/user/moments/logs', true, 'get', data);\n  },\n  momentsLogsRead: function momentsLogsRead(token, logsIds) {\n    return request('/user/moments/logRead', true, 'post', { token: token, logsIds: logsIds });\n  },\n  bottleMsgPublish: function bottleMsgPublish(data) {\n    return request('/bottleMsg/publish', true, 'post', data);\n  },\n  bottleMsgSalvage: function bottleMsgSalvage(token) {\n    return request('/bottleMsg/salvage', true, 'get', { token: token });\n  },\n  userInvoiceInfo: function userInvoiceInfo(token) {\n    return request('/userInvoice/info', true, 'get', { token: token });\n  },\n  userInvoiceUnbind: function userInvoiceUnbind(token) {\n    return request('/userInvoice/unbind', true, 'post', { token: token });\n  },\n  userInvoiceBind: function userInvoiceBind(data) {\n    return request('/userInvoice/bind', true, 'post', data);\n  },\n  goodsLendsList: function goodsLendsList(data) {\n    return request('/goodsLends/list', true, 'post', data);\n  },\n  goodsLendsLogs: function goodsLendsLogs(data) {\n    return request('/goodsLends/logs', true, 'post', data);\n  },\n  // 支付宝小程序\n  aliappUserRegister: function aliappUserRegister(data) {\n    return request('/user/aliapp/register', true, 'post', data);\n  },\n  aliappUserLogin: function aliappUserLogin(data) {\n    return request('/user/aliapp/login', true, 'post', data);\n  },\n  aliappUserAuthorize: function aliappUserAuthorize(data) {\n    return request('/user/aliapp/authorize', true, 'post', data);\n  },\n  aliappWebUserAuthorize: function aliappWebUserAuthorize(data) {\n    return request('/user/aliappweb/authorize', true, 'post', data);\n  },\n  aliappQrcode: function aliappQrcode(content) {\n    return request('/user/aliapp/qrcode', true, 'post', { content: content });\n  },\n  aliappMiniappBindMobile: function aliappMiniappBindMobile(data) {\n    return request('/user/aliapp/bindMobile', true, 'post', data);\n  },\n  aliappBindMobile: function aliappBindMobile(data) {\n    return request('/user/aliapp/bindMobile', true, 'post', data);\n  },\n  aliappGetMobile: function aliappGetMobile(encryptedData) {\n    return request('/user/aliapp/getMobile', true, 'post', { encryptedData: encryptedData });\n  },\n  tempDataSet: function tempDataSet(key, content) {\n    return request('/tempData/set', true, 'post', { key: key, content: content });\n  },\n  tempDataGet: function tempDataGet(key) {\n    return request('/tempData/get', true, 'get', { key: key });\n  },\n  tempDataSetV2: function tempDataSetV2(key, content) {\n    return request(COMMON_BASE_URL + merchantId + '/tempData/set', true, 'post', { key: key, content: content });\n  },\n  tempDataGetV2: function tempDataGetV2(key) {\n    return request(COMMON_BASE_URL + merchantId + '/tempData/get', true, 'get', { key: key });\n  },\n  commonDatetime: function commonDatetime() {\n    return request('/common/datetime', true, 'get');\n  },\n  commonDays: function commonDays() {\n    var startDay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n    var days = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request('/common/days', false, 'get', { startDay: startDay, days: days });\n  },\n  commonDiffMillis: function commonDiffMillis() {\n    var d1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n    var d2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request('/common/diffMillis', false, 'get', { d1: d1, d2: d2 });\n  },\n  // 企业应用 组织/成员/网盘\n  organizePrices: function organizePrices() {\n    return request(CMS_BASE_URL + subDomain + '/organizeInfo/prices', true, 'get');\n  },\n  organizeCreate: function organizeCreate(data) {\n    return request(COMMON_BASE_URL + subDomain + '/organizeInfo/create', true, 'post', data);\n  },\n  organizeUpgrade: function organizeUpgrade(data) {\n    return request(COMMON_BASE_URL + subDomain + '/organizeInfo/upgrade', true, 'post', data);\n  },\n  organizeCreateV2: function organizeCreateV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/organizeInfo/createV2', true, 'post', data);\n  },\n  organizeUpgradeV2: function organizeUpgradeV2(data) {\n    return request(COMMON_BASE_URL + subDomain + '/organizeInfo/upgradeV2', true, 'post', data);\n  },\n  organizeModify: function organizeModify(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeInfo/modify', true, 'post', data);\n  },\n  organizeJoinKey: function organizeJoinKey(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeInfo/joinKey', true, 'get', data);\n  },\n  organizeJoin: function organizeJoin(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeInfo/join', true, 'post', data);\n  },\n  organizeGrantAdmin: function organizeGrantAdmin(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeInfo/grantAdmin', true, 'post', data);\n  },\n  organizeKick: function organizeKick(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeInfo/kick', true, 'post', data);\n  },\n  organizeKickAllMembers: function organizeKickAllMembers(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeInfo/kickAllMembers', true, 'post', data);\n  },\n  organizeKickSelf: function organizeKickSelf(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeInfo/kickSelf', true, 'post', data);\n  },\n  organizeNick: function organizeNick(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeInfo/nick', true, 'post', data);\n  },\n  organizeDelete: function organizeDelete(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeInfo/deleteOrganize', true, 'post', data);\n  },\n  organizeMyOrganizeInfo: function organizeMyOrganizeInfo(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeInfo/myOrganizeInfo', true, 'post', data);\n  },\n  organizeDetail: function organizeDetail(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeInfo/organizeDetail', true, 'get', data);\n  },\n  organizeMembers: function organizeMembers(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeInfo/members', true, 'post', data);\n  },\n  organizeNoticeList: function organizeNoticeList(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeNotice/list', true, 'post', data);\n  },\n  organizeNoticeDetail: function organizeNoticeDetail(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeNotice/detail', true, 'get', data);\n  },\n  organizeNoticeSave: function organizeNoticeSave(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeNotice/save', true, 'post', data);\n  },\n  organizeNoticeDelete: function organizeNoticeDelete(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizeNotice/del', true, 'post', data);\n  },\n  organizePanUploadGetSignature: function organizePanUploadGetSignature(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizePan/uploadGetSignature', true, 'post', data);\n  },\n  organizePanUploadV2: function organizePanUploadV2(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizePan/upload', true, 'post', data);\n  },\n  organizePanDownloadV2: function organizePanDownloadV2(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizePan/download', true, 'get', data);\n  },\n  organizePanFiles: function organizePanFiles(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizePan/files', true, 'post', data);\n  },\n  organizePanModify: function organizePanModify(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizePan/modify', true, 'post', data);\n  },\n  organizePanDelete: function organizePanDelete(data) {\n    return request(CMS_BASE_URL + subDomain + '/organizePan/del', true, 'post', data);\n  },\n  newsExtFieldList: function newsExtFieldList(token, organizeId, newsId) {\n    return request('/newsExtField/extFields', true, 'get', { token: token, organizeId: organizeId, newsId: newsId });\n  },\n  newsExtFieldDynamic: function newsExtFieldDynamic(token, newsId) {\n    return request('/newsExtField/dynamic', true, 'get', { token: token, newsId: newsId });\n  },\n  newsExtFieldSet: function newsExtFieldSet(data) {\n    return request('/newsExtField/setField', true, 'post', data);\n  },\n  newsExtFieldInit: function newsExtFieldInit(data) {\n    return request(CMS_BASE_URL + subDomain + '/newsExtField/initFields', true, 'post', data);\n  },\n  newsExtFieldListV2: function newsExtFieldListV2(data) {\n    return request(CMS_BASE_URL + subDomain + '/newsExtField/extFields', true, 'get', data);\n  },\n  newsExtFieldDynamicV2: function newsExtFieldDynamicV2(data) {\n    return request(CMS_BASE_URL + subDomain + '/newsExtField/dynamic', true, 'get', data);\n  },\n  newsExtFieldSetV2: function newsExtFieldSetV2(data) {\n    return request(CMS_BASE_URL + subDomain + '/newsExtField/setField', true, 'post', data);\n  },\n  userAttendantList: function userAttendantList(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/list', false, 'post', data);\n  },\n  userAttendantDetail: function userAttendantDetail(id) {\n    var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/detail', false, 'get', { id: id, token: token });\n  },\n  userAttendantGoods: function userAttendantGoods(id) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/goods', false, 'get', { id: id });\n  },\n  userAttendantGoodsSet: function userAttendantGoodsSet(token, ids) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/goodsSet', false, 'post', { token: token, ids: ids });\n  },\n  userAttendantBindShop: function userAttendantBindShop(token, shopId) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/bindShop', false, 'post', { shopId: shopId, token: token });\n  },\n  userAttendantUnBindShop: function userAttendantUnBindShop(token) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/unbindShop', false, 'post', { token: token });\n  },\n  userAttendantChangeStatus: function userAttendantChangeStatus(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/changeStatus', false, 'post', data);\n  },\n  userAttendantDaysTimesAttendant: function userAttendantDaysTimesAttendant(goodsId, day) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/daysTimesAttendant', false, 'get', { goodsId: goodsId, day: day });\n  },\n  userAttendantDaysTimesAttendantSetQuery: function userAttendantDaysTimesAttendantSetQuery(token, day) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/daysTimesAttendant/set/query', false, 'get', { token: token, day: day });\n  },\n  userAttendantDaysTimesAttendantSet: function userAttendantDaysTimesAttendantSet(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/daysTimesAttendant/set', false, 'post', data);\n  },\n  userAttendantListReputation: function userAttendantListReputation(data) {\n    return request('/user/attendant/listReputation', true, 'post', data);\n  },\n  userAttendantShowPics: function userAttendantShowPics(id) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/showPics', false, 'get', { id: id });\n  },\n  userAttendantShowPicsAdd: function userAttendantShowPicsAdd(token, url) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/showPicsAdd', false, 'post', { token: token, url: url });\n  },\n  userAttendantShowPicsDel: function userAttendantShowPicsDel(token, id) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/showPicsDel', false, 'post', { token: token, id: id });\n  },\n  userAttendantUpdate: function userAttendantUpdate(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/update', false, 'post', data);\n  },\n  userAttendantUpdatePosition: function userAttendantUpdatePosition(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/updatePosition', false, 'post', data);\n  },\n  userAttendantUpdateUseful: function userAttendantUpdateUseful(data) {\n    return request(COMMON_BASE_URL + subDomain + '/user/attendant/useful', false, 'post', data);\n  },\n  userAttendantOrderServing: function userAttendantOrderServing(token, orderId) {\n    return request('/order/serving', true, 'post', { token: token, orderId: orderId });\n  },\n  userAttendantOrderRejectOrder: function userAttendantOrderRejectOrder(token, orderId) {\n    return request('/order/rejectOrder', true, 'post', { token: token, orderId: orderId });\n  },\n  userAttendantOrderSuccess: function userAttendantOrderSuccess(token, orderId) {\n    return request('/order/success', true, 'post', { token: token, orderId: orderId });\n  },\n  shopCategory: function shopCategory() {\n    return request('/shopCategory/all', true, 'get');\n  },\n  shopCategoryDetail: function shopCategoryDetail(id) {\n    return request('/shopCategory/info', true, 'get', { id: id });\n  },\n  yudingStatistics: function yudingStatistics(day) {\n    return request('/shop/goods/yudingStatistics', true, 'get', { day: day });\n  },\n  contactList: function contactList() {\n    return request('/contact/list', true, 'get');\n  },\n  distributedLock: function distributedLock(key, seconds) {\n    return request('/distributedLock/lock', true, 'get', { key: key, seconds: seconds });\n  },\n  distributedLockRelease: function distributedLockRelease(key) {\n    return request('/distributedLock/lock', true, 'get', { key: key });\n  },\n  communitySetting: function communitySetting() {\n    return request('/community/setting', true, 'get');\n  },\n  communityLeaderApply: function communityLeaderApply(data) {\n    return request('/communityLeader/apply', true, 'post', data);\n  },\n  communityLeaderApplyInfo: function communityLeaderApplyInfo(token) {\n    return request('/communityLeader/apply/info', true, 'get', { token: token });\n  },\n  communityLeaderBuy: function communityLeaderBuy(token) {\n    return request('/communityLeader/buy', true, 'post', { token: token });\n  },\n  communityOrderFahuo: function communityOrderFahuo(data) {\n    return request('/communityOrder/fahuo', true, 'post', data);\n  },\n  wxmpOpenid: function wxmpOpenid(code) {\n    return request('/user/wxmp/openid', true, 'get', { code: code });\n  },\n  listingSet: function listingSet() {\n    return request('/listingSet/info', true, 'get');\n  },\n  listingMyListing: function listingMyListing(token) {\n    return request('/listingInfo/myListing', true, 'get', { token: token });\n  },\n  listingSave: function listingSave(data) {\n    return request('/listingInfo/save', true, 'post', data);\n  },\n  listingDetail: function listingDetail(id) {\n    return request('/listingInfo/detail', true, 'get', { id: id });\n  },\n  listingCancel: function listingCancel(token, id) {\n    return request('/listingInfo/cancel', true, 'post', { token: token, id: id });\n  },\n  listingSuccess: function listingSuccess(token, id) {\n    return request('/listingInfo/success', true, 'post', { token: token, id: id });\n  },\n  listingDelete: function listingDelete(token, id) {\n    return request('/listingInfo/delete', true, 'post', { token: token, id: id });\n  },\n  listingAddGoods: function listingAddGoods(data) {\n    return request('/listingInfo/addGoods', true, 'post', data);\n  },\n  listingRemoveGoods: function listingRemoveGoods(data) {\n    return request('/listingInfo/removeGoods', true, 'post', data);\n  },\n  listingJoinList: function listingJoinList(data) {\n    return request('/listingInfo/joinList', true, 'post', data);\n  },\n  attendantAcceptOrder: function attendantAcceptOrder(data) {\n    return request('/order/acceptOrder', true, 'post', data);\n  },\n  orderCancelOrderPeriod: function orderCancelOrderPeriod(data) {\n    return request('/order/cancelOrderPeriod', true, 'post', data);\n  },\n  orderStartOrderPeriod: function orderStartOrderPeriod(data) {\n    return request('/order/startOrderPeriod', true, 'post', data);\n  },\n  shansongCourierInfo: function shansongCourierInfo(data) {\n    return request('/order/shansongCourierInfo', true, 'get', data);\n  },\n  shansongOrderInfo: function shansongOrderInfo(data) {\n    return request('/order/shansongOrderInfo', true, 'get', data);\n  },\n  userAttendantOrderStatistics: function userAttendantOrderStatistics(data) {\n    return request('/order/statisticsJishi', true, 'get', data);\n  },\n  keloopOrderLogs: function keloopOrderLogs(data) {\n    return request('/order/keloop/orderLogs', true, 'get', data);\n  },\n  keloopCourierTag: function keloopCourierTag(data) {\n    return request('/order/keloop/courierTag', true, 'get', data);\n  },\n  workingHoursMySubmitLogs: function workingHoursMySubmitLogs(data) {\n    return request('/workingHours/mySubmitLogs', true, 'post', data);\n  },\n  workingHoursSubmit: function workingHoursSubmit(data) {\n    return request('/workingHours/submit', true, 'post', data);\n  },\n  workingHoursBossReport: function workingHoursBossReport(data) {\n    return request('/workingHours/bossReport', true, 'post', data);\n  },\n  workingHoursMyProject: function workingHoursMyProject(data) {\n    return request('/workingHours/myProject', true, 'post', data);\n  },\n  workingHoursProjectInfo: function workingHoursProjectInfo(code) {\n    return request('/workingHours/project', true, 'get', { code: code });\n  },\n  bestpayProCreateOrder: function bestpayProCreateOrder(data) {\n    return request('/pay/bestpay/proCreateOrder', true, 'post', data);\n  },\n  bestpayH5: function bestpayH5(data) {\n    return request('/pay/bestpay/h5', true, 'get', data);\n  },\n  shopIotDevices: function shopIotDevices(data) {\n    return request('/shopIot/devices', true, 'get', data);\n  },\n  shopIotCmds: function shopIotCmds(data) {\n    return request('/shopIot/cmds', true, 'get', data);\n  },\n  shopIotExecute: function shopIotExecute(data) {\n    return request('/shopIot/execute', true, 'post', data);\n  },\n  wxTemplateNumberList: function wxTemplateNumberList(token) {\n    return request('/wxTemplateNumber/list', true, 'get', { token: token });\n  },\n  wxTemplateNumberSubscribe: function wxTemplateNumberSubscribe(data) {\n    return request('/wxTemplateNumber/subscribe', true, 'post', data);\n  },\n  errandsTaskPublish: function errandsTaskPublish(data) {\n    return request('/errandsTask/publish', true, 'post', data);\n  },\n  errandsTaskPay: function errandsTaskPay(data) {\n    return request('/errandsTask/pay', true, 'post', data);\n  },\n  errandsTaskAccept: function errandsTaskAccept(data) {\n    return request('/errandsTask/accept', true, 'post', data);\n  },\n  errandsTaskFinish: function errandsTaskFinish(data) {\n    return request('/errandsTask/finish', true, 'post', data);\n  },\n  errandsTaskSuccess: function errandsTaskSuccess(data) {\n    return request('/errandsTask/success', true, 'post', data);\n  },\n  activityVoteInfoList: function activityVoteInfoList(data) {\n    return request('/activityVoteInfo/list', true, 'post', data);\n  },\n  activityVoteInfoJoinList: function activityVoteInfoJoinList(data) {\n    return request('/activityVoteInfo/joinList', true, 'post', data);\n  },\n  activityVoteInfoDetail: function activityVoteInfoDetail(id) {\n    return request('/activityVoteInfo/detail', true, 'get', { id: id });\n  },\n  activityVoteInfoJoinDetail: function activityVoteInfoJoinDetail(joinId) {\n    return request('/activityVoteInfo/joinDetail', true, 'get', { joinId: joinId });\n  },\n  activityVoteInfoScoreToVotes: function activityVoteInfoScoreToVotes(activityId) {\n    return request('/activityVoteInfo/scoreToVotes', true, 'get', { activityId: activityId });\n  },\n  activityVoteInfoFetchVoteNumber: function activityVoteInfoFetchVoteNumber(data) {\n    return request('/activityVoteInfo/fetchVoteNumber', true, 'post', data);\n  },\n  activityVoteInfoJoin: function activityVoteInfoJoin(data) {\n    return request('/activityVoteInfo/join', true, 'post', data);\n  },\n  activityVoteInfoVote: function activityVoteInfoVote(data) {\n    return request('/activityVoteInfo/vote', true, 'post', data);\n  },\n  activityVoteBlance: function activityVoteBlance(token, activityId) {\n    return request('/activityVoteInfo/balance', true, 'get', { token: token, activityId: activityId });\n  },\n  stringsToPlainText: function stringsToPlainText(content) {\n    var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n    return request('/common/strings/plainText', true, 'post', { content: content, len: len });\n  },\n  blindBoxFriendsMatch: function blindBoxFriendsMatch(data) {\n    return request('/blindBoxFriends/match', true, 'post', data);\n  },\n  blindBoxFriendsPush: function blindBoxFriendsPush(data) {\n    return request('/blindBoxFriends/push', true, 'post', data);\n  },\n  blindBoxFriendsPay: function blindBoxFriendsPay(data) {\n    return request('/blindBoxFriends/pay', true, 'post', data);\n  },\n  blindBoxFriendsChangeStatus: function blindBoxFriendsChangeStatus(data) {\n    return request('/blindBoxFriends/changeStatus', true, 'post', data);\n  },\n  blindBoxFriendsDelete: function blindBoxFriendsDelete(data) {\n    return request('/blindBoxFriends/delete', true, 'post', data);\n  },\n  blindBoxFriendsPullLogs: function blindBoxFriendsPullLogs(data) {\n    return request('/blindBoxFriends/pullLogs', true, 'post', data);\n  },\n  blindBoxFriendsPushLogs: function blindBoxFriendsPushLogs(data) {\n    return request('/blindBoxFriends/pushLogs', true, 'post', data);\n  },\n  blindBoxFriendsRechargeRule: function blindBoxFriendsRechargeRule() {\n    return request('/blindBoxFriends/rechargeRule', true, 'get');\n  },\n  blindBoxFriendsBuyPullTimes: function blindBoxFriendsBuyPullTimes(data) {\n    return request('/blindBoxFriends/buyPullTimes', true, 'post', data);\n  },\n  blindBoxFriendsUnlock: function blindBoxFriendsUnlock(data) {\n    return request('/blindBoxFriends/unlock', true, 'post', data);\n  },\n  blindBoxFriendsBalance: function blindBoxFriendsBalance(token) {\n    return request('/blindBoxFriends/balance', true, 'get', { token: token });\n  },\n  cpactivityInfoDetail: function cpactivityInfoDetail(id) {\n    return request('/cpactivityInfo/detail', true, 'get', { id: id });\n  },\n  cpactivityUpdateUserInfo: function cpactivityUpdateUserInfo(data) {\n    return request('/cpactivityInfo/updateUserInfo', true, 'post', data);\n  },\n  cpactivityJoinDetail: function cpactivityJoinDetail(data) {\n    return request('/cpactivityInfo/join', true, 'get', data);\n  },\n  cpactivityJoin: function cpactivityJoin(data) {\n    return request('/cpactivityInfo/join', true, 'post', data);\n  },\n  cpactivityJoinDynamics: function cpactivityJoinDynamics(cpactivityId) {\n    return request('/cpactivityInfo/joinDynamics', true, 'get', { cpactivityId: cpactivityId });\n  },\n  cpactivityPay: function cpactivityPay(data) {\n    return request('/cpactivityInfo/pay', true, 'post', data);\n  },\n  volcesArkCreateChatCompletion: function volcesArkCreateChatCompletion(message) {\n    return request(COMMON_BASE_URL + subDomain + '/volcesArk/createChatCompletion', false, 'post', { message: message });\n  },\n  volcesArkChatCompletionResult: function volcesArkChatCompletionResult(key) {\n    return request(COMMON_BASE_URL + subDomain + '/volcesArk/result', false, 'get', { key: key });\n  }\n};\n\n/***/ })\n/******/ ]);"
  },
  {
    "path": "miniprogram_npm/dayjs/index.js",
    "content": "module.exports = (function() {\nvar __MODS__ = {};\nvar __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexports: {} }; __MODS__[modId] = { status: 0, func: func, req: req, m: m }; };\nvar __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, \"exports\"); if (desp && desp.configurable) Object.defineProperty(m, \"exports\", { set: function (val) { if(typeof val === \"object\" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };\nvar __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };\nvar __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };\n__DEFINE__(1770445838178, function(require, module, exports) {\n!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=\"$isDayjsObject\",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,\"0\")},$=f||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case\"YY\":return String(e.$y).slice(-2);case\"YYYY\":return b.s(e.$y,4,\"0\");case\"M\":return a+1;case\"MM\":return b.s(a+1,2,\"0\");case\"MMM\":return h(n.monthsShort,a,c,3);case\"MMMM\":return h(c,a);case\"D\":return e.$D;case\"DD\":return b.s(e.$D,2,\"0\");case\"d\":return String(e.$W);case\"dd\":return h(n.weekdaysMin,e.$W,o,2);case\"ddd\":return h(n.weekdaysShort,e.$W,o,3);case\"dddd\":return o[e.$W];case\"H\":return String(s);case\"HH\":return b.s(s,2,\"0\");case\"h\":return d(1);case\"hh\":return d(2);case\"a\":return $(s,u,!0);case\"A\":return $(s,u,!1);case\"m\":return String(u);case\"mm\":return b.s(u,2,\"0\");case\"s\":return String(e.$s);case\"ss\":return b.s(e.$s,2,\"0\");case\"SSS\":return b.s(e.$ms,3,\"0\");case\"Z\":return i}return null}(t)||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",c],[\"$y\",h],[\"$D\",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));\n}, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })\nreturn __REQUIRE__(1770445838178);\n})()\n//miniprogram-npm-outsideDeps=[]\n//# sourceMappingURL=index.js.map"
  },
  {
    "path": "miniprogram_npm/mp-html/index.js",
    "content": "\"use strict\";function e(t){\"@babel/helpers - typeof\";return(e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(t)}function t(e,t,o){return(t=n(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function n(t){var n=o(t,\"string\");return\"symbol\"==e(n)?n:n+\"\"}function o(t,n){if(\"object\"!=e(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,n||\"default\");if(\"object\"!=e(i))return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===n?String:Number)(t)}/*!\n * mp-html v2.5.2\n * https://github.com/jin-yufeng/mp-html\n *\n * Released under the MIT license\n * Author: Jin Yufeng\n */\nvar i=require(\"./parser\"),r=[];Component({data:{nodes:[]},properties:{containerStyle:String,content:{type:String,value:\"\",observer:function(e){this.setContent(e)}},copyLink:{type:Boolean,value:!0},domain:String,errorImg:String,lazyLoad:Boolean,loadingImg:String,pauseVideo:{type:Boolean,value:!0},previewImg:{type:null,value:!0},scrollTable:Boolean,selectable:null,setTitle:{type:Boolean,value:!0},showImgMenu:{type:Boolean,value:!0},tagStyle:Object,useAnchor:null},created:function(){this.plugins=[];for(var e=r.length;e--;)this.plugins.push(new r[e](this))},detached:function(){this._hook(\"onDetached\")},methods:{in:function(e,t,n){e&&t&&n&&(this._in={page:e,selector:t,scrollTop:n})},navigateTo:function(e,n){var o=this;return new Promise(function(i,r){if(!o.data.useAnchor)return void r(Error(\"Anchor is disabled\"));var a=wx.createSelectorQuery().in(o._in?o._in.page:o).select((o._in?o._in.selector:\"._root\")+(e?\"\".concat(\">>>\",\"#\").concat(e):\"\")).boundingClientRect();o._in?a.select(o._in.selector).scrollOffset().select(o._in.selector).boundingClientRect():a.selectViewport().scrollOffset(),a.exec(function(e){if(!e[0])return void r(Error(\"Label not found\"));var a=e[1].scrollTop+e[0].top-(e[2]?e[2].top:0)+(n||parseInt(o.data.useAnchor)||0);o._in?o._in.page.setData(t({},o._in.scrollTop,a)):wx.pageScrollTo({scrollTop:a,duration:300}),i()})})},getText:function(e){var t=\"\";return function e(n){for(var o=0;o<n.length;o++){var i=n[o];if(\"text\"===i.type)t+=i.text.replace(/&amp;/g,\"&\");else if(\"br\"===i.name)t+=\"\\n\";else{var r=\"p\"===i.name||\"div\"===i.name||\"tr\"===i.name||\"li\"===i.name||\"h\"===i.name[0]&&i.name[1]>\"0\"&&i.name[1]<\"7\";r&&t&&\"\\n\"!==t[t.length-1]&&(t+=\"\\n\"),i.children&&e(i.children),r&&\"\\n\"!==t[t.length-1]?t+=\"\\n\":\"td\"!==i.name&&\"th\"!==i.name||(t+=\"\\t\")}}}(e||this.data.nodes),t},getRect:function(){var e=this;return new Promise(function(t,n){wx.createSelectorQuery().in(e).select(\"._root\").boundingClientRect().exec(function(e){return e[0]?t(e[0]):n(Error(\"Root label not found\"))})})},pauseMedia:function(){for(var e=(this._videos||[]).length;e--;)this._videos[e].pause()},setPlaybackRate:function(e){this.playbackRate=e;for(var t=(this._videos||[]).length;t--;)this._videos[t].playbackRate(e)},setContent:function(e,t){var n=this;this.imgList&&t||(this.imgList=[]),this._videos=[];var o={},r=new i(this).parse(e);if(t)for(var a=this.data.nodes.length,s=r.length;s--;)o[\"nodes[\".concat(a+s,\"]\")]=r[s];else o.nodes=r;if(this.setData(o,function(){n._hook(\"onLoad\"),n.triggerEvent(\"load\")}),this.data.lazyLoad||this.imgList._unloadimgs<this.imgList.length/2){var l=0,c=function(e){e&&e.height||(e={}),e.height===l?n.triggerEvent(\"ready\",e):(l=e.height,setTimeout(function(){n.getRect().then(c).catch(c)},350))};this.getRect().then(c).catch(c)}else this.imgList._unloadimgs||this.getRect().then(function(e){n.triggerEvent(\"ready\",e)}).catch(function(){n.triggerEvent(\"ready\",{})})},_hook:function(e){for(var t=r.length;t--;)this.plugins[t][e]&&this.plugins[t][e]()},_add:function(e){e.detail.root=this}}});"
  },
  {
    "path": "miniprogram_npm/mp-html/index.json",
    "content": "{\"component\":true,\"usingComponents\":{\"node\":\"./node/node\"}}"
  },
  {
    "path": "miniprogram_npm/mp-html/index.wxml",
    "content": "<view class=\"_root {{selectable?'_select':''}}\" style=\"{{containerStyle}}\"><slot wx:if=\"{{!nodes[0]}}\"/><node id=\"_root\" childs=\"{{nodes}}\" opts=\"{{[lazyLoad,loadingImg,errorImg,showImgMenu,selectable]}}\" catchadd=\"_add\"/></view>"
  },
  {
    "path": "miniprogram_npm/mp-html/index.wxss",
    "content": "._root{padding:1px 0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}._select{-webkit-user-select:text;user-select:text}"
  },
  {
    "path": "miniprogram_npm/mp-html/node/node.js",
    "content": "\"use strict\";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,o)}return r}function e(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?t(Object(i),!0).forEach(function(t){r(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function r(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t){var e=i(t,\"string\");return\"symbol\"==n(e)?e:e+\"\"}function i(t,e){if(\"object\"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||\"default\");if(\"object\"!=n(o))return o;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===e?String:Number)(t)}function n(t){\"@babel/helpers - typeof\";return(n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function a(t,e){var r=\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(!r){if(Array.isArray(t)||(r=s(t))||e&&t&&\"number\"==typeof t.length){r&&(t=r);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var n,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,n=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw n}}}}function s(t,e){if(t){if(\"string\"==typeof t)return c(t,e);var r={}.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=Array(e);r<e;r++)o[r]=t[r];return o}Component({data:{ctrl:{},nodes:[],isiOS:(wx.canIUse(\"getDeviceInfo\")?wx.getDeviceInfo():wx.getSystemInfoSync()).system.includes(\"iOS\")},properties:{childs:{type:Array,value:[],observer:function(t){function e(t,o,i){var s=t.length;if(0===s||0===o.length)return void(r[i]=o);for(;s>o.length;)0!==Object.keys(t[s-1]).length&&(r[i+\"[\"+(s-1)+\"]\"]={}),s-=1;for(;s<o.length;)r[i+\"[\"+s+\"]\"]=o[s],s+=1;for(var c=0;c<Math.min(t.length,o.length);c++){var l,u=new Set(Object.keys(t[c]).concat(Object.keys(o[c]))),f=a(u);try{for(f.s();!(l=f.n()).done;){var h=l.value;if(void 0===t[c][h]||void 0===o[c][h]||\"object\"!==n(o[c][h])&&t[c][h]!==o[c][h]){r[i+\"[\"+c+\"]\"]=o[c];break}}}catch(t){f.e(t)}finally{f.f()}if(!(i+\"[\"+c+\"]\"in r)){var d,g=a(u);try{for(g.s();!(d=g.n()).done;){var p=d.value;if(Array.isArray(o[c][p]))e(t[c][p],o[c][p],i+\"[\"+c+\"].\"+p);else{var y,v=a(Object.keys(t[c][p]).concat(Object.keys(o[c][p])));try{for(v.s();!(y=v.n()).done;){var b=y.value;if(t[c][p][b]!==o[c][p][b]){r[i+\"[\"+c+\"].\"+p]=o[c][p];break}}}catch(t){v.e(t)}finally{v.f()}}}}catch(t){g.e(t)}finally{g.f()}}}}var r={};e(this.data.nodes,t,\"nodes\"),0!==Object.keys(r).length&&this.setData(r)}},opts:Array},options:{addGlobalClass:!0},attached:function(){this.triggerEvent(\"add\",this,{bubbles:!0,composed:!0})},methods:{noop:function(){},getNode:function(t){try{for(var e=t.split(\"_\"),r=this.data.childs[e[0]],o=1;o<e.length;o++)r=r.children[e[o]];return r}catch(t){return{text:\"\",attrs:{},children:[]}}},play:function(t){var r=t.target.dataset.i,o=this.getNode(r);if(this.root.triggerEvent(\"play\",{source:o.name,attrs:e(e({},o.attrs),{},{src:o.src[this.data.ctrl[r]||0]})}),this.root.data.pauseVideo){for(var i=!1,n=t.target.id,a=this.root._videos.length;a--;)this.root._videos[a].id===n?i=!0:this.root._videos[a].pause();if(!i){var s=wx.createVideoContext(n,this);s.id=n,this.root.playbackRate&&s.playbackRate(this.root.playbackRate),this.root._videos.push(s)}}},mediaEvent:function(t){var r=t.target.dataset.i,o=this.getNode(r);this.root.triggerEvent(t.type,e(e({},t.detail),{},{source:o.name,attrs:e(e({},o.attrs),{},{src:o.src[this.data.ctrl[r]||0]})}))},imgTap:function(t){var e=this.getNode(t.target.dataset.i);if(e.a)return this.linkTap(e.a);if(!e.attrs.ignore&&(this.root.triggerEvent(\"imgtap\",e.attrs),this.root.data.previewImg)){var r=this.root.imgList[e.i];wx.previewImage({showmenu:this.root.data.showImgMenu,current:r,urls:this.root.imgList})}},imgLoad:function(t){var e,o=t.target.dataset.i,i=this.getNode(o);i.w?(this.data.opts[1]&&!this.data.ctrl[o]||-1===this.data.ctrl[o])&&(e=1):e=t.detail.width,e&&this.setData(r({},\"ctrl.\"+o,e)),this.checkReady()},checkReady:function(){var t=this;this.root.data.lazyLoad||(this.root.imgList._unloadimgs-=1,this.root.imgList._unloadimgs||setTimeout(function(){t.root.getRect().then(function(e){t.root.triggerEvent(\"ready\",e)}).catch(function(){t.root.triggerEvent(\"ready\",{})})},350))},linkTap:function(t){var e=t.currentTarget?this.getNode(t.currentTarget.dataset.i):{},r=e.attrs||t,o=r.href;this.root.triggerEvent(\"linktap\",Object.assign({innerText:this.root.getText(e.children||[])},r)),o&&(\"#\"===o[0]?this.root.navigateTo(o.substring(1)).catch(function(){}):o.split(\"?\")[0].includes(\"://\")?this.root.data.copyLink&&wx.setClipboardData({data:o,success:function(){return wx.showToast({title:\"链接已复制\"})}}):wx.navigateTo({url:o,fail:function(){wx.switchTab({url:o,fail:function(){}})}}))},mediaError:function(t){var e=t.target.dataset.i,o=this.getNode(e);if(\"video\"===o.name||\"audio\"===o.name){var i=(this.data.ctrl[e]||0)+1;if(i>o.src.length&&(i=0),i<o.src.length)return this.setData(r({},\"ctrl.\"+e,i))}else\"img\"===o.name&&(this.data.opts[2]&&this.setData(r({},\"ctrl.\"+e,-1)),this.checkReady());this.root&&this.root.triggerEvent(\"error\",{source:o.name,attrs:o.attrs,errMsg:t.detail.errMsg})}}});"
  },
  {
    "path": "miniprogram_npm/mp-html/node/node.json",
    "content": "{\"component\":true,\"usingComponents\":{\"node\":\"./node\"}}"
  },
  {
    "path": "miniprogram_npm/mp-html/node/node.wxml",
    "content": "<wxs module=\"isInline\">var e={abbr:!0,b:!0,big:!0,code:!0,del:!0,em:!0,i:!0,ins:!0,label:!0,q:!0,small:!0,span:!0,strong:!0,sub:!0,sup:!0};module.exports=function(n,i){return e[n]||-1!==(i||\"\").indexOf(\"inline\")};</wxs><template name=\"el\"><block wx:if=\"{{n.name==='img'}}\"><rich-text wx:if=\"{{n.t}}\" style=\"display:{{n.t}}\" nodes=\"<img class='_img' style='{{n.attrs.style}}' src='{{n.attrs.src}}'>\" data-i=\"{{i}}\" catchtap=\"imgTap\"/><block wx:else><image wx:if=\"{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}\" class=\"_img\" style=\"{{n.attrs.style}}\" src=\"{{ctrl[i]<0?opts[2]:opts[1]}}\" mode=\"widthFix\"/><image id=\"{{n.attrs.id}}\" class=\"_img {{n.attrs.class}}\" style=\"{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}\" src=\"{{n.attrs.src}}\" mode=\"{{!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))}}\" lazy-load=\"{{opts[0]}}\" webp=\"{{n.webp}}\" show-menu-by-longpress=\"{{opts[3]&&!n.attrs.ignore}}\" data-i=\"{{i}}\" bindload=\"imgLoad\" binderror=\"mediaError\" catchtap=\"imgTap\" bindlongpress=\"noop\"/></block></block><text wx:elif=\"{{n.text}}\" user-select=\"{{opts[4]=='force'&&isiOS}}\" decode>{{n.text}}</text><text wx:elif=\"{{n.name==='br'}}\">{{'\\n'}}</text><view wx:elif=\"{{n.name==='a'}}\" id=\"{{n.attrs.id}}\" class=\"{{n.attrs.href?'_a ':''}}{{n.attrs.class}}\" hover-class=\"_hover\" style=\"display:inline;{{n.attrs.style}}\" data-i=\"{{i}}\" catchtap=\"linkTap\"><node childs=\"{{n.children}}\" opts=\"{{opts}}\" style=\"display:inherit\"/></view><video wx:elif=\"{{n.name==='video'}}\" id=\"{{n.attrs.id}}\" class=\"{{n.attrs.class}}\" style=\"{{n.attrs.style}}\" autoplay=\"{{n.attrs.autoplay}}\" controls=\"{{n.attrs.controls}}\" loop=\"{{n.attrs.loop}}\" muted=\"{{n.attrs.muted}}\" object-fit=\"{{n.attrs['object-fit']}}\" poster=\"{{n.attrs.poster}}\" src=\"{{n.src[ctrl[i]||0]}}\" data-i=\"{{i}}\" bindplay=\"play\" bindpause=\"mediaEvent\" bindfullscreenchange=\"mediaEvent\" binderror=\"mediaError\"/><audio wx:elif=\"{{n.name==='audio'}}\" id=\"{{n.attrs.id}}\" class=\"{{n.attrs.class}}\" style=\"{{n.attrs.style}}\" author=\"{{n.attrs.author}}\" controls=\"{{n.attrs.controls}}\" loop=\"{{n.attrs.loop}}\" name=\"{{n.attrs.name}}\" poster=\"{{n.attrs.poster}}\" src=\"{{n.src[ctrl[i]||0]}}\" data-i=\"{{i}}\" bindplay=\"play\" bindpause=\"mediaEvent\" binderror=\"mediaError\"/><rich-text wx:else id=\"{{n.attrs.id}}\" style=\"{{n.f}}\" user-select=\"{{opts[4]}}\" nodes=\"{{[n]}}\"/></template><block wx:for=\"{{nodes}}\" wx:for-item=\"n1\" wx:for-index=\"i1\" wx:key=\"i1\"><template wx:if=\"{{!n1.c&&(!n1.children||n1.name==='a'||!isInline(n1.name,n1.attrs.style))}}\" is=\"el\" data=\"{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}\"/><view wx:else id=\"{{n1.attrs.id}}\" class=\"_{{n1.name}} {{n1.attrs.class}}\" style=\"{{n1.attrs.style}}\"><block wx:for=\"{{n1.children}}\" wx:for-item=\"n2\" wx:for-index=\"i2\" wx:key=\"i2\"><template wx:if=\"{{!n2.c&&(!n2.children||n2.name==='a'||!isInline(n2.name,n2.attrs.style))}}\" is=\"el\" data=\"{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}\"/><view wx:else id=\"{{n2.attrs.id}}\" class=\"_{{n2.name}} {{n2.attrs.class}}\" style=\"{{n2.attrs.style}}\"><block wx:for=\"{{n2.children}}\" wx:for-item=\"n3\" wx:for-index=\"i3\" wx:key=\"i3\"><template wx:if=\"{{!n3.c&&(!n3.children||n3.name==='a'||!isInline(n3.name,n3.attrs.style))}}\" is=\"el\" data=\"{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}\"/><view wx:else id=\"{{n3.attrs.id}}\" class=\"_{{n3.name}} {{n3.attrs.class}}\" style=\"{{n3.attrs.style}}\"><block wx:for=\"{{n3.children}}\" wx:for-item=\"n4\" wx:for-index=\"i4\" wx:key=\"i4\"><template wx:if=\"{{!n4.c&&(!n4.children||n4.name==='a'||!isInline(n4.name,n4.attrs.style))}}\" is=\"el\" data=\"{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}\"/><view wx:else id=\"{{n4.attrs.id}}\" class=\"_{{n4.name}} {{n4.attrs.class}}\" style=\"{{n4.attrs.style}}\"><block wx:for=\"{{n4.children}}\" wx:for-item=\"n5\" wx:for-index=\"i5\" wx:key=\"i5\"><template wx:if=\"{{!n5.c&&(!n5.children||n5.name==='a'||!isInline(n5.name,n5.attrs.style))}}\" is=\"el\" data=\"{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}\"/><node wx:else id=\"{{n5.attrs.id}}\" class=\"_{{n5.name}} {{n5.attrs.class}}\" style=\"{{n5.attrs.style}}\" childs=\"{{n5.children}}\" opts=\"{{opts}}\"/></block></view></block></view></block></view></block></view></block>"
  },
  {
    "path": "miniprogram_npm/mp-html/node/node.wxss",
    "content": "._a{padding:1.5px 0 1.5px 0;color:#366092;word-break:break-all}._hover{text-decoration:underline;opacity:.7}._img{max-width:100%;-webkit-touch-callout:none}._b,._strong{font-weight:700}._code{font-family:monospace}._del{text-decoration:line-through}._em,._i{font-style:italic}._h1{font-size:2em}._h2{font-size:1.5em}._h3{font-size:1.17em}._h5{font-size:.83em}._h6{font-size:.67em}._h1,._h2,._h3,._h4,._h5,._h6{display:block;font-weight:700}._ins{text-decoration:underline}._li{display:list-item}._ol{list-style-type:decimal}._ol,._ul{display:block;padding-left:40px;margin:1em 0}._q::before{content:'\"'}._q::after{content:'\"'}._sub{font-size:smaller;vertical-align:sub}._sup{font-size:smaller;vertical-align:super}._tbody,._tfoot,._thead{display:table-row-group}._tr{display:table-row}._td,._th{display:table-cell;vertical-align:middle}._th{font-weight:700;text-align:center}._ul{list-style-type:disc}._ul ._ul{margin:0;list-style-type:circle}._ul ._ul ._ul{list-style-type:square}._abbr,._b,._code,._del,._em,._i,._ins,._label,._q,._span,._strong,._sub,._sup{display:inline}._blockquote,._div,._p{display:block}"
  },
  {
    "path": "miniprogram_npm/mp-html/parser.js",
    "content": "\"use strict\";function t(t,e){var s=\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(!s){if(Array.isArray(t)||(s=i(t))||e&&t&&\"number\"==typeof t.length){s&&(t=s);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var r,o=!0,l=!1;return{s:function(){s=s.call(t)},n:function(){var t=s.next();return o=t.done,t},e:function(t){l=!0,r=t},f:function(){try{o||null==s.return||s.return()}finally{if(l)throw r}}}}function i(t,i){if(t){if(\"string\"==typeof t)return e(t,i);var s={}.toString.call(t).slice(8,-1);return\"Object\"===s&&t.constructor&&(s=t.constructor.name),\"Map\"===s||\"Set\"===s?Array.from(t):\"Arguments\"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?e(t,i):void 0}}function e(t,i){(null==i||i>t.length)&&(i=t.length);for(var e=0,s=Array(i);e<i;e++)s[e]=t[e];return s}function s(t){for(var i=Object.create(null),e=t.split(\",\"),s=e.length;s--;)i[e[s]]=!0;return i}function n(t,i){for(var e=t.indexOf(\"&\");-1!==e;){var s=t.indexOf(\";\",e+3),n=void 0;if(-1===s)break;\"#\"===t[e+1]?(n=parseInt((\"x\"===t[e+2]?\"0\":\"\")+t.substring(e+2,s)),isNaN(n)||(t=t.substr(0,e)+String.fromCharCode(n)+t.substr(s+1))):(n=t.substring(e+1,s),(l.entities[n]||\"amp\"===n&&i)&&(t=t.substr(0,e)+(l.entities[n]||\"&\")+t.substr(s+1))),e=t.indexOf(\"&\",e+1)}return t}function a(t){for(var i=t.length-1,e=i;e>=-1;e--)(-1===e||t[e].c||!t[e].name||\"div\"!==t[e].name&&\"p\"!==t[e].name&&\"h\"!==t[e].name[0]||(t[e].attrs.style||\"\").includes(\"inline\"))&&(i-e>=5&&t.splice(e+1,i-e,{name:\"div\",attrs:{},children:t.slice(e+1,i+1)}),i=e-1)}function r(t){this.options=t.data||{},this.tagStyle=Object.assign({},l.tagStyle,this.options.tagStyle),this.imgList=t.imgList||[],this.imgList._unloadimgs=0,this.plugins=t.plugins||[],this.attrs=Object.create(null),this.stack=[],this.nodes=[],this.pre=(this.options.containerStyle||\"\").includes(\"white-space\")&&this.options.containerStyle.includes(\"pre\")?2:0}function o(t){this.handler=t}var l={trustTags:s(\"a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video\"),blockTags:s(\"address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section\"),ignoreTags:s(\"area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr\"),voidTags:s(\"area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr\"),entities:{lt:\"<\",gt:\">\",quot:'\"',apos:\"'\",ensp:\" \",emsp:\" \",nbsp:\" \",semi:\";\",ndash:\"–\",mdash:\"—\",middot:\"·\",lsquo:\"‘\",rsquo:\"’\",ldquo:\"“\",rdquo:\"”\",bull:\"•\",hellip:\"…\",larr:\"←\",uarr:\"↑\",rarr:\"→\",darr:\"↓\"},tagStyle:{address:\"font-style:italic\",big:\"display:inline;font-size:1.2em\",caption:\"display:table-caption;text-align:center\",center:\"text-align:center\",cite:\"font-style:italic\",dd:\"margin-left:40px\",mark:\"background-color:yellow\",pre:\"font-family:monospace;white-space:pre\",s:\"text-decoration:line-through\",small:\"display:inline;font-size:0.8em\",strike:\"text-decoration:line-through\",u:\"text-decoration:underline\"},svgDict:{animatetransform:\"animateTransform\",lineargradient:\"linearGradient\",viewbox:\"viewBox\",attributename:\"attributeName\",repeatcount:\"repeatCount\",repeatdur:\"repeatDur\",foreignobject:\"foreignObject\"}},h={},c,d;if(wx.canIUse(\"getWindowInfo\"))c=wx.getWindowInfo().windowWidth,d=wx.getDeviceInfo().system;else{var p=wx.getSystemInfoSync();c=p.windowWidth,d=p.system}var u=s(\" ,\\r,\\n,\\t,\\f\"),f=0;r.prototype.parse=function(t){for(var i=this.plugins.length;i--;)this.plugins[i].onUpdate&&(t=this.plugins[i].onUpdate(t,l)||t);for(new o(this).parse(t);this.stack.length;)this.popNode();return this.nodes.length>50&&a(this.nodes),this.nodes},r.prototype.expose=function(){for(var t=this.stack.length;t--;){var i=this.stack[t];if(i.c||\"a\"===i.name||\"video\"===i.name||\"audio\"===i.name)return;i.c=1}},r.prototype.hook=function(t){for(var i=this.plugins.length;i--;)if(this.plugins[i].onParse&&!1===this.plugins[i].onParse(t,this))return!1;return!0},r.prototype.getUrl=function(t){var i=this.options.domain;return\"/\"===t[0]?\"/\"===t[1]?t=(i?i.split(\"://\")[0]:\"http\")+\":\"+t:i&&(t=i+t):!i||t.includes(\"data:\")||t.includes(\"://\")||(t=i+\"/\"+t),t},r.prototype.parseStyle=function(t){var i=t.attrs,e=(this.tagStyle[t.name]||\"\").split(\";\").concat((i.style||\"\").split(\";\")),s={},n=\"\";i.id&&!this.xml&&(this.options.useAnchor?this.expose():\"img\"!==t.name&&\"a\"!==t.name&&\"video\"!==t.name&&\"audio\"!==t.name&&(i.id=void 0)),i.width&&(s.width=parseFloat(i.width)+(i.width.includes(\"%\")?\"%\":\"px\"),i.width=void 0),i.height&&(s.height=parseFloat(i.height)+(i.height.includes(\"%\")?\"%\":\"px\"),i.height=void 0);for(var a=0,r=e.length;a<r;a++){var o=e[a].split(\":\");if(!(o.length<2)){var l=o.shift().trim().toLowerCase(),h=o.join(\":\").trim();if(\"-\"===h[0]&&h.lastIndexOf(\"-\")>0||h.includes(\"safe\"))n+=\";\".concat(l,\":\").concat(h);else if(!s[l]||h.includes(\"import\")||!s[l].includes(\"import\")){if(h.includes(\"url\")){var d=h.indexOf(\"(\")+1;if(d){for(;'\"'===h[d]||\"'\"===h[d]||u[h[d]];)d++;h=h.substr(0,d)+this.getUrl(h.substr(d))}}else h.includes(\"rpx\")&&(h=h.replace(/[0-9.]+\\s*rpx/g,function(t){return parseFloat(t)*c/750+\"px\"}));s[l]=h}}}return t.attrs.style=n,s},r.prototype.onTagName=function(t){this.tagName=this.xml?t:t.toLowerCase(),\"svg\"===this.tagName&&(this.xml=(this.xml||0)+1,l.ignoreTags.style=void 0)},r.prototype.onAttrName=function(t){t=this.xml?t:t.toLowerCase(),\"data-\"===t.substr(0,5)?\"data-src\"!==t||this.attrs.src?\"img\"===this.tagName||\"a\"===this.tagName?this.attrName=t:this.attrName=void 0:this.attrName=\"src\":(this.attrName=t,this.attrs[t]=\"T\")},r.prototype.onAttrVal=function(t){var i=this.attrName||\"\";\"style\"===i||\"href\"===i?this.attrs[i]=n(t,!0):i.includes(\"src\")?this.attrs[i]=this.getUrl(n(t,!0)):i&&(this.attrs[i]=t)},r.prototype.onOpenTag=function(t){var i=Object.create(null);i.name=this.tagName,i.attrs=this.attrs,this.attrs=Object.create(null);var e=i.attrs,s=this.stack[this.stack.length-1],n=s?s.children:this.nodes,a=this.xml?t:l.voidTags[i.name];if(h[i.name]&&(e.class=h[i.name]+(e.class?\" \"+e.class:\"\")),\"embed\"===i.name){var r=e.src||\"\";r.includes(\".mp4\")||r.includes(\".3gp\")||r.includes(\".m3u8\")||(e.type||\"\").includes(\"video\")?i.name=\"video\":(r.includes(\".mp3\")||r.includes(\".wav\")||r.includes(\".aac\")||r.includes(\".m4a\")||(e.type||\"\").includes(\"audio\"))&&(i.name=\"audio\"),e.autostart&&(e.autoplay=\"T\"),e.controls=\"T\"}if(\"video\"!==i.name&&\"audio\"!==i.name||(\"video\"!==i.name||e.id||(e.id=\"v\"+f++),e.controls||e.autoplay||(e.controls=\"T\"),i.src=[],e.src&&(i.src.push(e.src),e.src=void 0),this.expose()),a){if(!this.hook(i)||l.ignoreTags[i.name])return void(\"base\"!==i.name||this.options.domain?\"source\"===i.name&&s&&(\"video\"===s.name||\"audio\"===s.name)&&e.src&&s.src.push(e.src):this.options.domain=e.href);var o=this.parseStyle(i);if(\"img\"===i.name){if(e.src&&(e.src.includes(\"webp\")&&(i.webp=\"T\"),e.src.includes(\"data:\")&&\"all\"!==this.options.previewImg&&!e[\"original-src\"]&&(e.ignore=\"T\"),!e.ignore||i.webp||e.src.includes(\"cloud://\"))){for(var d=this.stack.length;d--;){var p=this.stack[d];\"table\"!==p.name||i.webp||e.src.includes(\"cloud://\")||(!o.display||o.display.includes(\"inline\")?i.t=\"inline-block\":i.t=o.display,o.display=void 0);var u=p.attrs.style||\"\";if(!u.includes(\"flex:\")||u.includes(\"flex:0\")||u.includes(\"flex: 0\")||o.width&&!(parseInt(o.width)>100))if(u.includes(\"flex\")&&\"100%\"===o.width)for(var g=d+1;g<this.stack.length;g++){var m=this.stack[g].attrs.style||\"\";if(!m.includes(\";width\")&&!m.includes(\" width\")&&0!==m.indexOf(\"width\")){o.width=\"\";break}}else u.includes(\"inline-block\")&&(o.width&&\"%\"===o.width[o.width.length-1]?(p.attrs.style+=\";max-width:\"+o.width,o.width=\"\"):p.attrs.style+=\";max-width:100%\");else{o.width=\"100% !important\",o.height=\"\";for(var v=d+1;v<this.stack.length;v++)this.stack[v].attrs.style=(this.stack[v].attrs.style||\"\").replace(\"inline-\",\"\")}\"a\"===p.name?i.a=p.attrs:p.c=1}i.i=this.imgList.length;var y=e[\"original-src\"]||e.src;if(this.imgList.includes(y)){var b=y.indexOf(\"://\");if(-1!==b){b+=3;for(var x=y.substr(0,b);b<y.length&&\"/\"!==y[b];b++)x+=Math.random()>.5?y[b].toUpperCase():y[b];x+=y.substr(b),y=x}}this.imgList.push(y),i.t||(this.imgList._unloadimgs+=1)}\"inline\"===o.display&&(o.display=\"\"),e.ignore&&(o[\"max-width\"]=o[\"max-width\"]||\"100%\",e.style+=\";-webkit-touch-callout:none\"),parseInt(o.width)>c&&(o.height=void 0),isNaN(parseInt(o.width))||(i.w=\"T\"),!isNaN(parseInt(o.height))&&(!o.height.includes(\"%\")||s&&(s.attrs.style||\"\").includes(\"height\"))&&(i.h=\"T\"),i.w&&i.h&&o[\"object-fit\"]&&(\"contain\"===o[\"object-fit\"]?i.m=\"aspectFit\":\"cover\"===o[\"object-fit\"]&&(i.m=\"aspectFill\"))}else if(\"svg\"===i.name)return n.push(i),this.stack.push(i),void this.popNode();for(var w in o)o[w]&&(e.style+=\";\".concat(w,\":\").concat(o[w].replace(\" !important\",\"\")));e.style=e.style.substr(1)||void 0}else(\"pre\"===i.name||(e.style||\"\").includes(\"white-space\")&&e.style.includes(\"pre\"))&&2!==this.pre&&(this.pre=i.pre=1),i.children=[],this.stack.push(i);n.push(i)},r.prototype.onCloseTag=function(t){t=this.xml?t:t.toLowerCase();var i;for(i=this.stack.length;i--&&this.stack[i].name!==t;);if(-1!==i)for(;this.stack.length>i;)this.popNode();else if(\"p\"===t||\"br\"===t){var e=this.stack.length?this.stack[this.stack.length-1].children:this.nodes;e.push({name:t,attrs:{class:h[t],style:this.tagStyle[t]}})}},r.prototype.popNode=function(){var i=this.stack.pop(),e=i.attrs,s=i.children,n=this.stack[this.stack.length-1],r=n?n.children:this.nodes;if(!this.hook(i)||l.ignoreTags[i.name])return\"title\"===i.name&&s.length&&\"text\"===s[0].type&&this.options.setTitle&&wx.setNavigationBarTitle({title:s[0].text}),void r.pop();if(i.pre&&2!==this.pre){this.pre=i.pre=void 0;for(var o=this.stack.length;o--;)this.stack[o].pre&&(this.pre=1)}if(\"svg\"===i.name){if(this.xml>1)return void this.xml--;var h=\"\",d=e.style;return e.style=\"\",e.xmlns=\"http://www.w3.org/2000/svg\",function i(e){if(\"text\"===e.type)return void(h+=e.text);var s=l.svgDict[e.name]||e.name;if(\"foreignObject\"===s){var n,a=t(e.children||[]);try{for(a.s();!(n=a.n()).done;){var r=n.value;if(r.attrs&&!r.attrs.xmlns){r.attrs.xmlns=\"http://www.w3.org/1999/xhtml\";break}}}catch(t){a.e(t)}finally{a.f()}}h+=\"<\"+s;for(var o in e.attrs){var c=e.attrs[o];c&&(h+=\" \".concat(l.svgDict[o]||o,'=\"').concat(c.replace(/\"/g,\"\"),'\"'))}if(e.children){h+=\">\";for(var d=0;d<e.children.length;d++)i(e.children[d]);h+=\"</\"+s+\">\"}else h+=\"/>\"}(i),i.name=\"img\",i.attrs={src:\"data:image/svg+xml;utf8,\"+h.replace(/#/g,\"%23\"),style:d,ignore:\"T\"},i.children=void 0,this.xml=!1,void(l.ignoreTags.style=!0)}var p={};if(e.align&&(\"table\"===i.name?\"center\"===e.align?p[\"margin-inline-start\"]=p[\"margin-inline-end\"]=\"auto\":p.float=e.align:p[\"text-align\"]=e.align,e.align=void 0),e.dir&&(p.direction=e.dir,e.dir=void 0),\"font\"===i.name&&(e.color&&(p.color=e.color,e.color=void 0),e.face&&(p[\"font-family\"]=e.face,e.face=void 0),e.size)){var u=parseInt(e.size);isNaN(u)||(u<1?u=1:u>7&&(u=7),p[\"font-size\"]=[\"x-small\",\"small\",\"medium\",\"large\",\"x-large\",\"xx-large\",\"xxx-large\"][u-1]),e.size=void 0}if((e.class||\"\").includes(\"align-center\")&&(p[\"text-align\"]=\"center\"),Object.assign(p,this.parseStyle(i)),\"table\"!==i.name&&parseInt(p.width)>c&&(p[\"max-width\"]=\"100%\",p[\"box-sizing\"]=\"border-box\"),l.blockTags[i.name])i.name=\"div\";else if(l.trustTags[i.name]||this.xml)if(\"a\"===i.name||\"ad\"===i.name)this.expose();else if(\"video\"===i.name||\"audio\"===i.name)(p.height||\"\").includes(\"auto\")&&(p.height=void 0),i.children=void 0;else if(\"ul\"!==i.name&&\"ol\"!==i.name||!i.c)if(\"table\"===i.name){var f=parseFloat(e.cellpadding),g=parseFloat(e.cellspacing),m=parseFloat(e.border),v=p[\"border-color\"],y=p[\"border-style\"];if(i.c&&(isNaN(f)&&(f=2),isNaN(g)&&(g=2)),m&&(e.style+=\";border:\".concat(m,\"px \").concat(y||\"solid\",\" \").concat(v||\"gray\")),i.flag&&i.c){i.flag=void 0,p.display=\"grid\",\"collapse\"===p[\"border-collapse\"]&&(p[\"border-collapse\"]=void 0,g=0),g?(p[\"grid-gap\"]=g+\"px\",p.padding=g+\"px\"):m&&(e.style+=\";border-left:0;border-top:0\");var b=[],x=[],w=[],k={};!function i(e){for(var s=0;s<e.length;s++)if(\"tr\"===e[s].name)x.push(e[s]);else if(\"colgroup\"===e[s].name){var n,a=1,r=t(e[s].children||[]);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(\"col\"===o.name){var l=o.attrs.style||\"\",h=l.indexOf(\"width\")?l.indexOf(\";width\"):0;if(-1!==h){var c=l.indexOf(\";\",h+6);-1===c&&(c=l.length),b[a]=l.substring(h?h+7:6,c)}a+=1}}}catch(t){r.e(t)}finally{r.f()}}else i(e[s].children||[])}(s);for(var N=1;N<=x.length;N++){for(var T=1,O=0;O<x[N-1].children.length;O++){var j=x[N-1].children[O];if(\"td\"===j.name||\"th\"===j.name){for(;k[N+\".\"+T];)T++;j.c=1;var I=j.attrs.style||\"\",S=I.indexOf(\"width\")?I.indexOf(\";width\"):0;if(-1!==S){var C=I.indexOf(\";\",S+6);-1===C&&(C=I.length),j.attrs.colspan||(b[T]=I.substring(S?S+7:6,C)),I=I.substr(0,S)+I.substr(C)}if(I+=\";display:flex;flex-direction:column\",-1!==(S=I.indexOf(\"vertical-align\"))){var A=I.substr(S+15,10);A.includes(\"middle\")?I+=\";justify-content:center\":A.includes(\"bottom\")&&(I+=\";justify-content:flex-end\")}else I+=\";justify-content:center\";if(-1!==(S=I.indexOf(\"text-align\"))){var L=I.substr(S+11,10);L.includes(\"center\")?I+=\";justify-content: center\":L.includes(\"right\")&&(I+=\";justify-content: right\")}if(I=(m?\";border:\".concat(m,\"px \").concat(y||\"solid\",\" \").concat(v||\"gray\")+(g?\"\":\";border-right:0;border-bottom:0\"):\"\")+(f?\";padding:\".concat(f,\"px\"):\"\")+\";\"+I,j.attrs.colspan&&(I+=\";grid-column-start:\".concat(T,\";grid-column-end:\").concat(T+parseInt(j.attrs.colspan)),j.attrs.rowspan||(I+=\";grid-row-start:\".concat(N,\";grid-row-end:\").concat(N+1)),T+=parseInt(j.attrs.colspan)-1),j.attrs.rowspan){I+=\";grid-row-start:\".concat(N,\";grid-row-end:\").concat(N+parseInt(j.attrs.rowspan)),j.attrs.colspan||(I+=\";grid-column-start:\".concat(T,\";grid-column-end:\").concat(T+1));for(var z=1;z<j.attrs.rowspan;z++)for(var U=0;U<(j.attrs.colspan||1);U++)k[N+z+\".\"+(T-U)]=1}I&&(j.attrs.style=I),w.push(j),T++}}if(1===N){for(var F=\"\",q=1;q<T;q++)F+=(b[q]?b[q]:\"auto\")+\" \";p[\"grid-template-columns\"]=F}}i.children=w}else i.c&&(p.display=\"table\"),isNaN(g)||(p[\"border-spacing\"]=g+\"px\"),(m||f||i.c)&&function t(e){for(var s=0;s<e.length;s++){var n=e[s];i.c&&(n.c=1),\"th\"===n.name||\"td\"===n.name?(m&&(n.attrs.style=\"border:\".concat(m,\"px \").concat(y||\"solid\",\" \").concat(v||\"gray\",\";\").concat(n.attrs.style||\"\")),f&&(n.attrs.style=\"padding:\".concat(f,\"px;\").concat(n.attrs.style||\"\"))):n.children&&t(n.children)}}(s);if(this.options.scrollTable&&!(e.style||\"\").includes(\"inline\")){var V=Object.assign({},i);i.name=\"div\",i.attrs={style:\"overflow-x:auto;padding:1px\"},i.children=[V],e=V.attrs}}else if((\"tbody\"===i.name||\"tr\"===i.name)&&i.flag&&i.c)i.flag=void 0,function t(i){for(var e=0;e<i.length;e++)if(\"td\"===i[e].name)for(var s=0,n=[\"color\",\"background\",\"background-color\"];s<n.length;s++){var a=n[s];p[a]&&(i[e].attrs.style=a+\":\"+p[a]+\";\"+(i[e].attrs.style||\"\"))}else t(i[e].children||[])}(s);else if(\"td\"!==i.name&&\"th\"!==i.name||!e.colspan&&!e.rowspan){if(\"ruby\"===i.name){i.name=\"span\";for(var D=0;D<s.length-1;D++)\"text\"===s[D].type&&\"rt\"===s[D+1].name&&(s[D]={name:\"span\",attrs:{style:\"display:inline-block;text-align:center\"},children:[{name:\"div\",attrs:{style:\"font-size:50%;\"+(s[D+1].attrs.style||\"\")},children:s[D+1].children},s[D]]},s.splice(D+1,1))}}else for(var W=this.stack.length;W--;)\"table\"!==this.stack[W].name&&\"tbody\"!==this.stack[W].name&&\"tr\"!==this.stack[W].name||(this.stack[W].flag=1);else{var B={a:\"lower-alpha\",A:\"upper-alpha\",i:\"lower-roman\",I:\"upper-roman\"};B[e.type]&&(e.style+=\";list-style-type:\"+B[e.type],e.type=void 0),i.c=1;for(var M=s.length;M--;)\"li\"===s[M].name&&(s[M].c=1)}else i.name=\"span\";if((p.display||\"\").includes(\"flex\")&&!i.c)for(var P=s.length;P--;){var Z=s[P];Z.f&&(Z.attrs.style=(Z.attrs.style||\"\")+Z.f,Z.f=void 0)}var _=n&&((n.attrs.style||\"\").includes(\"flex\")||(n.attrs.style||\"\").includes(\"grid\"))&&!i.c&&!(p.display||\"\").includes(\"inline\");_&&(i.f=\";max-width:100%\"),s.length>=50&&i.c&&!(p.display||\"\").includes(\"flex\")&&a(s);for(var E in p)if(p[E]){var G=\";\".concat(E,\":\").concat(p[E].replace(\" !important\",\"\"));_&&(E.includes(\"flex\")&&\"flex-direction\"!==E||\"align-self\"===E||E.includes(\"grid\")||\"-\"===p[E][0]||E.includes(\"width\")&&G.includes(\"%\"))?(i.f+=G,\"width\"===E&&(e.style+=\";width:100%\")):e.style+=G}e.style=e.style.substr(1)||void 0},r.prototype.onText=function(t){if(!this.pre){for(var i,e=\"\",s=0,a=t.length;s<a;s++)u[t[s]]?(\" \"!==e[e.length-1]&&(e+=\" \"),\"\\n\"!==t[s]||i||(i=!0)):e+=t[s];if(\" \"===e&&i)return;t=e}var r=Object.create(null);if(r.type=\"text\",r.text=n(t),this.hook(r)){\"force\"===this.options.selectable&&d.includes(\"iOS\")&&!wx.canIUse(\"rich-text.user-select\")&&this.expose();(this.stack.length?this.stack[this.stack.length-1].children:this.nodes).push(r)}},o.prototype.parse=function(t){this.content=t||\"\",this.i=0,this.start=0,this.state=this.text;for(var i=this.content.length;-1!==this.i&&this.i<i;)this.state()},o.prototype.checkClose=function(t){var i=\"/\"===this.content[this.i];return!!(\">\"===this.content[this.i]||i&&\">\"===this.content[this.i+1])&&(t&&this.handler[t](this.content.substring(this.start,this.i)),this.i+=i?2:1,this.start=this.i,this.handler.onOpenTag(i),\"script\"===this.handler.tagName?(this.i=this.content.indexOf(\"</\",this.i),-1!==this.i&&(this.i+=2,this.start=this.i),this.state=this.endTag):this.state=this.text,!0)},o.prototype.text=function(){if(this.i=this.content.indexOf(\"<\",this.i),-1===this.i)return void(this.start<this.content.length&&this.handler.onText(this.content.substring(this.start,this.content.length)));var t=this.content[this.i+1];if(t>=\"a\"&&t<=\"z\"||t>=\"A\"&&t<=\"Z\")this.start!==this.i&&this.handler.onText(this.content.substring(this.start,this.i)),this.start=++this.i,this.state=this.tagName;else if(\"/\"===t||\"!\"===t||\"?\"===t){this.start!==this.i&&this.handler.onText(this.content.substring(this.start,this.i));var i=this.content[this.i+2];if(\"/\"===t&&(i>=\"a\"&&i<=\"z\"||i>=\"A\"&&i<=\"Z\"))return this.i+=2,this.start=this.i,void(this.state=this.endTag);var e=\"--\\x3e\";\"!\"===t&&\"-\"===this.content[this.i+2]&&\"-\"===this.content[this.i+3]||(e=\">\"),this.i=this.content.indexOf(e,this.i),-1!==this.i&&(this.i+=e.length,this.start=this.i)}else this.i++},o.prototype.tagName=function(){if(u[this.content[this.i]]){for(this.handler.onTagName(this.content.substring(this.start,this.i));u[this.content[++this.i]];);this.i<this.content.length&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)}else this.checkClose(\"onTagName\")||this.i++},o.prototype.attrName=function(){var t=this.content[this.i];if(u[t]||\"=\"===t){this.handler.onAttrName(this.content.substring(this.start,this.i));for(var i=\"=\"===t,e=this.content.length;++this.i<e;)if(t=this.content[this.i],!u[t]){if(this.checkClose())return;if(i)return this.start=this.i,void(this.state=this.attrVal);if(\"=\"!==this.content[this.i])return this.start=this.i,void(this.state=this.attrName);i=!0}}else this.checkClose(\"onAttrName\")||this.i++},o.prototype.attrVal=function(){var t=this.content[this.i],i=this.content.length;if('\"'===t||\"'\"===t){if(this.start=++this.i,this.i=this.content.indexOf(t,this.i),-1===this.i)return;this.handler.onAttrVal(this.content.substring(this.start,this.i))}else for(;this.i<i;this.i++){if(u[this.content[this.i]]){this.handler.onAttrVal(this.content.substring(this.start,this.i));break}if(this.checkClose(\"onAttrVal\"))return}for(;u[this.content[++this.i]];);this.i<i&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)},o.prototype.endTag=function(){var t=this.content[this.i];if(u[t]||\">\"===t||\"/\"===t){if(this.handler.onCloseTag(this.content.substring(this.start,this.i)),\">\"!==t&&(this.i=this.content.indexOf(\">\",this.i),-1===this.i))return;this.start=++this.i,this.state=this.text}else this.i++},module.exports=r;"
  },
  {
    "path": "miniprogram_npm/wxa-plugin-canvas/index/index.js",
    "content": "const main = {\n    /**\n     * 渲染块\n     * @param {Object} params\n     */\n    drawBlock({ text, width = 0, height, x, y, paddingLeft = 0, paddingRight = 0, borderWidth, backgroundColor, borderColor, borderRadius = 0, opacity = 1 }) {\n        // 判断是否块内有文字\n        let blockWidth = 0; // 块的宽度\n        let textX = 0;\n        let textY = 0;\n        if (typeof text !== 'undefined') {\n            // 如果有文字并且块的宽度小于文字宽度，块的宽度为 文字的宽度 + 内边距\n            const textWidth = this._getTextWidth(typeof text.text === 'string' ? text : text.text);\n            blockWidth = textWidth > width ? textWidth : width;\n            blockWidth += paddingLeft + paddingLeft;\n\n            const { textAlign = 'left', text: textCon } = text;\n            textY = height / 2 + y; // 文字的y轴坐标在块中线\n            if (textAlign === 'left') {\n                // 如果是右对齐，那x轴在块的最左边\n                textX = x + paddingLeft;\n            } else if (textAlign === 'center') {\n                textX = blockWidth / 2 + x;\n            } else {\n                textX = x + blockWidth - paddingRight;\n            }\n        } else {\n            blockWidth = width;\n        }\n\n        if (backgroundColor) {\n            // 画面\n            this.ctx.save();\n            this.ctx.setGlobalAlpha(opacity);\n            this.ctx.setFillStyle(backgroundColor);\n            if (borderRadius > 0) {\n                // 画圆角矩形\n                this._drawRadiusRect(x, y, blockWidth, height, borderRadius);\n                this.ctx.fill();\n            } else {\n                this.ctx.fillRect(this.toPx(x), this.toPx(y), this.toPx(blockWidth), this.toPx(height));\n            }\n            this.ctx.restore();\n        }\n        if (borderWidth) {\n            // 画线\n            this.ctx.save();\n            this.ctx.setGlobalAlpha(opacity);\n            this.ctx.setStrokeStyle(borderColor);\n            this.ctx.setLineWidth(this.toPx(borderWidth));\n            if (borderRadius > 0) {\n                // 画圆角矩形边框\n                this._drawRadiusRect(x, y, blockWidth, height, borderRadius);\n                this.ctx.stroke();\n            } else {\n                this.ctx.strokeRect(this.toPx(x), this.toPx(y), this.toPx(blockWidth), this.toPx(height));\n            }\n            this.ctx.restore();\n        }\n\n        if (text) {\n            this.drawText(Object.assign(text, { x: textX, y: textY }))\n        }\n    },\n\n    /**\n     * 渲染文字\n     * @param {Object} params\n     */\n    drawText(params) {\n        const { x, y, fontSize, color, baseLine, textAlign, text, opacity = 1, width, lineNum, lineHeight } = params;\n        if (Object.prototype.toString.call(text) === '[object Array]') {\n            let preText = { x, y, baseLine };\n            text.forEach(item => {\n                preText.x += item.marginLeft || 0;\n                const textWidth = this._drawSingleText(Object.assign(item, {\n                    ...preText,\n                }));\n                preText.x += textWidth + (item.marginRight || 0); // 下一段字的x轴为上一段字x + 上一段字宽度\n            })\n        } else {\n            this._drawSingleText(params);\n        }\n    },\n\n    /**\n     * 渲染图片\n     */\n    drawImage(data) {\n        const { imgPath, x, y, w, h, sx, sy, sw, sh, borderRadius = 0, borderWidth = 0, borderColor } = data;\n        this.ctx.save();\n        if (borderRadius > 0) {\n            this._drawRadiusRect(x, y, w, h, borderRadius);\n            this.ctx.strokeStyle = 'rgba(255,255,255,0)';\n            this.ctx.stroke();\n            this.ctx.clip();\n            this.ctx.drawImage(imgPath, this.toPx(sx), this.toPx(sy), this.toPx(sw), this.toPx(sh), this.toPx(x), this.toPx(y), this.toPx(w), this.toPx(h));\n            if (borderWidth > 0) {\n                this.ctx.setStrokeStyle(borderColor);\n                this.ctx.setLineWidth(this.toPx(borderWidth));\n                this.ctx.stroke();\n            }\n        } else {\n            this.ctx.drawImage(imgPath, this.toPx(sx), this.toPx(sy), this.toPx(sw), this.toPx(sh), this.toPx(x), this.toPx(y), this.toPx(w), this.toPx(h));\n        }\n        this.ctx.restore();\n    },\n    /**\n     * 渲染线\n     * @param {*} param0\n     */\n    drawLine({ startX, startY, endX, endY, color, width }) {\n        this.ctx.save();\n        this.ctx.beginPath();\n        this.ctx.setStrokeStyle(color);\n        this.ctx.setLineWidth(this.toPx(width));\n        this.ctx.moveTo(this.toPx(startX), this.toPx(startY));\n        this.ctx.lineTo(this.toPx(endX), this.toPx(endY));\n        this.ctx.stroke();\n        this.ctx.closePath();\n        this.ctx.restore();\n    },\n    downloadResource({ images = [], pixelRatio = 1 }) {\n        const drawList = [];\n        this.drawArr = [];\n        images.forEach((image, index) => drawList.push(this._downloadImageAndInfo(image, index, pixelRatio)));\n        return Promise.all(drawList);\n    },\n    initCanvas(w, h, debug) {\n        return new Promise((resolve) => {\n            this.setData({\n                pxWidth: this.toPx(w),\n                pxHeight: this.toPx(h),\n                debug,\n            }, resolve);\n        });\n    }\n}\nconst handle = {\n    /**\n     * 画圆角矩形\n     */\n    _drawRadiusRect(x, y, w, h, r) {\n        const br = r / 2;\n        this.ctx.beginPath();\n        this.ctx.moveTo(this.toPx(x + br), this.toPx(y));    // 移动到左上角的点\n        this.ctx.lineTo(this.toPx(x + w - br), this.toPx(y));\n        this.ctx.arc(this.toPx(x + w - br), this.toPx(y + br), this.toPx(br), 2 * Math.PI * (3 / 4), 2 * Math.PI * (4 / 4))\n        this.ctx.lineTo(this.toPx(x + w), this.toPx(y + h - br));\n        this.ctx.arc(this.toPx(x + w - br), this.toPx(y + h - br), this.toPx(br), 0, 2 * Math.PI * (1 / 4))\n        this.ctx.lineTo(this.toPx(x + br), this.toPx(y + h));\n        this.ctx.arc(this.toPx(x + br), this.toPx(y + h - br), this.toPx(br), 2 * Math.PI * (1 / 4), 2 * Math.PI * (2 / 4))\n        this.ctx.lineTo(this.toPx(x), this.toPx(y + br));\n        this.ctx.arc(this.toPx(x + br), this.toPx(y + br), this.toPx(br), 2 * Math.PI * (2 / 4), 2 * Math.PI * (3 / 4))\n    },\n    /**\n     * 计算文本长度\n     * @param {Array|Object}} text 数组 或者 对象\n     */\n    _getTextWidth(text) {\n        let texts = [];\n        if (Object.prototype.toString.call(text) === '[object Object]') {\n            texts.push(text);\n        } else {\n            texts = text;\n        }\n        let width = 0;\n        texts.forEach(({ fontSize, text, marginLeft = 0, marginRight = 0 }) => {\n            this.ctx.setFontSize(this.toPx(fontSize));\n            width += this.ctx.measureText(text).width + marginLeft + marginRight;\n        })\n\n        return this.toRpx(width);\n    },\n    /**\n     * 渲染一段文字\n     */\n    _drawSingleText({ x, y, fontSize, color, baseLine, textAlign = 'left', text, opacity = 1, textDecoration = 'none',\n      width, lineNum = 1, lineHeight = 0, fontWeight = 'normal', fontStyle = 'normal', fontFamily = \"sans-serif\"}) {\n        this.ctx.save();\n        this.ctx.beginPath();\n        this.ctx.font = fontStyle + \" \" + fontWeight + \" \" + this.toPx(fontSize, true) + \"px \" + fontFamily\n        this.ctx.setGlobalAlpha(opacity);\n        // this.ctx.setFontSize(this.toPx(fontSize));\n        this.ctx.setFillStyle(color);\n        this.ctx.setTextBaseline(baseLine);\n        this.ctx.setTextAlign(textAlign);\n        let textWidth = this.toRpx(this.ctx.measureText(text).width);\n        const textArr = [];\n         if (textWidth > width) {\n          // 文本宽度 大于 渲染宽度\n          let fillText = '';\n          let line = 1;\n          for (let i = 0; i <= text.length - 1 ; i++) {  // 将文字转为数组，一行文字一个元素\n            fillText = fillText + text[i];\n            if (this.toRpx(this.ctx.measureText(fillText).width) >= width) {\n              if (line === lineNum) {\n                if (i !== text.length - 1) {\n                  fillText = fillText.substring(0, fillText.length - 1) + '...';\n                }\n              }\n              if(line <= lineNum) {\n                textArr.push(fillText);\n              }\n              fillText = '';\n              line++;\n            } else {\n              if(line <= lineNum) {\n                if(i === text.length -1){\n                   textArr.push(fillText);\n                }\n              }\n            }\n          }\n          textWidth = width;\n        } else {\n          textArr.push(text);\n        }\n\n        textArr.forEach((item, index) => {\n            this.ctx.fillText(item, this.toPx(x), this.toPx(y + (lineHeight || fontSize) * index));\n        })\n\n        this.ctx.restore();\n\n        // textDecoration\n        if (textDecoration !== 'none') {\n            let lineY = y;\n            if (textDecoration === 'line-through') {\n                // 目前只支持贯穿线\n                lineY = y;\n\n                // 小程序画布baseLine偏移阈值\n                let threshold = 5;\n\n                // 根据baseLine的不同对贯穿线的Y坐标做相应调整\n                switch (baseLine) {\n                  case 'top':\n                    lineY += fontSize / 2 + threshold;\n                    break;\n                  case 'middle':\n                    break;\n                  case 'bottom':\n                    lineY -= fontSize / 2 + threshold;\n                    break;\n                  default:\n                    lineY -= fontSize / 2 - threshold;\n                    break;\n                }\n            }\n            this.ctx.save();\n            this.ctx.moveTo(this.toPx(x), this.toPx(lineY));\n            this.ctx.lineTo(this.toPx(x) + this.toPx(textWidth), this.toPx(lineY));\n            this.ctx.setStrokeStyle(color);\n            this.ctx.stroke();\n            this.ctx.restore();\n        }\n\n        return textWidth;\n    },\n}\nconst helper = {\n    /**\n      * 下载图片并获取图片信息\n      */\n    _downloadImageAndInfo(image, index, pixelRatio) {\n        return new Promise((resolve, reject) => {\n            const { x, y, url, zIndex } = image;\n            const imageUrl = url;\n            // 下载图片\n            this._downImage(imageUrl, index)\n                // 获取图片信息\n                .then(imgPath => this._getImageInfo(imgPath, index))\n                .then(({ imgPath, imgInfo }) => {\n                    // 根据画布的宽高计算出图片绘制的大小，这里会保证图片绘制不变形\n                    let sx;\n                    let sy;\n                    const borderRadius = image.borderRadius || 0;\n                    const setWidth = image.width;\n                    const setHeight = image.height;\n                    const width = this.toRpx(imgInfo.width / pixelRatio);\n                    const height = this.toRpx(imgInfo.height / pixelRatio);\n\n                    if (width / height <= setWidth / setHeight) {\n                        sx = 0;\n                        sy = (height - ((width / setWidth) * setHeight)) / 2;\n                    } else {\n                        sy = 0;\n                        sx = (width - ((height / setHeight) * setWidth)) / 2;\n                    }\n                    this.drawArr.push({\n                        type: 'image',\n                        borderRadius,\n                        borderWidth: image.borderWidth,\n                        borderColor: image.borderColor,\n                        zIndex: typeof zIndex !== 'undefined' ? zIndex : index,\n                        imgPath,\n                        sx,\n                        sy,\n                        sw: (width - (sx * 2)),\n                        sh: (height - (sy * 2)),\n                        x,\n                        y,\n                        w: setWidth,\n                        h: setHeight,\n                    });\n                    resolve();\n                })\n                .catch(err => reject(err));\n        });\n    },\n    /**\n     * 下载图片资源\n     * @param {*} imageUrl\n     */\n    _downImage(imageUrl) {\n        return new Promise((resolve, reject) => {\n            if (/^http/.test(imageUrl) && !new RegExp(wx.env.USER_DATA_PATH).test(imageUrl)) {\n                wx.downloadFile({\n                    url: this._mapHttpToHttps(imageUrl),\n                    success: (res) => {\n                        if (res.statusCode === 200) {\n                            resolve(res.tempFilePath);\n                        } else {\n                            reject(res.errMsg);\n                        }\n                    },\n                    fail(err) {\n                        reject(err);\n                    },\n                });\n            } else {\n                // 支持本地地址\n                resolve(imageUrl);\n            }\n        });\n    },\n    /**\n     * 获取图片信息\n     * @param {*} imgPath\n     * @param {*} index\n     */\n    _getImageInfo(imgPath, index) {\n        return new Promise((resolve, reject) => {\n            wx.getImageInfo({\n                src: imgPath,\n                success(res) {\n                    resolve({ imgPath, imgInfo: res, index });\n                },\n                fail(err) {\n                    reject(err);\n                },\n            });\n        });\n    },\n    toPx(rpx, int) {\n      if (int) {\n        return parseInt(rpx * this.factor * this.pixelRatio);\n      }\n      return rpx * this.factor * this.pixelRatio;\n\n    },\n    toRpx(px, int) {\n      if (int) {\n        return parseInt(px / this.factor);\n      }\n      return px / this.factor;\n    },\n    /**\n     * 将http转为https\n     * @param {String}} rawUrl 图片资源url\n     */\n    _mapHttpToHttps(rawUrl) {\n        if (rawUrl.indexOf(':') < 0) {\n            return rawUrl;\n        }\n        const urlComponent = rawUrl.split(':');\n        if (urlComponent.length === 2) {\n            if (urlComponent[0] === 'http') {\n                urlComponent[0] = 'https';\n                return `${urlComponent[0]}:${urlComponent[1]}`;\n            }\n        }\n        return rawUrl;\n    },\n}\nComponent({\n    properties: {\n    },\n    created() {\n        const sysInfo = wx.getSystemInfoSync();\n        const screenWidth = sysInfo.screenWidth;\n        this.factor = screenWidth / 750;\n    },\n    methods: Object.assign({\n        /**\n         * 计算画布的高度\n         * @param {*} config\n         */\n        getHeight(config) {\n            const getTextHeight = (text) => {\n                let fontHeight = text.lineHeight || text.fontSize;\n                let height = 0;\n                if (text.baseLine === 'top') {\n                    height = fontHeight;\n                } else if (text.baseLine === 'middle') {\n                    height = fontHeight / 2;\n                } else {\n                    height = 0;\n                }\n                return height;\n            }\n            const heightArr = [];\n            (config.blocks || []).forEach((item) => {\n                heightArr.push(item.y + item.height);\n            });\n            (config.texts  || []).forEach((item) => {\n                let height;\n                if (Object.prototype.toString.call(item.text) === '[object Array]') {\n                    item.text.forEach((i) => {\n                        height = getTextHeight({...i, baseLine: item.baseLine});\n                        heightArr.push(item.y + height);\n                    });\n                } else {\n                    height = getTextHeight(item);\n                    heightArr.push(item.y + height);\n                }\n            });\n            (config.images || []).forEach((item) => {\n                heightArr.push(item.y + item.height);\n            });\n            (config.lines || []).forEach((item) => {\n                heightArr.push(item.startY);\n                heightArr.push(item.endY);\n            });\n            const sortRes = heightArr.sort((a, b) => b - a);\n            let canvasHeight = 0;\n            if (sortRes.length > 0) {\n                canvasHeight = sortRes[0];\n            }\n            if (config.height < canvasHeight || !config.height) {\n                return canvasHeight;\n            } else {\n                return config.height;\n            }\n        },\n        create(config) {\n            this.ctx = wx.createCanvasContext('canvasid', this);\n\n            this.pixelRatio = config.pixelRatio || 1;\n            const height = this.getHeight(config);\n            this.initCanvas(config.width, height, config.debug)\n                .then(() => {\n                    // 设置画布底色\n                    if (config.backgroundColor) {\n                        this.ctx.save();\n                        this.ctx.setFillStyle(config.backgroundColor);\n                        this.ctx.fillRect(0, 0, this.toPx(config.width), this.toPx(height));\n                        this.ctx.restore();\n                    }\n                    const { texts = [], images = [], blocks = [], lines = [] } = config;\n                    const queue = this.drawArr\n                        .concat(texts.map((item) => {\n                            item.type = 'text';\n                            item.zIndex = item.zIndex || 0;\n                            return item;\n                        }))\n                        .concat(blocks.map((item) => {\n                            item.type = 'block';\n                            item.zIndex = item.zIndex || 0;\n                            return item;\n                        }))\n                        .concat(lines.map((item) => {\n                            item.type = 'line';\n                            item.zIndex = item.zIndex || 0;\n                            return item;\n                        }));\n                    // 按照顺序排序\n                    queue.sort((a, b) => a.zIndex - b.zIndex);\n\n                    queue.forEach((item) => {\n                        if (item.type === 'image') {\n                            this.drawImage(item)\n                        } else if (item.type === 'text') {\n                            this.drawText(item)\n                        } else if (item.type === 'block') {\n                            this.drawBlock(item)\n                        } else if (item.type === 'line') {\n                            this.drawLine(item)\n                        }\n                    });\n\n                    const res = wx.getSystemInfoSync();\n                    const platform = res.platform;\n                    let time = 0;\n                    if (platform === 'android') {\n                        // 在安卓平台，经测试发现如果海报过于复杂在转换时需要做延时，要不然样式会错乱\n                        time = 300;\n                    }\n                    this.ctx.draw(false, () => {\n                        setTimeout(() => {\n                            wx.canvasToTempFilePath({\n                                canvasId: 'canvasid',\n                                success: (res) => {\n                                    this.triggerEvent('success', res.tempFilePath);\n                                },\n                                fail: (err) => {\n                                    this.triggerEvent('fail', err);\n                                },\n                            }, this);\n                        }, time);\n                    });\n                })\n                .catch((err) => {\n                    wx.showToast({ icon: 'none', title: err.errMsg || '生成失败' });\n                    console.error(err);\n                });\n        },\n    }, main, handle, helper),\n});\n\n"
  },
  {
    "path": "miniprogram_npm/wxa-plugin-canvas/index/index.json",
    "content": "{\n    \"component\": true\n}"
  },
  {
    "path": "miniprogram_npm/wxa-plugin-canvas/index/index.wxml",
    "content": "<!--index.wxml-->\n<view class=\"container\">\n  <canvas canvas-id='canvasid' class=\"canvas {{debug ? 'debug' : 'pro'}}\" style='width: {{pxWidth}}px; height: {{pxHeight}}px;'></canvas>\n</view>\n"
  },
  {
    "path": "miniprogram_npm/wxa-plugin-canvas/index/index.wxss",
    "content": ".canvas {\n    width: 750rpx;\n    height: 750rpx;\n}\n.canvas.pro {\n    position: absolute;\n    bottom: 0;\n    left: 0;\n    transform: translate3d(-9999rpx, 0, 0);\n}\n.canvas.debug {\n    position: absolute;\n    bottom: 0;\n    left: 0;\n    border: 1rpx solid #ccc;\n}"
  },
  {
    "path": "miniprogram_npm/wxa-plugin-canvas/poster/index.js",
    "content": "Component({\n    properties: {\n        config: {\n            type: Object,\n            value: {},\n        },\n        preload: {  // 是否预下载图片资源\n            type: Boolean,\n            value: false,\n        },\n        hideLoading: {  // 是否隐藏loading\n            type: Boolean,\n            value: false,\n        }\n    },\n    ready() {\n        if (this.data.preload) {\n            const poster = this.selectComponent('#poster');\n            this.downloadStatus = 'doing';\n            poster.downloadResource(this.data.config).then(() => {\n                this.downloadStatus = 'success';\n                this.trigger('downloadSuccess');\n            }).catch((e) => {\n                this.downloadStatus = 'fail';\n                this.trigger('downloadFail', e);\n            });\n        }\n    },\n    methods: {\n        trigger(event, data) {\n            if (this.listener && typeof this.listener[event] === 'function') {\n                this.listener[event](data);\n            }\n        },\n        once(event, fun) {\n            if (typeof this.listener === 'undefined') {\n                this.listener = {};\n            }\n            this.listener[event] = fun;\n        },\n        downloadResource(reset) {\n            return new Promise((resolve, reject) => {\n                if (reset) {\n                    this.downloadStatus = null;\n                }\n                const poster = this.selectComponent('#poster');\n                if (this.downloadStatus && this.downloadStatus !== 'fail') {\n                    if (this.downloadStatus === 'success') {\n                        resolve();\n                    } else {\n                        this.once('downloadSuccess', () => resolve());\n                        this.once('downloadFail', (e) => reject(e));\n                    }\n                } else {\n                    poster.downloadResource(this.data.config)\n                        .then(() => {\n                            this.downloadStatus = 'success';\n                            resolve();\n                        })\n                        .catch((e) => reject(e));\n                }  \n            })\n        },\n        onCreate(reset = false) {\n            !this.data.hideLoading && wx.showLoading({ mask: true, title: '生成中' });\n            return this.downloadResource(typeof reset === 'boolean' && reset).then(() => {\n                !this.data.hideLoading && wx.hideLoading();\n                const poster = this.selectComponent('#poster');\n                poster.create(this.data.config);\n            })\n            .catch((err) => {\n                !this.data.hideLoading && wx.hideLoading();\n                wx.showToast({ icon: 'none', title: err.errMsg || '生成失败' });\n                console.error(err);\n                this.triggerEvent('fail', err);\n            })\n        },\n        onCreateSuccess(e) {\n            const { detail } = e;\n            this.triggerEvent('success', detail);\n        },\n        onCreateFail(err) {\n            console.error(err);\n            this.triggerEvent('fail', err);\n        }\n    }\n})"
  },
  {
    "path": "miniprogram_npm/wxa-plugin-canvas/poster/index.json",
    "content": "{\n    \"component\": true,\n    \"usingComponents\": {\n        \"we-canvas\": \"../index/index\"\n    }\n}"
  },
  {
    "path": "miniprogram_npm/wxa-plugin-canvas/poster/index.wxml",
    "content": "<view bindtap='onCreate'>\n    <slot/>\n</view>\n<we-canvas id=\"poster\" bind:success=\"onCreateSuccess\" bind:fail=\"onCreateFail\"/>"
  },
  {
    "path": "miniprogram_npm/wxa-plugin-canvas/poster/index.wxss",
    "content": ""
  },
  {
    "path": "miniprogram_npm/wxa-plugin-canvas/poster/poster.js",
    "content": "const defaultOptions = {\n    selector: '#poster'\n};\n\nfunction Poster(options = {}, that) {\n    options = {\n        ...defaultOptions,\n        ...options,\n    };\n\n    const pages = getCurrentPages();\n    let ctx = pages[pages.length - 1];\n    if (that) ctx = that\n    const poster = ctx.selectComponent(options.selector);\n    delete options.selector;\n\n    return poster;\n};\n\nPoster.create = (reset = false, that) => {\n    const poster  = Poster({}, that);\n    if (!poster) {\n        console.error('请设置组件的id=\"poster\"!!!');\n    } else {\n        return Poster({}, that).onCreate(reset);\n    }\n}\n\nexport default Poster;\n"
  },
  {
    "path": "miniprogram_npm/wxbarcode/index.js",
    "content": "module.exports = (function() {\nvar __MODS__ = {};\nvar __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexports: {} }; __MODS__[modId] = { status: 0, func: func, req: req, m: m }; };\nvar __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, \"exports\"); if (desp && desp.configurable) Object.defineProperty(m, \"exports\", { set: function (val) { if(typeof val === \"object\" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };\nvar __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };\nvar __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };\n__DEFINE__(1770445838179, function(require, module, exports) {\nmodule.exports = require('./demo/utils')\n}, function(modId) {var map = {\"./demo/utils\":1770445838180}; return __REQUIRE__(map[modId], modId); })\n__DEFINE__(1770445838180, function(require, module, exports) {\nvar barcode = require('./barcode');\nvar qrcode = require('./qrcode');\n\nfunction convert_length(length) {\n\treturn Math.round(wx.getSystemInfoSync().windowWidth * length / 750);\n}\n\nfunction barc(id, code, width, height) {\n\tbarcode.code128(wx.createCanvasContext(id), code, convert_length(width), convert_length(height))\n}\n\nfunction qrc(id, code, width, height) {\n\tqrcode.api.draw(code, {\n\t\tctx: wx.createCanvasContext(id),\n\t\twidth: convert_length(width),\n\t\theight: convert_length(height)\n\t})\n}\n\nmodule.exports = {\n\tbarcode: barc,\n\tqrcode: qrc\n}\n}, function(modId) { var map = {\"./barcode\":1770445838181,\"./qrcode\":1770445838182}; return __REQUIRE__(map[modId], modId); })\n__DEFINE__(1770445838181, function(require, module, exports) {\nvar CHAR_TILDE = 126;\nvar CODE_FNC1 = 102;\n\nvar SET_STARTA = 103;\nvar SET_STARTB = 104;\nvar SET_STARTC = 105;\nvar SET_SHIFT = 98;\nvar SET_CODEA = 101;\nvar SET_CODEB = 100;\nvar SET_STOP = 106;\n\n\nvar REPLACE_CODES = {\n    CHAR_TILDE: CODE_FNC1 //~ corresponds to FNC1 in GS1-128 standard\n}\n\nvar CODESET = {\n    ANY: 1,\n    AB: 2,\n    A: 3,\n    B: 4,\n    C: 5\n};\n\nfunction getBytes(str) {\n    var bytes = [];\n    for (var i = 0; i < str.length; i++) {\n        bytes.push(str.charCodeAt(i));\n    }\n    return bytes;\n}\n\nexports.code128 = function (ctx, text, width, height) {\n\n    width = parseInt(width);\n\n    height = parseInt(height);\n\n    var codes = stringToCode128(text);\n\n    var g = new Graphics(ctx, width, height);\n\n    var barWeight = g.area.width / ((codes.length - 3) * 11 + 35);\n\n    var x = g.area.left;\n    var y = g.area.top;\n    for (var i = 0; i < codes.length; i++) {\n        var c = codes[i];\n        //two bars at a time: 1 black and 1 white\n        for (var bar = 0; bar < 8; bar += 2) {\n            var barW = PATTERNS[c][bar] * barWeight;\n            // var barH = height - y - this.border;\n            var barH = height - y;\n            var spcW = PATTERNS[c][bar + 1] * barWeight;\n\n            //no need to draw if 0 width\n            if (barW > 0) {\n                g.fillFgRect(x, y, barW, barH);\n            }\n\n            x += barW + spcW;\n        }\n    }\n\n    ctx.draw();\n}\n\n\nfunction stringToCode128(text) {\n\n    var barc = {\n        currcs: CODESET.C\n    };\n\n    var bytes = getBytes(text);\n    //decide starting codeset\n    var index = bytes[0] == CHAR_TILDE ? 1 : 0;\n\n    var csa1 = bytes.length > 0 ? codeSetAllowedFor(bytes[index++]) : CODESET.AB;\n    var csa2 = bytes.length > 0 ? codeSetAllowedFor(bytes[index++]) : CODESET.AB;\n    barc.currcs = getBestStartSet(csa1, csa2);\n    barc.currcs = perhapsCodeC(bytes, barc.currcs);\n\n    //if no codeset changes this will end up with bytes.length+3\n    //start, checksum and stop\n    var codes = new Array();\n\n    switch (barc.currcs) {\n        case CODESET.A:\n            codes.push(SET_STARTA);\n            break;\n        case CODESET.B:\n            codes.push(SET_STARTB);\n            break;\n        default:\n            codes.push(SET_STARTC);\n            break;\n    }\n\n\n    for (var i = 0; i < bytes.length; i++) {\n        var b1 = bytes[i]; //get the first of a pair\n        //should we translate/replace\n        if (b1 in REPLACE_CODES) {\n            codes.push(REPLACE_CODES[b1]);\n            i++ //jump to next\n            b1 = bytes[i];\n        }\n\n        //get the next in the pair if possible\n        var b2 = bytes.length > (i + 1) ? bytes[i + 1] : -1;\n\n        codes = codes.concat(codesForChar(b1, b2, barc.currcs));\n        //code C takes 2 chars each time\n        if (barc.currcs == CODESET.C) i++;\n    }\n\n    //calculate checksum according to Code 128 standards\n    var checksum = codes[0];\n    for (var weight = 1; weight < codes.length; weight++) {\n        checksum += (weight * codes[weight]);\n    }\n    codes.push(checksum % 103);\n\n    codes.push(SET_STOP);\n\n    //encoding should now be complete\n    return codes;\n\n    function getBestStartSet(csa1, csa2) {\n        //tries to figure out the best codeset\n        //to start with to get the most compact code\n        var vote = 0;\n        vote += csa1 == CODESET.A ? 1 : 0;\n        vote += csa1 == CODESET.B ? -1 : 0;\n        vote += csa2 == CODESET.A ? 1 : 0;\n        vote += csa2 == CODESET.B ? -1 : 0;\n        //tie goes to B due to my own predudices\n        return vote > 0 ? CODESET.A : CODESET.B;\n    }\n\n    function perhapsCodeC(bytes, codeset) {\n        for (var i = 0; i < bytes.length; i++) {\n            var b = bytes[i]\n            if ((b < 48 || b > 57) && b != CHAR_TILDE)\n                return codeset;\n        }\n        return CODESET.C;\n    }\n\n    //chr1 is current byte\n    //chr2 is the next byte to process. looks ahead.\n    function codesForChar(chr1, chr2, currcs) {\n        var result = [];\n        var shifter = -1;\n\n        if (charCompatible(chr1, currcs)) {\n            if (currcs == CODESET.C) {\n                if (chr2 == -1) {\n                    shifter = SET_CODEB;\n                    currcs = CODESET.B;\n                }\n                else if ((chr2 != -1) && !charCompatible(chr2, currcs)) {\n                    //need to check ahead as well\n                    if (charCompatible(chr2, CODESET.A)) {\n                        shifter = SET_CODEA;\n                        currcs = CODESET.A;\n                    }\n                    else {\n                        shifter = SET_CODEB;\n                        currcs = CODESET.B;\n                    }\n                }\n            }\n        }\n        else {\n            //if there is a next char AND that next char is also not compatible\n            if ((chr2 != -1) && !charCompatible(chr2, currcs)) {\n                //need to switch code sets\n                switch (currcs) {\n                    case CODESET.A:\n                        shifter = SET_CODEB;\n                        currcs = CODESET.B;\n                        break;\n                    case CODESET.B:\n                        shifter = SET_CODEA;\n                        currcs = CODESET.A;\n                        break;\n                }\n            }\n            else {\n                //no need to shift code sets, a temporary SHIFT will suffice\n                shifter = SET_SHIFT;\n            }\n        }\n\n        //ok some type of shift is nessecary\n        if (shifter != -1) {\n            result.push(shifter);\n            result.push(codeValue(chr2));\n        }\n        else {\n            if (currcs == CODESET.C) {\n                //include next as well\n                result.push(codeValue(chr1, chr2));\n            }\n            else {\n                result.push(codeValue(chr1));\n            }\n        }\n        barc.currcs = currcs;\n\n        return result;\n    }\n}\n\n//reduce the ascii code to fit into the Code128 char table\nfunction codeValue(chr1, chr2) {\n    if (typeof chr2 == \"undefined\") {\n        return chr1 >= 32 ? chr1 - 32 : chr1 + 64;\n    }\n    else {\n        return parseInt(String.fromCharCode(chr1) + String.fromCharCode(chr2));\n    }\n}\n\nfunction charCompatible(chr, codeset) {\n    var csa = codeSetAllowedFor(chr);\n    if (csa == CODESET.ANY) return true;\n    //if we need to change from current\n    if (csa == CODESET.AB) return true;\n    if (csa == CODESET.A && codeset == CODESET.A) return true;\n    if (csa == CODESET.B && codeset == CODESET.B) return true;\n    return false;\n}\n\nfunction codeSetAllowedFor(chr) {\n    if (chr >= 48 && chr <= 57) {\n        //0-9\n        return CODESET.ANY;\n    }\n    else if (chr >= 32 && chr <= 95) {\n        //0-9 A-Z\n        return CODESET.AB;\n    }\n    else {\n        //if non printable\n        return chr < 32 ? CODESET.A : CODESET.B;\n    }\n}\n\nvar Graphics = function(ctx, width, height) {\n\n    this.width = width;\n    this.height = height;\n    this.quiet = Math.round(this.width / 40);\n    \n    this.border_size   = 0;\n    this.padding_width = 0;\n\n    this.area = {\n        width : width - this.padding_width * 2 - this.quiet * 2,\n        height: height - this.border_size * 2,\n        top   : this.border_size - 4,\n        left  : this.padding_width + this.quiet\n    };\n\n    this.ctx = ctx;\n    this.fg = \"#000000\";\n    this.bg = \"#ffffff\";\n\n    // fill background\n    this.fillBgRect(0,0, width, height);\n\n    // fill center to create border\n    this.fillBgRect(0, this.border_size, width, height - this.border_size * 2);\n}\n\n//use native color\nGraphics.prototype._fillRect = function(x, y, width, height, color) {\n    this.ctx.setFillStyle(color)\n    this.ctx.fillRect(x, y, width, height)\n}\n\nGraphics.prototype.fillFgRect = function(x,y, width, height) {\n    this._fillRect(x, y, width, height, this.fg);\n}\n\nGraphics.prototype.fillBgRect = function(x,y, width, height) {\n    this._fillRect(x, y, width, height, this.bg);\n}\n\nvar PATTERNS = [\n    [2, 1, 2, 2, 2, 2, 0, 0],  // 0\n    [2, 2, 2, 1, 2, 2, 0, 0],  // 1\n    [2, 2, 2, 2, 2, 1, 0, 0],  // 2\n    [1, 2, 1, 2, 2, 3, 0, 0],  // 3\n    [1, 2, 1, 3, 2, 2, 0, 0],  // 4\n    [1, 3, 1, 2, 2, 2, 0, 0],  // 5\n    [1, 2, 2, 2, 1, 3, 0, 0],  // 6\n    [1, 2, 2, 3, 1, 2, 0, 0],  // 7\n    [1, 3, 2, 2, 1, 2, 0, 0],  // 8\n    [2, 2, 1, 2, 1, 3, 0, 0],  // 9\n    [2, 2, 1, 3, 1, 2, 0, 0],  // 10\n    [2, 3, 1, 2, 1, 2, 0, 0],  // 11\n    [1, 1, 2, 2, 3, 2, 0, 0],  // 12\n    [1, 2, 2, 1, 3, 2, 0, 0],  // 13\n    [1, 2, 2, 2, 3, 1, 0, 0],  // 14\n    [1, 1, 3, 2, 2, 2, 0, 0],  // 15\n    [1, 2, 3, 1, 2, 2, 0, 0],  // 16\n    [1, 2, 3, 2, 2, 1, 0, 0],  // 17\n    [2, 2, 3, 2, 1, 1, 0, 0],  // 18\n    [2, 2, 1, 1, 3, 2, 0, 0],  // 19\n    [2, 2, 1, 2, 3, 1, 0, 0],  // 20\n    [2, 1, 3, 2, 1, 2, 0, 0],  // 21\n    [2, 2, 3, 1, 1, 2, 0, 0],  // 22\n    [3, 1, 2, 1, 3, 1, 0, 0],  // 23\n    [3, 1, 1, 2, 2, 2, 0, 0],  // 24\n    [3, 2, 1, 1, 2, 2, 0, 0],  // 25\n    [3, 2, 1, 2, 2, 1, 0, 0],  // 26\n    [3, 1, 2, 2, 1, 2, 0, 0],  // 27\n    [3, 2, 2, 1, 1, 2, 0, 0],  // 28\n    [3, 2, 2, 2, 1, 1, 0, 0],  // 29\n    [2, 1, 2, 1, 2, 3, 0, 0],  // 30\n    [2, 1, 2, 3, 2, 1, 0, 0],  // 31\n    [2, 3, 2, 1, 2, 1, 0, 0],  // 32\n    [1, 1, 1, 3, 2, 3, 0, 0],  // 33\n    [1, 3, 1, 1, 2, 3, 0, 0],  // 34\n    [1, 3, 1, 3, 2, 1, 0, 0],  // 35\n    [1, 1, 2, 3, 1, 3, 0, 0],  // 36\n    [1, 3, 2, 1, 1, 3, 0, 0],  // 37\n    [1, 3, 2, 3, 1, 1, 0, 0],  // 38\n    [2, 1, 1, 3, 1, 3, 0, 0],  // 39\n    [2, 3, 1, 1, 1, 3, 0, 0],  // 40\n    [2, 3, 1, 3, 1, 1, 0, 0],  // 41\n    [1, 1, 2, 1, 3, 3, 0, 0],  // 42\n    [1, 1, 2, 3, 3, 1, 0, 0],  // 43\n    [1, 3, 2, 1, 3, 1, 0, 0],  // 44\n    [1, 1, 3, 1, 2, 3, 0, 0],  // 45\n    [1, 1, 3, 3, 2, 1, 0, 0],  // 46\n    [1, 3, 3, 1, 2, 1, 0, 0],  // 47\n    [3, 1, 3, 1, 2, 1, 0, 0],  // 48\n    [2, 1, 1, 3, 3, 1, 0, 0],  // 49\n    [2, 3, 1, 1, 3, 1, 0, 0],  // 50\n    [2, 1, 3, 1, 1, 3, 0, 0],  // 51\n    [2, 1, 3, 3, 1, 1, 0, 0],  // 52\n    [2, 1, 3, 1, 3, 1, 0, 0],  // 53\n    [3, 1, 1, 1, 2, 3, 0, 0],  // 54\n    [3, 1, 1, 3, 2, 1, 0, 0],  // 55\n    [3, 3, 1, 1, 2, 1, 0, 0],  // 56\n    [3, 1, 2, 1, 1, 3, 0, 0],  // 57\n    [3, 1, 2, 3, 1, 1, 0, 0],  // 58\n    [3, 3, 2, 1, 1, 1, 0, 0],  // 59\n    [3, 1, 4, 1, 1, 1, 0, 0],  // 60\n    [2, 2, 1, 4, 1, 1, 0, 0],  // 61\n    [4, 3, 1, 1, 1, 1, 0, 0],  // 62\n    [1, 1, 1, 2, 2, 4, 0, 0],  // 63\n    [1, 1, 1, 4, 2, 2, 0, 0],  // 64\n    [1, 2, 1, 1, 2, 4, 0, 0],  // 65\n    [1, 2, 1, 4, 2, 1, 0, 0],  // 66\n    [1, 4, 1, 1, 2, 2, 0, 0],  // 67\n    [1, 4, 1, 2, 2, 1, 0, 0],  // 68\n    [1, 1, 2, 2, 1, 4, 0, 0],  // 69\n    [1, 1, 2, 4, 1, 2, 0, 0],  // 70\n    [1, 2, 2, 1, 1, 4, 0, 0],  // 71\n    [1, 2, 2, 4, 1, 1, 0, 0],  // 72\n    [1, 4, 2, 1, 1, 2, 0, 0],  // 73\n    [1, 4, 2, 2, 1, 1, 0, 0],  // 74\n    [2, 4, 1, 2, 1, 1, 0, 0],  // 75\n    [2, 2, 1, 1, 1, 4, 0, 0],  // 76\n    [4, 1, 3, 1, 1, 1, 0, 0],  // 77\n    [2, 4, 1, 1, 1, 2, 0, 0],  // 78\n    [1, 3, 4, 1, 1, 1, 0, 0],  // 79\n    [1, 1, 1, 2, 4, 2, 0, 0],  // 80\n    [1, 2, 1, 1, 4, 2, 0, 0],  // 81\n    [1, 2, 1, 2, 4, 1, 0, 0],  // 82\n    [1, 1, 4, 2, 1, 2, 0, 0],  // 83\n    [1, 2, 4, 1, 1, 2, 0, 0],  // 84\n    [1, 2, 4, 2, 1, 1, 0, 0],  // 85\n    [4, 1, 1, 2, 1, 2, 0, 0],  // 86\n    [4, 2, 1, 1, 1, 2, 0, 0],  // 87\n    [4, 2, 1, 2, 1, 1, 0, 0],  // 88\n    [2, 1, 2, 1, 4, 1, 0, 0],  // 89\n    [2, 1, 4, 1, 2, 1, 0, 0],  // 90\n    [4, 1, 2, 1, 2, 1, 0, 0],  // 91\n    [1, 1, 1, 1, 4, 3, 0, 0],  // 92\n    [1, 1, 1, 3, 4, 1, 0, 0],  // 93\n    [1, 3, 1, 1, 4, 1, 0, 0],  // 94\n    [1, 1, 4, 1, 1, 3, 0, 0],  // 95\n    [1, 1, 4, 3, 1, 1, 0, 0],  // 96\n    [4, 1, 1, 1, 1, 3, 0, 0],  // 97\n    [4, 1, 1, 3, 1, 1, 0, 0],  // 98\n    [1, 1, 3, 1, 4, 1, 0, 0],  // 99\n    [1, 1, 4, 1, 3, 1, 0, 0],  // 100\n    [3, 1, 1, 1, 4, 1, 0, 0],  // 101\n    [4, 1, 1, 1, 3, 1, 0, 0],  // 102\n    [2, 1, 1, 4, 1, 2, 0, 0],  // 103\n    [2, 1, 1, 2, 1, 4, 0, 0],  // 104\n    [2, 1, 1, 2, 3, 2, 0, 0],  // 105\n    [2, 3, 3, 1, 1, 1, 2, 0]   // 106\n]\n\n\n}, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })\n__DEFINE__(1770445838182, function(require, module, exports) {\nvar QR = (function () {\n\n    // alignment pattern\n    var adelta = [\n      0, 11, 15, 19, 23, 27, 31, // force 1 pat\n      16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24,\n      26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28\n      ];\n\n    // version block\n    var vpat = [\n        0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d,\n        0x928, 0xb78, 0x45d, 0xa17, 0x532, 0x9a6, 0x683, 0x8c9,\n        0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75,\n        0x250, 0x9d5, 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64,\n        0x541, 0xc69\n    ];\n\n    // final format bits with mask: level << 3 | mask\n    var fmtword = [\n        0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976,    //L\n        0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0,    //M\n        0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed,    //Q\n        0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b    //H\n    ];\n\n    // 4 per version: number of blocks 1,2; data width; ecc width\n    var eccblocks = [\n        1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17,\n        1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28,\n        1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22,\n        1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16,\n        1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22,\n        2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28,\n        2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26,\n        2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26,\n        2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24,\n        2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28,\n        4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24,\n        2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28,\n        4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22,\n        3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24,\n        5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24,\n        5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30,\n        1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28,\n        5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28,\n        3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26,\n        3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28,\n        4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30,\n        2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24,\n        4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30,\n        6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30,\n        8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30,\n        10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30,\n        8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30,\n        3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30,\n        7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30,\n        5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30,\n        13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30,\n        17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30,\n        17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30,\n        13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30,\n        12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30,\n        6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30,\n        17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30,\n        4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30,\n        20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30,\n        19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30\n    ];\n\n    // Galois field log table\n    var glog = [\n        0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,\n        0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71,\n        0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45,\n        0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, 0xc9, 0x9a, 0x09, 0x78, 0x4d, 0xe4, 0x72, 0xa6,\n        0x06, 0xbf, 0x8b, 0x62, 0x66, 0xdd, 0x30, 0xfd, 0xe2, 0x98, 0x25, 0xb3, 0x10, 0x91, 0x22, 0x88,\n        0x36, 0xd0, 0x94, 0xce, 0x8f, 0x96, 0xdb, 0xbd, 0xf1, 0xd2, 0x13, 0x5c, 0x83, 0x38, 0x46, 0x40,\n        0x1e, 0x42, 0xb6, 0xa3, 0xc3, 0x48, 0x7e, 0x6e, 0x6b, 0x3a, 0x28, 0x54, 0xfa, 0x85, 0xba, 0x3d,\n        0xca, 0x5e, 0x9b, 0x9f, 0x0a, 0x15, 0x79, 0x2b, 0x4e, 0xd4, 0xe5, 0xac, 0x73, 0xf3, 0xa7, 0x57,\n        0x07, 0x70, 0xc0, 0xf7, 0x8c, 0x80, 0x63, 0x0d, 0x67, 0x4a, 0xde, 0xed, 0x31, 0xc5, 0xfe, 0x18,\n        0xe3, 0xa5, 0x99, 0x77, 0x26, 0xb8, 0xb4, 0x7c, 0x11, 0x44, 0x92, 0xd9, 0x23, 0x20, 0x89, 0x2e,\n        0x37, 0x3f, 0xd1, 0x5b, 0x95, 0xbc, 0xcf, 0xcd, 0x90, 0x87, 0x97, 0xb2, 0xdc, 0xfc, 0xbe, 0x61,\n        0xf2, 0x56, 0xd3, 0xab, 0x14, 0x2a, 0x5d, 0x9e, 0x84, 0x3c, 0x39, 0x53, 0x47, 0x6d, 0x41, 0xa2,\n        0x1f, 0x2d, 0x43, 0xd8, 0xb7, 0x7b, 0xa4, 0x76, 0xc4, 0x17, 0x49, 0xec, 0x7f, 0x0c, 0x6f, 0xf6,\n        0x6c, 0xa1, 0x3b, 0x52, 0x29, 0x9d, 0x55, 0xaa, 0xfb, 0x60, 0x86, 0xb1, 0xbb, 0xcc, 0x3e, 0x5a,\n        0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9, 0xa0, 0x51, 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7,\n        0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf\n    ];\n\n    // Galios field exponent table\n    var gexp = [\n        0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,\n        0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0,\n        0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23,\n        0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1,\n        0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0,\n        0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2,\n        0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce,\n        0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc,\n        0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54,\n        0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73,\n        0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff,\n        0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41,\n        0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6,\n        0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,\n        0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,\n        0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00\n    ];\n\n    // Working buffers:\n    // data input and ecc append, image working buffer, fixed part of image, run lengths for badness\n    var strinbuf=[], eccbuf=[], qrframe=[], framask=[], rlens=[]; \n    // Control values - width is based on version, last 4 are from table.\n    var version, width, neccblk1, neccblk2, datablkw, eccblkwid;\n    var ecclevel = 2;\n    // set bit to indicate cell in qrframe is immutable.  symmetric around diagonal\n    function setmask(x, y)\n    {\n        var bt;\n        if (x > y) {\n            bt = x;\n            x = y;\n            y = bt;\n        }\n        // y*y = 1+3+5...\n        bt = y;\n        bt *= y;\n        bt += y;\n        bt >>= 1;\n        bt += x;\n        framask[bt] = 1;\n    }\n\n    // enter alignment pattern - black to qrframe, white to mask (later black frame merged to mask)\n    function putalign(x, y)\n    {\n        var j;\n\n        qrframe[x + width * y] = 1;\n        for (j = -2; j < 2; j++) {\n            qrframe[(x + j) + width * (y - 2)] = 1;\n            qrframe[(x - 2) + width * (y + j + 1)] = 1;\n            qrframe[(x + 2) + width * (y + j)] = 1;\n            qrframe[(x + j + 1) + width * (y + 2)] = 1;\n        }\n        for (j = 0; j < 2; j++) {\n            setmask(x - 1, y + j);\n            setmask(x + 1, y - j);\n            setmask(x - j, y - 1);\n            setmask(x + j, y + 1);\n        }\n    }\n\n    //========================================================================\n    // Reed Solomon error correction\n    // exponentiation mod N\n    function modnn(x)\n    {\n        while (x >= 255) {\n            x -= 255;\n            x = (x >> 8) + (x & 255);\n        }\n        return x;\n    }\n\n    var genpoly = [];\n\n    // Calculate and append ECC data to data block.  Block is in strinbuf, indexes to buffers given.\n    function appendrs(data, dlen, ecbuf, eclen)\n    {\n        var i, j, fb;\n\n        for (i = 0; i < eclen; i++)\n            strinbuf[ecbuf + i] = 0;\n        for (i = 0; i < dlen; i++) {\n            fb = glog[strinbuf[data + i] ^ strinbuf[ecbuf]];\n            if (fb != 255)     /* fb term is non-zero */\n                for (j = 1; j < eclen; j++)\n                    strinbuf[ecbuf + j - 1] = strinbuf[ecbuf + j] ^ gexp[modnn(fb + genpoly[eclen - j])];\n            else\n                for( j = ecbuf ; j < ecbuf + eclen; j++ )\n                    strinbuf[j] = strinbuf[j + 1];\n            strinbuf[ ecbuf + eclen - 1] = fb == 255 ? 0 : gexp[modnn(fb + genpoly[0])];\n        }\n    }\n\n    //========================================================================\n    // Frame data insert following the path rules\n\n    // check mask - since symmetrical use half.\n    function ismasked(x, y)\n    {\n        var bt;\n        if (x > y) {\n            bt = x;\n            x = y;\n            y = bt;\n        }\n        bt = y;\n        bt += y * y;\n        bt >>= 1;\n        bt += x;\n        return framask[bt];\n    }\n\n    //========================================================================\n    //  Apply the selected mask out of the 8.\n    function  applymask(m)\n    {\n        var x, y, r3x, r3y;\n\n        switch (m) {\n        case 0:\n            for (y = 0; y < width; y++)\n                for (x = 0; x < width; x++)\n                    if (!((x + y) & 1) && !ismasked(x, y))\n                        qrframe[x + y * width] ^= 1;\n            break;\n        case 1:\n            for (y = 0; y < width; y++)\n                for (x = 0; x < width; x++)\n                    if (!(y & 1) && !ismasked(x, y))\n                        qrframe[x + y * width] ^= 1;\n            break;\n        case 2:\n            for (y = 0; y < width; y++)\n                for (r3x = 0, x = 0; x < width; x++, r3x++) {\n                    if (r3x == 3)\n                        r3x = 0;\n                    if (!r3x && !ismasked(x, y))\n                        qrframe[x + y * width] ^= 1;\n                }\n            break;\n        case 3:\n            for (r3y = 0, y = 0; y < width; y++, r3y++) {\n                if (r3y == 3)\n                    r3y = 0;\n                for (r3x = r3y, x = 0; x < width; x++, r3x++) {\n                    if (r3x == 3)\n                        r3x = 0;\n                    if (!r3x && !ismasked(x, y))\n                        qrframe[x + y * width] ^= 1;\n                }\n            }\n            break;\n        case 4:\n            for (y = 0; y < width; y++)\n                for (r3x = 0, r3y = ((y >> 1) & 1), x = 0; x < width; x++, r3x++) {\n                    if (r3x == 3) {\n                        r3x = 0;\n                        r3y = !r3y;\n                    }\n                    if (!r3y && !ismasked(x, y))\n                        qrframe[x + y * width] ^= 1;\n                }\n            break;\n        case 5:\n            for (r3y = 0, y = 0; y < width; y++, r3y++) {\n                if (r3y == 3)\n                    r3y = 0;\n                for (r3x = 0, x = 0; x < width; x++, r3x++) {\n                    if (r3x == 3)\n                        r3x = 0;\n                    if (!((x & y & 1) + !(!r3x | !r3y)) && !ismasked(x, y))\n                        qrframe[x + y * width] ^= 1;\n                }\n            }\n            break;\n        case 6:\n            for (r3y = 0, y = 0; y < width; y++, r3y++) {\n                if (r3y == 3)\n                    r3y = 0;\n                for (r3x = 0, x = 0; x < width; x++, r3x++) {\n                    if (r3x == 3)\n                        r3x = 0;\n                    if (!(((x & y & 1) + (r3x && (r3x == r3y))) & 1) && !ismasked(x, y))\n                        qrframe[x + y * width] ^= 1;\n                }\n            }\n            break;\n        case 7:\n            for (r3y = 0, y = 0; y < width; y++, r3y++) {\n                if (r3y == 3)\n                    r3y = 0;\n                for (r3x = 0, x = 0; x < width; x++, r3x++) {\n                    if (r3x == 3)\n                        r3x = 0;\n                    if (!(((r3x && (r3x == r3y)) + ((x + y) & 1)) & 1) && !ismasked(x, y))\n                        qrframe[x + y * width] ^= 1;\n                }\n            }\n            break;\n        }\n        return;\n    }\n\n    // Badness coefficients.\n    var N1 = 3, N2 = 3, N3 = 40, N4 = 10;\n\n    // Using the table of the length of each run, calculate the amount of bad image \n    // - long runs or those that look like finders; called twice, once each for X and Y\n    function badruns(length)\n    {\n        var i;\n        var runsbad = 0;\n        for (i = 0; i <= length; i++)\n            if (rlens[i] >= 5)\n                runsbad += N1 + rlens[i] - 5;\n        // BwBBBwB as in finder\n        for (i = 3; i < length - 1; i += 2)\n            if (rlens[i - 2] == rlens[i + 2]\n                && rlens[i + 2] == rlens[i - 1]\n                && rlens[i - 1] == rlens[i + 1]\n                && rlens[i - 1] * 3 == rlens[i]\n                // white around the black pattern? Not part of spec\n                && (rlens[i - 3] == 0 // beginning\n                    || i + 3 > length  // end\n                    || rlens[i - 3] * 3 >= rlens[i] * 4 || rlens[i + 3] * 3 >= rlens[i] * 4)\n               )\n                runsbad += N3;\n        return runsbad;\n    }\n\n    // Calculate how bad the masked image is - blocks, imbalance, runs, or finders.\n    function badcheck()\n    {\n        var x, y, h, b, b1;\n        var thisbad = 0;\n        var bw = 0;\n\n        // blocks of same color.\n        for (y = 0; y < width - 1; y++)\n            for (x = 0; x < width - 1; x++)\n                if ((qrframe[x + width * y] && qrframe[(x + 1) + width * y]\n                     && qrframe[x + width * (y + 1)] && qrframe[(x + 1) + width * (y + 1)]) // all black\n                    || !(qrframe[x + width * y] || qrframe[(x + 1) + width * y]\n                         || qrframe[x + width * (y + 1)] || qrframe[(x + 1) + width * (y + 1)])) // all white\n                    thisbad += N2;\n\n        // X runs\n        for (y = 0; y < width; y++) {\n            rlens[0] = 0;\n            for (h = b = x = 0; x < width; x++) {\n                if ((b1 = qrframe[x + width * y]) == b)\n                    rlens[h]++;\n                else\n                    rlens[++h] = 1;\n                b = b1;\n                bw += b ? 1 : -1;\n            }\n            thisbad += badruns(h);\n        }\n\n        // black/white imbalance\n        if (bw < 0)\n            bw = -bw;\n\n        var big = bw;\n        var count = 0;\n        big += big << 2;\n        big <<= 1;\n        while (big > width * width)\n            big -= width * width, count++;\n        thisbad += count * N4;\n\n        // Y runs\n        for (x = 0; x < width; x++) {\n            rlens[0] = 0;\n            for (h = b = y = 0; y < width; y++) {\n                if ((b1 = qrframe[x + width * y]) == b)\n                    rlens[h]++;\n                else\n                    rlens[++h] = 1;\n                b = b1;\n            }\n            thisbad += badruns(h);\n        }\n        return thisbad;\n    }\n\n    function genframe(instring)\n    {\n        var x, y, k, t, v, i, j, m;\n\n    // find the smallest version that fits the string\n        t = instring.length;\n        version = 0;\n        do {\n            version++;\n            k = (ecclevel - 1) * 4 + (version - 1) * 16;\n            neccblk1 = eccblocks[k++];\n            neccblk2 = eccblocks[k++];\n            datablkw = eccblocks[k++];\n            eccblkwid = eccblocks[k];\n            k = datablkw * (neccblk1 + neccblk2) + neccblk2 - 3 + (version <= 9);\n            if (t <= k)\n                break;\n        } while (version < 40);\n\n    // FIXME - insure that it fits insted of being truncated\n        width = 17 + 4 * version;\n\n    // allocate, clear and setup data structures\n        v = datablkw + (datablkw + eccblkwid) * (neccblk1 + neccblk2) + neccblk2;\n        for( t = 0; t < v; t++ )\n            eccbuf[t] = 0;\n        strinbuf = instring.slice(0);\n\n        for( t = 0; t < width * width; t++ )\n            qrframe[t] = 0;\n\n        for( t = 0 ; t < (width * (width + 1) + 1) / 2; t++)\n            framask[t] = 0;\n\n    // insert finders - black to frame, white to mask\n        for (t = 0; t < 3; t++) {\n            k = 0;\n            y = 0;\n            if (t == 1)\n                k = (width - 7);\n            if (t == 2)\n                y = (width - 7);\n            qrframe[(y + 3) + width * (k + 3)] = 1;\n            for (x = 0; x < 6; x++) {\n                qrframe[(y + x) + width * k] = 1;\n                qrframe[y + width * (k + x + 1)] = 1;\n                qrframe[(y + 6) + width * (k + x)] = 1;\n                qrframe[(y + x + 1) + width * (k + 6)] = 1;\n            }\n            for (x = 1; x < 5; x++) {\n                setmask(y + x, k + 1);\n                setmask(y + 1, k + x + 1);\n                setmask(y + 5, k + x);\n                setmask(y + x + 1, k + 5);\n            }\n            for (x = 2; x < 4; x++) {\n                qrframe[(y + x) + width * (k + 2)] = 1;\n                qrframe[(y + 2) + width * (k + x + 1)] = 1;\n                qrframe[(y + 4) + width * (k + x)] = 1;\n                qrframe[(y + x + 1) + width * (k + 4)] = 1;\n            }\n        }\n\n    // alignment blocks\n        if (version > 1) {\n            t = adelta[version];\n            y = width - 7;\n            for (;;) {\n                x = width - 7;\n                while (x > t - 3) {\n                    putalign(x, y);\n                    if (x < t)\n                        break;\n                    x -= t;\n                }\n                if (y <= t + 9)\n                    break;\n                y -= t;\n                putalign(6, y);\n                putalign(y, 6);\n            }\n        }\n\n    // single black\n        qrframe[8 + width * (width - 8)] = 1;\n\n    // timing gap - mask only\n        for (y = 0; y < 7; y++) {\n            setmask(7, y);\n            setmask(width - 8, y);\n            setmask(7, y + width - 7);\n        }\n        for (x = 0; x < 8; x++) {\n            setmask(x, 7);\n            setmask(x + width - 8, 7);\n            setmask(x, width - 8);\n        }\n\n    // reserve mask-format area\n        for (x = 0; x < 9; x++)\n            setmask(x, 8);\n        for (x = 0; x < 8; x++) {\n            setmask(x + width - 8, 8);\n            setmask(8, x);\n        }\n        for (y = 0; y < 7; y++)\n            setmask(8, y + width - 7);\n\n    // timing row/col\n        for (x = 0; x < width - 14; x++)\n            if (x & 1) {\n                setmask(8 + x, 6);\n                setmask(6, 8 + x);\n            }\n            else {\n                qrframe[(8 + x) + width * 6] = 1;\n                qrframe[6 + width * (8 + x)] = 1;\n            }\n\n    // version block\n        if (version > 6) {\n            t = vpat[version - 7];\n            k = 17;\n            for (x = 0; x < 6; x++)\n                for (y = 0; y < 3; y++, k--)\n                    if (1 & (k > 11 ? version >> (k - 12) : t >> k)) {\n                        qrframe[(5 - x) + width * (2 - y + width - 11)] = 1;\n                        qrframe[(2 - y + width - 11) + width * (5 - x)] = 1;\n                    }\n            else {\n                setmask(5 - x, 2 - y + width - 11);\n                setmask(2 - y + width - 11, 5 - x);\n            }\n        }\n\n    // sync mask bits - only set above for white spaces, so add in black bits\n        for (y = 0; y < width; y++)\n            for (x = 0; x <= y; x++)\n                if (qrframe[x + width * y])\n                    setmask(x, y);\n\n    // convert string to bitstream\n    // 8 bit data to QR-coded 8 bit data (numeric or alphanum, or kanji not supported)\n        v = strinbuf.length;\n\n    // string to array\n        for( i = 0 ; i < v; i++ )\n            eccbuf[i] = strinbuf.charCodeAt(i);\n        strinbuf = eccbuf.slice(0);\n\n    // calculate max string length\n        x = datablkw * (neccblk1 + neccblk2) + neccblk2;\n        if (v >= x - 2) {\n            v = x - 2;\n            if (version > 9)\n                v--;\n        }\n\n    // shift and repack to insert length prefix\n        i = v;\n        if (version > 9) {\n            strinbuf[i + 2] = 0;\n            strinbuf[i + 3] = 0;\n            while (i--) {\n                t = strinbuf[i];\n                strinbuf[i + 3] |= 255 & (t << 4);\n                strinbuf[i + 2] = t >> 4;\n            }\n            strinbuf[2] |= 255 & (v << 4);\n            strinbuf[1] = v >> 4;\n            strinbuf[0] = 0x40 | (v >> 12);\n        }\n        else {\n            strinbuf[i + 1] = 0;\n            strinbuf[i + 2] = 0;\n            while (i--) {\n                t = strinbuf[i];\n                strinbuf[i + 2] |= 255 & (t << 4);\n                strinbuf[i + 1] = t >> 4;\n            }\n            strinbuf[1] |= 255 & (v << 4);\n            strinbuf[0] = 0x40 | (v >> 4);\n        }\n    // fill to end with pad pattern\n        i = v + 3 - (version < 10);\n        while (i < x) {\n            strinbuf[i++] = 0xec;\n            // buffer has room    if (i == x)      break;\n            strinbuf[i++] = 0x11;\n        }\n\n    // calculate and append ECC\n\n    // calculate generator polynomial\n        genpoly[0] = 1;\n        for (i = 0; i < eccblkwid; i++) {\n            genpoly[i + 1] = 1;\n            for (j = i; j > 0; j--)\n                genpoly[j] = genpoly[j]\n                ? genpoly[j - 1] ^ gexp[modnn(glog[genpoly[j]] + i)] : genpoly[j - 1];\n            genpoly[0] = gexp[modnn(glog[genpoly[0]] + i)];\n        }\n        for (i = 0; i <= eccblkwid; i++)\n            genpoly[i] = glog[genpoly[i]]; // use logs for genpoly[] to save calc step\n\n    // append ecc to data buffer\n        k = x;\n        y = 0;\n        for (i = 0; i < neccblk1; i++) {\n            appendrs(y, datablkw, k, eccblkwid);\n            y += datablkw;\n            k += eccblkwid;\n        }\n        for (i = 0; i < neccblk2; i++) {\n            appendrs(y, datablkw + 1, k, eccblkwid);\n            y += datablkw + 1;\n            k += eccblkwid;\n        }\n    // interleave blocks\n        y = 0;\n        for (i = 0; i < datablkw; i++) {\n            for (j = 0; j < neccblk1; j++)\n                eccbuf[y++] = strinbuf[i + j * datablkw];\n            for (j = 0; j < neccblk2; j++)\n                eccbuf[y++] = strinbuf[(neccblk1 * datablkw) + i + (j * (datablkw + 1))];\n        }\n        for (j = 0; j < neccblk2; j++)\n            eccbuf[y++] = strinbuf[(neccblk1 * datablkw) + i + (j * (datablkw + 1))];\n        for (i = 0; i < eccblkwid; i++)\n            for (j = 0; j < neccblk1 + neccblk2; j++)\n                eccbuf[y++] = strinbuf[x + i + j * eccblkwid];\n        strinbuf = eccbuf;\n\n    // pack bits into frame avoiding masked area.\n        x = y = width - 1;\n        k = v = 1;         // up, minus\n        /* inteleaved data and ecc codes */\n        m = (datablkw + eccblkwid) * (neccblk1 + neccblk2) + neccblk2;\n        for (i = 0; i < m; i++) {\n            t = strinbuf[i];\n            for (j = 0; j < 8; j++, t <<= 1) {\n                if (0x80 & t)\n                    qrframe[x + width * y] = 1;\n                do {        // find next fill position\n                    if (v)\n                        x--;\n                    else {\n                        x++;\n                        if (k) {\n                            if (y != 0)\n                                y--;\n                            else {\n                                x -= 2;\n                                k = !k;\n                                if (x == 6) {\n                                    x--;\n                                    y = 9;\n                                }\n                            }\n                        }\n                        else {\n                            if (y != width - 1)\n                                y++;\n                            else {\n                                x -= 2;\n                                k = !k;\n                                if (x == 6) {\n                                    x--;\n                                    y -= 8;\n                                }\n                            }\n                        }\n                    }\n                    v = !v;\n                } while (ismasked(x, y));\n            }\n        }\n\n    // save pre-mask copy of frame\n        strinbuf = qrframe.slice(0);\n        t = 0;           // best\n        y = 30000;         // demerit\n    // for instead of while since in original arduino code\n    // if an early mask was \"good enough\" it wouldn't try for a better one\n    // since they get more complex and take longer.\n        for (k = 0; k < 8; k++) {\n            applymask(k);      // returns black-white imbalance\n            x = badcheck();\n            if (x < y) { // current mask better than previous best?\n                y = x;\n                t = k;\n            }\n            if (t == 7)\n                break;       // don't increment i to a void redoing mask\n            qrframe = strinbuf.slice(0); // reset for next pass\n        }\n        if (t != k)         // redo best mask - none good enough, last wasn't t\n            applymask(t);\n\n    // add in final mask/ecclevel bytes\n        y = fmtword[t + ((ecclevel - 1) << 3)];\n        // low byte\n        for (k = 0; k < 8; k++, y >>= 1)\n            if (y & 1) {\n                qrframe[(width - 1 - k) + width * 8] = 1;\n                if (k < 6)\n                    qrframe[8 + width * k] = 1;\n                else\n                    qrframe[8 + width * (k + 1)] = 1;\n            }\n        // high byte\n        for (k = 0; k < 7; k++, y >>= 1)\n            if (y & 1) {\n                qrframe[8 + width * (width - 7 + k)] = 1;\n                if (k)\n                    qrframe[(6 - k) + width * 8] = 1;\n                else\n                    qrframe[7 + width * 8] = 1;\n            }\n\n    // return image\n        return qrframe;\n    }\n\n    var _canvas = null,\n        _size = null;\n\n    var api = {\n\n        get ecclevel () {\n            return ecclevel;\n        },\n\n        set ecclevel (val) {\n            ecclevel = val;\n        },\n\n        get size () {\n            return _size;\n        },\n\n        set size (val) {\n            _size = val\n        },\n\n        get canvas () {\n            return _canvas;\n        },\n\n        set canvas (el) {\n            _canvas = el;\n        },\n\n        getFrame: function (string) {\n            return genframe(string);\n        },\n\n        draw: function (string, canvas, size, ecc) {\n            \n            ecclevel = ecc || ecclevel;\n            canvas = canvas || _canvas;\n\n            if (!canvas) {\n                console.warn('No canvas provided to draw QR code in!')\n                return;\n            }\n\n            size = size || _size || Math.min(canvas.width, canvas.height);\n\n            var frame = genframe(string),\n                ctx = canvas.ctx,\n                px = Math.round(size / (width + 8));\n\n            var roundedSize = px * (width + 8),\n                offset = Math.floor((size - roundedSize) / 2);\n\n            size = roundedSize;\n\n            ctx.clearRect(0, 0, canvas.width, canvas.height);\n            ctx.setFillStyle('#000000');\n\n            for (var i = 0; i < width; i++) {\n                for (var j = 0; j < width; j++) {\n                    if (frame[j * width + i]) {\n                        ctx.fillRect(px * (4 + i) + offset, px * (4 + j) + offset, px, px);\n                    }\n                }\n            }\n            ctx.draw();\n        }\n    }\n\n    module.exports = {\n        api: api\n    }\n\n})()\n}, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })\nreturn __REQUIRE__(1770445838179);\n})()\n//miniprogram-npm-outsideDeps=[]\n//# sourceMappingURL=index.js.map"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"wechat-app-mall\",\n  \"version\": \"8.4.0\",\n  \"description\": \"删除 <float-menu />\",\n  \"main\": \"app.js\",\n  \"dependencies\": {\n    \"@vant/weapp\": \"^1.11.7\",\n    \"apifm-wxapi\": \"^26.2.5\",\n    \"dayjs\": \"^1.11.19\",\n    \"mp-html\": \"^2.5.2\",\n    \"wxa-plugin-canvas\": \"^1.1.12\",\n    \"wxbarcode\": \"^1.0.2\"\n  },\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/EastWorld/wechat-app-mall.git\"\n  },\n  \"keywords\": [\n    \"微店\",\n    \"小店\",\n    \"微商城\"\n  ],\n  \"author\": \"gooking\",\n  \"license\": \"ISC\",\n  \"bugs\": {\n    \"url\": \"https://github.com/EastWorld/wechat-app-mall/issues\"\n  },\n  \"homepage\": \"https://github.com/EastWorld/wechat-app-mall#readme\"\n}\n"
  },
  {
    "path": "packageCps/pages/goods-details/cps-jd.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../../utils/auth')\nconst CONFIG = require('../../../config.js')\nimport Poster from 'wxa-plugin-canvas/poster/poster'\n\nPage({\n  data: {\n    createTabs: false, //绘制tabs\n    tabs: [{\n      tabs_name: '商品简介',\n      view_id: 'swiper-container',\n      topHeight: 0\n    }, {\n      tabs_name: '商品详情',\n      view_id: 'goods-des-info',\n      topHeight: 0,\n    }],\n    goodsDetail: {},\n    hasMoreSelect: false,\n    selectSizePrice: 0,\n    selectSizeOPrice: 0,\n    totalScoreToPay: 0,\n    shopNum: 0,\n    hideShopPopup: true,\n    buyNumber: 1,\n    buyNumMin: 1,\n    buyNumMax: 0,\n    propertyChildIds: \"\",\n    propertyChildNames: \"\",\n    canSubmit: false, //  选中规格尺寸时候是否允许加入购物车\n    shopType: \"addShopCar\", //购物类型，加入购物车或立即购买，默认为加入购物车\n  },\n  bindscroll(e) {\n    if (this.data.tabclicked) {\n      return\n    }\n    //计算页面 轮播图、详情、评价(砍价)view 高度\n    this.getTopHeightFunction()\n    var tabsHeight = this.data.tabsHeight //顶部距离（tabs高度）\n    if (this.data.tabs[0].topHeight-tabsHeight<=0 && 0 < this.data.tabs[1].topHeight-tabsHeight) { //临界值，根据自己的需求来调整\n      this.setData({\n        active: this.data.tabs[0].tabs_name //设置当前标签栏\n      })\n    } else if (this.data.tabs[1].topHeight-tabsHeight<=0) {\n      this.setData({\n        active: this.data.tabs[1].tabs_name\n      })\n    }\n  },\n  onLoad(e) {\n    // e.id = 802819\n    // 读取分享链接中的邀请人编号\n    if (e && e.inviter_id) {\n      wx.setStorageSync('referrer', e.inviter_id)\n    }\n    // 读取小程序码中的邀请人编号\n    if (e && e.scene) {\n      const scene = decodeURIComponent(e.scene) // 处理扫码进商品详情页面的逻辑\n      if (scene && scene.split(',').length >= 2) {\n        e.id = scene.split(',')[0]\n        wx.setStorageSync('referrer', scene.split(',')[1])\n      }\n    }\n    this.data.goodsId = e.id\n    this.goodsDetail()\n  },\n  async goodsDetail() {\n    const token = wx.getStorageSync('token')\n    const res = await WXAPI.goodsDetail(this.data.goodsId, token ? token : '')\n    if (res.code == 0) {\n      this.setData({\n        goodsDetail: res.data,\n      })\n      this.cpsJdGoodsDetail(res.data.basicInfo.yyId)\n    }\n  },\n  async cpsJdGoodsDetail(skuId) {\n    const res = await WXAPI.cpsJdGoodsDetail({\n      skuIds: skuId\n    })\n    if (res.code == 0) {\n      const _data = res.data[0]\n      if (_data.detailImages) {\n        _data.detailImagesArray = _data.detailImages.split(',')\n      }\n      this.setData({\n        cpsJdGoodsDetail: _data\n      })\n    }\n  },\n  selectAddress: function () {\n    wx.navigateTo({\n      url: \"/pages/select-address/index\"\n    })\n  },\n  onShow (){\n    this.setData({\n      createTabs: true //绘制tabs\n    })\n    //计算tabs高度\n    var query = wx.createSelectorQuery();\n    query.select('#tabs').boundingClientRect((rect) => {\n      var tabsHeight = rect.height\n      this.setData({\n        tabsHeight:tabsHeight\n      })\n    }).exec()\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.goodsFavCheck()\n      }\n    })\n  },\n  getTopHeightFunction() {\n    var that = this\n    var tabs = that.data.tabs\n    tabs.forEach((element, index) => {\n      var viewId = \"#\" + element.view_id\n      that.getTopHeight(viewId, index)\n    });\n  },\n  getTopHeight(viewId, index) {\n    var query = wx.createSelectorQuery();\n    query.select(viewId).boundingClientRect((rect) => {\n      if (!rect) {\n        return\n      }\n      let top = rect.top\n      var tabs = this.data.tabs\n      tabs[index].topHeight = top\n      this.setData({\n        tabs: tabs\n      })\n    }).exec()\n    \n  },\n  async goodsFavCheck() {\n    const res = await WXAPI.goodsFavCheck(wx.getStorageSync('token'), this.data.goodsId)\n    if (res.code == 0) {\n      this.setData({\n        faved: true\n      })\n    } else {\n      this.setData({\n        faved: false\n      })\n    }\n  },\n  async addFav(){\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        if (this.data.faved) {\n          // 取消收藏\n          WXAPI.goodsFavDeleteV2({\n            token: wx.getStorageSync('token'),\n            goodsId: this.data.goodsId,\n            type: 1\n          }).then(res => {\n            this.goodsFavCheck()\n          })\n        } else {\n          const extJsonStr = {\n            wxaurl: `/packageCps/pages/goods-details/cps-jd?id=${this.data.goodsId}`,\n            skuId: this.data.goodsId,\n            pic: this.data.goodsDetail.basicInfo.pic,\n            name: this.data.goodsDetail.basicInfo.name\n          }\n          // 加入收藏\n          WXAPI.goodsFavAdd({\n            token: wx.getStorageSync('token'),\n            goodsId: this.data.goodsId,\n            type: 1,\n            extJsonStr: JSON.stringify(extJsonStr)\n          }).then(res => {\n            this.goodsFavCheck()\n          })\n        }\n      }\n    })\n  },\n  goShopCar: function() {\n    wx.reLaunch({\n      url: \"/pages/shop-cart/index\"\n    });\n  },\n  toAddShopCar: function() {\n    this.setData({\n      shopType: \"addShopCar\"\n    })\n    this.bindGuiGeTap();\n  },\n  async tobuy() {\n    const token = wx.getStorageSync('token')\n    if (!token) {\n      wx.showToast({\n        title: '请先登陆',\n        icon: 'none'\n      })\n      return\n    }\n    const res = await WXAPI.cpsJdGoodsShotUrl(token, this.data.goodsDetail.basicInfo.yyId)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    // res.data.shortURL\n    const url = encodeURIComponent(res.data.shortURL)\n    wx.navigateToMiniProgram({\n      appId: 'wx91d27dbf599dff74',\n      path: `/pages/union/proxy/proxy?spreadUrl=${url}`\n    })\n  },\n  toPingtuan: function(e) {\n    let pingtuanopenid = 0\n    if (e.currentTarget.dataset.pingtuanopenid) {\n      pingtuanopenid = e.currentTarget.dataset.pingtuanopenid\n    }\n    this.setData({\n      shopType: \"toPingtuan\",\n      selectSizePrice: this.data.goodsDetail.basicInfo.pingtuanPrice,\n      selectSizeOPrice: this.data.goodsDetail.basicInfo.originalPrice,\n      pingtuanopenid: pingtuanopenid,\n      \n      hideShopPopup: false,\n      skuGoodsPic: this.data.goodsDetail.basicInfo.pic\n    });\n    \n  },\n  /**\n   * 规格选择弹出框\n   */\n  bindGuiGeTap: function() {\n    this.setData({\n      hideShopPopup: false\n    })\n  },\n  /**\n   * 规格选择弹出框隐藏\n   */\n  closePopupTap: function() {\n    this.setData({\n      hideShopPopup: true\n    })\n  },\n  stepChange(event) {\n    this.setData({\n      buyNumber: event.detail\n    })\n  },\n  /**\n   * 选择商品规格\n   */\n  async labelItemTap(e) {\n    const propertyindex = e.currentTarget.dataset.propertyindex\n    const propertychildindex = e.currentTarget.dataset.propertychildindex\n\n    const property = this.data.goodsDetail.properties[propertyindex]\n    const child = property.childsCurGoods[propertychildindex]\n    // 取消该分类下的子栏目所有的选中状态\n    property.childsCurGoods.forEach(child => {\n      child.active = false\n    })\n    // 设置当前选中状态\n    property.optionValueId = child.id\n    child.active = true\n    // 获取所有的选中规格尺寸数据\n    const needSelectNum = this.data.goodsDetail.properties.length\n    let curSelectNum = 0;\n    let propertyChildIds = \"\";\n    let propertyChildNames = \"\";\n\n    this.data.goodsDetail.properties.forEach(p => {\n      p.childsCurGoods.forEach(c => {\n        if (c.active) {\n          curSelectNum++;\n          propertyChildIds = propertyChildIds + p.id + \":\" + c.id + \",\";\n          propertyChildNames = propertyChildNames + p.name + \":\" + c.name + \"  \";\n        }\n      })\n    })\n    let canSubmit = false;\n    if (needSelectNum == curSelectNum) {\n      canSubmit = true;\n    }\n    let skuGoodsPic = this.data.skuGoodsPic\n    if (this.data.goodsDetail.subPics && this.data.goodsDetail.subPics.length > 0) {\n      const _subPic = this.data.goodsDetail.subPics.find(ele => {\n        return ele.optionValueId == child.id\n      })\n      if (_subPic) {\n        skuGoodsPic = _subPic.pic\n      }\n    }\n    this.setData({\n      goodsDetail: this.data.goodsDetail,\n      canSubmit,\n      skuGoodsPic,\n      propertyChildIds,\n      propertyChildNames,\n    })\n    this.calculateGoodsPrice()\n  },\n  async calculateGoodsPrice() {\n    // 计算最终的商品价格\n    let price = this.data.goodsDetail.basicInfo.minPrice\n    let originalPrice = this.data.goodsDetail.basicInfo.originalPrice\n    let totalScoreToPay = this.data.goodsDetail.basicInfo.minScore\n    let buyNumMax = this.data.goodsDetail.basicInfo.stores\n    let buyNumber = this.data.goodsDetail.basicInfo.minBuyNumber\n    if (this.data.shopType == 'toPingtuan') {\n      price = this.data.goodsDetail.basicInfo.pingtuanPrice\n    }\n    // 计算 sku 价格\n    if (this.data.canSubmit) {\n      const token = wx.getStorageSync('token')\n      const res = await WXAPI.goodsPriceV2({\n        token: token ? token : '',\n        goodsId: this.data.goodsDetail.basicInfo.id,\n        propertyChildIds: this.data.propertyChildIds\n      })\n      if (res.code == 0) {\n        price = res.data.price\n        if (this.data.shopType == 'toPingtuan') {\n          price = res.data.pingtuanPrice\n        }\n        originalPrice = res.data.originalPrice\n        totalScoreToPay = res.data.score\n        buyNumMax = res.data.stores\n      }\n    }\n    // 计算配件价格\n    if (this.data.goodsAddition) {\n      this.data.goodsAddition.forEach(big => {\n        big.items.forEach(small => {\n          if (small.active) {\n            price = (price*100 + small.price*100) / 100\n          }\n        })\n      })\n    }\n    this.setData({\n      selectSizePrice: price,\n      selectSizeOPrice: originalPrice,\n      totalScoreToPay: totalScoreToPay,\n      buyNumMax,\n      buyNumber: (buyNumMax >= buyNumber) ? buyNumber : 0\n    });\n  },\n  /**\n   * 选择可选配件\n   */\n  async labelItemTap2(e) {\n    const propertyindex = e.currentTarget.dataset.propertyindex\n    const propertychildindex = e.currentTarget.dataset.propertychildindex\n\n    const goodsAddition = this.data.goodsAddition\n    const property = goodsAddition[propertyindex]\n    const child = property.items[propertychildindex]\n    if (child.active) {\n      // 该操作为取消选择\n      child.active = false\n      this.setData({\n        goodsAddition\n      })\n      this.calculateGoodsPrice()\n      return\n    }\n    // 单选配件取消所有子栏目选中状态\n    if (property.type == 0) {\n      property.items.forEach(child => {\n        child.active = false\n      })\n    }\n    // 设置当前选中状态\n    child.active = true\n    this.setData({\n      goodsAddition\n    })\n    this.calculateGoodsPrice()\n  },\n  /**\n   * 组建立即购买信息\n   */\n  buliduBuyNowInfo: function(shoptype) {\n    var shopCarMap = {};\n    shopCarMap.goodsId = this.data.goodsId;\n    shopCarMap.pic = this.data.imageDomain + this.data.price.pic;\n    shopCarMap.name = this.data.price.skuName;\n    shopCarMap.price = this.data.price.priceSale;\n    shopCarMap.left = \"\";\n    shopCarMap.active = true;\n    shopCarMap.number = this.data.buyNumber;\n    \n    var buyNowInfo = {};\n    buyNowInfo.shopNum = 0;\n    buyNowInfo.shopList = [shopCarMap];\n    \n    return buyNowInfo;\n  },\n  onShareAppMessage() {\n    return {\n      title: this.data.goodsDetail.basicInfo.name,\n      path: '/packageCps/pages/goods-details/cps-jd?id=' + this.data.goodsId + '&inviter_id=' + wx.getStorageSync('uid'),\n      success: function(res) {\n        // 转发成功\n      },\n      fail: function(res) {\n        // 转发失败\n      }\n    }\n  },\n  onShareTimeline() {    \n    return {\n      title: this.data.goodsDetail.basicInfo.name,\n      query: 'id=' + this.data.goodsId + '&inviter_id=' + wx.getStorageSync('uid'),\n      imageUrl: this.data.goodsDetail.basicInfo.pic\n    }\n  },\n  reputation: function(goodsId) {\n    var that = this;\n    WXAPI.goodsReputation({\n      goodsId: goodsId\n    }).then(function(res) {\n      if (res.code == 0) {\n        res.data.forEach(ele => {\n          if (ele.goods.goodReputation == 0) {\n            ele.goods.goodReputation = 1\n          } else if (ele.goods.goodReputation == 1) {\n            ele.goods.goodReputation = 3\n          } else if (ele.goods.goodReputation == 2) {\n            ele.goods.goodReputation = 5\n          }\n        })\n        that.setData({\n          reputation: res.data\n        });\n      }\n    })\n  },\n  pingtuanList: function(goodsId) {\n    var that = this;\n    WXAPI.pingtuanList({\n      goodsId: goodsId,\n      status: 0\n    }).then(function(res) {\n      if (res.code == 0) {\n        that.setData({\n          pingtuanList: res.data.result\n        });\n      }\n    })\n  },\n  getVideoSrc: function(videoId) {\n    var that = this;\n    WXAPI.videoDetail(videoId).then(function(res) {\n      if (res.code == 0) {\n        that.setData({\n          videoMp4Src: res.data.fdMp4\n        });\n      }\n    })\n  },\n  joinKanjia(){\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.doneJoinKanjia();\n      }\n    })\n  },\n  doneJoinKanjia: function() { // 报名参加砍价活动\n    const _this = this;\n    if (!_this.data.curGoodsKanjia) {\n      return;\n    }\n    wx.showLoading({\n      title: '加载中',\n      mask: true\n    })\n    WXAPI.kanjiaJoin(wx.getStorageSync('token'), _this.data.curGoodsKanjia.id).then(function(res) {\n      wx.hideLoading()\n      if (res.code == 0) {\n        _this.setData({\n          kjJoinUid: wx.getStorageSync('uid'),\n          myHelpDetail: null\n        })\n        _this.getGoodsDetailAndKanjieInfo(_this.data.goodsDetail.basicInfo.id)\n      } else {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n      }\n    })\n  },\n  joinPingtuan: function(e) {\n    let pingtuanopenid = e.currentTarget.dataset.pingtuanopenid\n    wx.navigateTo({\n      url: \"/pages/to-pay-order/index?orderType=buyNow&pingtuanOpenId=\" + pingtuanopenid\n    })\n  },\n  goIndex() {\n    wx.switchTab({\n      url: '/pages/index/index',\n    });\n  },\n  helpKanjia() {\n    const _this = this;\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        _this.helpKanjiaDone()\n      }\n    })\n  },\n  helpKanjiaDone(){\n    const _this = this;\n    WXAPI.kanjiaHelp(wx.getStorageSync('token'), _this.data.kjId, _this.data.kjJoinUid, '').then(function (res) {\n      if (res.code != 0) {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n        return;\n      }\n      _this.setData({\n        myHelpDetail: res.data\n      });\n      wx.showModal({\n        title: '成功',\n        content: '成功帮TA砍掉 ' + res.data.cutPrice + ' 元',\n        showCancel: false\n      })\n      _this.getGoodsDetailAndKanjieInfo(_this.data.goodsDetail.basicInfo.id)\n    })\n  },\n  closePop(){\n    this.setData({\n      posterShow: false\n    })\n  },\n  async drawSharePic() {\n    const _this = this\n    const accountInfo = wx.getAccountInfoSync()\n    const envVersion = accountInfo.miniProgram.envVersion\n    const qrcodeRes = await WXAPI.wxaQrcode({\n      scene: _this.data.goodsId + ',' + wx.getStorageSync('uid'),\n      page: '/packageCps/pages/goods-details/cps-jd',\n      is_hyaline: true,\n      autoColor: true,\n      expireHours: 1,\n      env_version: envVersion,\n      check_path: envVersion == 'release' ? true : false,\n    })\n    if (qrcodeRes.code != 0) {\n      wx.showToast({\n        title: qrcodeRes.msg,\n        icon: 'none'\n      })\n      return\n    }\n    const qrcode = qrcodeRes.data\n    const pic = _this.data.goodsDetail.basicInfo.pic\n    wx.getImageInfo({\n      src: pic,\n      success(res) {\n        const height = 490 * res.height / res.width\n        _this.drawSharePicDone(height, qrcode)\n      },\n      fail(e) {\n        console.error(e)\n      }\n    })\n  },\n  drawSharePicDone(picHeight, qrcode) {\n    const _this = this\n    const _baseHeight = 74 + (picHeight + 120)\n    this.setData({\n      posterConfig: {\n        width: 750,\n        height: picHeight + 660,\n        backgroundColor: '#fff',\n        debug: false,\n        blocks: [\n          {\n            x: 76,\n            y: 74,\n            width: 604,\n            height: picHeight + 120,\n            borderWidth: 2,\n            borderColor: '#c2aa85',\n            borderRadius: 8\n          }\n        ],\n        images: [\n          {\n            x: 133,\n            y: 133,\n            url: _this.data.goodsDetail.basicInfo.pic, // 商品图片\n            width: 490,\n            height: picHeight\n          },\n          {\n            x: 76,\n            y: _baseHeight + 199,\n            url: qrcode, // 二维码\n            width: 222,\n            height: 222\n          }\n        ],\n        texts: [\n          {\n            x: 375,\n            y: _baseHeight + 80,\n            width: 650,\n            lineNum:2,\n            text: _this.data.goodsDetail.basicInfo.name,\n            textAlign: 'center',\n            fontSize: 40,\n            color: '#333'\n          },\n          {\n            x: 375,\n            y: _baseHeight + 180,\n            text: '￥' + _this.data.goodsDetail.basicInfo.minPrice,\n            textAlign: 'center',\n            fontSize: 50,\n            color: '#e64340'\n          },\n          {\n            x: 352,\n            y: _baseHeight + 320,\n            text: '长按识别小程序码',\n            fontSize: 28,\n            color: '#999'\n          }\n        ],\n      }\n    }, () => {\n      Poster.create();\n    });\n  },\n  onPosterSuccess(e) {\n    console.log('success:', e)\n    this.setData({\n      posterImg: e.detail,\n      showposterImg: true\n    })\n  },\n  onPosterFail(e) {\n    console.error('fail:', e)\n  },\n  savePosterPic() {\n    const _this = this\n    wx.saveImageToPhotosAlbum({\n      filePath: this.data.posterImg,\n      success: (res) => {\n        wx.showModal({\n          content: '已保存到手机相册',\n          showCancel: false,\n          confirmText: '知道了',\n          confirmColor: '#333'\n        })\n      },\n      complete: () => {\n        _this.setData({\n          showposterImg: false\n        })\n      },\n      fail: (res) => {\n        if (res.errMsg.indexOf('fail privacy permission is not authorized') != -1) {\n          wx.showModal({\n            content: '请阅读并同意隐私条款以后才能继续本操作',\n            confirmText: '阅读协议',\n            cancelText: '取消',\n            success (res) {\n              if (res.confirm) {\n                wx.requirePrivacyAuthorize() // 弹出用户隐私授权框\n              }\n            }\n          })\n        } else if (res.errMsg.indexOf('fail auth deny') != -1) {\n          wx.showModal({\n            content: '本次操作需要您同意并将图片写入手机相册',\n            confirmText: '立即授权',\n            cancelText: '取消',\n            success (res) {\n              if (res.confirm) {\n                // 弹出设置窗口，让用户去设置\n                wx.openSetting({\n                  withSubscriptions: true,\n                  fail: aaa => console.log(aaa)\n                });\n              }\n            }\n          })\n        } else {\n          console.error(res);\n          wx.showToast({\n            title: res.errMsg,\n            icon: 'none'\n          })\n        }\n      }\n    })\n  },\n  previewImage(e) {\n    const url = e.currentTarget.dataset.url\n    wx.previewImage({\n      current: url, // 当前显示图片的http链接\n      urls: [url] // 需要预览的图片http链接列表\n    })\n  },\n  onTabsChange(e) {\n    var index = e.detail.index\n    this.setData({\n      toView: this.data.tabs[index].view_id,\n      tabclicked: true\n    })\n    setTimeout(() => {\n      this.setData({\n        tabclicked: false\n      })\n    }, 1000);\n  },\n  backToHome() {\n    wx.switchTab({\n      url: '/pages/index/index',\n    })\n  }\n})\n"
  },
  {
    "path": "packageCps/pages/goods-details/cps-jd.json",
    "content": "{\n  \"navigationBarTitleText\": \"商品详情\",\n  \"usingComponents\": {\n    \"poster\": \"wxa-plugin-canvas/poster\"\n  }\n}"
  },
  {
    "path": "packageCps/pages/goods-details/cps-jd.wxml",
    "content": "<view class=\"container\">\n  <van-sticky wx:if=\"{{createTabs}}\">\n    <view id=\"tabs\" class=\"tabs-container\">\n      <van-tabs sticky bind:click=\"onTabsChange\" custom-class=\"\" active=\"{{ active }}\">\n        <van-tab wx:for=\"{{tabs}}\" title=\"{{item.tabs_name}}\" name=\"{{item.tabs_name}}\" />\n      </van-tabs>\n    </view>\n  </van-sticky>\n  <scroll-view class=\"scroll-container\" scroll-into-view=\"{{toView}}\" scroll-y=\"true\" scroll-with-animation=\"true\"\n    bindscroll=\"bindscroll\">\n    <view class=\"swiper-container\" id=\"swiper-container\">\n      <swiper class=\"swiper_box\" indicator-dots=\"true\" indicator-active-color=\"#fff\" autoplay circular>\n        <swiper-item wx:for=\"{{cpsJdGoodsDetail.imageInfo.imageList}}\" wx:key=\"id\">\n          <image src=\"{{item.url}}\" class=\"slide-image\" mode=\"aspectFill\" lazy-load=\"true\" />\n        </swiper-item>\n      </swiper>\n    </view>\n    <view class=\"goods-info vcell\">\n      <view class=\"goods-info-top-container\">\n        <view class=\"goods-profile\">\n          <view class=\"p\"><text>¥</text> {{goodsDetail.basicInfo.minPrice}}</view>\n          <view wx:if=\"{{goodsDetail.basicInfo.originalPrice && goodsDetail.basicInfo.originalPrice > 0}}\" class=\"goods-price\"\n            style='color:#aaa;text-decoration:line-through;padding: 15rpx 0rpx 0rpx 15rpx;'><text>¥</text>\n            {{goodsDetail.basicInfo.originalPrice}}</view>\n        </view>\n        <view class=\"goods-info-fx\">\n          <view class='item left'>\n            <van-icon name=\"share-o\" size=\"24px\" />\n            <view class=\"icon-title\">分享</view>\n            <button open-type='share'></button>\n          </view>\n          <view class='item' bindtap=\"drawSharePic\">\n            <van-icon name=\"qr\" size=\"24px\" />\n            <view class=\"icon-title\">二维码</view>\n          </view>\n        </view>\n      </view>\n      <view class=\"goods-title\">{{goodsDetail.basicInfo.name}}</view>\n      <view class=\"characteristic\">{{goodsDetail.basicInfo.characteristic}}</view>\n    </view>\n\n    <view class='space'></view>\n    <view class=\"goods-des-info\" style=\"margin-top:35rpx;\" wx:if=\"{{pingtuanList}}\">\n      <view class=\"label-title\" style=\"border-bottom:1px solid #eee;\">{{pingtuanList.length}}人在拼单，可直接参与</view>\n      <view class=\"goods-text\" style=\"margin-top:15rpx;border-bottom:1px solid #eee;overflow:hidden;\"\n        wx:for=\"{{pingtuanList}}\" wx:key=\"id\">\n        <view style=\"width:150rpx;float:left;\">\n          <image style=\"width: 150rpx; height: 150rpx;\" src=\"{{item.apiExtUser.avatarUrl}}\"></image>\n          <view style=\"width:150rpx;text-align:center;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;\">\n            {{item.apiExtUser.nick}}</view>\n        </view>\n        <view style=\"width:500rpx;float:left;margin-left:35rpx;\">\n          <view>已有\n            <text style=\"color:red\"> {{item.helpNumber}} </text>人参与</view>\n          <view style=\"color: #B0B0B0;font-size:24rpx;\">截止: {{item.dateEnd}}</view>\n          <button type=\"warn\" size=\"mini\" data-pingtuanopenid=\"{{item.id}}\" bindtap=\"toPingtuan\"> 去拼单 </button>\n        </view>\n      </view>\n    </view>\n    <van-cell wx:if=\"{{hasMoreSelect && goodsDetailSkuShowType==0}}\" custom-class=\"vw100\" is-link\n      bind:click=\"bindGuiGeTap\">\n      <view slot=\"title\">\n        请选择:\n        <block wx:for=\"{{goodsDetail.properties}}\" wx:key=\"id\"> {{item.name}}</block>\n        <block wx:for=\"{{goodsAddition}}\" wx:key=\"id\"> {{item.name}}</block>\n      </view>\n    </van-cell>\n    <view class=\"size-label-box2\" wx:if=\"{{goodsDetailSkuShowType==1}}\">\n      <view class=\"label-title\">选择商品规格</view>\n      <view class=\"size-label-box\">\n        <block wx:for=\"{{goodsDetail.properties}}\" wx:for-item=\"property\" wx:for-index=\"idx\" wx:key=\"id\">\n          <view class=\"label\">{{property.name}}</view>\n          <view class=\"label-item-box\">\n            <view class=\"label-item {{item.active ? 'active' : '' }}\" wx:for=\"{{property.childsCurGoods}}\" wx:key=\"id\"\n              bindtap=\"labelItemTap\" data-propertyindex=\"{{idx}}\" data-propertychildindex=\"{{index}}\">\n              {{item.name}}\n            </view>\n          </view>\n        </block>\n      </view>\n      <van-cell title=\"购买数量\">\n        <view>\n          <van-stepper value=\"{{ buyNumber }}\" min=\"{{ buyNumMin }}\" max=\"{{ buyNumMax }}\" bind:change=\"stepChange\" />\n        </view>\n      </van-cell>\n    </view>\n    <view wx:if=\"{{shopSubdetail}}\" class=\"shop-container\">\n      <image mode=\"aspectFill\" src=\"{{shopSubdetail.info.pic}}\"></image>\n      <view class=\"info\">\n        <view class=\"title\">{{shopSubdetail.info.name}}</view>\n        <view class=\"address\">{{shopSubdetail.info.address}}</view>\n      </view>\n    </view>\n    <view class=\"goods-des-info\" id=\"goods-des-info\">\n      <view class=\"label-title\">\n        <view class=\"left\">商品详情</view>\n      </view>\n      <view class=\"goods-text\">\n        <image wx:for=\"{{ cpsJdGoodsDetail.detailImagesArray }}\" wx:key=\"id\" mode=\"widthFix\" src=\"{{ item }}\"></image>\n      </view>\n    </view>\n    <van-cell-group wx:if=\"{{!curGoodsKanjia && reputation}}\" custom-class=\"vw100\" title=\"宝贝评价\">\n      <block wx:for=\"{{reputation}}\" wx:key=\"id\">\n        <van-cell custom-class=\"reputation-cell\" icon=\"{{item.user.avatarUrl}}\" title=\"{{item.user.nick}}\"\n          label=\"{{item.goods.dateReputation}}\" border=\"{{ false }}\">\n          <van-rate value=\"{{ item.goods.goodReputation }}\" color=\"#e64340\" readonly />\n        </van-cell>\n        <van-cell wx:if=\"{{ item.goods.goodReputationRemark }}\" title-class=\"reputation-cell-reamrk\"\n          title=\"{{item.goods.goodReputationRemark}}\" />\n        <view wx:if=\"{{ item.reputationPics }}\" class=\"reputation-pics\">\n          <image wx:for=\"{{item.reputationPics}}\" wx:for-item=\"picItem\" src=\"{{ picItem.pic }}\" mode=\"aspectFill\"\n            bindtap=\"previewImage\" data-url=\"{{ picItem.pic }}\"></image>\n        </view>\n        <van-cell wx:if=\"{{ item.goods.goodReputationReply }}\" title-class=\"reputation-cell-reamrk\"\n          title=\"掌柜回复:{{item.goods.goodReputationReply}}\" />\n      </block>\n    </van-cell-group>\n    <van-goods-action wx:if=\"{{!curGoodsKanjia}}\">\n      <van-goods-action-icon icon=\"chat-o\" text=\"客服\" open-type=\"contact\"\n        send-message-title=\"{{goodsDetail.basicInfo.name}}\" send-message-img=\"{{goodsDetail.basicInfo.pic}}\"\n        send-message-path=\"/packageCps/pages/goods-details/cps-jd?id={{goodsDetail.basicInfo.id}}\" show-message-card=\"{{ true }}\" />\n      <van-goods-action-icon icon=\"{{faved?'like':'like-o'}}\" text=\"收藏\" bind:click=\"addFav\" />\n      <van-goods-action-button text=\"立即购买\" data-shopType=\"{{shopType}}\"\n        bind:click=\"tobuy\" />\n    </van-goods-action>\n  </scroll-view>\n</view>\n\n<block wx:if=\"{{posterShow}}\">\n  <view class=\"poster-mask\"></view>\n  <view class=\"poster\">\n    <canvas class=\"canvas\" style=\"{{canvasstyle}}\" canvas-id=\"firstCanvas\"></canvas>\n  </view>\n  <view class=\"poster-btn\">\n    <button type=\"primary\" size=\"mini\" bindtap='_saveToMobile'> 保存图片 </button>\n    <button type=\"warn\" size=\"mini\" bindtap='closePop'> 关闭 </button>\n  </view>\n</block>\n\n<poster id=\"poster\" config=\"{{posterConfig}}\" bind:success=\"onPosterSuccess\" bind:fail=\"onPosterFail\"></poster>\n<view wx:if=\"{{showposterImg}}\" class=\"popup-mask\"></view>\n<view wx:if=\"{{showposterImg}}\" class=\"posterImg-box\">\n  <image mode=\"widthFix\" class=\"posterImg\" src=\"{{posterImg}}\"></image>\n  <view class=\"btn-create\" bindtap=\"savePosterPic\">保存到相册</view>\n</view>\n\n<van-popup show=\"{{ !hideShopPopup }}\" round closeable position=\"bottom\"\n  custom-style=\"padding-top:48rpx;max-height: 80%;\" bind:close=\"closePopupTap\">\n  <van-card centered price=\"{{price.priceSale}}\" origin-price=\"{{ price.priceJd ? price.priceJd : '' }}\"\n    title=\"{{price.skuName}}\" thumb=\"{{ imageDomain }}{{ price.pic }}\" />\n  <van-cell title=\"购买数量\">\n    <view>\n      <van-stepper value=\"{{ buyNumber }}\" min=\"{{ 1 }}\" max=\"{{ 999 }}\" bind:change=\"stepChange\" />\n    </view>\n  </van-cell>\n  <van-cell-group wx:if=\"{{ curAddressData }}\" title=\"配送地址\">\n    <van-cell title=\"{{curAddressData.linkMan}} {{curAddressData.mobile}}\" label=\"{{curAddressData.address}}\" value=\"更换\"\n      is-link bind:click=\"selectAddress\" />\n  </van-cell-group>\n  <van-button wx:if=\"{{!curAddressData}}\" bindtap=\"selectAddress\" type=\"warning\" block>添加收货地址</van-button>\n  <van-button wx:if=\"{{curAddressData && !canPurchase}}\" type=\"warning\" disabled block>该地区已售罄</van-button>\n  <van-button wx:if=\"{{curAddressData && canPurchase && shopType =='addShopCar'}}\" bindtap=\"addShopCar\" type=\"danger\"\n    block>加入购物车</van-button>\n  <van-button wx:if=\"{{curAddressData && canPurchase && (shopType =='tobuy' || shopType =='toPingtuan')}}\"\n    data-shopType=\"{{shopType}}\" bindtap=\"buyNow\" type=\"danger\" block>立即购买</van-button>\n</van-popup>"
  },
  {
    "path": "packageCps/pages/goods-details/cps-jd.wxss",
    "content": "page,\nview,\nimage,\ninput,\ntextarea {\n  display: block;\n  box-sizing: border-box;\n}\n\n.van-cell {\n  padding: 10px 38rpx;\n}\n\n.container {\n  background-color: #F2f2f2;\n  min-height: 100%;\n  padding-bottom: 100rpx;\n}\n\n.scroll-container {\n  height: 100vh;\n  padding-bottom: 64rpx;\n}\n\n.tabs-container {\n  width: 100%;\n  display: flex;\n  background-color: white;\n}\n\n.home-o {\n  width: 20%;\n}\n\n.swiper-container {\n  width: 100%;\n  position: relative;\n}\n\n.swiper_box {\n  width: 100%;\n  height: 748rpx;\n}\n\nswiper-item image {\n  width: 100%;\n  display: inline-block;\n  overflow: hidden;\n  height: 748rpx;\n}\n\n.goods-info {\n  background-color: #fff;\n  padding: 35rpx 0;\n  width: 100%;\n  position: relative;\n}\n\n.goods-info-top-container {\n  display: flex;\n  justify-content: space-between;\n  margin-bottom: 10rpx;\n}\n\n.goods-info-fx {\n  bottom: 60rpx;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-right: 35rpx;\n}\n\n.goods-info-fx .item {\n  /* height: 50rpx; */\n  right: 130rpx;\n  top: 100rpx;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  font-size: 24rpx;\n  background: #fff;\n  z-index: 20;\n}\n\n.goods-info-fx .left {\n  margin-right: 10px;\n}\n\n.goods-info-fx .icon-title{\n  padding-top:5px ;\n  font-size: 11px;\n}\n\n.goods-info-fx .item image {\n  width: 50rpx;\n  height: 50rpx;\n}\n\n.goods-info-fx .item button {\n  position: absolute;\n  height: 100%;\n  width: 100%;\n  opacity: 0;\n  z-index: 99;\n}\n\n.goods-info .goods-title {\n  box-sizing: border-box;\n  padding: 0 30rpx;\n  font-size: 32rpx;\n  line-height: 1.4;\n  color: #000;\n  /* padding-bottom: 26rpx; */\n}\n\n.goods-info .goods-share {\n  box-sizing: border-box;\n  padding: 0 30rpx;\n  font-size: 25rpx;\n  line-height: 1.4;\n  color: #CC0000;\n  padding-top: 26rpx;\n}\n\n.vcell{\n  border-bottom-left-radius: 12px;\n  border-bottom-right-radius: 12px;\n}\n\n.goods-profile {\n  display: flex;\n  align-items: center;\n}\n\n.goods-profile .p {\n  color: #e64340;\n  font-size: 20pt;\n  margin-left: 30rpx;\n}\n\n.goods-profile .p text {\n  font-size: 12pt;\n}\n\n.goods-profile .r {\n  color: #ccc;\n  font-size: 10pt;\n  margin-left: 30rpx;\n}\n\n.row-arrow {\n  width: 100vw;\n  padding: 0 32rpx;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  height: 102rpx;\n  font-size: 28rpx;\n  line-height: 102rpx;\n  background: #fff;\n  margin-bottom: 32rpx;\n}\n\n.row-arrow image {\n  width: 40rpx;\n  height: 40rpx;\n}\n\n.goods-des-info {\n  width: 100%;\n  box-sizing: border-box;\n  background-color: #fff;\n  border-radius: 12px;\n}\n\n.label-title {\n  font-size: 28rpx;\n  color: #000000;\n  padding: 30rpx;\n  display: flex;\n  justify-content: space-between;\n}\n\n.label-title .left{\n  border-left: 3px solid #e64340;\n  height: auto;\n  padding-left: 10px;\n}\n\n.goods-text {\n  padding: 0 10rpx;\n  font-size: 28rpx;\n  color: #666666;\n  line-height: 56rpx;\n  margin-bottom: 30rpx;\n}\n\n.goods-text image {\n  width: 100%;\n}\n\n.des-imgs {\n  width: 100%;\n}\n\n.des-imgs image {\n  width: 100%;\n}\n\n.footer-box {\n  width: 100%;\n  height: 100rpx;\n  background-color: #fff;\n  position: fixed;\n  bottom: 0;\n  left: 0;\n  display: flex;\n  box-shadow: 0 0 1rpx 0;\n  align-items: center;\n}\n\n.footer-box .contact {\n  position: relative;\n  height: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-left: 32rpx;\n}\n\n.footer-box .contact button {\n  position: absolute;\n  height: 100%;\n  width: 100%;\n  opacity: 0;\n  z-index: 99;\n}\n\n.footer-box .contact image {\n  width: 60rpx;\n  height: 60rpx;\n}\n\n.footer-box .shop-cart-btn {\n  position: relative;\n  height: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-left: 32rpx;\n}\n\n.footer-box .shop-cart-btn image {\n  width: 55rpx;\n  height: 55rpx;\n}\n\n.fav-icon {\n  width: 60rpx;\n  height: 60rpx;\n  margin-left: 32rpx;\n  /*707070*/\n}\n\n.footer-box .shop-cart-btn .shop-num {\n  position: absolute;\n  color: #fff;\n  left: 32rpx;\n  top: 10rpx;\n\n  width: 40rpx;\n  height: 40rpx;\n  line-height: 40rpx;\n  text-align: center;\n  border-radius: 50%;\n  background: #e64340;\n  font-size: 24rpx;\n}\n\n.footer-box .join-shop-cart {\n  text-align: center;\n  height: 100%;\n  line-height: 100rpx;\n  background-color: #ff6850;\n  color: #fff;\n  font-size: 34rpx;\n  flex: 1;\n  margin-left: 32rpx;\n}\n\n.footer-box .now-buy {\n  text-align: center;\n  height: 100%;\n  width: 250rpx;\n  line-height: 100rpx;\n  background-color: #e64340;\n  color: #fff;\n  font-size: 34rpx;\n  flex: 1;\n}\n\n.show-popup {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  z-index: 999;\n}\n\n.popup-mask {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.5);\n  z-index: 5;\n}\n\n.popup-contents {\n  position: fixed;\n  left: 0;\n  bottom: 0;\n  width: 100%;\n  background-color: #fff;\n  z-index: 6;\n}\n\n.pop-goods-info {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-left: 32rpx;\n  margin-right: 32rpx;\n  padding: 30rpx 0;\n  border-bottom: 1px solid #eee;\n}\n\n.pop-img-box {\n  width: 120rpx;\n  height: 120rpx;\n  overflow: hidden;\n  margin-right: 26rpx;\n}\n\n.pop-img-box .goods-thumbnail {\n  width: 120rpx;\n  height: 120rpx;\n}\n\n.pop-goods-title {\n  width: 484rpx;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  overflow: hidden;\n  font-size: 26rpx;\n  color: #000000;\n}\n\n.pop-goods-price {\n  font-size: 26rpx;\n  color: #e64340;\n  margin-top: 20rpx;\n}\n\n.pop-goods-price .t1 {\n  font-size: 50rpx;\n}\n\n.pop-goods-price-original {\n  font-size: 26rpx;\n  color: #aaa;\n  text-decoration: line-through;\n  margin-left: 16rpx;\n}\n\n.pop-goods-close {\n  width: 36rpx;\n  height: 36rpx;\n}\n\n.goods-property-container {\n  height: 56px;\n  align-items: center;\n  border-radius: 12px;\n  padding: 0 16px;\n}\n\n.size-label-box2 {\n  width: 100vw;\n  background: #fff;\n}\n\n.size-label-box .label {\n  font-size: 26rpx;\n  color: #000;\n  padding-left: 30rpx;\n  padding: 30rpx 0 20rpx 30rpx;\n}\n\n.size-label-box .label-item-box {\n  display: flex;\n  margin-left: 30rpx;\n  flex-direction: row;\n  flex-wrap: wrap;\n}\n\n.size-label-box .label-item {\n  font-size: 26rpx;\n  color: #000;\n  padding: 14rpx 20rpx;\n  border: 1px solid #ddd;\n  border-radius: 6rpx;\n  margin: 0 20rpx 20rpx 0;\n}\n\n.size-label-box .label-item.active {\n  color: #e64340;\n  border: 1px solid #e64340;\n}\n\n.buy-num-box {\n  display: flex;\n  justify-content: space-between;\n  padding: 30rpx 30rpx 48rpx 0;\n  margin-left: 30rpx;\n  border-top: 1px solid #eee;\n  margin-top: 30rpx;\n  align-items: center;\n}\n\n.num-label {\n  font-size: 26rpx;\n  color: #000000;\n}\n\n.buy-num-box .num-box {\n  display: flex;\n}\n\n.buy-num-box .num-box .num-jian,\n.buy-num-box .num-box .num-input,\n.buy-num-box .num-box .num-jia {\n  width: 80rpx;\n  height: 64rpx;\n  line-height: 62rpx;\n  text-align: center;\n  border: 1px solid #eee;\n}\n\n.buy-num-box .num-box .num-input {\n  font-size: 28rpx;\n}\n\n.buy-num-box .num-box .num-input input {\n  height: 100%;\n}\n\n.popup-join-btn {\n  width: 100%;\n  height: 89rpx;\n  text-align: center;\n  line-height: 89rpx;\n  font-size: 34rpx;\n  color: #ffffff;\n  background-color: #e64340;\n}\n\n.buy-num-box .num-box .hui {\n  background-color: #f5f5f9;\n}\n\n.curKanjiaprogress {\n  width: 750rpx;\n  background-color: #fff;\n  margin-top: 20rpx;\n}\n\n.curKanjiaprogress .name {\n  font-size: 40rpx;\n  padding: 20rpx;\n  text-align: center;\n}\n\n.curKanjiaprogress .placeholder {\n  margin-left: 30rpx;\n  margin-right: 30rpx;\n  text-align: center;\n  font-size: 26rpx;\n  width: 100rpx;\n  color: #999;\n}\n\n.curKanjiaprogress .kjbutton {\n  padding: 30rpx;\n}\n\n.kjBuyButton {\n  position: fixed;\n  left: 0;\n  bottom: calc(env(safe-area-inset-bottom) / 2);\n  width: 750rpx;\n  display: flex;\n}\n\n.kjBuyButton .item {\n  flex: 1;\n}\n\n.shareFloatDiv1 {\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  width: 100vw;\n  height: 100vh;\n  background-color: #555;\n  filter: Alpha(Opacity=60);\n  opacity: 0.6;\n  z-index: 99998;\n}\n\n.shareFloatDiv2 {\n  position: fixed;\n  width: 100%;\n  height: 400rpx;\n  background-color: #ffffff;\n  bottom: 0rpx;\n  z-index: 99999;\n}\n\n.shareFloatDiv2 .p1 {\n  height: 260rpx;\n}\n\n.shareFloatDiv2 .p2 {\n  height: 20rpx;\n  background-color: #EEEEEE;\n}\n\n.shareFloatDiv2 .p3 {\n  height: 120rpx;\n  line-height: 120rpx;\n  text-align: center;\n  color: #555555;\n  font-size: 16px;\n}\n\n.qrcode-button {\n  padding: 30rpx;\n  margin-top: 50rpx;\n}\n\n.qrcode {\n  width: 300rpx;\n  height: 300rpx;\n  margin-top: 50rpx;\n}\n\n\n\n.posterImg-box {\n  position: absolute;\n  top: 104rpx;\n  left: 32rpx;\n  width: 686rpx;\n  margin-bottom: 100rpx;\n  z-index: 999999;\n}\n\n.posterImg {\n  width: 100%;\n}\n\n.btn-create {\n  margin: 32rpx;\n  margin-bottom: 0;\n  height: 88rpx;\n  line-height: 88rpx;\n  background: #e64340;\n  color: #fff;\n  text-align: center;\n  border-radius: 8rpx;\n}\n\n.clearfix:after {\n  /*伪元素是行内元素 正常浏览器清除浮动方法*/\n  content: \"\";\n  display: block;\n  height: 0;\n  clear: both;\n  visibility: hidden;\n}\n\n.shop-container {\n  width: 100vw;\n  margin: 32rpx 0rpx;\n  padding: 32rpx;\n  display: flex;\n  align-items: center;\n  background: #fff;\n}\n\n.shop-container image {\n  width: 90rpx;\n  height: 90rpx;\n}\n\n.shop-container .info {\n  margin-left: 32rpx;\n}\n\n.shop-container .info .title {\n  font-size: 30rpx;\n  color: #333;\n}\n\n.shop-container .info .address {\n  font-size: 26rpx;\n  color: #666;\n}\n\n.reputation-cell-group{\n  background-color:white !important;\n  border-radius: 12px;\n}\n\n.reputation-cell {\n  padding-bottom: 0rpx !important;\n  --cell-icon-size: 88rpx;\n}\n\n.reputation-cell .van-icon {\n  top: 16rpx !important;\n}\n\n.reputation-cell .avatarUrl-img{\n  width: 40px;\n  height: 40px;\n  border-radius: 100%;\n  margin-right: 26rpx;\n}\n\n.reputation-cell-reamrk {\n  /* padding-left: 96rpx; */\n}\n\n.reputation-pics {\n  width: 100vw;\n  display: flex;\n  flex-wrap: wrap;\n  background: #ffffff;\n}\n\n.reputation-pics image {\n  width: 207rpx;\n  height: 207rpx;\n  margin: 32rpx 0 0 32rpx;\n  border-radius: 16rpx;\n}\n.characteristic {\n  padding: 8rpx 32rpx;\n  color: #666;\n  font-size: 26rpx;\n}"
  },
  {
    "path": "packageCps/pages/goods-details/cps-pdd.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../../utils/auth')\nconst CONFIG = require('../../../config.js')\nimport Poster from 'wxa-plugin-canvas/poster/poster'\n\nPage({\n  data: {\n    beianPass: 0, // 0 未判断，1 未备案， 2 已备案\n  },\n  onLoad(e) {\n    // e.id = 819066\n    // 读取分享链接中的邀请人编号\n    if (e && e.inviter_id) {\n      wx.setStorageSync('referrer', e.inviter_id)\n    }\n    // 读取小程序码中的邀请人编号\n    if (e && e.scene) {\n      const scene = decodeURIComponent(e.scene) // 处理扫码进商品详情页面的逻辑\n      if (scene && scene.split(',').length >= 2) {\n        e.id = scene.split(',')[0]\n        wx.setStorageSync('referrer', scene.split(',')[1])\n      }\n    }\n    this.data.goodsId = e.id\n  },\n  async cpsPddBeian() {\n    if (this.data.beianPass == 2) {\n      return\n    }\n    if (CONFIG.bindSeller) {\n      AUTH.bindSeller()\n    }\n    const token = wx.getStorageSync('token')\n    const res = await WXAPI.cpsPddBeian(token)\n    if (res.code == 10000) {\n      wx.setNavigationBarTitle({\n        title: '商品详情',\n      })\n      this.setData({\n        beianPass: 2\n      })\n      this.goodsDetail()\n      return\n    }\n    if (res.code == 0) {\n      wx.setNavigationBarTitle({\n        title: '认证页',\n      })\n      this.setData({\n        beianPass: 1,\n        beianData: res.data\n      })\n    } else {\n      wx.showModal({\n        title: '错误',\n        content: res.msg,\n        showCancel: false,\n        success: res => {\n          wx.navigateBack()\n        }\n      })\n    }\n  },\n  goBeian() {\n    wx.navigateToMiniProgram({\n      appId: this.data.beianData.we_app_info.app_id,\n      path: this.data.beianData.we_app_info.page_path\n    })\n  },\n  async goodsDetail() {\n    const token = wx.getStorageSync('token')\n    const res = await WXAPI.goodsDetail(this.data.goodsId, token ? token : '')\n    if (res.code == 0) {\n      this.setData({\n        goodsDetail: res.data,\n      })\n      this.cpsPddGoodsDetail(res.data.basicInfo.yyId)\n    }\n  },\n  async cpsPddGoodsDetail(skuId) {\n    const token = wx.getStorageSync('token')\n    const res = await WXAPI.cpsPddGoodsDetail({\n      token,\n      goodsSign: this.data.goodsDetail.basicInfo.yyIdStr\n    })\n    if (res.code == 0) {\n      this.setData({\n        cpsPddGoodsDetail: res.data\n      })\n    }\n  },\n  onShow (){\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.cpsPddBeian()\n        this.goodsFavCheck()\n      }\n    })\n  },\n  async goodsFavCheck() {\n    const res = await WXAPI.goodsFavCheck(wx.getStorageSync('token'), this.data.goodsId)\n    if (res.code == 0) {\n      this.setData({\n        faved: true\n      })\n    } else {\n      this.setData({\n        faved: false\n      })\n    }\n  },\n  async addFav(){\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        if (this.data.faved) {\n          // 取消收藏\n          WXAPI.goodsFavDeleteV2({\n            token: wx.getStorageSync('token'),\n            goodsId: this.data.goodsId,\n            type: 1\n          }).then(res => {\n            this.goodsFavCheck()\n          })\n        } else {\n          const extJsonStr = {\n            wxaurl: `/packageCps/pages/goods-details/cps-pdd?id=${this.data.goodsId}`,\n            skuId: this.data.goodsId,\n            pic: this.data.goodsDetail.basicInfo.pic,\n            name: this.data.goodsDetail.basicInfo.name\n          }\n          // 加入收藏\n          WXAPI.goodsFavAdd({\n            token: wx.getStorageSync('token'),\n            goodsId: this.data.goodsId,\n            type: 1,\n            extJsonStr: JSON.stringify(extJsonStr)\n          }).then(res => {\n            this.goodsFavCheck()\n          })\n        }\n      }\n    })\n  },\n  goShopCar: function() {\n    wx.reLaunch({\n      url: \"/pages/shop-cart/index\"\n    });\n  },\n  toAddShopCar: function() {\n    this.setData({\n      shopType: \"addShopCar\"\n    })\n    this.bindGuiGeTap();\n  },\n  async tobuy() {\n    const token = wx.getStorageSync('token')\n    if (!token) {\n      wx.showToast({\n        title: '请先登陆',\n        icon: 'none'\n      })\n      return\n    }\n    const res = await WXAPI.cpsPddGoodsShotUrl(token, this.data.goodsDetail.basicInfo.yyIdStr)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.navigateToMiniProgram({\n      appId: res.data.we_app_info.app_id,\n      path: res.data.we_app_info.page_path\n    })\n  },\n  toPingtuan: function(e) {\n    let pingtuanopenid = 0\n    if (e.currentTarget.dataset.pingtuanopenid) {\n      pingtuanopenid = e.currentTarget.dataset.pingtuanopenid\n    }\n    this.setData({\n      shopType: \"toPingtuan\",\n      selectSizePrice: this.data.goodsDetail.basicInfo.pingtuanPrice,\n      selectSizeOPrice: this.data.goodsDetail.basicInfo.originalPrice,\n      pingtuanopenid: pingtuanopenid,\n      \n      hideShopPopup: false,\n      skuGoodsPic: this.data.goodsDetail.basicInfo.pic\n    });\n    \n  },\n  /**\n   * 规格选择弹出框\n   */\n  bindGuiGeTap: function() {\n    this.setData({\n      hideShopPopup: false\n    })\n  },\n  /**\n   * 规格选择弹出框隐藏\n   */\n  closePopupTap: function() {\n    this.setData({\n      hideShopPopup: true\n    })\n  },\n  stepChange(event) {\n    this.setData({\n      buyNumber: event.detail\n    })\n  },\n  /**\n   * 选择商品规格\n   */\n  async labelItemTap(e) {\n    const propertyindex = e.currentTarget.dataset.propertyindex\n    const propertychildindex = e.currentTarget.dataset.propertychildindex\n\n    const property = this.data.goodsDetail.properties[propertyindex]\n    const child = property.childsCurGoods[propertychildindex]\n    // 取消该分类下的子栏目所有的选中状态\n    property.childsCurGoods.forEach(child => {\n      child.active = false\n    })\n    // 设置当前选中状态\n    property.optionValueId = child.id\n    child.active = true\n    // 获取所有的选中规格尺寸数据\n    const needSelectNum = this.data.goodsDetail.properties.length\n    let curSelectNum = 0;\n    let propertyChildIds = \"\";\n    let propertyChildNames = \"\";\n\n    this.data.goodsDetail.properties.forEach(p => {\n      p.childsCurGoods.forEach(c => {\n        if (c.active) {\n          curSelectNum++;\n          propertyChildIds = propertyChildIds + p.id + \":\" + c.id + \",\";\n          propertyChildNames = propertyChildNames + p.name + \":\" + c.name + \"  \";\n        }\n      })\n    })\n    let canSubmit = false;\n    if (needSelectNum == curSelectNum) {\n      canSubmit = true;\n    }\n    let skuGoodsPic = this.data.skuGoodsPic\n    if (this.data.goodsDetail.subPics && this.data.goodsDetail.subPics.length > 0) {\n      const _subPic = this.data.goodsDetail.subPics.find(ele => {\n        return ele.optionValueId == child.id\n      })\n      if (_subPic) {\n        skuGoodsPic = _subPic.pic\n      }\n    }\n    this.setData({\n      goodsDetail: this.data.goodsDetail,\n      canSubmit,\n      skuGoodsPic,\n      propertyChildIds,\n      propertyChildNames,\n    })\n    this.calculateGoodsPrice()\n  },\n  async calculateGoodsPrice() {\n    // 计算最终的商品价格\n    let price = this.data.goodsDetail.basicInfo.minPrice\n    let originalPrice = this.data.goodsDetail.basicInfo.originalPrice\n    let totalScoreToPay = this.data.goodsDetail.basicInfo.minScore\n    let buyNumMax = this.data.goodsDetail.basicInfo.stores\n    let buyNumber = this.data.goodsDetail.basicInfo.minBuyNumber\n    if (this.data.shopType == 'toPingtuan') {\n      price = this.data.goodsDetail.basicInfo.pingtuanPrice\n    }\n    // 计算 sku 价格\n    if (this.data.canSubmit) {\n      const token = wx.getStorageSync('token')\n      const res = await WXAPI.goodsPriceV2({\n        token: token ? token : '',\n        goodsId: this.data.goodsDetail.basicInfo.id,\n        propertyChildIds: this.data.propertyChildIds\n      })\n      if (res.code == 0) {\n        price = res.data.price\n        if (this.data.shopType == 'toPingtuan') {\n          price = res.data.pingtuanPrice\n        }\n        originalPrice = res.data.originalPrice\n        totalScoreToPay = res.data.score\n        buyNumMax = res.data.stores\n      }\n    }\n    // 计算配件价格\n    if (this.data.goodsAddition) {\n      this.data.goodsAddition.forEach(big => {\n        big.items.forEach(small => {\n          if (small.active) {\n            price = (price*100 + small.price*100) / 100\n          }\n        })\n      })\n    }\n    this.setData({\n      selectSizePrice: price,\n      selectSizeOPrice: originalPrice,\n      totalScoreToPay: totalScoreToPay,\n      buyNumMax,\n      buyNumber: (buyNumMax >= buyNumber) ? buyNumber : 0\n    });\n  },\n  /**\n   * 选择可选配件\n   */\n  async labelItemTap2(e) {\n    const propertyindex = e.currentTarget.dataset.propertyindex\n    const propertychildindex = e.currentTarget.dataset.propertychildindex\n\n    const goodsAddition = this.data.goodsAddition\n    const property = goodsAddition[propertyindex]\n    const child = property.items[propertychildindex]\n    if (child.active) {\n      // 该操作为取消选择\n      child.active = false\n      this.setData({\n        goodsAddition\n      })\n      this.calculateGoodsPrice()\n      return\n    }\n    // 单选配件取消所有子栏目选中状态\n    if (property.type == 0) {\n      property.items.forEach(child => {\n        child.active = false\n      })\n    }\n    // 设置当前选中状态\n    child.active = true\n    this.setData({\n      goodsAddition\n    })\n    this.calculateGoodsPrice()\n  },\n  /**\n   * 组建立即购买信息\n   */\n  buliduBuyNowInfo: function(shoptype) {\n    var shopCarMap = {};\n    shopCarMap.goodsId = this.data.goodsId;\n    shopCarMap.pic = this.data.imageDomain + this.data.price.pic;\n    shopCarMap.name = this.data.price.skuName;\n    shopCarMap.price = this.data.price.priceSale;\n    shopCarMap.left = \"\";\n    shopCarMap.active = true;\n    shopCarMap.number = this.data.buyNumber;\n    \n    var buyNowInfo = {};\n    buyNowInfo.shopNum = 0;\n    buyNowInfo.shopList = [shopCarMap];\n    \n    return buyNowInfo;\n  },\n  onShareAppMessage() {\n    return {\n      title: this.data.goodsDetail.basicInfo.name,\n      path: '/packageCps/pages/goods-details/cps-pdd?id=' + this.data.goodsId + '&inviter_id=' + wx.getStorageSync('uid'),\n      success: function(res) {\n        // 转发成功\n      },\n      fail: function(res) {\n        // 转发失败\n      }\n    }\n  },\n  onShareTimeline() {    \n    return {\n      title: this.data.goodsDetail.basicInfo.name,\n      query: 'id=' + this.data.goodsId + '&inviter_id=' + wx.getStorageSync('uid'),\n      imageUrl: this.data.goodsDetail.basicInfo.pic\n    }\n  },\n  reputation: function(goodsId) {\n    var that = this;\n    WXAPI.goodsReputation({\n      goodsId: goodsId\n    }).then(function(res) {\n      if (res.code == 0) {\n        res.data.forEach(ele => {\n          if (ele.goods.goodReputation == 0) {\n            ele.goods.goodReputation = 1\n          } else if (ele.goods.goodReputation == 1) {\n            ele.goods.goodReputation = 3\n          } else if (ele.goods.goodReputation == 2) {\n            ele.goods.goodReputation = 5\n          }\n        })\n        that.setData({\n          reputation: res.data\n        });\n      }\n    })\n  },\n  pingtuanList: function(goodsId) {\n    var that = this;\n    WXAPI.pingtuanList({\n      goodsId: goodsId,\n      status: 0\n    }).then(function(res) {\n      if (res.code == 0) {\n        that.setData({\n          pingtuanList: res.data.result\n        });\n      }\n    })\n  },\n  getVideoSrc: function(videoId) {\n    var that = this;\n    WXAPI.videoDetail(videoId).then(function(res) {\n      if (res.code == 0) {\n        that.setData({\n          videoMp4Src: res.data.fdMp4\n        });\n      }\n    })\n  },\n  joinKanjia(){\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.doneJoinKanjia();\n      }\n    })\n  },\n  doneJoinKanjia: function() { // 报名参加砍价活动\n    const _this = this;\n    if (!_this.data.curGoodsKanjia) {\n      return;\n    }\n    wx.showLoading({\n      title: '加载中',\n      mask: true\n    })\n    WXAPI.kanjiaJoin(wx.getStorageSync('token'), _this.data.curGoodsKanjia.id).then(function(res) {\n      wx.hideLoading()\n      if (res.code == 0) {\n        _this.setData({\n          kjJoinUid: wx.getStorageSync('uid'),\n          myHelpDetail: null\n        })\n        _this.getGoodsDetailAndKanjieInfo(_this.data.goodsDetail.basicInfo.id)\n      } else {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n      }\n    })\n  },\n  joinPingtuan: function(e) {\n    let pingtuanopenid = e.currentTarget.dataset.pingtuanopenid\n    wx.navigateTo({\n      url: \"/pages/to-pay-order/index?orderType=buyNow&pingtuanOpenId=\" + pingtuanopenid\n    })\n  },\n  goIndex() {\n    wx.switchTab({\n      url: '/pages/index/index',\n    });\n  },\n  helpKanjia() {\n    const _this = this;\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        _this.helpKanjiaDone()\n      }\n    })\n  },\n  helpKanjiaDone(){\n    const _this = this;\n    WXAPI.kanjiaHelp(wx.getStorageSync('token'), _this.data.kjId, _this.data.kjJoinUid, '').then(function (res) {\n      if (res.code != 0) {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n        return;\n      }\n      _this.setData({\n        myHelpDetail: res.data\n      });\n      wx.showModal({\n        title: '成功',\n        content: '成功帮TA砍掉 ' + res.data.cutPrice + ' 元',\n        showCancel: false\n      })\n      _this.getGoodsDetailAndKanjieInfo(_this.data.goodsDetail.basicInfo.id)\n    })\n  },\n  closePop(){\n    this.setData({\n      posterShow: false\n    })\n  },\n  async drawSharePic() {\n    const _this = this\n    const accountInfo = wx.getAccountInfoSync()\n    const envVersion = accountInfo.miniProgram.envVersion\n    const qrcodeRes = await WXAPI.wxaQrcode({\n      scene: _this.data.goodsId + ',' + wx.getStorageSync('uid'),\n      page: '/packageCps/pages/goods-details/cps-pdd',\n      is_hyaline: true,\n      autoColor: true,\n      expireHours: 1,\n      env_version: envVersion,\n      check_path: envVersion == 'release' ? true : false,\n    })\n    if (qrcodeRes.code != 0) {\n      wx.showToast({\n        title: qrcodeRes.msg,\n        icon: 'none'\n      })\n      return\n    }\n    const qrcode = qrcodeRes.data\n    const pic = _this.data.goodsDetail.basicInfo.pic\n    wx.getImageInfo({\n      src: pic,\n      success(res) {\n        const height = 490 * res.height / res.width\n        _this.drawSharePicDone(height, qrcode)\n      },\n      fail(e) {\n        console.error(e)\n      }\n    })\n  },\n  drawSharePicDone(picHeight, qrcode) {\n    const _this = this\n    const _baseHeight = 74 + (picHeight + 120)\n    this.setData({\n      posterConfig: {\n        width: 750,\n        height: picHeight + 660,\n        backgroundColor: '#fff',\n        debug: false,\n        blocks: [\n          {\n            x: 76,\n            y: 74,\n            width: 604,\n            height: picHeight + 120,\n            borderWidth: 2,\n            borderColor: '#c2aa85',\n            borderRadius: 8\n          }\n        ],\n        images: [\n          {\n            x: 133,\n            y: 133,\n            url: _this.data.goodsDetail.basicInfo.pic, // 商品图片\n            width: 490,\n            height: picHeight\n          },\n          {\n            x: 76,\n            y: _baseHeight + 199,\n            url: qrcode, // 二维码\n            width: 222,\n            height: 222\n          }\n        ],\n        texts: [\n          {\n            x: 375,\n            y: _baseHeight + 80,\n            width: 650,\n            lineNum:2,\n            text: _this.data.goodsDetail.basicInfo.name,\n            textAlign: 'center',\n            fontSize: 40,\n            color: '#333'\n          },\n          {\n            x: 375,\n            y: _baseHeight + 180,\n            text: '￥' + _this.data.goodsDetail.basicInfo.minPrice,\n            textAlign: 'center',\n            fontSize: 50,\n            color: '#e64340'\n          },\n          {\n            x: 352,\n            y: _baseHeight + 320,\n            text: '长按识别小程序码',\n            fontSize: 28,\n            color: '#999'\n          }\n        ],\n      }\n    }, () => {\n      Poster.create();\n    });\n  },\n  onPosterSuccess(e) {\n    console.log('success:', e)\n    this.setData({\n      posterImg: e.detail,\n      showposterImg: true\n    })\n  },\n  onPosterFail(e) {\n    console.error('fail:', e)\n  },\n  savePosterPic() {\n    const _this = this\n    wx.saveImageToPhotosAlbum({\n      filePath: this.data.posterImg,\n      success: (res) => {\n        wx.showModal({\n          content: '已保存到手机相册',\n          showCancel: false,\n          confirmText: '知道了',\n          confirmColor: '#333'\n        })\n      },\n      complete: () => {\n        _this.setData({\n          showposterImg: false\n        })\n      },\n      fail: (res) => {\n        if (res.errMsg.indexOf('fail privacy permission is not authorized') != -1) {\n          wx.showModal({\n            content: '请阅读并同意隐私条款以后才能继续本操作',\n            confirmText: '阅读协议',\n            cancelText: '取消',\n            success (res) {\n              if (res.confirm) {\n                wx.requirePrivacyAuthorize() // 弹出用户隐私授权框\n              }\n            }\n          })\n        } else if (res.errMsg.indexOf('fail auth deny') != -1) {\n          wx.showModal({\n            content: '本次操作需要您同意并将图片写入手机相册',\n            confirmText: '立即授权',\n            cancelText: '取消',\n            success (res) {\n              if (res.confirm) {\n                // 弹出设置窗口，让用户去设置\n                wx.openSetting({\n                  withSubscriptions: true,\n                  fail: aaa => console.log(aaa)\n                });\n              }\n            }\n          })\n        } else {\n          console.error(res);\n          wx.showToast({\n            title: res.errMsg,\n            icon: 'none'\n          })\n        }\n      }\n    })\n  },\n  previewImage(e) {\n    const url = e.currentTarget.dataset.url\n    wx.previewImage({\n      current: url, // 当前显示图片的http链接\n      urls: [url] // 需要预览的图片http链接列表\n    })\n  },\n  onTabsChange(e) {\n    var index = e.detail.index\n    this.setData({\n      toView: this.data.tabs[index].view_id\n    })\n  },\n  backToHome() {\n    wx.switchTab({\n      url: '/pages/index/index',\n    })\n  }\n})\n"
  },
  {
    "path": "packageCps/pages/goods-details/cps-pdd.json",
    "content": "{\n  \"navigationBarTitleText\": \"商品详情\",\n  \"usingComponents\": {\n    \"poster\": \"wxa-plugin-canvas/poster\"\n  }\n}"
  },
  {
    "path": "packageCps/pages/goods-details/cps-pdd.wxml",
    "content": "<view wx:if=\"{{ beianPass == 1}}\" class=\"beian\">\n  <image class=\"img\" src=\"{{beianData.we_app_info.we_app_icon_url}}\" mode=\"widthFix\"></image>\n  <van-button custom-class=\"btn\" type=\"danger\" round bind:click=\"goBeian\">前往授权备案</van-button>\n</view>\n<view wx:if=\"{{ beianPass == 2}}\" class=\"container\">\n  <scroll-view class=\"scroll-container\" scroll-y=\"true\" scroll-with-animation=\"true\">\n    <view class=\"swiper-container\" id=\"swiper-container\">\n      <swiper class=\"swiper_box\" indicator-dots=\"true\" indicator-active-color=\"#fff\" autoplay circular>\n        <swiper-item wx:for=\"{{cpsPddGoodsDetail.goods_gallery_urls}}\" wx:key=\"*this\">\n          <image src=\"{{item}}\" class=\"slide-image\" mode=\"aspectFill\" lazy-load=\"true\" />\n        </swiper-item>\n      </swiper>\n    </view>\n    <view class=\"goods-info vcell\">\n      <view class=\"goods-info-top-container\">\n        <view class=\"goods-profile\">\n          <view class=\"p\"><text>¥</text> {{goodsDetail.basicInfo.minPrice}}</view>\n          <view wx:if=\"{{goodsDetail.basicInfo.originalPrice && goodsDetail.basicInfo.originalPrice > 0}}\" class=\"goods-price\"\n            style='color:#aaa;text-decoration:line-through;padding: 15rpx 0rpx 0rpx 15rpx;'><text>¥</text>\n            {{goodsDetail.basicInfo.originalPrice}}</view>\n        </view>\n        <view class=\"goods-info-fx\">\n          <view class='item left'>\n            <van-icon name=\"share-o\" size=\"24px\" />\n            <view class=\"icon-title\">分享</view>\n            <button open-type='share'></button>\n          </view>\n          <view class='item' bindtap=\"drawSharePic\">\n            <van-icon name=\"qr\" size=\"24px\" />\n            <view class=\"icon-title\">二维码</view>\n          </view>\n        </view>\n      </view>\n      <view class=\"goods-title\">{{goodsDetail.basicInfo.name}}</view>\n      <view class=\"characteristic\">{{goodsDetail.basicInfo.characteristic}}</view>\n    </view>\n\n    <view class='space'></view>\n    <van-cell wx:if=\"{{hasMoreSelect && goodsDetailSkuShowType==0}}\" custom-class=\"vw100\" is-link\n      bind:click=\"bindGuiGeTap\">\n      <view slot=\"title\">\n        请选择:\n        <block wx:for=\"{{goodsDetail.properties}}\" wx:key=\"id\"> {{item.name}}</block>\n        <block wx:for=\"{{goodsAddition}}\" wx:key=\"id\"> {{item.name}}</block>\n      </view>\n    </van-cell>\n    <view class=\"size-label-box2\" wx:if=\"{{goodsDetailSkuShowType==1}}\">\n      <view class=\"label-title\">选择商品规格</view>\n      <view class=\"size-label-box\">\n        <block wx:for=\"{{goodsDetail.properties}}\" wx:for-item=\"property\" wx:for-index=\"idx\" wx:key=\"id\">\n          <view class=\"label\">{{property.name}}</view>\n          <view class=\"label-item-box\">\n            <view class=\"label-item {{item.active ? 'active' : '' }}\" wx:for=\"{{property.childsCurGoods}}\" wx:key=\"id\"\n              bindtap=\"labelItemTap\" data-propertyindex=\"{{idx}}\" data-propertychildindex=\"{{index}}\">\n              {{item.name}}\n            </view>\n          </view>\n        </block>\n      </view>\n      <van-cell title=\"购买数量\">\n        <view>\n          <van-stepper value=\"{{ buyNumber }}\" min=\"{{ buyNumMin }}\" max=\"{{ buyNumMax }}\" bind:change=\"stepChange\" />\n        </view>\n      </van-cell>\n    </view>\n    <view wx:if=\"{{shopSubdetail}}\" class=\"shop-container\">\n      <image mode=\"aspectFill\" src=\"{{shopSubdetail.info.pic}}\"></image>\n      <view class=\"info\">\n        <view class=\"title\">{{shopSubdetail.info.name}}</view>\n        <view class=\"address\">{{shopSubdetail.info.address}}</view>\n      </view>\n    </view>\n    <view class=\"goods-des-info\" id=\"goods-des-info\">\n      <view class=\"label-title\">\n        <view class=\"left\">商品详情</view>\n      </view>\n      <view class=\"goods-text\">\n        <image wx:for=\"{{ cpsPddGoodsDetail.goods_gallery_urls }}\" wx:key=\"*this\" mode=\"widthFix\" src=\"{{ item }}\"></image>\n      </view>\n    </view>\n    <van-cell-group wx:if=\"{{!curGoodsKanjia && reputation}}\" custom-class=\"vw100\" title=\"宝贝评价\">\n      <block wx:for=\"{{reputation}}\" wx:key=\"id\">\n        <van-cell custom-class=\"reputation-cell\" icon=\"{{item.user.avatarUrl}}\" title=\"{{item.user.nick}}\"\n          label=\"{{item.goods.dateReputation}}\" border=\"{{ false }}\">\n          <van-rate value=\"{{ item.goods.goodReputation }}\" color=\"#e64340\" readonly />\n        </van-cell>\n        <van-cell wx:if=\"{{ item.goods.goodReputationRemark }}\" title-class=\"reputation-cell-reamrk\"\n          title=\"{{item.goods.goodReputationRemark}}\" />\n        <view wx:if=\"{{ item.reputationPics }}\" class=\"reputation-pics\">\n          <image wx:for=\"{{item.reputationPics}}\" wx:for-item=\"picItem\" src=\"{{ picItem.pic }}\" mode=\"aspectFill\"\n            bindtap=\"previewImage\" data-url=\"{{ picItem.pic }}\"></image>\n        </view>\n        <van-cell wx:if=\"{{ item.goods.goodReputationReply }}\" title-class=\"reputation-cell-reamrk\"\n          title=\"掌柜回复:{{item.goods.goodReputationReply}}\" />\n      </block>\n    </van-cell-group>\n    <van-goods-action wx:if=\"{{!curGoodsKanjia}}\">\n      <van-goods-action-icon icon=\"chat-o\" text=\"客服\" open-type=\"contact\"\n        send-message-title=\"{{goodsDetail.basicInfo.name}}\" send-message-img=\"{{goodsDetail.basicInfo.pic}}\"\n        send-message-path=\"/packageCps/pages/goods-details/cps-pdd?id={{goodsDetail.basicInfo.id}}\" show-message-card=\"{{ true }}\" />\n      <van-goods-action-icon icon=\"{{faved?'like':'like-o'}}\" text=\"收藏\" bind:click=\"addFav\" />\n      <van-goods-action-button text=\"立即购买\" data-shopType=\"{{shopType}}\"\n        bind:click=\"tobuy\" />\n    </van-goods-action>\n  </scroll-view>\n</view>\n\n<block wx:if=\"{{posterShow}}\">\n  <view class=\"poster-mask\"></view>\n  <view class=\"poster\">\n    <canvas class=\"canvas\" style=\"{{canvasstyle}}\" canvas-id=\"firstCanvas\"></canvas>\n  </view>\n  <view class=\"poster-btn\">\n    <button type=\"primary\" size=\"mini\" bindtap='_saveToMobile'> 保存图片 </button>\n    <button type=\"warn\" size=\"mini\" bindtap='closePop'> 关闭 </button>\n  </view>\n</block>\n\n<poster id=\"poster\" config=\"{{posterConfig}}\" bind:success=\"onPosterSuccess\" bind:fail=\"onPosterFail\"></poster>\n<view wx:if=\"{{showposterImg}}\" class=\"popup-mask\"></view>\n<view wx:if=\"{{showposterImg}}\" class=\"posterImg-box\">\n  <image mode=\"widthFix\" class=\"posterImg\" src=\"{{posterImg}}\"></image>\n  <view class=\"btn-create\" bindtap=\"savePosterPic\">保存到相册</view>\n</view>\n"
  },
  {
    "path": "packageCps/pages/goods-details/cps-pdd.wxss",
    "content": "page,\nview,\nimage,\ninput,\ntextarea {\n  display: block;\n  box-sizing: border-box;\n}\n\n.van-cell {\n  padding: 10px 38rpx;\n}\n\n.container {\n  background-color: #F2f2f2;\n  min-height: 100%;\n  padding-bottom: 100rpx;\n}\n\n.scroll-container {\n  height: 100vh;\n  padding-bottom: 64rpx;\n}\n\n.tabs-container {\n  width: 100%;\n  display: flex;\n  background-color: white;\n}\n\n.home-o {\n  width: 20%;\n}\n\n.swiper-container {\n  width: 100%;\n  position: relative;\n}\n\n.swiper_box {\n  width: 100%;\n  height: 748rpx;\n}\n\nswiper-item image {\n  width: 100%;\n  display: inline-block;\n  overflow: hidden;\n  height: 748rpx;\n}\n\n.goods-info {\n  background-color: #fff;\n  padding: 35rpx 0;\n  width: 100%;\n  position: relative;\n}\n\n.goods-info-top-container {\n  display: flex;\n  justify-content: space-between;\n  margin-bottom: 10rpx;\n}\n\n.goods-info-fx {\n  bottom: 60rpx;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-right: 35rpx;\n}\n\n.goods-info-fx .item {\n  /* height: 50rpx; */\n  right: 130rpx;\n  top: 100rpx;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  font-size: 24rpx;\n  background: #fff;\n  z-index: 20;\n}\n\n.goods-info-fx .left {\n  margin-right: 10px;\n}\n\n.goods-info-fx .icon-title{\n  padding-top:5px ;\n  font-size: 11px;\n}\n\n.goods-info-fx .item image {\n  width: 50rpx;\n  height: 50rpx;\n}\n\n.goods-info-fx .item button {\n  position: absolute;\n  height: 100%;\n  width: 100%;\n  opacity: 0;\n  z-index: 99;\n}\n\n.goods-info .goods-title {\n  box-sizing: border-box;\n  padding: 0 30rpx;\n  font-size: 32rpx;\n  line-height: 1.4;\n  color: #000;\n  /* padding-bottom: 26rpx; */\n}\n\n.goods-info .goods-share {\n  box-sizing: border-box;\n  padding: 0 30rpx;\n  font-size: 25rpx;\n  line-height: 1.4;\n  color: #CC0000;\n  padding-top: 26rpx;\n}\n\n.vcell{\n  border-bottom-left-radius: 12px;\n  border-bottom-right-radius: 12px;\n}\n\n.goods-profile {\n  display: flex;\n  align-items: center;\n}\n\n.goods-profile .p {\n  color: #e64340;\n  font-size: 20pt;\n  margin-left: 30rpx;\n}\n\n.goods-profile .p text {\n  font-size: 12pt;\n}\n\n.goods-profile .r {\n  color: #ccc;\n  font-size: 10pt;\n  margin-left: 30rpx;\n}\n\n.row-arrow {\n  width: 100vw;\n  padding: 0 32rpx;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  height: 102rpx;\n  font-size: 28rpx;\n  line-height: 102rpx;\n  background: #fff;\n  margin-bottom: 32rpx;\n}\n\n.row-arrow image {\n  width: 40rpx;\n  height: 40rpx;\n}\n\n.goods-des-info {\n  width: 100%;\n  box-sizing: border-box;\n  background-color: #fff;\n  border-radius: 12px;\n}\n\n.label-title {\n  font-size: 28rpx;\n  color: #000000;\n  padding: 30rpx;\n  display: flex;\n  justify-content: space-between;\n}\n\n.label-title .left{\n  border-left: 3px solid #e64340;\n  height: auto;\n  padding-left: 10px;\n}\n\n.goods-text {\n  padding: 0 10rpx;\n  font-size: 28rpx;\n  color: #666666;\n  line-height: 56rpx;\n  margin-bottom: 30rpx;\n}\n\n.goods-text image {\n  width: 100%;\n}\n\n.des-imgs {\n  width: 100%;\n}\n\n.des-imgs image {\n  width: 100%;\n}\n\n.footer-box {\n  width: 100%;\n  height: 100rpx;\n  background-color: #fff;\n  position: fixed;\n  bottom: 0;\n  left: 0;\n  display: flex;\n  box-shadow: 0 0 1rpx 0;\n  align-items: center;\n}\n\n.footer-box .contact {\n  position: relative;\n  height: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-left: 32rpx;\n}\n\n.footer-box .contact button {\n  position: absolute;\n  height: 100%;\n  width: 100%;\n  opacity: 0;\n  z-index: 99;\n}\n\n.footer-box .contact image {\n  width: 60rpx;\n  height: 60rpx;\n}\n\n.footer-box .shop-cart-btn {\n  position: relative;\n  height: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-left: 32rpx;\n}\n\n.footer-box .shop-cart-btn image {\n  width: 55rpx;\n  height: 55rpx;\n}\n\n.fav-icon {\n  width: 60rpx;\n  height: 60rpx;\n  margin-left: 32rpx;\n  /*707070*/\n}\n\n.footer-box .shop-cart-btn .shop-num {\n  position: absolute;\n  color: #fff;\n  left: 32rpx;\n  top: 10rpx;\n\n  width: 40rpx;\n  height: 40rpx;\n  line-height: 40rpx;\n  text-align: center;\n  border-radius: 50%;\n  background: #e64340;\n  font-size: 24rpx;\n}\n\n.footer-box .join-shop-cart {\n  text-align: center;\n  height: 100%;\n  line-height: 100rpx;\n  background-color: #ff6850;\n  color: #fff;\n  font-size: 34rpx;\n  flex: 1;\n  margin-left: 32rpx;\n}\n\n.footer-box .now-buy {\n  text-align: center;\n  height: 100%;\n  width: 250rpx;\n  line-height: 100rpx;\n  background-color: #e64340;\n  color: #fff;\n  font-size: 34rpx;\n  flex: 1;\n}\n\n.show-popup {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  z-index: 999;\n}\n\n.popup-mask {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.5);\n  z-index: 5;\n}\n\n.popup-contents {\n  position: fixed;\n  left: 0;\n  bottom: 0;\n  width: 100%;\n  background-color: #fff;\n  z-index: 6;\n}\n\n.pop-goods-info {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-left: 32rpx;\n  margin-right: 32rpx;\n  padding: 30rpx 0;\n  border-bottom: 1px solid #eee;\n}\n\n.pop-img-box {\n  width: 120rpx;\n  height: 120rpx;\n  overflow: hidden;\n  margin-right: 26rpx;\n}\n\n.pop-img-box .goods-thumbnail {\n  width: 120rpx;\n  height: 120rpx;\n}\n\n.pop-goods-title {\n  width: 484rpx;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  overflow: hidden;\n  font-size: 26rpx;\n  color: #000000;\n}\n\n.pop-goods-price {\n  font-size: 26rpx;\n  color: #e64340;\n  margin-top: 20rpx;\n}\n\n.pop-goods-price .t1 {\n  font-size: 50rpx;\n}\n\n.pop-goods-price-original {\n  font-size: 26rpx;\n  color: #aaa;\n  text-decoration: line-through;\n  margin-left: 16rpx;\n}\n\n.pop-goods-close {\n  width: 36rpx;\n  height: 36rpx;\n}\n\n.goods-property-container {\n  height: 56px;\n  align-items: center;\n  border-radius: 12px;\n  padding: 0 16px;\n}\n\n.size-label-box2 {\n  width: 100vw;\n  background: #fff;\n}\n\n.size-label-box .label {\n  font-size: 26rpx;\n  color: #000;\n  padding-left: 30rpx;\n  padding: 30rpx 0 20rpx 30rpx;\n}\n\n.size-label-box .label-item-box {\n  display: flex;\n  margin-left: 30rpx;\n  flex-direction: row;\n  flex-wrap: wrap;\n}\n\n.size-label-box .label-item {\n  font-size: 26rpx;\n  color: #000;\n  padding: 14rpx 20rpx;\n  border: 1px solid #ddd;\n  border-radius: 6rpx;\n  margin: 0 20rpx 20rpx 0;\n}\n\n.size-label-box .label-item.active {\n  color: #e64340;\n  border: 1px solid #e64340;\n}\n\n.buy-num-box {\n  display: flex;\n  justify-content: space-between;\n  padding: 30rpx 30rpx 48rpx 0;\n  margin-left: 30rpx;\n  border-top: 1px solid #eee;\n  margin-top: 30rpx;\n  align-items: center;\n}\n\n.num-label {\n  font-size: 26rpx;\n  color: #000000;\n}\n\n.buy-num-box .num-box {\n  display: flex;\n}\n\n.buy-num-box .num-box .num-jian,\n.buy-num-box .num-box .num-input,\n.buy-num-box .num-box .num-jia {\n  width: 80rpx;\n  height: 64rpx;\n  line-height: 62rpx;\n  text-align: center;\n  border: 1px solid #eee;\n}\n\n.buy-num-box .num-box .num-input {\n  font-size: 28rpx;\n}\n\n.buy-num-box .num-box .num-input input {\n  height: 100%;\n}\n\n.popup-join-btn {\n  width: 100%;\n  height: 89rpx;\n  text-align: center;\n  line-height: 89rpx;\n  font-size: 34rpx;\n  color: #ffffff;\n  background-color: #e64340;\n}\n\n.buy-num-box .num-box .hui {\n  background-color: #f5f5f9;\n}\n\n.curKanjiaprogress {\n  width: 750rpx;\n  background-color: #fff;\n  margin-top: 20rpx;\n}\n\n.curKanjiaprogress .name {\n  font-size: 40rpx;\n  padding: 20rpx;\n  text-align: center;\n}\n\n.curKanjiaprogress .placeholder {\n  margin-left: 30rpx;\n  margin-right: 30rpx;\n  text-align: center;\n  font-size: 26rpx;\n  width: 100rpx;\n  color: #999;\n}\n\n.curKanjiaprogress .kjbutton {\n  padding: 30rpx;\n}\n\n.kjBuyButton {\n  position: fixed;\n  left: 0;\n  bottom: calc(env(safe-area-inset-bottom) / 2);\n  width: 750rpx;\n  display: flex;\n}\n\n.kjBuyButton .item {\n  flex: 1;\n}\n\n.shareFloatDiv1 {\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  width: 100vw;\n  height: 100vh;\n  background-color: #555;\n  filter: Alpha(Opacity=60);\n  opacity: 0.6;\n  z-index: 99998;\n}\n\n.shareFloatDiv2 {\n  position: fixed;\n  width: 100%;\n  height: 400rpx;\n  background-color: #ffffff;\n  bottom: 0rpx;\n  z-index: 99999;\n}\n\n.shareFloatDiv2 .p1 {\n  height: 260rpx;\n}\n\n.shareFloatDiv2 .p2 {\n  height: 20rpx;\n  background-color: #EEEEEE;\n}\n\n.shareFloatDiv2 .p3 {\n  height: 120rpx;\n  line-height: 120rpx;\n  text-align: center;\n  color: #555555;\n  font-size: 16px;\n}\n\n.qrcode-button {\n  padding: 30rpx;\n  margin-top: 50rpx;\n}\n\n.qrcode {\n  width: 300rpx;\n  height: 300rpx;\n  margin-top: 50rpx;\n}\n\n\n\n.posterImg-box {\n  position: absolute;\n  top: 104rpx;\n  left: 32rpx;\n  width: 686rpx;\n  margin-bottom: 100rpx;\n  z-index: 999999;\n}\n\n.posterImg {\n  width: 100%;\n}\n\n.btn-create {\n  margin: 32rpx;\n  margin-bottom: 0;\n  height: 88rpx;\n  line-height: 88rpx;\n  background: #e64340;\n  color: #fff;\n  text-align: center;\n  border-radius: 8rpx;\n}\n\n.clearfix:after {\n  /*伪元素是行内元素 正常浏览器清除浮动方法*/\n  content: \"\";\n  display: block;\n  height: 0;\n  clear: both;\n  visibility: hidden;\n}\n\n.shop-container {\n  width: 100vw;\n  margin: 32rpx 0rpx;\n  padding: 32rpx;\n  display: flex;\n  align-items: center;\n  background: #fff;\n}\n\n.shop-container image {\n  width: 90rpx;\n  height: 90rpx;\n}\n\n.shop-container .info {\n  margin-left: 32rpx;\n}\n\n.shop-container .info .title {\n  font-size: 30rpx;\n  color: #333;\n}\n\n.shop-container .info .address {\n  font-size: 26rpx;\n  color: #666;\n}\n\n.reputation-cell-group{\n  background-color:white !important;\n  border-radius: 12px;\n}\n\n.reputation-cell {\n  padding-bottom: 0rpx !important;\n  --cell-icon-size: 88rpx;\n}\n\n.reputation-cell .van-icon {\n  top: 16rpx !important;\n}\n\n.reputation-cell .avatarUrl-img{\n  width: 40px;\n  height: 40px;\n  border-radius: 100%;\n  margin-right: 26rpx;\n}\n\n.reputation-cell-reamrk {\n  /* padding-left: 96rpx; */\n}\n\n.reputation-pics {\n  width: 100vw;\n  display: flex;\n  flex-wrap: wrap;\n  background: #ffffff;\n}\n\n.reputation-pics image {\n  width: 207rpx;\n  height: 207rpx;\n  margin: 32rpx 0 0 32rpx;\n  border-radius: 16rpx;\n}\n.characteristic {\n  padding: 8rpx 32rpx;\n  color: #666;\n  font-size: 26rpx;\n}\n.beian {\n  display: flex;\n  flex-direction: column;\n  width: 100vw;\n  height: 100vh;\n  justify-content: center;\n  align-items: center;\n}\n.beian .img {\n  width: 260rpx;\n  border-radius: 50%;\n}\n.beian .btn {\n  width: 600rpx;\n  margin-top: 200rpx;\n}"
  },
  {
    "path": "packageCps/pages/goods-details/cps-taobao.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../../utils/auth')\nimport Poster from 'wxa-plugin-canvas/poster/poster'\n\nPage({\n  data: {\n    beianPass: 0, // 0 未判断，1 未备案， 2 已备案\n  },\n  onLoad(e) {\n    // e.id = 825894\n    // 读取分享链接中的邀请人编号\n    if (e && e.inviter_id) {\n      wx.setStorageSync('referrer', e.inviter_id)\n    }\n    // 读取小程序码中的邀请人编号\n    if (e && e.scene) {\n      const scene = decodeURIComponent(e.scene) // 处理扫码进商品详情页面的逻辑\n      if (scene && scene.split(',').length >= 2) {\n        e.id = scene.split(',')[0]\n        wx.setStorageSync('referrer', scene.split(',')[1])\n      }\n    }\n    this.data.goodsId = e.id\n    this.goodsDetail()\n  },\n  async goodsDetail() {\n    const token = wx.getStorageSync('token')\n    const res = await WXAPI.goodsDetail(this.data.goodsId, token ? token : '')\n    if (res.code == 0) {\n      this.setData({\n        goodsDetail: res.data,\n      })\n      this.cpsTaobaoGoodsDetail(res.data.basicInfo.yyId)\n    }\n  },\n  async cpsTaobaoGoodsDetail(goodsId) {\n    const token = wx.getStorageSync('token')\n    const res = await WXAPI.cpsTaobaoGoodsDetail({\n      token,\n      platform: 2,\n      goodsIds: goodsId\n    })\n    if (res.code == 0) {\n      this.setData({\n        cpsTaobaoGoodsDetail: res.data[0]\n      })\n    }\n  },\n  onShow (){\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.goodsFavCheck()\n      }\n    })\n  },\n  async goodsFavCheck() {\n    const res = await WXAPI.goodsFavCheck(wx.getStorageSync('token'), this.data.goodsId)\n    if (res.code == 0) {\n      this.setData({\n        faved: true\n      })\n    } else {\n      this.setData({\n        faved: false\n      })\n    }\n  },\n  async addFav(){\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        if (this.data.faved) {\n          // 取消收藏\n          WXAPI.goodsFavDeleteV2({\n            token: wx.getStorageSync('token'),\n            goodsId: this.data.goodsId,\n            type: 1\n          }).then(res => {\n            this.goodsFavCheck()\n          })\n        } else {\n          const extJsonStr = {\n            wxaurl: `/packageCps/pages/goods-details/cps-taobao?id=${this.data.goodsId}`,\n            skuId: this.data.goodsId,\n            pic: this.data.goodsDetail.basicInfo.pic,\n            name: this.data.goodsDetail.basicInfo.name\n          }\n          // 加入收藏\n          WXAPI.goodsFavAdd({\n            token: wx.getStorageSync('token'),\n            goodsId: this.data.goodsId,\n            type: 1,\n            extJsonStr: JSON.stringify(extJsonStr)\n          }).then(res => {\n            this.goodsFavCheck()\n          })\n        }\n      }\n    })\n  },\n  goShopCar: function() {\n    wx.reLaunch({\n      url: \"/pages/shop-cart/index\"\n    });\n  },\n  toAddShopCar: function() {\n    this.setData({\n      shopType: \"addShopCar\"\n    })\n    this.bindGuiGeTap();\n  },\n  async tobuy() {\n    const token = wx.getStorageSync('token')\n    if (!token) {\n      wx.showToast({\n        title: '请先登陆',\n        icon: 'none'\n      })\n      return\n    }\n    const res = await WXAPI.cpsPddGoodsShotUrl(token, this.data.goodsDetail.basicInfo.yyIdStr)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.navigateToMiniProgram({\n      appId: res.data.we_app_info.app_id,\n      path: res.data.we_app_info.page_path\n    })\n  },\n  toPingtuan: function(e) {\n    let pingtuanopenid = 0\n    if (e.currentTarget.dataset.pingtuanopenid) {\n      pingtuanopenid = e.currentTarget.dataset.pingtuanopenid\n    }\n    this.setData({\n      shopType: \"toPingtuan\",\n      selectSizePrice: this.data.goodsDetail.basicInfo.pingtuanPrice,\n      selectSizeOPrice: this.data.goodsDetail.basicInfo.originalPrice,\n      pingtuanopenid: pingtuanopenid,\n      \n      hideShopPopup: false,\n      skuGoodsPic: this.data.goodsDetail.basicInfo.pic\n    });\n    \n  },\n  /**\n   * 规格选择弹出框\n   */\n  bindGuiGeTap: function() {\n    this.setData({\n      hideShopPopup: false\n    })\n  },\n  /**\n   * 规格选择弹出框隐藏\n   */\n  closePopupTap: function() {\n    this.setData({\n      hideShopPopup: true\n    })\n  },\n  stepChange(event) {\n    this.setData({\n      buyNumber: event.detail\n    })\n  },\n  /**\n   * 选择商品规格\n   */\n  async labelItemTap(e) {\n    const propertyindex = e.currentTarget.dataset.propertyindex\n    const propertychildindex = e.currentTarget.dataset.propertychildindex\n\n    const property = this.data.goodsDetail.properties[propertyindex]\n    const child = property.childsCurGoods[propertychildindex]\n    // 取消该分类下的子栏目所有的选中状态\n    property.childsCurGoods.forEach(child => {\n      child.active = false\n    })\n    // 设置当前选中状态\n    property.optionValueId = child.id\n    child.active = true\n    // 获取所有的选中规格尺寸数据\n    const needSelectNum = this.data.goodsDetail.properties.length\n    let curSelectNum = 0;\n    let propertyChildIds = \"\";\n    let propertyChildNames = \"\";\n\n    this.data.goodsDetail.properties.forEach(p => {\n      p.childsCurGoods.forEach(c => {\n        if (c.active) {\n          curSelectNum++;\n          propertyChildIds = propertyChildIds + p.id + \":\" + c.id + \",\";\n          propertyChildNames = propertyChildNames + p.name + \":\" + c.name + \"  \";\n        }\n      })\n    })\n    let canSubmit = false;\n    if (needSelectNum == curSelectNum) {\n      canSubmit = true;\n    }\n    let skuGoodsPic = this.data.skuGoodsPic\n    if (this.data.goodsDetail.subPics && this.data.goodsDetail.subPics.length > 0) {\n      const _subPic = this.data.goodsDetail.subPics.find(ele => {\n        return ele.optionValueId == child.id\n      })\n      if (_subPic) {\n        skuGoodsPic = _subPic.pic\n      }\n    }\n    this.setData({\n      goodsDetail: this.data.goodsDetail,\n      canSubmit,\n      skuGoodsPic,\n      propertyChildIds,\n      propertyChildNames,\n    })\n    this.calculateGoodsPrice()\n  },\n  async calculateGoodsPrice() {\n    // 计算最终的商品价格\n    let price = this.data.goodsDetail.basicInfo.minPrice\n    let originalPrice = this.data.goodsDetail.basicInfo.originalPrice\n    let totalScoreToPay = this.data.goodsDetail.basicInfo.minScore\n    let buyNumMax = this.data.goodsDetail.basicInfo.stores\n    let buyNumber = this.data.goodsDetail.basicInfo.minBuyNumber\n    if (this.data.shopType == 'toPingtuan') {\n      price = this.data.goodsDetail.basicInfo.pingtuanPrice\n    }\n    // 计算 sku 价格\n    if (this.data.canSubmit) {\n      const token = wx.getStorageSync('token')\n      const res = await WXAPI.goodsPriceV2({\n        token: token ? token : '',\n        goodsId: this.data.goodsDetail.basicInfo.id,\n        propertyChildIds: this.data.propertyChildIds\n      })\n      if (res.code == 0) {\n        price = res.data.price\n        if (this.data.shopType == 'toPingtuan') {\n          price = res.data.pingtuanPrice\n        }\n        originalPrice = res.data.originalPrice\n        totalScoreToPay = res.data.score\n        buyNumMax = res.data.stores\n      }\n    }\n    // 计算配件价格\n    if (this.data.goodsAddition) {\n      this.data.goodsAddition.forEach(big => {\n        big.items.forEach(small => {\n          if (small.active) {\n            price = (price*100 + small.price*100) / 100\n          }\n        })\n      })\n    }\n    this.setData({\n      selectSizePrice: price,\n      selectSizeOPrice: originalPrice,\n      totalScoreToPay: totalScoreToPay,\n      buyNumMax,\n      buyNumber: (buyNumMax >= buyNumber) ? buyNumber : 0\n    });\n  },\n  /**\n   * 选择可选配件\n   */\n  async labelItemTap2(e) {\n    const propertyindex = e.currentTarget.dataset.propertyindex\n    const propertychildindex = e.currentTarget.dataset.propertychildindex\n\n    const goodsAddition = this.data.goodsAddition\n    const property = goodsAddition[propertyindex]\n    const child = property.items[propertychildindex]\n    if (child.active) {\n      // 该操作为取消选择\n      child.active = false\n      this.setData({\n        goodsAddition\n      })\n      this.calculateGoodsPrice()\n      return\n    }\n    // 单选配件取消所有子栏目选中状态\n    if (property.type == 0) {\n      property.items.forEach(child => {\n        child.active = false\n      })\n    }\n    // 设置当前选中状态\n    child.active = true\n    this.setData({\n      goodsAddition\n    })\n    this.calculateGoodsPrice()\n  },\n  /**\n   * 组建立即购买信息\n   */\n  buliduBuyNowInfo: function(shoptype) {\n    var shopCarMap = {};\n    shopCarMap.goodsId = this.data.goodsId;\n    shopCarMap.pic = this.data.imageDomain + this.data.price.pic;\n    shopCarMap.name = this.data.price.skuName;\n    shopCarMap.price = this.data.price.priceSale;\n    shopCarMap.left = \"\";\n    shopCarMap.active = true;\n    shopCarMap.number = this.data.buyNumber;\n    \n    var buyNowInfo = {};\n    buyNowInfo.shopNum = 0;\n    buyNowInfo.shopList = [shopCarMap];\n    \n    return buyNowInfo;\n  },\n  onShareAppMessage() {\n    return {\n      title: this.data.goodsDetail.basicInfo.name,\n      path: '/packageCps/pages/goods-details/cps-taobao?id=' + this.data.goodsId + '&inviter_id=' + wx.getStorageSync('uid'),\n      success: function(res) {\n        // 转发成功\n      },\n      fail: function(res) {\n        // 转发失败\n      }\n    }\n  },\n  onShareTimeline() {    \n    return {\n      title: this.data.goodsDetail.basicInfo.name,\n      query: 'id=' + this.data.goodsId + '&inviter_id=' + wx.getStorageSync('uid'),\n      imageUrl: this.data.goodsDetail.basicInfo.pic\n    }\n  },\n  reputation: function(goodsId) {\n    var that = this;\n    WXAPI.goodsReputation({\n      goodsId: goodsId\n    }).then(function(res) {\n      if (res.code == 0) {\n        res.data.forEach(ele => {\n          if (ele.goods.goodReputation == 0) {\n            ele.goods.goodReputation = 1\n          } else if (ele.goods.goodReputation == 1) {\n            ele.goods.goodReputation = 3\n          } else if (ele.goods.goodReputation == 2) {\n            ele.goods.goodReputation = 5\n          }\n        })\n        that.setData({\n          reputation: res.data\n        });\n      }\n    })\n  },\n  pingtuanList: function(goodsId) {\n    var that = this;\n    WXAPI.pingtuanList({\n      goodsId: goodsId,\n      status: 0\n    }).then(function(res) {\n      if (res.code == 0) {\n        that.setData({\n          pingtuanList: res.data.result\n        });\n      }\n    })\n  },\n  getVideoSrc: function(videoId) {\n    var that = this;\n    WXAPI.videoDetail(videoId).then(function(res) {\n      if (res.code == 0) {\n        that.setData({\n          videoMp4Src: res.data.fdMp4\n        });\n      }\n    })\n  },\n  joinKanjia(){\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.doneJoinKanjia();\n      }\n    })\n  },\n  doneJoinKanjia: function() { // 报名参加砍价活动\n    const _this = this;\n    if (!_this.data.curGoodsKanjia) {\n      return;\n    }\n    wx.showLoading({\n      title: '加载中',\n      mask: true\n    })\n    WXAPI.kanjiaJoin(wx.getStorageSync('token'), _this.data.curGoodsKanjia.id).then(function(res) {\n      wx.hideLoading()\n      if (res.code == 0) {\n        _this.setData({\n          kjJoinUid: wx.getStorageSync('uid'),\n          myHelpDetail: null\n        })\n        _this.getGoodsDetailAndKanjieInfo(_this.data.goodsDetail.basicInfo.id)\n      } else {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n      }\n    })\n  },\n  joinPingtuan: function(e) {\n    let pingtuanopenid = e.currentTarget.dataset.pingtuanopenid\n    wx.navigateTo({\n      url: \"/pages/to-pay-order/index?orderType=buyNow&pingtuanOpenId=\" + pingtuanopenid\n    })\n  },\n  goIndex() {\n    wx.switchTab({\n      url: '/pages/index/index',\n    });\n  },\n  helpKanjia() {\n    const _this = this;\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        _this.helpKanjiaDone()\n      }\n    })\n  },\n  helpKanjiaDone(){\n    const _this = this;\n    WXAPI.kanjiaHelp(wx.getStorageSync('token'), _this.data.kjId, _this.data.kjJoinUid, '').then(function (res) {\n      if (res.code != 0) {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n        return;\n      }\n      _this.setData({\n        myHelpDetail: res.data\n      });\n      wx.showModal({\n        title: '成功',\n        content: '成功帮TA砍掉 ' + res.data.cutPrice + ' 元',\n        showCancel: false\n      })\n      _this.getGoodsDetailAndKanjieInfo(_this.data.goodsDetail.basicInfo.id)\n    })\n  },\n  closePop(){\n    this.setData({\n      posterShow: false\n    })\n  },\n  async drawSharePic() {\n    const _this = this\n    const accountInfo = wx.getAccountInfoSync()\n    const envVersion = accountInfo.miniProgram.envVersion\n    const qrcodeRes = await WXAPI.wxaQrcode({\n      scene: _this.data.goodsId + ',' + wx.getStorageSync('uid'),\n      page: '/packageCps/pages/goods-details/cps-taobao',\n      is_hyaline: true,\n      autoColor: true,\n      expireHours: 1,\n      env_version: envVersion,\n      check_path: envVersion == 'release' ? true : false,\n    })\n    if (qrcodeRes.code != 0) {\n      wx.showToast({\n        title: qrcodeRes.msg,\n        icon: 'none'\n      })\n      return\n    }\n    const qrcode = qrcodeRes.data\n    const pic = _this.data.goodsDetail.basicInfo.pic\n    wx.getImageInfo({\n      src: pic,\n      success(res) {\n        const height = 490 * res.height / res.width\n        _this.drawSharePicDone(height, qrcode)\n      },\n      fail(e) {\n        console.error(e)\n      }\n    })\n  },\n  drawSharePicDone(picHeight, qrcode) {\n    const _this = this\n    const _baseHeight = 74 + (picHeight + 120)\n    this.setData({\n      posterConfig: {\n        width: 750,\n        height: picHeight + 660,\n        backgroundColor: '#fff',\n        debug: false,\n        blocks: [\n          {\n            x: 76,\n            y: 74,\n            width: 604,\n            height: picHeight + 120,\n            borderWidth: 2,\n            borderColor: '#c2aa85',\n            borderRadius: 8\n          }\n        ],\n        images: [\n          {\n            x: 133,\n            y: 133,\n            url: _this.data.goodsDetail.basicInfo.pic, // 商品图片\n            width: 490,\n            height: picHeight\n          },\n          {\n            x: 76,\n            y: _baseHeight + 199,\n            url: qrcode, // 二维码\n            width: 222,\n            height: 222\n          }\n        ],\n        texts: [\n          {\n            x: 375,\n            y: _baseHeight + 80,\n            width: 650,\n            lineNum:2,\n            text: _this.data.goodsDetail.basicInfo.name,\n            textAlign: 'center',\n            fontSize: 40,\n            color: '#333'\n          },\n          {\n            x: 375,\n            y: _baseHeight + 180,\n            text: '￥' + _this.data.goodsDetail.basicInfo.minPrice,\n            textAlign: 'center',\n            fontSize: 50,\n            color: '#e64340'\n          },\n          {\n            x: 352,\n            y: _baseHeight + 320,\n            text: '长按识别小程序码',\n            fontSize: 28,\n            color: '#999'\n          }\n        ],\n      }\n    }, () => {\n      Poster.create();\n    });\n  },\n  onPosterSuccess(e) {\n    console.log('success:', e)\n    this.setData({\n      posterImg: e.detail,\n      showposterImg: true\n    })\n  },\n  onPosterFail(e) {\n    console.error('fail:', e)\n  },\n  savePosterPic() {\n    const _this = this\n    wx.saveImageToPhotosAlbum({\n      filePath: this.data.posterImg,\n      success: (res) => {\n        wx.showModal({\n          content: '已保存到手机相册',\n          showCancel: false,\n          confirmText: '知道了',\n          confirmColor: '#333'\n        })\n      },\n      complete: () => {\n        _this.setData({\n          showposterImg: false\n        })\n      },\n      fail: (res) => {\n        if (res.errMsg.indexOf('fail privacy permission is not authorized') != -1) {\n          wx.showModal({\n            content: '请阅读并同意隐私条款以后才能继续本操作',\n            confirmText: '阅读协议',\n            cancelText: '取消',\n            success (res) {\n              if (res.confirm) {\n                wx.requirePrivacyAuthorize() // 弹出用户隐私授权框\n              }\n            }\n          })\n        } else if (res.errMsg.indexOf('fail auth deny') != -1) {\n          wx.showModal({\n            content: '本次操作需要您同意并将图片写入手机相册',\n            confirmText: '立即授权',\n            cancelText: '取消',\n            success (res) {\n              if (res.confirm) {\n                // 弹出设置窗口，让用户去设置\n                wx.openSetting({\n                  withSubscriptions: true,\n                  fail: aaa => console.log(aaa)\n                });\n              }\n            }\n          })\n        } else {\n          console.error(res);\n          wx.showToast({\n            title: res.errMsg,\n            icon: 'none'\n          })\n        }\n      }\n    })\n  },\n  previewImage(e) {\n    const url = e.currentTarget.dataset.url\n    wx.previewImage({\n      current: url, // 当前显示图片的http链接\n      urls: [url] // 需要预览的图片http链接列表\n    })\n  },\n  onTabsChange(e) {\n    var index = e.detail.index\n    this.setData({\n      toView: this.data.tabs[index].view_id\n    })\n  },\n  backToHome() {\n    wx.switchTab({\n      url: '/pages/index/index',\n    })\n  },\n  async copyKouling() {\n    const res = await WXAPI.cpsTaobaoGoodsKouling(wx.getStorageSync('token'), this.data.goodsDetail.content)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.setClipboardData({\n      data: res.data.model,\n      success: () => {\n        wx.showToast({\n          title: '淘口令已复制'\n        })\n      }\n    })\n  },\n  async copyLink() {\n    const res = await WXAPI.cpsTaobaoGoodsShotUrl(wx.getStorageSync('token'), this.data.goodsDetail.content)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.setClipboardData({\n      data: res.data[0].content,\n      success: () => {\n        wx.showToast({\n          title: '链接已复制'\n        })\n      }\n    })\n  }\n})\n"
  },
  {
    "path": "packageCps/pages/goods-details/cps-taobao.json",
    "content": "{\n  \"navigationBarTitleText\": \"商品详情\",\n  \"usingComponents\": {\n    \"poster\": \"wxa-plugin-canvas/poster\"\n  }\n}"
  },
  {
    "path": "packageCps/pages/goods-details/cps-taobao.wxml",
    "content": "<view class=\"container\">\n  <scroll-view class=\"scroll-container\" scroll-y=\"true\" scroll-with-animation=\"true\">\n    <view class=\"swiper-container\" id=\"swiper-container\">\n      <swiper class=\"swiper_box\" indicator-dots=\"true\" indicator-active-color=\"#fff\" autoplay circular>\n        <swiper-item wx:for=\"{{cpsTaobaoGoodsDetail.small_images.string}}\" wx:key=\"*this\">\n          <image src=\"{{item}}\" class=\"slide-image\" mode=\"aspectFill\" lazy-load=\"true\" />\n        </swiper-item>\n      </swiper>\n    </view>\n    <view class=\"goods-info vcell\">\n      <view class=\"goods-info-top-container\">\n        <view class=\"goods-profile\">\n          <view class=\"p\"><text>¥</text> {{goodsDetail.basicInfo.minPrice}}</view>\n          <view wx:if=\"{{goodsDetail.basicInfo.originalPrice && goodsDetail.basicInfo.originalPrice > 0}}\" class=\"goods-price\"\n            style='color:#aaa;text-decoration:line-through;padding: 15rpx 0rpx 0rpx 15rpx;'><text>¥</text>\n            {{goodsDetail.basicInfo.originalPrice}}</view>\n        </view>\n        <view class=\"goods-info-fx\">\n          <view class='item left'>\n            <van-icon name=\"share-o\" size=\"24px\" />\n            <view class=\"icon-title\">分享</view>\n            <button open-type='share'></button>\n          </view>\n          <view class='item' bindtap=\"drawSharePic\">\n            <van-icon name=\"qr\" size=\"24px\" />\n            <view class=\"icon-title\">二维码</view>\n          </view>\n        </view>\n      </view>\n      <view class=\"goods-title\">{{goodsDetail.basicInfo.name}}</view>\n      <view class=\"characteristic\">{{goodsDetail.basicInfo.characteristic}}</view>\n    </view>\n\n    <view class='space'></view>\n    <view class=\"goods-des-info\" style=\"margin-top:35rpx;\" wx:if=\"{{pingtuanList}}\">\n      <view class=\"label-title\" style=\"border-bottom:1px solid #eee;\">{{pingtuanList.length}}人在拼单，可直接参与</view>\n      <view class=\"goods-text\" style=\"margin-top:15rpx;border-bottom:1px solid #eee;overflow:hidden;\"\n        wx:for=\"{{pingtuanList}}\" wx:key=\"id\">\n        <view style=\"width:150rpx;float:left;\">\n          <image style=\"width: 150rpx; height: 150rpx;\" src=\"{{item.apiExtUser.avatarUrl}}\"></image>\n          <view style=\"width:150rpx;text-align:center;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;\">\n            {{item.apiExtUser.nick}}</view>\n        </view>\n        <view style=\"width:500rpx;float:left;margin-left:35rpx;\">\n          <view>已有\n            <text style=\"color:red\"> {{item.helpNumber}} </text>人参与</view>\n          <view style=\"color: #B0B0B0;font-size:24rpx;\">截止: {{item.dateEnd}}</view>\n          <button type=\"warn\" size=\"mini\" data-pingtuanopenid=\"{{item.id}}\" bindtap=\"toPingtuan\"> 去拼单 </button>\n        </view>\n      </view>\n    </view>\n    <van-cell wx:if=\"{{hasMoreSelect && goodsDetailSkuShowType==0}}\" custom-class=\"vw100\" is-link\n      bind:click=\"bindGuiGeTap\">\n      <view slot=\"title\">\n        请选择:\n        <block wx:for=\"{{goodsDetail.properties}}\" wx:key=\"id\"> {{item.name}}</block>\n        <block wx:for=\"{{goodsAddition}}\" wx:key=\"id\"> {{item.name}}</block>\n      </view>\n    </van-cell>\n    <view class=\"size-label-box2\" wx:if=\"{{goodsDetailSkuShowType==1}}\">\n      <view class=\"label-title\">选择商品规格</view>\n      <view class=\"size-label-box\">\n        <block wx:for=\"{{goodsDetail.properties}}\" wx:for-item=\"property\" wx:for-index=\"idx\" wx:key=\"id\">\n          <view class=\"label\">{{property.name}}</view>\n          <view class=\"label-item-box\">\n            <view class=\"label-item {{item.active ? 'active' : '' }}\" wx:for=\"{{property.childsCurGoods}}\" wx:key=\"id\"\n              bindtap=\"labelItemTap\" data-propertyindex=\"{{idx}}\" data-propertychildindex=\"{{index}}\">\n              {{item.name}}\n            </view>\n          </view>\n        </block>\n      </view>\n      <van-cell title=\"购买数量\">\n        <view>\n          <van-stepper value=\"{{ buyNumber }}\" min=\"{{ buyNumMin }}\" max=\"{{ buyNumMax }}\" bind:change=\"stepChange\" />\n        </view>\n      </van-cell>\n    </view>\n    <view wx:if=\"{{shopSubdetail}}\" class=\"shop-container\">\n      <image mode=\"aspectFill\" src=\"{{shopSubdetail.info.pic}}\"></image>\n      <view class=\"info\">\n        <view class=\"title\">{{shopSubdetail.info.name}}</view>\n        <view class=\"address\">{{shopSubdetail.info.address}}</view>\n      </view>\n    </view>\n    <view class=\"goods-des-info\" id=\"goods-des-info\">\n      <view class=\"label-title\">\n        <view class=\"left\">商品详情</view>\n      </view>\n      <view class=\"goods-text\">\n        <image wx:for=\"{{ cpsTaobaoGoodsDetail.small_images.string }}\" wx:key=\"*this\" mode=\"widthFix\" src=\"{{ item }}\"></image>\n      </view>\n    </view>\n    <van-cell-group wx:if=\"{{!curGoodsKanjia && reputation}}\" custom-class=\"vw100\" title=\"宝贝评价\">\n      <block wx:for=\"{{reputation}}\" wx:key=\"id\">\n        <van-cell custom-class=\"reputation-cell\" icon=\"{{item.user.avatarUrl}}\" title=\"{{item.user.nick}}\"\n          label=\"{{item.goods.dateReputation}}\" border=\"{{ false }}\">\n          <van-rate value=\"{{ item.goods.goodReputation }}\" color=\"#e64340\" readonly />\n        </van-cell>\n        <van-cell wx:if=\"{{ item.goods.goodReputationRemark }}\" title-class=\"reputation-cell-reamrk\"\n          title=\"{{item.goods.goodReputationRemark}}\" />\n        <view wx:if=\"{{ item.reputationPics }}\" class=\"reputation-pics\">\n          <image wx:for=\"{{item.reputationPics}}\" wx:for-item=\"picItem\" src=\"{{ picItem.pic }}\" mode=\"aspectFill\"\n            bindtap=\"previewImage\" data-url=\"{{ picItem.pic }}\"></image>\n        </view>\n        <van-cell wx:if=\"{{ item.goods.goodReputationReply }}\" title-class=\"reputation-cell-reamrk\"\n          title=\"掌柜回复:{{item.goods.goodReputationReply}}\" />\n      </block>\n    </van-cell-group>\n    <view class='kjBuyButton' wx:if=\"{{curGoodsKanjia && curKanjiaprogress}}\">\n      <view class=\"item\" wx:if=\"{{curKanjiaprogress.kanjiaInfo.uid != curuid}}\">\n        <van-button type=\"primary\" block bind:click=\"helpKanjia\" disabled=\"{{myHelpDetail}}\">\n          {{myHelpDetail?\"您已砍过\":\"帮TA砍\"}}</van-button>\n      </view>\n      <view class=\"item\" wx:else>\n        <van-button type=\"danger\" block bind:click=\"tobuy\">用当前价购买</van-button>\n      </view>\n    </view>\n    <van-goods-action wx:if=\"{{!curGoodsKanjia}}\">\n      <van-goods-action-icon icon=\"chat-o\" text=\"客服\" open-type=\"contact\"\n        send-message-title=\"{{goodsDetail.basicInfo.name}}\" send-message-img=\"{{goodsDetail.basicInfo.pic}}\"\n        send-message-path=\"/packageCps/pages/goods-details/cps-taobao?id={{goodsDetail.basicInfo.id}}\" show-message-card=\"{{ true }}\" />\n      <van-goods-action-icon icon=\"{{faved?'like':'like-o'}}\" text=\"收藏\" bind:click=\"addFav\" />\n      <van-goods-action-button type=\"warning\"text=\"复制淘口令\" bind:click=\"copyKouling\" />\n      <van-goods-action-button text=\"复制链接\" bind:click=\"copyLink\" />\n    </van-goods-action>\n  </scroll-view>\n</view>\n\n<block wx:if=\"{{posterShow}}\">\n  <view class=\"poster-mask\"></view>\n  <view class=\"poster\">\n    <canvas class=\"canvas\" style=\"{{canvasstyle}}\" canvas-id=\"firstCanvas\"></canvas>\n  </view>\n  <view class=\"poster-btn\">\n    <button type=\"primary\" size=\"mini\" bindtap='_saveToMobile'> 保存图片 </button>\n    <button type=\"warn\" size=\"mini\" bindtap='closePop'> 关闭 </button>\n  </view>\n</block>\n\n<poster id=\"poster\" config=\"{{posterConfig}}\" bind:success=\"onPosterSuccess\" bind:fail=\"onPosterFail\"></poster>\n<view wx:if=\"{{showposterImg}}\" class=\"popup-mask\"></view>\n<view wx:if=\"{{showposterImg}}\" class=\"posterImg-box\">\n  <image mode=\"widthFix\" class=\"posterImg\" src=\"{{posterImg}}\"></image>\n  <view class=\"btn-create\" bindtap=\"savePosterPic\">保存到相册</view>\n</view>\n"
  },
  {
    "path": "packageCps/pages/goods-details/cps-taobao.wxss",
    "content": "page,\nview,\nimage,\ninput,\ntextarea {\n  display: block;\n  box-sizing: border-box;\n}\n\n.van-cell {\n  padding: 10px 38rpx;\n}\n\n.container {\n  background-color: #F2f2f2;\n  min-height: 100%;\n  padding-bottom: 100rpx;\n}\n\n.scroll-container {\n  height: 100vh;\n  padding-bottom: 64rpx;\n}\n\n.tabs-container {\n  width: 100%;\n  display: flex;\n  background-color: white;\n}\n\n.home-o {\n  width: 20%;\n}\n\n.swiper-container {\n  width: 100%;\n  position: relative;\n}\n\n.swiper_box {\n  width: 100%;\n  height: 748rpx;\n}\n\nswiper-item image {\n  width: 100%;\n  display: inline-block;\n  overflow: hidden;\n  height: 748rpx;\n}\n\n.goods-info {\n  background-color: #fff;\n  padding: 35rpx 0;\n  width: 100%;\n  position: relative;\n}\n\n.goods-info-top-container {\n  display: flex;\n  justify-content: space-between;\n  margin-bottom: 10rpx;\n}\n\n.goods-info-fx {\n  bottom: 60rpx;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-right: 35rpx;\n}\n\n.goods-info-fx .item {\n  /* height: 50rpx; */\n  right: 130rpx;\n  top: 100rpx;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  font-size: 24rpx;\n  background: #fff;\n  z-index: 20;\n}\n\n.goods-info-fx .left {\n  margin-right: 10px;\n}\n\n.goods-info-fx .icon-title{\n  padding-top:5px ;\n  font-size: 11px;\n}\n\n.goods-info-fx .item image {\n  width: 50rpx;\n  height: 50rpx;\n}\n\n.goods-info-fx .item button {\n  position: absolute;\n  height: 100%;\n  width: 100%;\n  opacity: 0;\n  z-index: 99;\n}\n\n.goods-info .goods-title {\n  box-sizing: border-box;\n  padding: 0 30rpx;\n  font-size: 32rpx;\n  line-height: 1.4;\n  color: #000;\n  /* padding-bottom: 26rpx; */\n}\n\n.goods-info .goods-share {\n  box-sizing: border-box;\n  padding: 0 30rpx;\n  font-size: 25rpx;\n  line-height: 1.4;\n  color: #CC0000;\n  padding-top: 26rpx;\n}\n\n.vcell{\n  border-bottom-left-radius: 12px;\n  border-bottom-right-radius: 12px;\n}\n\n.goods-profile {\n  display: flex;\n  align-items: center;\n}\n\n.goods-profile .p {\n  color: #e64340;\n  font-size: 20pt;\n  margin-left: 30rpx;\n}\n\n.goods-profile .p text {\n  font-size: 12pt;\n}\n\n.goods-profile .r {\n  color: #ccc;\n  font-size: 10pt;\n  margin-left: 30rpx;\n}\n\n.row-arrow {\n  width: 100vw;\n  padding: 0 32rpx;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  height: 102rpx;\n  font-size: 28rpx;\n  line-height: 102rpx;\n  background: #fff;\n  margin-bottom: 32rpx;\n}\n\n.row-arrow image {\n  width: 40rpx;\n  height: 40rpx;\n}\n\n.goods-des-info {\n  width: 100%;\n  box-sizing: border-box;\n  background-color: #fff;\n  border-radius: 12px;\n}\n\n.label-title {\n  font-size: 28rpx;\n  color: #000000;\n  padding: 30rpx;\n  display: flex;\n  justify-content: space-between;\n}\n\n.label-title .left{\n  border-left: 3px solid #e64340;\n  height: auto;\n  padding-left: 10px;\n}\n\n.goods-text {\n  padding: 0 10rpx;\n  font-size: 28rpx;\n  color: #666666;\n  line-height: 56rpx;\n  margin-bottom: 30rpx;\n}\n\n.goods-text image {\n  width: 100%;\n}\n\n.des-imgs {\n  width: 100%;\n}\n\n.des-imgs image {\n  width: 100%;\n}\n\n.footer-box {\n  width: 100%;\n  height: 100rpx;\n  background-color: #fff;\n  position: fixed;\n  bottom: 0;\n  left: 0;\n  display: flex;\n  box-shadow: 0 0 1rpx 0;\n  align-items: center;\n}\n\n.footer-box .contact {\n  position: relative;\n  height: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-left: 32rpx;\n}\n\n.footer-box .contact button {\n  position: absolute;\n  height: 100%;\n  width: 100%;\n  opacity: 0;\n  z-index: 99;\n}\n\n.footer-box .contact image {\n  width: 60rpx;\n  height: 60rpx;\n}\n\n.footer-box .shop-cart-btn {\n  position: relative;\n  height: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-left: 32rpx;\n}\n\n.footer-box .shop-cart-btn image {\n  width: 55rpx;\n  height: 55rpx;\n}\n\n.fav-icon {\n  width: 60rpx;\n  height: 60rpx;\n  margin-left: 32rpx;\n  /*707070*/\n}\n\n.footer-box .shop-cart-btn .shop-num {\n  position: absolute;\n  color: #fff;\n  left: 32rpx;\n  top: 10rpx;\n\n  width: 40rpx;\n  height: 40rpx;\n  line-height: 40rpx;\n  text-align: center;\n  border-radius: 50%;\n  background: #e64340;\n  font-size: 24rpx;\n}\n\n.footer-box .join-shop-cart {\n  text-align: center;\n  height: 100%;\n  line-height: 100rpx;\n  background-color: #ff6850;\n  color: #fff;\n  font-size: 34rpx;\n  flex: 1;\n  margin-left: 32rpx;\n}\n\n.footer-box .now-buy {\n  text-align: center;\n  height: 100%;\n  width: 250rpx;\n  line-height: 100rpx;\n  background-color: #e64340;\n  color: #fff;\n  font-size: 34rpx;\n  flex: 1;\n}\n\n.show-popup {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  z-index: 999;\n}\n\n.popup-mask {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.5);\n  z-index: 5;\n}\n\n.popup-contents {\n  position: fixed;\n  left: 0;\n  bottom: 0;\n  width: 100%;\n  background-color: #fff;\n  z-index: 6;\n}\n\n.pop-goods-info {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-left: 32rpx;\n  margin-right: 32rpx;\n  padding: 30rpx 0;\n  border-bottom: 1px solid #eee;\n}\n\n.pop-img-box {\n  width: 120rpx;\n  height: 120rpx;\n  overflow: hidden;\n  margin-right: 26rpx;\n}\n\n.pop-img-box .goods-thumbnail {\n  width: 120rpx;\n  height: 120rpx;\n}\n\n.pop-goods-title {\n  width: 484rpx;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  overflow: hidden;\n  font-size: 26rpx;\n  color: #000000;\n}\n\n.pop-goods-price {\n  font-size: 26rpx;\n  color: #e64340;\n  margin-top: 20rpx;\n}\n\n.pop-goods-price .t1 {\n  font-size: 50rpx;\n}\n\n.pop-goods-price-original {\n  font-size: 26rpx;\n  color: #aaa;\n  text-decoration: line-through;\n  margin-left: 16rpx;\n}\n\n.pop-goods-close {\n  width: 36rpx;\n  height: 36rpx;\n}\n\n.goods-property-container {\n  height: 56px;\n  align-items: center;\n  border-radius: 12px;\n  padding: 0 16px;\n}\n\n.size-label-box2 {\n  width: 100vw;\n  background: #fff;\n}\n\n.size-label-box .label {\n  font-size: 26rpx;\n  color: #000;\n  padding-left: 30rpx;\n  padding: 30rpx 0 20rpx 30rpx;\n}\n\n.size-label-box .label-item-box {\n  display: flex;\n  margin-left: 30rpx;\n  flex-direction: row;\n  flex-wrap: wrap;\n}\n\n.size-label-box .label-item {\n  font-size: 26rpx;\n  color: #000;\n  padding: 14rpx 20rpx;\n  border: 1px solid #ddd;\n  border-radius: 6rpx;\n  margin: 0 20rpx 20rpx 0;\n}\n\n.size-label-box .label-item.active {\n  color: #e64340;\n  border: 1px solid #e64340;\n}\n\n.buy-num-box {\n  display: flex;\n  justify-content: space-between;\n  padding: 30rpx 30rpx 48rpx 0;\n  margin-left: 30rpx;\n  border-top: 1px solid #eee;\n  margin-top: 30rpx;\n  align-items: center;\n}\n\n.num-label {\n  font-size: 26rpx;\n  color: #000000;\n}\n\n.buy-num-box .num-box {\n  display: flex;\n}\n\n.buy-num-box .num-box .num-jian,\n.buy-num-box .num-box .num-input,\n.buy-num-box .num-box .num-jia {\n  width: 80rpx;\n  height: 64rpx;\n  line-height: 62rpx;\n  text-align: center;\n  border: 1px solid #eee;\n}\n\n.buy-num-box .num-box .num-input {\n  font-size: 28rpx;\n}\n\n.buy-num-box .num-box .num-input input {\n  height: 100%;\n}\n\n.popup-join-btn {\n  width: 100%;\n  height: 89rpx;\n  text-align: center;\n  line-height: 89rpx;\n  font-size: 34rpx;\n  color: #ffffff;\n  background-color: #e64340;\n}\n\n.buy-num-box .num-box .hui {\n  background-color: #f5f5f9;\n}\n\n.curKanjiaprogress {\n  width: 750rpx;\n  background-color: #fff;\n  margin-top: 20rpx;\n}\n\n.curKanjiaprogress .name {\n  font-size: 40rpx;\n  padding: 20rpx;\n  text-align: center;\n}\n\n.curKanjiaprogress .placeholder {\n  margin-left: 30rpx;\n  margin-right: 30rpx;\n  text-align: center;\n  font-size: 26rpx;\n  width: 100rpx;\n  color: #999;\n}\n\n.curKanjiaprogress .kjbutton {\n  padding: 30rpx;\n}\n\n.kjBuyButton {\n  position: fixed;\n  left: 0;\n  bottom: calc(env(safe-area-inset-bottom) / 2);\n  width: 750rpx;\n  display: flex;\n}\n\n.kjBuyButton .item {\n  flex: 1;\n}\n\n.shareFloatDiv1 {\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  width: 100vw;\n  height: 100vh;\n  background-color: #555;\n  filter: Alpha(Opacity=60);\n  opacity: 0.6;\n  z-index: 99998;\n}\n\n.shareFloatDiv2 {\n  position: fixed;\n  width: 100%;\n  height: 400rpx;\n  background-color: #ffffff;\n  bottom: 0rpx;\n  z-index: 99999;\n}\n\n.shareFloatDiv2 .p1 {\n  height: 260rpx;\n}\n\n.shareFloatDiv2 .p2 {\n  height: 20rpx;\n  background-color: #EEEEEE;\n}\n\n.shareFloatDiv2 .p3 {\n  height: 120rpx;\n  line-height: 120rpx;\n  text-align: center;\n  color: #555555;\n  font-size: 16px;\n}\n\n.qrcode-button {\n  padding: 30rpx;\n  margin-top: 50rpx;\n}\n\n.qrcode {\n  width: 300rpx;\n  height: 300rpx;\n  margin-top: 50rpx;\n}\n\n\n\n.posterImg-box {\n  position: absolute;\n  top: 104rpx;\n  left: 32rpx;\n  width: 686rpx;\n  margin-bottom: 100rpx;\n  z-index: 999999;\n}\n\n.posterImg {\n  width: 100%;\n}\n\n.btn-create {\n  margin: 32rpx;\n  margin-bottom: 0;\n  height: 88rpx;\n  line-height: 88rpx;\n  background: #e64340;\n  color: #fff;\n  text-align: center;\n  border-radius: 8rpx;\n}\n\n.clearfix:after {\n  /*伪元素是行内元素 正常浏览器清除浮动方法*/\n  content: \"\";\n  display: block;\n  height: 0;\n  clear: both;\n  visibility: hidden;\n}\n\n.shop-container {\n  width: 100vw;\n  margin: 32rpx 0rpx;\n  padding: 32rpx;\n  display: flex;\n  align-items: center;\n  background: #fff;\n}\n\n.shop-container image {\n  width: 90rpx;\n  height: 90rpx;\n}\n\n.shop-container .info {\n  margin-left: 32rpx;\n}\n\n.shop-container .info .title {\n  font-size: 30rpx;\n  color: #333;\n}\n\n.shop-container .info .address {\n  font-size: 26rpx;\n  color: #666;\n}\n\n.reputation-cell-group{\n  background-color:white !important;\n  border-radius: 12px;\n}\n\n.reputation-cell {\n  padding-bottom: 0rpx !important;\n  --cell-icon-size: 88rpx;\n}\n\n.reputation-cell .van-icon {\n  top: 16rpx !important;\n}\n\n.reputation-cell .avatarUrl-img{\n  width: 40px;\n  height: 40px;\n  border-radius: 100%;\n  margin-right: 26rpx;\n}\n\n.reputation-cell-reamrk {\n  /* padding-left: 96rpx; */\n}\n\n.reputation-pics {\n  width: 100vw;\n  display: flex;\n  flex-wrap: wrap;\n  background: #ffffff;\n}\n\n.reputation-pics image {\n  width: 207rpx;\n  height: 207rpx;\n  margin: 32rpx 0 0 32rpx;\n  border-radius: 16rpx;\n}\n.characteristic {\n  padding: 8rpx 32rpx;\n  color: #666;\n  font-size: 26rpx;\n}\n.beian {\n  display: flex;\n  flex-direction: column;\n  width: 100vw;\n  height: 100vh;\n  justify-content: center;\n  align-items: center;\n}\n.beian .img {\n  width: 260rpx;\n  border-radius: 50%;\n}\n.beian .btn {\n  width: 600rpx;\n  margin-top: 200rpx;\n}"
  },
  {
    "path": "packageCps/pages/order-list/cps.js",
    "content": "const WXAPI = require('apifm-wxapi')\n\nPage({\n  data: {\n    tabIndex: 0,\n    page: 1\n  },\n  onLoad(e) {\n    this.cpsJdOrders()\n  },\n  onShow() {\n\n  },\n  tabChange(e) {\n    this.setData({\n      page: 1,\n      tabIndex: e.detail.index\n    })\n    if (e.detail.index == 0) {\n      this.cpsJdOrders()\n    }\n    if (e.detail.index == 1) {\n      this.cpsPddOrders()\n    }\n  },\n  async cpsJdOrders() {\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.cpsJdOrders({\n      token: wx.getStorageSync('token')\n    })\n    wx.hideLoading()\n    if (res.code == 0) {\n      this.setData({\n        list: res.data.result\n      })\n    }\n  },\n  async cpsPddOrders() {\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.cpsPddOrders({\n      token: wx.getStorageSync('token')\n    })\n    wx.hideLoading()\n    if (res.code == 0) {\n      this.setData({\n        list: res.data.result\n      })\n    }\n  },\n  onPullDownRefresh() {\n    this.setData({\n      page: 1\n    })\n    if (this.data.tabIndex == 0) {\n      this.cpsJdOrders()\n    }\n    if (this.data.tabIndex == 1) {\n      this.cpsPddOrders()\n    }\n    wx.stopPullDownRefresh()\n  },\n  huishou(e) {\n    console.log(e);\n    const type = e.currentTarget.dataset.type\n    const orderId = e.currentTarget.dataset.orderid\n    const platform = e.currentTarget.dataset.platform\n    wx.navigateTo({\n      url: `/pages/recycle/index?type=${type}&orderId=${orderId}&platform=${platform}`,\n    })\n  }\n})"
  },
  {
    "path": "packageCps/pages/order-list/cps.json",
    "content": "{\n  \"navigationBarTitleText\":\"CPS订单\",\n  \"enablePullDownRefresh\": true\n}"
  },
  {
    "path": "packageCps/pages/order-list/cps.wxml",
    "content": "<van-sticky>\n  <van-tabs active=\"{{ tabIndex }}\" bind:change=\"tabChange\">\n    <van-tab title=\"京东\" />\n    <van-tab title=\"拼多多\" />\n  </van-tabs>\n</van-sticky>\n<van-empty wx:if=\"{{ !list }}\" description=\"暂无订单\" />\n<block wx:if=\"{{ tabIndex == 0 }}\">\n  <van-card\n    wx:for=\"{{list}}\" wx:key=\"id\"\n    num=\"{{ item.skuNum }}\"\n    price=\"{{ item.estimateCosPrice }}\"\n    title=\"{{ item.skuName }}\"\n    thumb=\"{{ item.imageUrl }}\"\n    tag=\"{{ item.validCodeStr }}\"\n    centered\n  >\n    <view slot=\"desc\">\n      <view>订单号 {{ item.orderId }}</view>\n      <view>商品编号 {{ item.skuId }}</view>\n      <view>下单时间 {{ item.orderTime }}</view>\n    </view>\n    <view slot=\"footer\">\n      <van-button wx:if=\"{{ item.validCode == 17 && !item.recycleOrderId }}\" type=\"danger\" size=\"mini\" data-type=\"1\" data-orderid=\"{{ item.id }}\" data-platform=\"jd\" bind:click=\"huishou\">回收</van-button>\n    </view>\n  </van-card>\n</block>\n<block wx:if=\"{{ tabIndex == 1 }}\">\n  <van-card\n    wx:for=\"{{list}}\" wx:key=\"id\"\n    num=\"{{ item.goodsNum }}\"\n    price=\"{{ item.orderAmount }}\"\n    title=\"{{ item.goodsName }}\"\n    thumb=\"{{ item.imageUrl }}\"\n    tag=\"{{ item.statusStr }}\"\n    centered\n  >\n    <view slot=\"desc\">\n      <view>订单号 {{ item.orderSn }}</view>\n      <view>商品编号 {{ item.goodsId }}</view>\n      <view>下单时间 {{ item.datePay }}</view>\n    </view>\n    <view slot=\"footer\">\n      <van-button wx:if=\"{{ (item.status == 2 || item.status == 3 || item.status == 5) && !item.recycleOrderId }}\" type=\"danger\" size=\"mini\" data-type=\"1\" data-orderid=\"{{ item.id }}\" data-platform=\"pdd\" bind:click=\"huishou\">回收</van-button>\n    </view>\n  </van-card>\n</block>"
  },
  {
    "path": "packageCps/pages/order-list/cps.wxss",
    "content": "/* pages/order-list/cps.wxss */"
  },
  {
    "path": "packageFx/pages/apply/form.js",
    "content": "const WXAPI = require('apifm-wxapi')\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    \n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad(e) {\n  },\n  /**\n   * 生命周期函数--监听页面显示\n   */\n  onShow: function () {\n    const _this = this\n    WXAPI.userDetail(wx.getStorageSync('token')).then(res => {\n      if (res.code === 0) {\n        _this.setData({\n          userDetail: res.data\n        })\n      }\n    })\n  },\n  bindSave(){\n    const fx_subscribe_ids = wx.getStorageSync('fx_subscribe_ids')\n    if (fx_subscribe_ids) {\n      wx.requestSubscribeMessage({\n        tmplIds: fx_subscribe_ids.split(','),\n        success(res) {\n  \n        },\n        fail(e) {\n          console.error(e)\n        },\n        complete: (e) => {\n          this.bindSaveDone()\n        },\n      })\n    } else{\n      this.bindSaveDone()\n    }\n  },\n  bindSaveDone: function () {\n    const name = this.data.name\n    const mobile = this.data.mobile\n    if (!name) {\n      wx.showToast({\n        title: '请输入真实姓名',\n        icon: 'none'\n      })\n      return\n    }\n    if (!mobile) {\n      wx.showToast({\n        title: '请输入手机号码',\n        icon: 'none'\n      })\n      return\n    }\n    WXAPI.fxApply(wx.getStorageSync('token'), name, mobile).then(res => {\n      if (res.code != 0) {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n        return\n      }\n      wx.redirectTo({\n        url: \"/packageFx/pages/apply/index\"\n      })\n    })\n  },\n})"
  },
  {
    "path": "packageFx/pages/apply/form.json",
    "content": "{\n  \"navigationBarTitleText\": \"申请成为分销商\"\n}"
  },
  {
    "path": "packageFx/pages/apply/form.wxml",
    "content": "<view class=\"apply-container\">\n  <!-- 顶部装饰背景 -->\n  <view class=\"header-bg\">\n    <view class=\"bg-circle circle-1\"></view>\n    <view class=\"bg-circle circle-2\"></view>\n    <view class=\"bg-circle circle-3\"></view>\n  </view>\n\n  <!-- 头部区域 -->\n  <view class=\"header-section\">\n    <view class=\"icon-wrapper\">\n      <view class=\"icon-circle\">\n        <text class=\"icon-text\">💎</text>\n      </view>\n    </view>\n    <view class=\"title\">申请成为分销商</view>\n    <view class=\"subtitle\">开启您的财富之旅</view>\n  </view>\n\n  <!-- 表单卡片 -->\n  <view class=\"form-card\">\n    <view class=\"card-inner\">\n      <!-- 邀请人信息 -->\n      <view wx:if=\"{{ userDetail && userDetail.referrer }}\" class=\"referrer-section\">\n        <view class=\"referrer-label\">\n          <text class=\"label-icon\">👤</text>\n          <text class=\"label-text\">邀请人</text>\n        </view>\n        <view class=\"referrer-value\">{{ userDetail.referrer.nick }}</view>\n      </view>\n\n      <!-- 表单项 -->\n      <view class=\"form-item\">\n        <view class=\"item-label\">\n          <text class=\"label-icon\">📝</text>\n          <text class=\"label-text\">真实姓名</text>\n          <text class=\"required-star\">*</text>\n        </view>\n        <input \n          class=\"item-input\" \n          model:value=\"{{ name }}\"\n          placeholder=\"请输入您的真实姓名\"\n          placeholder-class=\"placeholder-style\"\n        />\n      </view>\n\n      <view class=\"form-item\">\n        <view class=\"item-label\">\n          <text class=\"label-icon\">📱</text>\n          <text class=\"label-text\">手机号码</text>\n          <text class=\"required-star\">*</text>\n        </view>\n        <input \n          class=\"item-input\" \n          model:value=\"{{ mobile }}\"\n          type=\"number\"\n          maxlength=\"11\"\n          placeholder=\"请输入您的手机号码\"\n          placeholder-class=\"placeholder-style\"\n        />\n      </view>\n    </view>\n  </view>\n\n  <!-- 权益说明 -->\n  <view class=\"benefits-section\">\n    <view class=\"benefit-item\">\n      <view class=\"benefit-icon\">💰</view>\n      <view class=\"benefit-text\">推广商品赚取佣金</view>\n    </view>\n    <view class=\"benefit-item\">\n      <view class=\"benefit-icon\">🎁</view>\n      <view class=\"benefit-text\">专属分销特权</view>\n    </view>\n    <view class=\"benefit-item\">\n      <view class=\"benefit-icon\">📈</view>\n      <view class=\"benefit-text\">收益实时到账</view>\n    </view>\n  </view>\n\n  <!-- 提交按钮 -->\n  <view class=\"submit-wrapper\">\n    <button class=\"submit-btn\" bindtap=\"bindSave\">\n      <text class=\"btn-text\">立即申请</text>\n      <text class=\"btn-arrow\">→</text>\n    </button>\n  </view>\n\n  <!-- 底部提示 -->\n  <view class=\"footer-tips\">\n    <text class=\"tips-text\">提交申请后，我们将尽快审核</text>\n  </view>\n</view>"
  },
  {
    "path": "packageFx/pages/apply/form.wxss",
    "content": "page {\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  min-height: 100vh;\n}\n\n.apply-container {\n  min-height: 100vh;\n  padding: 40rpx 32rpx 60rpx;\n  position: relative;\n}\n\n/* 顶部装饰背景 */\n.header-bg {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 500rpx;\n  overflow: hidden;\n  z-index: 0;\n}\n\n.bg-circle {\n  position: absolute;\n  border-radius: 50%;\n  background: rgba(255, 255, 255, 0.1);\n  animation: float 6s ease-in-out infinite;\n}\n\n.circle-1 {\n  width: 300rpx;\n  height: 300rpx;\n  top: -100rpx;\n  right: -50rpx;\n  animation-delay: 0s;\n}\n\n.circle-2 {\n  width: 200rpx;\n  height: 200rpx;\n  top: 200rpx;\n  left: -80rpx;\n  animation-delay: 2s;\n}\n\n.circle-3 {\n  width: 150rpx;\n  height: 150rpx;\n  top: 100rpx;\n  left: 50%;\n  animation-delay: 4s;\n}\n\n@keyframes float {\n  0%, 100% {\n    transform: translateY(0) scale(1);\n    opacity: 0.3;\n  }\n  50% {\n    transform: translateY(-30rpx) scale(1.1);\n    opacity: 0.5;\n  }\n}\n\n/* 头部区域 */\n.header-section {\n  position: relative;\n  z-index: 1;\n  text-align: center;\n  padding: 60rpx 0 50rpx;\n}\n\n.icon-wrapper {\n  display: flex;\n  justify-content: center;\n  margin-bottom: 30rpx;\n}\n\n.icon-circle {\n  width: 140rpx;\n  height: 140rpx;\n  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.15);\n  animation: pulse 2s ease-in-out infinite;\n}\n\n@keyframes pulse {\n  0%, 100% {\n    transform: scale(1);\n    box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.15);\n  }\n  50% {\n    transform: scale(1.05);\n    box-shadow: 0 25rpx 70rpx rgba(0, 0, 0, 0.2);\n  }\n}\n\n.icon-text {\n  font-size: 70rpx;\n}\n\n.title {\n  font-size: 48rpx;\n  font-weight: bold;\n  color: #ffffff;\n  margin-bottom: 16rpx;\n  text-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);\n  letter-spacing: 2rpx;\n}\n\n.subtitle {\n  font-size: 28rpx;\n  color: rgba(255, 255, 255, 0.9);\n  letter-spacing: 1rpx;\n}\n\n/* 表单卡片 */\n.form-card {\n  position: relative;\n  z-index: 1;\n  background: #ffffff;\n  border-radius: 32rpx;\n  padding: 50rpx 40rpx;\n  margin-bottom: 40rpx;\n  box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.08);\n}\n\n.card-inner {\n  position: relative;\n}\n\n/* 邀请人信息 */\n.referrer-section {\n  background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);\n  border-radius: 20rpx;\n  padding: 28rpx 32rpx;\n  margin-bottom: 40rpx;\n  position: relative;\n  overflow: hidden;\n}\n\n.referrer-section::before {\n  content: '';\n  position: absolute;\n  top: -50%;\n  right: -20rpx;\n  width: 200rpx;\n  height: 200rpx;\n  background: rgba(255, 255, 255, 0.2);\n  border-radius: 50%;\n}\n\n.referrer-label {\n  display: flex;\n  align-items: center;\n  margin-bottom: 12rpx;\n}\n\n.label-icon {\n  font-size: 32rpx;\n  margin-right: 12rpx;\n}\n\n.label-text {\n  font-size: 26rpx;\n  color: #8b6914;\n  font-weight: 500;\n}\n\n.referrer-value {\n  font-size: 32rpx;\n  color: #664d03;\n  font-weight: bold;\n  padding-left: 44rpx;\n}\n\n/* 表单项 */\n.form-item {\n  margin-bottom: 36rpx;\n}\n\n.form-item:last-child {\n  margin-bottom: 0;\n}\n\n.item-label {\n  display: flex;\n  align-items: center;\n  margin-bottom: 20rpx;\n}\n\n.item-label .label-icon {\n  font-size: 32rpx;\n  margin-right: 12rpx;\n}\n\n.item-label .label-text {\n  font-size: 30rpx;\n  color: #333333;\n  font-weight: 600;\n}\n\n.required-star {\n  color: #ff6b6b;\n  margin-left: 8rpx;\n  font-size: 32rpx;\n}\n\n.item-input {\n  background: #f8f9fa;\n  border-radius: 16rpx;\n  padding: 24rpx 28rpx;\n  font-size: 30rpx;\n  color: #333333;\n  border: 2rpx solid transparent;\n  transition: all 0.3s ease;\n}\n\n.item-input:focus {\n  background: #ffffff;\n  border-color: #667eea;\n  box-shadow: 0 0 0 6rpx rgba(102, 126, 234, 0.1);\n}\n\n.placeholder-style {\n  color: #b8bbc6;\n}\n\n/* 权益说明 */\n.benefits-section {\n  position: relative;\n  z-index: 1;\n  display: flex;\n  justify-content: space-between;\n  margin-bottom: 50rpx;\n  padding: 0 10rpx;\n}\n\n.benefit-item {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  text-align: center;\n}\n\n.benefit-icon {\n  width: 100rpx;\n  height: 100rpx;\n  background: rgba(255, 255, 255, 0.95);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-size: 48rpx;\n  margin-bottom: 16rpx;\n  box-shadow: 0 12rpx 30rpx rgba(0, 0, 0, 0.08);\n}\n\n.benefit-text {\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.95);\n  line-height: 1.5;\n  font-weight: 500;\n}\n\n/* 提交按钮 */\n.submit-wrapper {\n  position: relative;\n  z-index: 1;\n  padding: 0 20rpx;\n  margin-bottom: 30rpx;\n}\n\n.submit-btn {\n  width: 100%;\n  height: 100rpx;\n  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);\n  border-radius: 50rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  border: none;\n  box-shadow: 0 16rpx 40rpx rgba(245, 87, 108, 0.4);\n  position: relative;\n  overflow: hidden;\n  transition: all 0.3s ease;\n}\n\n.submit-btn::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: -100%;\n  width: 100%;\n  height: 100%;\n  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);\n  transition: left 0.5s ease;\n}\n\n.submit-btn:active::before {\n  left: 100%;\n}\n\n.submit-btn:active {\n  transform: scale(0.98);\n  box-shadow: 0 12rpx 30rpx rgba(245, 87, 108, 0.3);\n}\n\n.btn-text {\n  font-size: 34rpx;\n  color: #ffffff;\n  font-weight: bold;\n  letter-spacing: 2rpx;\n  margin-right: 12rpx;\n}\n\n.btn-arrow {\n  font-size: 36rpx;\n  color: #ffffff;\n  font-weight: bold;\n  animation: arrowMove 1.5s ease-in-out infinite;\n}\n\n@keyframes arrowMove {\n  0%, 100% {\n    transform: translateX(0);\n  }\n  50% {\n    transform: translateX(8rpx);\n  }\n}\n\n/* 底部提示 */\n.footer-tips {\n  position: relative;\n  z-index: 1;\n  text-align: center;\n}\n\n.tips-text {\n  font-size: 26rpx;\n  color: rgba(255, 255, 255, 0.85);\n  letter-spacing: 1rpx;\n}"
  },
  {
    "path": "packageFx/pages/apply/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../../utils/auth')\n\nPage({\n  data: {\n    applyStatus: -2, // -1 表示未申请，0 审核中 1 不通过 2 通过\n    applyInfo: {},\n    canvasHeight: 0\n  },\n  onLoad: function (options) {\n    this.setting()\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.initData()\n      } else {\n        getApp().loginOK = () => {\n          this.initData()\n        }\n      }\n    })\n  },\n  onShow() {\n  },\n  async initData() {\n    const _this = this\n    const userDetail = await WXAPI.userDetail(wx.getStorageSync('token'))\n    WXAPI.fxApplyProgress(wx.getStorageSync('token')).then(res => {\n      let applyStatus = userDetail.data.base.isSeller ? 2 : -1\n      if (res.code === 700) {\n        _this.setData({\n          applyStatus: applyStatus\n        })\n      }\n      if (res.code === 0) {\n        if (userDetail.data.base.isSeller) {\n          applyStatus = 2\n        } else {\n          applyStatus = res.data.status\n        }\n        _this.setData({\n          applyStatus: applyStatus,\n          applyInfo: res.data\n        })\n      }\n    })\n  },\n  goForm: function (e) {\n    wx.navigateTo({\n      url: \"/packageFx/pages/apply/form\"\n    })\n  },\n  goShop: function (e) {\n    wx.switchTab({\n      url: '/pages/index/index',\n    })\n  },\n  goFx: function (e) {\n    wx.redirectTo({\n      url: '/packageFx/pages/index/index',\n    })\n  },\n  async setting() {\n    const res = await WXAPI.fxSetting()\n    if (res.code == 0) {\n      this.setData({\n        setting: res.data\n      })\n    }\n  },\n  async buy() {\n    const token = wx.getStorageSync('token')\n    let res = await WXAPI.userAmount(token)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    if (res.data.balance >= this.data.setting.price) {\n      // 余额足够\n      res = await WXAPI.fxBuy(token)\n      if (res.code != 0) {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n        return\n      }\n      wx.showToast({\n        title: '升级成功',\n      })\n      setTimeout(() => {\n        wx.redirectTo({\n          url: '/packageFx/pages/index/index',\n        })\n      }, 1000);\n    } else {\n      let price = this.data.setting.price - res.data.balance\n      price = price.toFixed(2)\n      this.setData({\n        price,\n        paymentShow: true,\n        nextAction: {type: 13}\n      })\n    }\n  },\n  paymentOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      paymentShow: false\n    })\n    wx.redirectTo({\n      url: '/packageFx/pages/index/index',\n    })\n  },\n  paymentCancel() {\n    this.setData({\n      paymentShow: false\n    })\n  },\n})"
  },
  {
    "path": "packageFx/pages/apply/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"成为分销商\"\n}"
  },
  {
    "path": "packageFx/pages/apply/index.wxml",
    "content": "<view class=\"apply-status-container\">\n  <!-- 顶部装饰背景 -->\n  <view class=\"header-bg\">\n    <view class=\"bg-circle circle-1\"></view>\n    <view class=\"bg-circle circle-2\"></view>\n    <view class=\"bg-circle circle-3\"></view>\n  </view>\n\n  <!-- 未申请状态 -->\n  <view class='status-wrapper' wx:if=\"{{applyStatus == -1}}\">\n    <!-- 头部区域 -->\n    <view class=\"header-section\">\n      <view class=\"icon-wrapper\">\n        <view class=\"icon-circle\">\n          <text class=\"icon-text\">💎</text>\n        </view>\n      </view>\n      <view class=\"title\">诚邀您成为分销商</view>\n      <view class=\"subtitle\">开启您的财富之旅</view>\n    </view>\n\n    <!-- 权益卡片 -->\n    <view class=\"benefits-card\">\n      <view class=\"benefit-title\">成为分销商，享专属特权</view>\n      <view class=\"benefit-list\">\n        <view class=\"benefit-item\">\n          <view class=\"benefit-icon\">💰</view>\n          <view class=\"benefit-content\">\n            <view class=\"benefit-name\">推广赚佣金</view>\n            <view class=\"benefit-desc\">分享商品即可获取收益</view>\n          </view>\n        </view>\n        <view class=\"benefit-item\">\n          <view class=\"benefit-icon\">🎁</view>\n          <view class=\"benefit-content\">\n            <view class=\"benefit-name\">专属特权</view>\n            <view class=\"benefit-desc\">享受更多优惠和福利</view>\n          </view>\n        </view>\n        <view class=\"benefit-item\">\n          <view class=\"benefit-icon\">📈</view>\n          <view class=\"benefit-content\">\n            <view class=\"benefit-name\">实时到账</view>\n            <view class=\"benefit-desc\">收益透明可见，快速提现</view>\n          </view>\n        </view>\n      </view>\n    </view>\n\n    <!-- 按钮组 -->\n    <view class=\"action-wrapper\">\n      <button class=\"primary-btn\" bindtap=\"goForm\">\n        <text class=\"btn-text\">免费申请</text>\n        <text class=\"btn-subtitle\">等待管理员审核</text>\n      </button>\n      <button wx:if=\"{{ setting.canBuy }}\" class=\"secondary-btn\" bindtap=\"buy\">\n        <text class=\"btn-text\">立即开通 ¥{{ setting.price }}</text>\n        <text class=\"btn-subtitle\">无需审核，即开即用</text>\n      </button>\n    </view>\n  </view>\n\n  <!-- 审核中状态 -->\n  <view class='status-wrapper' wx:if=\"{{applyStatus == 0}}\">\n    <view class=\"header-section\">\n      <view class=\"icon-wrapper\">\n        <view class=\"icon-circle pending\">\n          <text class=\"icon-text\">⏳</text>\n        </view>\n      </view>\n      <view class=\"title\">审核中</view>\n      <view class=\"subtitle\">感谢您的支持，请耐心等待</view>\n    </view>\n\n    <view class=\"status-card\">\n      <view class=\"status-info\">\n        <view class=\"info-row\">\n          <text class=\"info-label\">审核状态</text>\n          <text class=\"info-value pending-text\">待审核</text>\n        </view>\n        <view class=\"divider\"></view>\n        <view class=\"tips-box\">\n          <text class=\"tips-icon\">💡</text>\n          <text class=\"tips-text\">我们会在1-3个工作日内完成审核，请留意通知消息</text>\n        </view>\n      </view>\n    </view>\n\n    <view class=\"action-wrapper\">\n      <button class=\"outlined-btn\" bindtap=\"goShop\">\n        <text class=\"btn-text\">先去逛逛</text>\n      </button>\n    </view>\n  </view>\n\n  <!-- 审核不通过状态 -->\n  <view class='status-wrapper' wx:if=\"{{applyStatus == 1}}\">\n    <view class=\"header-section\">\n      <view class=\"icon-wrapper\">\n        <view class=\"icon-circle reject\">\n          <text class=\"icon-text\">❌</text>\n        </view>\n      </view>\n      <view class=\"title\">审核未通过</view>\n      <view class=\"subtitle\">很遗憾，您的申请未能通过审核</view>\n    </view>\n\n    <view class=\"status-card reject-card\">\n      <view class=\"status-info\">\n        <view class=\"info-row\">\n          <text class=\"info-label\">审核结果</text>\n          <text class=\"info-value reject-text\">未通过</text>\n        </view>\n        <view class=\"divider\"></view>\n        <view wx:if=\"{{applyInfo.remark}}\" class=\"remark-box\">\n          <text class=\"remark-label\">未通过原因</text>\n          <text class=\"remark-text\">{{applyInfo.remark}}</text>\n        </view>\n        <view class=\"tips-box\">\n          <text class=\"tips-icon\">💡</text>\n          <text class=\"tips-text\">如有疑问，请联系客服咨询</text>\n        </view>\n      </view>\n    </view>\n\n    <view class=\"action-wrapper\">\n      <button class=\"outlined-btn\" bindtap=\"goShop\">\n        <text class=\"btn-text\">返回首页</text>\n      </button>\n    </view>\n  </view>\n\n  <!-- 审核通过状态 -->\n  <view class='status-wrapper' wx:if=\"{{applyStatus == 2}}\">\n    <view class=\"header-section\">\n      <view class=\"icon-wrapper\">\n        <view class=\"icon-circle success\">\n          <text class=\"icon-text\">✅</text>\n        </view>\n      </view>\n      <view class=\"title success-title\">恭喜您</view>\n      <view class=\"subtitle\">成功成为分销商</view>\n    </view>\n\n    <view class=\"status-card success-card\">\n      <view class=\"congrats-content\">\n        <view class=\"congrats-item\">\n          <text class=\"congrats-icon\">🎉</text>\n          <text class=\"congrats-text\">您已成为我们的合作伙伴</text>\n        </view>\n        <view class=\"congrats-item\">\n          <text class=\"congrats-icon\">💼</text>\n          <text class=\"congrats-text\">可以开始推广商品赚取佣金了</text>\n        </view>\n        <view class=\"congrats-item\">\n          <text class=\"congrats-icon\">🚀</text>\n          <text class=\"congrats-text\">前往分销中心，开启财富之旅</text>\n        </view>\n      </view>\n    </view>\n\n    <view class=\"action-wrapper\">\n      <button class=\"primary-btn single\" bindtap=\"goFx\">\n        <text class=\"btn-text\">前往分销中心</text>\n        <text class=\"btn-arrow\">→</text>\n      </button>\n    </view>\n  </view>\n</view>\n\n<payment\n  money=\"{{ price }}\"\n  remark=\"购买分销资格\"\n  show=\"{{ paymentShow }}\"\n  nextAction=\"{{ nextAction }}\"\n  bind:cancel=\"paymentCancel\"\n  bind:ok=\"paymentOk\"\n/>"
  },
  {
    "path": "packageFx/pages/apply/index.wxss",
    "content": "page {\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  min-height: 100vh;\n}\n\n.apply-status-container {\n  min-height: 100vh;\n  position: relative;\n}\n\n/* 顶部装饰背景 */\n.header-bg {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 500rpx;\n  overflow: hidden;\n  z-index: 0;\n}\n\n.bg-circle {\n  position: absolute;\n  border-radius: 50%;\n  background: rgba(255, 255, 255, 0.1);\n  animation: float 6s ease-in-out infinite;\n}\n\n.circle-1 {\n  width: 300rpx;\n  height: 300rpx;\n  top: -100rpx;\n  right: -50rpx;\n  animation-delay: 0s;\n}\n\n.circle-2 {\n  width: 200rpx;\n  height: 200rpx;\n  top: 200rpx;\n  left: -80rpx;\n  animation-delay: 2s;\n}\n\n.circle-3 {\n  width: 150rpx;\n  height: 150rpx;\n  top: 100rpx;\n  left: 50%;\n  animation-delay: 4s;\n}\n\n@keyframes float {\n  0%, 100% {\n    transform: translateY(0) scale(1);\n    opacity: 0.3;\n  }\n  50% {\n    transform: translateY(-30rpx) scale(1.1);\n    opacity: 0.5;\n  }\n}\n\n/* 状态容器 */\n.status-wrapper {\n  position: relative;\n  z-index: 1;\n  padding: 40rpx 32rpx 60rpx;\n}\n\n/* 头部区域 */\n.header-section {\n  text-align: center;\n  padding: 60rpx 0 40rpx;\n}\n\n.icon-wrapper {\n  display: flex;\n  justify-content: center;\n  margin-bottom: 30rpx;\n}\n\n.icon-circle {\n  width: 140rpx;\n  height: 140rpx;\n  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.15);\n  animation: pulse 2s ease-in-out infinite;\n}\n\n.icon-circle.pending {\n  background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);\n}\n\n.icon-circle.reject {\n  background: linear-gradient(135deg, #ff7675 0%, #d63031 100%);\n}\n\n.icon-circle.success {\n  background: linear-gradient(135deg, #55efc4 0%, #00b894 100%);\n}\n\n@keyframes pulse {\n  0%, 100% {\n    transform: scale(1);\n    box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.15);\n  }\n  50% {\n    transform: scale(1.05);\n    box-shadow: 0 25rpx 70rpx rgba(0, 0, 0, 0.2);\n  }\n}\n\n.icon-text {\n  font-size: 70rpx;\n}\n\n.title {\n  font-size: 48rpx;\n  font-weight: bold;\n  color: #ffffff;\n  margin-bottom: 16rpx;\n  text-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);\n  letter-spacing: 2rpx;\n}\n\n.title.success-title {\n  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);\n  -webkit-background-clip: text;\n  background-clip: text;\n  -webkit-text-fill-color: transparent;\n}\n\n.subtitle {\n  font-size: 28rpx;\n  color: rgba(255, 255, 255, 0.9);\n  letter-spacing: 1rpx;\n}\n\n/* 权益卡片 */\n.benefits-card {\n  background: #ffffff;\n  border-radius: 32rpx;\n  padding: 40rpx;\n  margin-bottom: 40rpx;\n  box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.08);\n}\n\n.benefit-title {\n  font-size: 32rpx;\n  font-weight: bold;\n  color: #333333;\n  text-align: center;\n  margin-bottom: 32rpx;\n}\n\n.benefit-list {\n  display: flex;\n  flex-direction: column;\n  gap: 24rpx;\n}\n\n.benefit-item {\n  display: flex;\n  align-items: flex-start;\n  padding: 24rpx;\n  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);\n  border-radius: 20rpx;\n  border: 2rpx solid #f0f0f0;\n  transition: all 0.3s ease;\n}\n\n.benefit-icon {\n  width: 80rpx;\n  height: 80rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-size: 40rpx;\n  flex-shrink: 0;\n  margin-right: 20rpx;\n}\n\n.benefit-content {\n  flex: 1;\n  padding-top: 8rpx;\n}\n\n.benefit-name {\n  font-size: 30rpx;\n  font-weight: 600;\n  color: #333333;\n  margin-bottom: 8rpx;\n}\n\n.benefit-desc {\n  font-size: 24rpx;\n  color: #999999;\n  line-height: 1.5;\n}\n\n/* 状态卡片 */\n.status-card {\n  background: #ffffff;\n  border-radius: 32rpx;\n  padding: 40rpx;\n  margin-bottom: 40rpx;\n  box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.08);\n}\n\n.status-card.reject-card {\n  border: 2rpx solid #ff7675;\n}\n\n.status-card.success-card {\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);\n  border: 2rpx solid #00b894;\n}\n\n.status-info {\n  position: relative;\n}\n\n.info-row {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 24rpx 0;\n}\n\n.info-label {\n  font-size: 28rpx;\n  color: #666666;\n}\n\n.info-value {\n  font-size: 30rpx;\n  font-weight: bold;\n}\n\n.pending-text {\n  color: #fdcb6e;\n}\n\n.reject-text {\n  color: #d63031;\n}\n\n.divider {\n  height: 2rpx;\n  background: linear-gradient(90deg, transparent, #e0e0e0, transparent);\n  margin: 16rpx 0;\n}\n\n.tips-box {\n  display: flex;\n  align-items: flex-start;\n  padding: 24rpx;\n  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);\n  border-radius: 16rpx;\n  margin-top: 16rpx;\n}\n\n.tips-icon {\n  font-size: 32rpx;\n  margin-right: 12rpx;\n  flex-shrink: 0;\n}\n\n.tips-text {\n  flex: 1;\n  font-size: 26rpx;\n  color: #666666;\n  line-height: 1.6;\n}\n\n.remark-box {\n  padding: 24rpx;\n  background: #fff5f5;\n  border-radius: 16rpx;\n  margin-bottom: 16rpx;\n}\n\n.remark-label {\n  display: block;\n  font-size: 24rpx;\n  color: #999999;\n  margin-bottom: 12rpx;\n}\n\n.remark-text {\n  display: block;\n  font-size: 28rpx;\n  color: #d63031;\n  line-height: 1.6;\n}\n\n/* 恭喜内容 */\n.congrats-content {\n  display: flex;\n  flex-direction: column;\n  gap: 24rpx;\n}\n\n.congrats-item {\n  display: flex;\n  align-items: center;\n  padding: 24rpx;\n  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);\n  border-radius: 16rpx;\n}\n\n.congrats-icon {\n  font-size: 40rpx;\n  margin-right: 16rpx;\n}\n\n.congrats-text {\n  flex: 1;\n  font-size: 28rpx;\n  color: #333333;\n  line-height: 1.5;\n}\n\n/* 按钮组 */\n.action-wrapper {\n  padding: 0 20rpx;\n  display: flex;\n  flex-direction: column;\n  gap: 20rpx;\n}\n\n/* 主要按钮 */\n.primary-btn {\n  width: 100%;\n  min-height: 120rpx;\n  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);\n  border-radius: 50rpx;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  border: none;\n  box-shadow: 0 16rpx 40rpx rgba(245, 87, 108, 0.4);\n  position: relative;\n  overflow: hidden;\n  transition: all 0.3s ease;\n  padding: 20rpx 40rpx;\n}\n\n.primary-btn.single {\n  flex-direction: row;\n  min-height: 100rpx;\n  padding: 0 40rpx;\n}\n\n.primary-btn::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: -100%;\n  width: 100%;\n  height: 100%;\n  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);\n  transition: left 0.5s ease;\n}\n\n.primary-btn:active::before {\n  left: 100%;\n}\n\n.primary-btn:active {\n  transform: scale(0.98);\n  box-shadow: 0 12rpx 30rpx rgba(245, 87, 108, 0.3);\n}\n\n.primary-btn .btn-text {\n  font-size: 32rpx;\n  color: #ffffff;\n  font-weight: bold;\n  letter-spacing: 2rpx;\n  line-height: 1.2;\n}\n\n.primary-btn .btn-subtitle {\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.85);\n  margin-top: 8rpx;\n  line-height: 1.2;\n}\n\n.btn-arrow {\n  font-size: 36rpx;\n  color: #ffffff;\n  font-weight: bold;\n  margin-left: 12rpx;\n  animation: arrowMove 1.5s ease-in-out infinite;\n}\n\n@keyframes arrowMove {\n  0%, 100% {\n    transform: translateX(0);\n  }\n  50% {\n    transform: translateX(8rpx);\n  }\n}\n\n/* 次要按钮 */\n.secondary-btn {\n  width: 100%;\n  min-height: 120rpx;\n  background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);\n  border-radius: 50rpx;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  border: none;\n  box-shadow: 0 16rpx 40rpx rgba(253, 203, 110, 0.4);\n  transition: all 0.3s ease;\n  padding: 20rpx 40rpx;\n}\n\n.secondary-btn:active {\n  transform: scale(0.98);\n  box-shadow: 0 12rpx 30rpx rgba(253, 203, 110, 0.3);\n}\n\n.secondary-btn .btn-text {\n  font-size: 32rpx;\n  color: #8b6914;\n  font-weight: bold;\n  letter-spacing: 2rpx;\n  line-height: 1.2;\n}\n\n.secondary-btn .btn-subtitle {\n  font-size: 24rpx;\n  color: rgba(139, 105, 20, 0.8);\n  margin-top: 8rpx;\n  line-height: 1.2;\n}\n\n/* 轮廓按钮 */\n.outlined-btn {\n  width: 100%;\n  height: 100rpx;\n  background: rgba(255, 255, 255, 0.95);\n  border-radius: 50rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  border: 2rpx solid rgba(255, 255, 255, 0.3);\n  box-shadow: 0 12rpx 30rpx rgba(0, 0, 0, 0.08);\n  transition: all 0.3s ease;\n  padding: 0;\n}\n\n.outlined-btn:active {\n  transform: scale(0.98);\n  background: rgba(255, 255, 255, 0.85);\n}\n\n.outlined-btn .btn-text {\n  font-size: 32rpx;\n  color: #667eea;\n  font-weight: bold;\n  letter-spacing: 2rpx;\n}"
  },
  {
    "path": "packageFx/pages/commisionLog/index.js",
    "content": "const wxpay = require('../../../utils/pay.js')\nconst WXAPI = require('apifm-wxapi')\n\nPage({\n  data: {\n    dateBegin: undefined,\n    dateEnd: undefined,\n    sellerMobile: undefined,\n    aggregate: {\n      sum_sale_amount: 0\n    }\n  },\n  onLoad(options) {},\n  onShow: function () {\n    //获取佣金列表\n    this.getCommisionLog()\n  },\n  async getCommisionLog() {\n    const postData = {\n      token: wx.getStorageSync('token'),\n      dateAddBegin: this.data.dateBegin ? this.data.dateBegin : '',\n      dateAddEnd: this.data.dateEnd ? this.data.dateEnd : '',\n      sellerMobile: this.data.sellerMobile ? this.data.sellerMobile : ''\n    }\n    await WXAPI.fxCommisionLog(postData).then(res => {\n      if (res.code == 0) {\n        const goodsMap = res.data.goodsMap\n        const commisionLog = res.data.result\n        if (goodsMap) {\n          res.data.orderList.forEach(ele => {\n            const _goods = goodsMap[ele.id] // 该订单下的商品列表\n            if (_goods) {\n              let totalCommision = 0\n              _goods.forEach(c => {\n                const commisionRecord = commisionLog.find(d => {\n                  return d.orderId == ele.id && d.goodsName == c.goodsName //  FIXME 要么根据销售额，还是别的来匹配返佣记录\n                })\n                if (commisionRecord) {\n                  commisionRecord.money = (commisionRecord.money * 1).toFixed(2)\n                  totalCommision += (commisionRecord.money * 1)\n                  c.commisionRecord = commisionRecord\n                  ele.buyerUserNick = commisionRecord.nicks ? commisionRecord.nicks : '用户' + commisionRecord.uids\n                }\n              })\n              ele.goodsList = _goods\n              ele.totalCommision = (totalCommision * 1).toFixed(2)\n            }\n          })\n        }\n        this.setData({\n          commisionLog,\n          orderList: res.data.orderList,\n          logisticsMap: res.data.logisticsMap,\n          goodsMap,\n          aggregate: res.data.aggregate,\n          userInviter: res.data.userInviter,\n        })\n      } else {\n        this.setData({\n          commisionLog: [],\n          orderList: [],\n          logisticsMap: [],\n          goodsMap: [],\n        })\n      }\n    })\n  },\n  dateBeginCancel() {\n    this.setData({\n      dateBegin: null\n    })\n  },\n  dateBeginChange(e) {\n    this.setData({\n      dateBegin: e.detail.value\n    })\n  },\n  dateEndCancel() {\n    this.setData({\n      dateEnd: null\n    })\n  },\n  dateEndChange(e) {\n    this.setData({\n      dateEnd: e.detail.value\n    })\n  }\n})"
  },
  {
    "path": "packageFx/pages/commisionLog/index.json",
    "content": "{\n    \"navigationBarTitleText\":\"推广订单\"\n}"
  },
  {
    "path": "packageFx/pages/commisionLog/index.wxml",
    "content": "<view class=\"page-container\">\n  <!-- 头部标题区 -->\n  <view class=\"header-section\">\n    <view class=\"header-title\">推广订单</view>\n    <view class=\"header-subtitle\">Promotion Orders</view>\n  </view>\n\n  <!-- 空状态 -->\n  <view wx:if=\"{{!orderList || orderList.length == 0}}\" class=\"empty-container\">\n    <van-empty description=\"暂无推广订单\" />\n  </view>\n\n  <!-- 订单列表 -->\n  <view class=\"order-list\" wx:if=\"{{orderList && orderList.length > 0}}\">\n    <view class=\"order-card\" wx:for=\"{{orderList}}\" wx:key=\"index\">\n      \n      <!-- 订单头部 -->\n      <view class=\"order-header\">\n        <view class=\"order-header-left\">\n          <view class=\"order-number\">订单号 {{item.orderNumber}}</view>\n          <view class=\"order-user\">\n            <text class=\"user-icon\">👤</text>\n            <text>{{item.buyerUserNick}}</text>\n          </view>\n        </view>\n        <view class=\"order-status {{item.status == -1 ? 'status-cancel' : ''}}\">\n          {{item.statusStr}}\n        </view>\n      </view>\n\n      <!-- 商品列表 -->\n      <view class=\"goods-section\">\n        <view class=\"goods-item\" wx:for=\"{{item.goodsList}}\" wx:key=\"id\" wx:for-item=\"g\">\n          <image class=\"goods-image\" src=\"{{g.pic}}\" mode=\"aspectFill\"></image>\n          <view class=\"goods-content\">\n            <view class=\"goods-title\">{{g.goodsName}}</view>\n            <view class=\"goods-bottom\">\n              <view class=\"goods-price-box\">\n                <text class=\"price-symbol\">¥</text>\n                <text class=\"price-value\">{{g.amountSingle}}</text>\n                <text class=\"goods-num\">×{{g.number}}</text>\n              </view>\n            </view>\n            <!-- 佣金标签 -->\n            <view class=\"commission-tag {{g.commisionRecord.isSettlement ? 'settled' : 'pending'}}\">\n              <view class=\"commission-rate\">{{g.commisionRecord.bili}}% 返佣</view>\n              <view class=\"commission-amount\">\n                <text class=\"amount-icon\">💰</text>\n                <text>{{g.commisionRecord.money}} {{g.commisionRecord.unit==0?'元':'积分'}}</text>\n              </view>\n              <view class=\"settlement-status\">\n                <text wx:if=\"{{g.commisionRecord.isSettlement}}\" class=\"status-settled\">已结算</text>\n                <text wx:elif=\"{{ item.status != -1 }}\" class=\"status-pending\">待结算</text>\n              </view>\n            </view>\n          </view>\n        </view>\n      </view>\n\n      <!-- 订单统计信息 -->\n      <view class=\"order-summary\">\n        <view class=\"summary-row\">\n          <text class=\"summary-label\">商品数量</text>\n          <text class=\"summary-value\">{{item.goodsNumber}} 件</text>\n        </view>\n        <view class=\"summary-row total\">\n          <text class=\"summary-label\">订单金额</text>\n          <text class=\"summary-price\">\n            <text wx:if=\"{{item.score <= 0}}\">¥{{item.amountReal}}</text>\n            <text wx:if=\"{{item.score > 0}}\">¥{{item.amountReal}} + {{item.score}}积分</text>\n          </text>\n        </view>\n        <view class=\"summary-row commission\">\n          <text class=\"summary-label\">累计佣金</text>\n          <text class=\"commission-value\">¥{{item.totalCommision}}</text>\n        </view>\n      </view>\n\n      <!-- 底部信息 -->\n      <view class=\"order-footer\">\n        <view class=\"footer-info\">\n          <text class=\"footer-icon\">🕒</text>\n          <text class=\"footer-text\">{{item.dateAdd}}</text>\n        </view>\n        <view wx:if=\"{{ userInviter[item.goodsList[0].commisionRecord.uids] }}\" class=\"footer-info seller\">\n          <text class=\"footer-icon\">👨‍💼</text>\n          <text class=\"footer-text\">销售员：{{userInviter[item.goodsList[0].commisionRecord.uids].nick}}</text>\n        </view>\n        <view wx:if=\"{{item.remark && item.remark != ''}}\" class=\"order-remark\">\n          <text class=\"remark-icon\">📝</text>\n          <text>{{item.remark}}</text>\n        </view>\n      </view>\n\n    </view>\n  </view>\n\n  <view class=\"safeAreaOldMarginBttom safeAreaNewMarginBttom\"></view>\n</view>"
  },
  {
    "path": "packageFx/pages/commisionLog/index.wxss",
    "content": "page {\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  min-height: 100vh;\n}\n\n/* 页面容器 */\n.page-container {\n  min-height: 100vh;\n  padding-bottom: 40rpx;\n}\n\n/* 头部区域 */\n.header-section {\n  padding: 60rpx 40rpx 50rpx;\n  text-align: center;\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);\n}\n\n.header-title {\n  font-size: 48rpx;\n  font-weight: bold;\n  color: #ffffff;\n  letter-spacing: 4rpx;\n  margin-bottom: 12rpx;\n}\n\n.header-subtitle {\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.85);\n  letter-spacing: 2rpx;\n  text-transform: uppercase;\n}\n\n/* 空状态 */\n.empty-container {\n  margin-top: 200rpx;\n  padding: 60rpx;\n  background: #ffffff;\n  border-radius: 32rpx;\n  margin: 200rpx 32rpx 0;\n  box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.1);\n}\n\n/* 订单列表 */\n.order-list {\n  padding: 32rpx;\n}\n\n/* 订单卡片 */\n.order-card {\n  background: #ffffff;\n  border-radius: 24rpx;\n  margin-bottom: 32rpx;\n  overflow: hidden;\n  box-shadow: 0 16rpx 48rpx rgba(102, 126, 234, 0.15);\n  transition: all 0.3s ease;\n}\n\n/* 订单头部 */\n.order-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: flex-start;\n  padding: 32rpx;\n  background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);\n  border-bottom: 2rpx solid #e8eaff;\n}\n\n.order-header-left {\n  flex: 1;\n}\n\n.order-number {\n  font-size: 28rpx;\n  font-weight: 600;\n  color: #333333;\n  margin-bottom: 16rpx;\n  letter-spacing: 0.5rpx;\n}\n\n.order-user {\n  display: flex;\n  align-items: center;\n  font-size: 26rpx;\n  color: #666666;\n}\n\n.user-icon {\n  margin-right: 8rpx;\n  font-size: 28rpx;\n}\n\n.order-status {\n  padding: 12rpx 24rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  color: #ffffff;\n  font-size: 24rpx;\n  font-weight: 600;\n  border-radius: 32rpx;\n  white-space: nowrap;\n}\n\n.order-status.status-cancel {\n  background: linear-gradient(135deg, #999999 0%, #777777 100%);\n}\n\n/* 商品区域 */\n.goods-section {\n  padding: 24rpx 32rpx;\n}\n\n.goods-item {\n  display: flex;\n  padding: 24rpx 0;\n  border-bottom: 2rpx solid #f5f5f5;\n}\n\n.goods-item:last-child {\n  border-bottom: none;\n}\n\n.goods-image {\n  width: 160rpx;\n  height: 160rpx;\n  border-radius: 16rpx;\n  background-color: #f8f9fa;\n  flex-shrink: 0;\n  margin-right: 24rpx;\n}\n\n.goods-content {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n}\n\n.goods-title {\n  font-size: 28rpx;\n  color: #333333;\n  font-weight: 500;\n  line-height: 1.5;\n  margin-bottom: 16rpx;\n  display: -webkit-box;\n  -webkit-box-orient: vertical;\n  -webkit-line-clamp: 2;\n  overflow: hidden;\n}\n\n.goods-bottom {\n  margin-bottom: 16rpx;\n}\n\n.goods-price-box {\n  display: flex;\n  align-items: baseline;\n}\n\n.price-symbol {\n  font-size: 24rpx;\n  color: #ff6b6b;\n  font-weight: 600;\n  margin-right: 4rpx;\n}\n\n.price-value {\n  font-size: 32rpx;\n  color: #ff6b6b;\n  font-weight: 700;\n}\n\n.goods-num {\n  font-size: 24rpx;\n  color: #999999;\n  margin-left: 16rpx;\n}\n\n/* 佣金标签 */\n.commission-tag {\n  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);\n  padding: 16rpx 20rpx;\n  border-radius: 12rpx;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  border-left: 6rpx solid #ff6b6b;\n}\n\n.commission-tag.settled {\n  background: linear-gradient(135deg, #f0fff4 0%, #e8f9ed 100%);\n  border-left-color: #51cf66;\n}\n\n.commission-rate {\n  font-size: 24rpx;\n  color: #ff6b6b;\n  font-weight: 600;\n  margin-right: 16rpx;\n}\n\n.commission-tag.settled .commission-rate {\n  color: #37b24d;\n}\n\n.commission-amount {\n  display: flex;\n  align-items: center;\n  font-size: 26rpx;\n  color: #ff6b6b;\n  font-weight: 700;\n  flex: 1;\n}\n\n.commission-tag.settled .commission-amount {\n  color: #37b24d;\n}\n\n.amount-icon {\n  margin-right: 8rpx;\n  font-size: 28rpx;\n}\n\n.settlement-status {\n  font-size: 22rpx;\n  margin-left: 16rpx;\n}\n\n.status-settled {\n  color: #37b24d;\n  font-weight: 600;\n  padding: 6rpx 16rpx;\n  background: #e8f9ed;\n  border-radius: 24rpx;\n}\n\n.status-pending {\n  color: #fa5252;\n  font-weight: 600;\n  padding: 6rpx 16rpx;\n  background: #ffe8e8;\n  border-radius: 24rpx;\n}\n\n/* 订单统计 */\n.order-summary {\n  padding: 24rpx 32rpx;\n  background: linear-gradient(135deg, #fafbff 0%, #f5f7ff 100%);\n  border-top: 2rpx solid #e8eaff;\n  border-bottom: 2rpx solid #e8eaff;\n}\n\n.summary-row {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 12rpx 0;\n}\n\n.summary-label {\n  font-size: 26rpx;\n  color: #666666;\n}\n\n.summary-value {\n  font-size: 26rpx;\n  color: #333333;\n  font-weight: 500;\n}\n\n.summary-row.total .summary-label {\n  font-size: 28rpx;\n  color: #333333;\n  font-weight: 600;\n}\n\n.summary-price {\n  font-size: 32rpx;\n  color: #ff6b6b;\n  font-weight: 700;\n}\n\n.summary-row.commission {\n  margin-top: 16rpx;\n  padding: 20rpx;\n  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);\n  border-radius: 12rpx;\n  border-left: 6rpx solid #ff6b6b;\n}\n\n.summary-row.commission .summary-label {\n  font-size: 28rpx;\n  color: #ff6b6b;\n  font-weight: 600;\n}\n\n.commission-value {\n  font-size: 36rpx;\n  color: #ff6b6b;\n  font-weight: 700;\n}\n\n/* 订单底部 */\n.order-footer {\n  padding: 24rpx 32rpx;\n}\n\n.footer-info {\n  display: flex;\n  align-items: center;\n  font-size: 24rpx;\n  color: #999999;\n  margin-bottom: 12rpx;\n}\n\n.footer-info:last-child {\n  margin-bottom: 0;\n}\n\n.footer-info.seller {\n  color: #667eea;\n  font-weight: 500;\n}\n\n.footer-icon {\n  margin-right: 12rpx;\n  font-size: 28rpx;\n}\n\n.footer-text {\n  line-height: 1.5;\n}\n\n.order-remark {\n  display: flex;\n  align-items: flex-start;\n  margin-top: 16rpx;\n  padding: 16rpx;\n  background: #fff9e6;\n  border-radius: 12rpx;\n  font-size: 24rpx;\n  color: #d48806;\n  border-left: 4rpx solid #ffa940;\n}\n\n.remark-icon {\n  margin-right: 12rpx;\n  font-size: 28rpx;\n  flex-shrink: 0;\n}\n\n/* 底部安全区 */\n.safeAreaOldMarginBttom {\n  height: 40rpx;\n}\n\n.safeAreaNewMarginBttom {\n  padding-bottom: constant(safe-area-inset-bottom);\n  padding-bottom: env(safe-area-inset-bottom);\n}"
  },
  {
    "path": "packageFx/pages/hehuorenfenxiao/fxmember.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../../utils/auth')\n\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    level:0,\n    description:''\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function (options) {\n    var level = options.level;\n    if(level==0){\n      wx.setNavigationBarTitle({\n        title: '团队长列表',\n      })\n      this.setData({\n        description:'暂无团队长'\n      })\n    }\n    if(level==1){\n      wx.setNavigationBarTitle({\n        title: '团员列表',\n      })\n      this.setData({\n        description:'暂无团员'\n      })\n    }\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.fxMembers(level)\n      } else {\n        getApp().loginOK = () => {\n          this.fxMembers(level)\n        }\n      }\n    })\n  },\n\n  /**\n   * 生命周期函数--监听页面初次渲染完成\n   */\n  onReady: function () {\n\n  },\n\n  /**\n   * 生命周期函数--监听页面显示\n   */\n  onShow: function () {\n    \n  },\n\n  getUserApiInfo: function () {\n    var that = this;\n    WXAPI.userDetail(wx.getStorageSync('token')).then(function (res) {\n      if (res.code == 0) {\n        let _data = {}\n        _data.apiUserInfoMap = res.data\n        if (res.data.base.mobile) {\n          _data.userMobile = res.data.base.mobile\n        }\n        if (that.data.order_hx_uids && that.data.order_hx_uids.indexOf(res.data.base.id) != -1) {\n          _data.canHX = true // 具有扫码核销的权限\n        }\n        const adminUserIds = wx.getStorageSync('adminUserIds')\n        if (adminUserIds && adminUserIds.indexOf(res.data.base.id) != -1) {\n          _data.isAdmin = true\n        }\n        if (res.data.peisongMember && res.data.peisongMember.status == 1) {\n          _data.memberChecked = false\n        } else {\n          _data.memberChecked = true\n        }\n        that.setData(_data);\n        that.commision();\n      }\n    })\n  },\n\n\n  cancelLogin() {\n    wx.switchTab({\n      url: '/pages/my/index'\n    })\n  },\n  processLogin(e) {\n    if (!e.detail.userInfo) {\n      wx.showToast({\n        title: '已取消',\n        icon: 'none',\n      })\n      return;\n    }\n    AUTH.register(this);\n  },\n\n  async fxMembers(level){\n    const res = await WXAPI.partnerMembers({\n      token:wx.getStorageSync('token'),\n      type:level\n    })\n    if(res.code==0){\n      this.setData({\n        memberList:res.data        \n      })      \n    }\n    console.log(\"fxmenber\",res)\n  }\n})"
  },
  {
    "path": "packageFx/pages/hehuorenfenxiao/fxmember.json",
    "content": "{\n  \"usingComponents\": {}\n}"
  },
  {
    "path": "packageFx/pages/hehuorenfenxiao/fxmember.wxml",
    "content": "<!--pages/packageA/pages/vip/fxmember.wxml-->\n<view>\n  <view wx:for=\"{{memberList.result}}\" class=\"listItem\">\n    <view style=\"display:flex;align-items:center\">\n      <view><image style=\"width: 58rpx;height: 58rpx;border-radius:100%\" src=\"{{item.avatarUrl}}\" alt=\"\"/></view>\n      <view class=\"nickName\">{{item.nick}}</view>\n    </view>\n    <view style=\"display:flex;justify-content: space-between;margin-top:5px\">\n      <view class=\"t1\">销售情况：<span class=\"t2\">{{memberList.statisticsCommisionMap[item.uid].number?memberList.statisticsCommisionMap[item.uid].number:0}}单</span></view>\n      <view class=\"t1\">累计收益：<span class=\"t2\">{{memberList.statisticsCommisionMap[item.uid].amount?memberList.statisticsCommisionMap[item.uid].amount:0}}元</span></view>\n    </view>\n  </view>\n\n  <view wx:if=\"{{!memberList.result}}\">\n    <van-empty description=\"{{description}}\" />\n  </view>\n</view>"
  },
  {
    "path": "packageFx/pages/hehuorenfenxiao/fxmember.wxss",
    "content": "/* pages/packageA/pages/vip/fxmember.wxss */\npage{\n  background-color: #F5F5F5;\n}\n.listItem{\n  width: 670rpx;\nbackground: #FFFFFF;\nborder-radius: 8rpx;\n  margin-left:20rpx;\n  margin-top:10rpx ;\n  padding: 20rpx;\n}\n\n.nickName{\nheight: 40px;\nfont-size: 26rpx;\nfont-family: PingFangSC-Regular, PingFang SC;\nfont-weight: 400;\ncolor: #333333;\nline-height: 40px;\nmargin-left: 20rpx;\n}\n\n.t1{\n  height: 40rpx;\n  font-size: 26rpx;\n  font-family: PingFangSC-Regular, PingFang SC;\n  font-weight: 400;\n  color: #666666;\n  line-height: 40rpx;  \n}\n\n.t2{\n  color:#333333;\n}"
  },
  {
    "path": "packageFx/pages/hehuorenfenxiao/index.js",
    "content": "const app = getApp()\nconst WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../../utils/auth')\nconst ImageUtil = require('../../../utils/image')\nconst APP = getApp()\n// fixed首次打开不显示标题的bug\n\nvar sliderWidth = 96; // 需要设置slider的宽度，用于计算中间位置\n\nDate.prototype.format = function (format) {\n  var date = {\n    \"M+\": this.getMonth() + 1,\n    \"d+\": this.getDate(),\n    \"h+\": this.getHours(),\n    \"m+\": this.getMinutes(),\n    \"s+\": this.getSeconds(),\n    \"q+\": Math.floor((this.getMonth() + 3) / 3),\n    \"S+\": this.getMilliseconds()\n  };\n  if (/(y+)/i.test(format)) {\n    format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));\n  }\n  for (var k in date) {\n    if (new RegExp(\"(\" + k + \")\").test(format)) {\n      format = format.replace(RegExp.$1, RegExp.$1.length == 1\n        ? date[k] : (\"00\" + date[k]).substr((\"\" + date[k]).length));\n    }\n  }\n  return format;\n}\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    balance: 0,\n    freeze: 0,\n    score: 0,\n    score_sign_continuous: 0,\n    cashlogs: undefined,\n\n    tabs: [\"资金明细\", \"提现记录\", \"押金记录\"],\n    activeIndex: 0,\n    sliderOffset: 0,\n    sliderLeft: 0,\n\n    rechargeOpen: false, // 是否开启充值[预存]功能\n    TzCount: 0, //团长数\n    TyCount: 0, //团员数\n    commisionData: {\n      today: 0,\n      yesday: 0,\n      thisMonth: 0,\n      lastMonth: 0,\n      todayXiaoshou: 0,\n      yesdayXiaoshou: 0,\n      thisMonthXiaoshou: 0,\n      lastMonthXiaoshou: 0,\n    },\n    tzid: \"\",//团长id\n    originShow: false,//显示固定得二维码 不带参数\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad(options) {\n    this.setData({\n      navHeight: APP.globalData.navHeight,\n      navTop: APP.globalData.navTop,\n      windowHeight: APP.globalData.windowHeight,\n      menuButtonObject: APP.globalData.menuButtonObject //小程序胶囊信息\n    })\n    wx.getSystemInfo({\n      success: res => {\n        this.setData({\n          sliderLeft: (res.windowWidth / this.data.tabs.length - sliderWidth) / 2,\n          sliderOffset: res.windowWidth / this.data.tabs.length * this.data.activeIndex\n        });\n      }\n    });\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.doneShow();\n        this.getUserApiInfo();\n        this.getTz(1);\n        this.getTy(2);\n        this.getfxMoney();\n        this.fxMembers();\n        this.getMembersStatistics();\n      } else {\n        getApp().loginOK = () => {\n          this.doneShow();\n          this.getUserApiInfo();\n          this.getTz(1);\n          this.getTy(2);\n          this.getfxMoney();\n          this.fxMembers();\n          this.getMembersStatistics();\n        }\n      }\n    })\n  },\n  onShow() {\n  },\n\n  async commision() {\n    const uid = this.data.apiUserInfoMap.base.id\n    var commisionData = this.data.commisionData\n    const nowDate = new Date()\n    console.log('今天', nowDate.format('yyyyMMdd'))\n    console.log('本月', nowDate.format('yyyyMM'))\n    const yestoday = new Date(nowDate.getTime() - 24 * 60 * 60 * 1000)\n    console.log('昨天', yestoday.format('yyyyMMdd'))\n    // 上个月\n    let year = nowDate.getFullYear()\n    let month = nowDate.getMonth() + 1\n    if (month == 1) {\n      month = 12\n      year--\n    } else {\n      month--\n    }\n    const lastMonth = year + \"\" + (month < 10 ? ('0' + month) : month)\n    console.log('上个月', lastMonth)\n    let res = await WXAPI.siteStatisticsSaleroom({\n      dateBegin: nowDate.format('yyyyMMdd'),\n      dateEnd: nowDate.format('yyyyMMdd'),\n      uid: uid\n    })\n    if (res.code === 0) {\n      commisionData.today = res.data[0].amount\n      commisionData.todayXiaoshou = res.data[0].saleroom\n    }\n    res = await WXAPI.siteStatisticsSaleroom({\n      dateBegin: yestoday.format('yyyyMMdd'),\n      dateEnd: yestoday.format('yyyyMMdd'),\n      uid: uid\n    })\n    if (res.code === 0) {\n      commisionData.yesday = res.data[0].amount\n      commisionData.yesdayXiaoshou = res.data[0].saleroom\n    }\n    res = await WXAPI.siteStatisticsSaleroom({\n      dateBegin: nowDate.format('yyyyMM'),\n      dateEnd: nowDate.format('yyyyMM'),\n      uid: uid\n    })\n    if (res.code === 0) {\n      commisionData.thisMonth = res.data[0].amount\n      commisionData.thisMonthXiaoshou = res.data[0].saleroom\n    }\n    res = await WXAPI.siteStatisticsSaleroom({\n      dateBegin: lastMonth,\n      dateEnd: lastMonth,\n      uid: uid\n    })\n    if (res.code === 0) {\n      commisionData.lastMonth = res.data[0].amount\n      commisionData.lastMonthXiaoshou = res.data[0].saleroom\n    }\n    this.setData({\n      commisionData: commisionData\n    })\n  },\n\n\n  backto() {\n    wx.navigateBack()\n  },\n  getUserApiInfo: function () {\n    var that = this;\n    WXAPI.userDetail(wx.getStorageSync('token')).then(function (res) {\n      if (res.code == 0) {\n        let _data = {}\n        _data.apiUserInfoMap = res.data\n        if (res.data.base.mobile) {\n          _data.userMobile = res.data.base.mobile\n        }\n        if (that.data.order_hx_uids && that.data.order_hx_uids.indexOf(res.data.base.id) != -1) {\n          _data.canHX = true // 具有扫码核销的权限\n        }\n        const adminUserIds = wx.getStorageSync('adminUserIds')\n        if (adminUserIds && adminUserIds.indexOf(res.data.base.id) != -1) {\n          _data.isAdmin = true\n        }\n        if (res.data.peisongMember && res.data.peisongMember.status == 1) {\n          _data.memberChecked = false\n        } else {\n          _data.memberChecked = true\n        }\n        that.setData(_data);\n        that.commision();\n        if (res.data.base.isTeamLeader || res.data.partnerInfo) {\n          that.fetchQrcode()\n        }\n      }\n    })\n  },\n  doneShow: function () {\n    const _this = this\n    const token = wx.getStorageSync('token')\n    WXAPI.userAmount(token).then(function (res) {\n      if (res.code == 700) {\n        wx.showToast({\n          title: '当前账户存在异常',\n          icon: 'none'\n        })\n        return\n      }\n      if (res.code == 0) {\n        _this.setData({\n          balance: res.data.balance.toFixed(2),\n          freeze: res.data.freeze.toFixed(2),\n          totleConsumed: res.data.totleConsumed.toFixed(2),\n          score: res.data.score\n        });\n      }\n    })\n    this.fetchTabData(this.data.activeIndex)\n  },\n\n\n  async getfxMoney() {\n    const res = await WXAPI.partnerSetting()\n    console.log(\"getfxMoney\", res)\n    if (res.code == 0) {\n      this.setData({\n        fxData: res.data\n      })\n    }\n  },\n\n  async payFx() {\n    var money = this.data.fxData.priceLeader\n    this.setData({\n      money,\n      paymentShow: true,\n      nextAction: {type: 14}\n    })\n  },\n\n  fetchTabData(activeIndex) {\n    if (activeIndex == 0) {\n      this.cashLogs()\n    }\n  },\n  cashLogs() {\n    const _this = this\n    WXAPI.cashLogsV2({\n      token: wx.getStorageSync('token'),\n      page: 1,\n      pageSize: 50\n    }).then(res => {\n      if (res.code == 0) {\n        _this.setData({\n          cashlogs: res.data.result\n        })\n      }\n    })\n  },\n\n  recharge: function (e) {\n    wx.navigateTo({\n      url: \"/pages/recharge/index\"\n    })\n  },\n  withdraw: function (e) {\n    wx.navigateTo({\n      url: \"/pages/withdraw/index\"\n    })\n  },\n  tabClick: function (e) {\n    this.setData({\n      sliderOffset: e.currentTarget.offsetLeft,\n      activeIndex: e.currentTarget.id\n    });\n    this.fetchTabData(e.currentTarget.id)\n  },\n  cancelLogin() {\n    wx.switchTab({\n      url: '/pages/my/index'\n    })\n  },\n  processLogin(e) {\n    if (!e.detail.userInfo) {\n      wx.showToast({\n        title: '已取消',\n        icon: 'none',\n      })\n      return;\n    }\n    AUTH.register(this);\n  },\n\n  async getcashLogJD() { //获取金豆\n    const _this = this\n    await WXAPI.cashLogsV2({\n      token: wx.getStorageSync('token'),\n      page: 1,\n      pageSize: 50000,\n      type: 7\n    }).then(res => {\n      if (res.code == 0) {\n        _this.setData({\n          cashLogJD: res.data\n        })\n        _this.setData({\n          invite_count: res.data.totalRow,\n          getJD: res.data.totalRow,\n        })\n      } else {\n        _this.setData({\n          invite_count: 0,\n          getJD: 0,\n        })\n      }\n    })\n  },\n  async getcashLogJDtx() { //获取金豆(已提现)\n    const _this = this\n    await WXAPI.cashLogsV2({\n      token: wx.getStorageSync('token'),\n      page: 1,\n      pageSize: 50000,\n      type: 1\n    }).then(res => {\n      if (res.code == 0) {\n        _this.setData({\n          txJD: res.data.totalRow,\n        })\n      } else {\n        _this.setData({\n          txJD: 0\n        })\n      }\n    })\n  },\n  copyContent(e) {\n    console.log(\"1\")\n    var data = e.currentTarget.dataset.id + \"\"\n    wx.setClipboardData({\n      data: data,\n      success(res) {\n        wx.getClipboardData({\n          success(res) {\n            console.log(res.data) // data\n          }\n        })\n      }\n    })\n  },\n\n  async getMembersStatistics() { //团队情况\n    const res = await WXAPI.partnerMembersStatistics(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      this.setData({\n        membersStatistics: res.data\n      })\n    }\n  },\n\n\n  async getTz(name) { //团长\n    const res = await WXAPI.fxMembers({\n      token: wx.getStorageSync('token'),\n      page: 1,\n      pageSize: 50,\n      level: name, // \"不填全部，1为团队长，2为团员\"\n      statisticsDay: \"2021\"\n    })\n    if (res.code == 0) {\n      this.setData({\n        TzCount: res.data.result.length\n      })\n    }\n  },\n  async getTy(name) { //团员\n    const res = await WXAPI.fxMembers({\n      token: wx.getStorageSync('token'),\n      page: 1,\n      pageSize: 50,\n      level: name, // \"不填全部，1为团队长，2为团员\"\n      statisticsDay: \"2021\"\n    })\n    if (res.code == 0) {\n      this.setData({\n        TyCount: res.data.result.length\n      })\n    }\n  },\n  async fxMembers() {\n    const res = await WXAPI.fxMembers({\n      token: wx.getStorageSync('token')\n    })\n    console.log(\"fxmenber\", res)\n  },\n  goFxmem(e) {\n    var level = e.currentTarget.dataset.level\n    wx.navigateTo({\n      url: 'fxmember?level=' + level,\n    })\n  },\n\n  goCommision() {\n    wx.navigateTo({\n      url: '../commisionLog/index',\n    })\n  },\n\n  async partnerBindTeamLeader() {\n    var uid = this.data.tzid;\n    const res = await WXAPI.partnerBindTeamLeader(wx.getStorageSync('token'), uid)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    } else if (res.code == 0) {\n      wx.showToast({\n        title: '设置团长成功',\n      })\n      setTimeout(() => {\n        this.onShow()\n      }, 1000);\n    }\n  },\n  onChange(e) {\n    this.setData({\n      tzid: e.detail\n    })\n  },\n  fetchQrcode() {\n    const _this = this\n    wx.showLoading({\n      title: '加载中',\n      mask: true\n    })\n    const accountInfo = wx.getAccountInfoSync()\n    const envVersion = accountInfo.miniProgram.envVersion\n    WXAPI.wxaQrcode({\n      scene: 'inviter_id=' + wx.getStorageSync('uid'),\n      page: 'pages/index/index',\n      is_hyaline: true,\n      autoColor: true,\n      expireHours: 1,\n      env_version: envVersion,\n      check_path: envVersion == 'release' ? true : false,\n    }).then(res => {\n      wx.hideLoading()\n      if (res.code == 41030) {\n        _this.fetchQrcode()\n        return\n      }\n      if (res.code == 0) {\n        _this.showCanvas(res.data)\n      }\n    })\n  },\n  showCanvas(qrcode) {\n    const _this = this\n    let ctx\n    wx.getImageInfo({\n      src: qrcode,\n      success: (res) => {\n        const imageSize = ImageUtil.imageUtil(res.width, res.height)\n        const qrcodeWidth = 160\n        console.log(\"imageSize\", imageSize)\n        _this.setData({\n          canvasHeight: qrcodeWidth\n        })\n        ctx = wx.createCanvasContext('firstCanvas')\n        ctx.setFillStyle('#fff')\n        ctx.fillRect(0, 0, imageSize.windowWidth, imageSize.imageHeight + qrcodeWidth)\n        ctx.drawImage(res.path, 0, 0, qrcodeWidth, qrcodeWidth)\n        setTimeout(function () {\n          wx.hideLoading()\n          ctx.draw()\n        }, 1000)\n      }\n    })\n  },\n  // =====================保存推荐二维码图片到手机==========================\n  saveToMobile() { //下载二维码到手机\n    wx.canvasToTempFilePath({\n      canvasId: 'firstCanvas',\n      success: function (res) {\n        let tempFilePath = res.tempFilePath\n        wx.saveImageToPhotosAlbum({\n          filePath: tempFilePath,\n          success: (res) => {\n            wx.showModal({\n              content: '二维码已保存到手机相册',\n              showCancel: false,\n              confirmText: '知道了',\n              confirmColor: '#333'\n            })\n          },\n          fail: (res) => {\n            if (res.errMsg.indexOf('fail privacy permission is not authorized') != -1) {\n              wx.showModal({\n                content: '请阅读并同意隐私条款以后才能继续本操作',\n                confirmText: '阅读协议',\n                cancelText: '取消',\n                success(res) {\n                  if (res.confirm) {\n                    wx.requirePrivacyAuthorize() // 弹出用户隐私授权框\n                  }\n                }\n              })\n            } else if (res.errMsg.indexOf('fail auth deny') != -1) {\n              wx.showModal({\n                content: '本次操作需要您同意并将图片写入手机相册',\n                confirmText: '立即授权',\n                cancelText: '取消',\n                success(res) {\n                  if (res.confirm) {\n                    // 弹出设置窗口，让用户去设置\n                    wx.openSetting({\n                      withSubscriptions: true,\n                      fail: aaa => console.log(aaa)\n                    });\n                  }\n                }\n              })\n            } else {\n              console.error(res);\n              wx.showToast({\n                title: res.errMsg,\n                icon: 'none'\n              })\n            }\n          }\n        })\n      }\n    })\n  },\n\n  // =====================保存固定二维码图片到手机==========================\n  saveOri() {\n    let that = this\n    //若二维码未加载完毕，加个动画提高用户体验\n    wx.showToast({\n      icon: 'loading',\n      title: '正在保存图片',\n      duration: 1000\n    })\n    //判断用户是否授权\"保存到相册\"\n    wx.getSetting({\n      success(res) {\n        //没有权限，发起授权\n        if (!res.authSetting['scope.writePhotosAlbum']) {\n          wx.authorize({\n            scope: 'scope.writePhotosAlbum',\n            success() {//用户允许授权，保存图片到相册\n              that.savePhoto();\n            },\n            fail() {//用户点击拒绝授权，跳转到设置页，引导用户授权\n              wx.openSetting({\n                success() {\n                  wx.authorize({\n                    scope: 'scope.writePhotosAlbum',\n                    success() {\n                      that.savePhoto();\n                    }\n                  })\n                }\n              })\n            }\n          })\n        } else {//用户已授权，保存到相册\n          that.savePhoto()\n        }\n      }\n    })\n  },\n  //保存图片到相册，提示保存成功\n  savePhoto() {\n    let that = this\n    wx.downloadFile({\n      url: 'https://dcdn.it120.cc/2021/01/24/928782d2-062c-4a45-9911-b331fdf38ed9.jpg',\n      success: function (res) {\n        wx.saveImageToPhotosAlbum({\n          filePath: res.tempFilePath,\n          success(res) {\n            wx.showToast({\n              title: '保存成功',\n              icon: \"success\",\n              duration: 1000\n            })\n          },\n          fail: (res) => {\n            if (res.errMsg.indexOf('fail privacy permission is not authorized') != -1) {\n              wx.showModal({\n                content: '请阅读并同意隐私条款以后才能继续本操作',\n                confirmText: '阅读协议',\n                cancelText: '取消',\n                success(res) {\n                  if (res.confirm) {\n                    wx.requirePrivacyAuthorize() // 弹出用户隐私授权框\n                  }\n                }\n              })\n            } else if (res.errMsg.indexOf('fail auth deny') != -1) {\n              wx.showModal({\n                content: '本次操作需要您同意并将图片写入手机相册',\n                confirmText: '立即授权',\n                cancelText: '取消',\n                success(res) {\n                  if (res.confirm) {\n                    // 弹出设置窗口，让用户去设置\n                    wx.openSetting({\n                      withSubscriptions: true,\n                      fail: aaa => console.log(aaa)\n                    });\n                  }\n                }\n              })\n            } else {\n              console.error(res);\n              wx.showToast({\n                title: res.errMsg,\n                icon: 'none'\n              })\n            }\n          }\n        })\n      }\n    })\n  },\n  paymentOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      paymentShow: false\n    })\n    wx.redirectTo({\n      url: '/pages/packageA/pages/vip/index',\n    })\n  },\n  paymentCancel() {\n    this.setData({\n      paymentShow: false\n    })\n  },\n})"
  },
  {
    "path": "packageFx/pages/hehuorenfenxiao/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"分销中心\"\n}"
  },
  {
    "path": "packageFx/pages/hehuorenfenxiao/index.wxml",
    "content": "<view>\n  <image style=\"width:750rpx;height:200rpx\" mode=\"scaleToFill\"\n    src=\"https://dcdn.it120.cc/2021/01/13/3bb7207c-de68-476e-a5f8-8a2bfb7f1f09.png\"></image>\n</view>\n\n<view wx:if=\"{{apiUserInfoMap.base.isTeamMember || apiUserInfoMap.base.isTeamLeader || apiUserInfoMap.partnerInfo}}\">\n  <view class=\"tabTop\" style=\"margin-top:-88rpx\">\n    <view wx:if=\"{{apiUserInfoMap}}\" class=\"header-box\">\n      <!-- <image class=\"avatar2\" src=\"../../../../images/my/vip-guan@2x.png\" mode=\"aspectFill\"></image> -->\n      <image class=\"avatar\" src=\"{{ apiUserInfoMap.base.avatarUrl }}\" mode=\"aspectFill\"></image>\n      <view class=\"r\">\n        <view class=\"uid\">用户ID: {{ apiUserInfoMap.base.id }}</view>\n        <view style=\"display:flex\">\n          <view class=\"nick\">{{ apiUserInfoMap.base.nick }}</view>\n          <view wx:if=\"{{apiUserInfoMap.partnerInfo}}\" class=\"nick\"\n            style=\"padding:2rpx 10rpx;background-color:#FFAF32;color:white;border-radius:10rpx;font-size:14px;margin-left:10px\">\n            合伙人</view>\n          <view wx:elif=\"{{apiUserInfoMap.base.isTeamLeader}}\" class=\"nick\"\n            style=\"padding:2rpx 10rpx;background-color:#FFAF32;color:white;border-radius:10rpx;font-size:14px;margin-left:10px\">\n            团长</view>\n        </view>\n      </view>\n    </view>\n    <view class=\"header-box2\"> </view>\n    <view class=\"line\"></view>\n    <view class=\"asset\">\n      <view class='item'>\n        <view class=\"Count\">{{freeze}}</view>\n        <view>冻结金额</view>\n      </view>\n      <view class='item right'>\n        <view class=\"Count\" style=\"color:#FF444A\">{{balance}}</view>\n        <view>可用金额</view>\n      </view>\n      <view class=\"txBtn\" bindtap=\"withdraw\" style=\"margin-top:20px;background: #F5D795;\">\n        立即提现\n      </view>\n    </view>\n    <view class=\"line\"></view>\n    <view class=\"titleXS\">\n      我的销售额\n    </view>\n    <view class=\"asset\">\n      <view class='item'>\n        <view class=\"Count\">{{commisionData.todayXiaoshou}}</view>\n        <view>今日销售</view>\n        <view class=\"yjP\">{{commisionData.today}}</view>\n        <view class=\"yjT\">（佣金）</view>\n      </view>\n      <view class='item right'>\n        <view class=\"Count\">{{commisionData.yesdayXiaoshou}}</view>\n        <view>昨天销售</view>\n        <view class=\"yjP\">{{commisionData.yesday}}</view>\n        <view class=\"yjT\">（佣金）</view>\n      </view>\n      <view class='item right' bindtap='goScore'>\n        <view class=\"Count\">{{commisionData.thisMonthXiaoshou}}</view>\n        <view>本月销售</view>\n        <view class=\"yjP\">{{commisionData.thisMonth}}</view>\n        <view class=\"yjT\">（佣金）</view>\n      </view>\n      <view class='item right'>\n        <view class=\"Count\">{{commisionData.lastMonthXiaoshou}}</view>\n        <view>上月销售</view>\n        <view class=\"yjP\">{{commisionData.lastMonth}}</view>\n        <view class=\"yjT\">（佣金）</view>\n      </view>\n    </view>\n  </view>\n\n\n\n\n\n  <view wx:if=\"{{apiUserInfoMap.partnerInfo}}\">\n    <!-- 我是合伙人 -->\n    <view class=\"tuan\" wx:if=\"{{apiUserInfoMap.partnerInfo}}\">\n      <view>我的团队</view>\n      <view class=\"line2\"></view>\n      <view style=\"display:flex\">\n        <view class=\"tuanItem\" bindtap=\"goFxmem\" data-level=\"0\">\n          <view class=\"tI1\">{{membersStatistics.leaders}}人</view>\n          <view class=\"tI2\">团队长</view>\n        </view>\n        <view class=\"tuanItem\" bindtap=\"goFxmem\" data-level=\"1\">\n          <view class=\"tI1\">{{membersStatistics.members}}人</view>\n          <view class=\"tI2\">团员</view>\n        </view>\n      </view>\n    </view>\n\n    <view class=\"tuan2\" style=\"margin-top:10px;display:flex;justify-content: space-between;margin-bottom:10px\"\n      bindtap=\"goCommision\">\n      <view class=\"tL\" style=\"display:flex;align-items:center\">\n        <view>推广订单</view>\n        <image class=\"next\" src=\"/images/icon/next.png\"></image>\n      </view>\n    </view>\n\n    <view class=\"tuan2\" style=\"margin-top:10px;display:flex;justify-content: space-between;\">\n      <view class=\"tL\" style=\"display:flex;align-items:center\">\n        <view>我的邀请码</view>\n        <view class=\"yqCode\">{{ apiUserInfoMap.base.id }}</view>\n      </view>\n      <view class=\"cybtn\" bindtap=\"copyContent\" data-id=\"{{ apiUserInfoMap.base.id }}\">\n        复制\n      </view>\n    </view>\n  </view>\n\n  <view wx:elif=\"{{apiUserInfoMap.base.isTeamLeader}}\">\n    <!-- -----我是团长---- -->\n    <view class=\"tuan\" style=\"padding: 40rpx 40rpx 20rpx 40rpx;margin-bottom:10px\"\n      wx:if=\"{{apiUserInfoMap.parentPartnerInfo}}\">\n      <view>我的合伙人</view>\n      <view class=\"line2\"></view>\n      <view style=\"display:flex\">\n        <image style=\"width:80rpx;height:80rpx;margin:10px 20px 0px 0;border-radius:100%\"\n          src=\"{{apiUserInfoMap.parentPartnerInfo.avatarUrl}}\"></image>\n\n        <view style=\"height:120rpx;line-height:120rpx\">{{apiUserInfoMap.parentPartnerInfo.nick}}</view>\n      </view>\n    </view>\n\n    <view class=\"tuan2\" style=\"margin-top:10px;display:flex;justify-content: space-between;margin-bottom:10px\"\n      bindtap=\"goFxmem\" data-level=\"1\">\n      <view class=\"tL\" style=\"display:flex;align-items:center\">\n        <view>我的团员</view>\n        <image class=\"next\" src=\"/images/icon/next.png\"></image>\n      </view>\n    </view>\n\n    <view class=\"tuan2\" style=\"margin-top:10px;display:flex;justify-content: space-between;margin-bottom:10px\"\n      bindtap=\"goCommision\">\n      <view class=\"tL\" style=\"display:flex;align-items:center\">\n        <view>推广订单</view>\n        <image class=\"next\" src=\"/images/icon/next.png\"></image>\n      </view>\n    </view>\n\n    <view class=\"tuan2\" style=\"margin-top:10px;display:flex;justify-content: space-between;margin-bottom:10px\">\n      <view class=\"tL\" style=\"display:flex;align-items:center\">\n        <view>我的邀请码</view>\n        <view class=\"yqCode\">{{ apiUserInfoMap.base.id }}</view>\n      </view>\n      <view class=\"cybtn\" bindtap=\"copyContent\" data-id=\"{{ apiUserInfoMap.base.id }}\">\n        复制\n      </view>\n    </view>\n\n  </view>\n\n  <view wx:elif=\"{{apiUserInfoMap.base.isTeamMember}}\">\n    <!-- -----我是团员--------- -->\n    <view class=\"tuan\" style=\"padding: 40rpx 40rpx 20rpx 40rpx;\" wx:if=\"{{apiUserInfoMap.parentTeamLeaderInfo}}\">\n      <view>我的团长</view>\n      <view class=\"line2\"></view>\n      <view style=\"display:flex\">\n        <image style=\"width:80rpx;height:80rpx;margin:10px 20px 0px 0;border-radius:100%\"\n          src=\"{{apiUserInfoMap.parentTeamLeaderInfo.avatarUrl}}\"></image>\n\n        <view style=\"height:120rpx;line-height:120rpx\">{{apiUserInfoMap.parentTeamLeaderInfo.nick}}</view>\n      </view>\n    </view>\n\n    <view class=\"tuan\" style=\"padding: 40rpx 40rpx 20rpx 40rpx;\" wx:else>\n      <view>绑定团长</view>\n      <view class=\"line2\"></view>\n      <van-field value=\"{{ tzid }}\" placeholder=\"请输入团长邀请码，立即成为会员\" border=\"{{ false }}\" bind:change=\"onChange\" clearable\n        input-align=\"center\" />\n      <view style=\"text-align:center\">\n        <view class=\"tzBtn\" bindtap=\"partnerBindTeamLeader\" style=\"margin-top:20px;background: #F5D795;\">\n          立即绑定\n        </view>\n      </view>\n    </view>\n\n    <view class=\"tuan\" style=\"margin-top:10px\">\n      <view>我的团队</view>\n      <view class=\"line2\"></view>\n      <view style=\"width:100%;text-align:center\">\n        <view class=\"textsjtz\"> 您还不是团长，支付 <span style=\"color: #FF444A;\">{{fxData.priceLeader}}</span> 立即升级 </view>\n      </view>\n      <view style=\"text-align:center\">\n        <view class=\"tzBtn\" style=\"margin-top:20px;background: #F5D795;\" bindtap=\"payFx\"\n          wx:if=\"{{fxData.isOpen && !apiUserInfoMap.base.isTeamLeader}}\">\n          立即升级\n        </view>\n      </view>\n    </view>\n\n  </view>\n\n  <view class='noApply' wx:if=\"{{ apiUserInfoMap.base.isTeamLeader || apiUserInfoMap.partnerInfo}}\"\n    style=\"padding-top:10px;padding-bottom:20px\">\n    <!-- 我是合伙人或者团长可以生成推广码 -->\n    <view style=\"text-align:center\">\n      <canvas class=\"canvas\" style=\"height:160px;width:160px;margin:0 auto\" canvas-id=\"firstCanvas\"></canvas>\n      <view class=\"tzBtn\" bindtap=\"saveToMobile\" style=\"margin-top:10px;background: #F5D795;\">\n        保存到相册\n      </view>\n    </view>\n  </view>\n\n</view>\n\n<view wx:else class=\"tabTop\" style=\"margin-top:-88rpx\">\n  <!-- ------我是普通用户----- -->\n  <view wx:if=\"{{apiUserInfoMap}}\" class=\"header-box\">\n    <image class=\"avatar\" src=\"{{ apiUserInfoMap.base.avatarUrl }}\" mode=\"aspectFill\"></image>\n    <view class=\"r\">\n      <view class=\"uid\">用户ID: {{ apiUserInfoMap.base.id }}</view>\n      <view class=\"nick\">{{ apiUserInfoMap.base.nick }}</view>\n    </view>\n  </view>\n  <view class=\"header-box2\">您当前还不是分销商</view>\n  <view class=\"line\"></view>\n  <view style=\"padding:20px\">\n    <van-cell-group>\n      <van-field value=\"{{ tzid }}\" placeholder=\"请输入团长邀请码，立即成为分销商\" bind:change=\"onChange\" />\n    </van-cell-group>\n  </view>\n  <view style=\"text-align:center\">\n    <view class=\"tzBtn\" bindtap=\"partnerBindTeamLeader\" style=\"margin-top:20px;background: #F5D795;\">\n      立即加入\n    </view>\n  </view>\n</view>\n\n<payment\n  money=\"{{ money }}\"\n  remark=\"购买团长 ：{{ money }}\"\n  nextAction=\"{{ nextAction }}\"\n  show=\"{{ paymentShow }}\"\n  bind:cancel=\"paymentCancel\"\n  bind:ok=\"paymentOk\"\n/>"
  },
  {
    "path": "packageFx/pages/hehuorenfenxiao/index.wxss",
    "content": "\npage {\n  background:#FDF3E7\n}\n\n.asset {\n  display: flex;\n  padding: 20rpx 0;\n  /* height: 150rpx; */\n  /* background-color: #e85654; */\n}\n\n.asset .item {\n  display: flex;\n  flex-direction: column;\n  width: 250rpx;\n  text-align: center;\n  font-size: 14px;\n  line-height: 30px;\n  color: #3F240A;\n}\n\n.btn-view {\n  height: 88rpx;\n  /* background-color: #e85654; */\n  padding-right: 40rpx;\n  padding-bottom: 30rpx;\n  width: 100vw;\n  display: flex;\n  flex-direction: row-reverse;\n}\n\n.btn-view .btn {\n  border-color: #fff !important;\n  color: #fff !important;\n  margin-right: 20rpx;\n}\n\n.btn-hover {\n  border-color: #fff;\n  color: #fff;\n}\n\n.no-data {\n  margin-top: 100rpx;\n  text-align: center;\n  font-size: 13px;\n  color: #ccc;\n}\n\n.cashlogs {\n  display: flex;\n  font-size: 12px;\n  margin-top: 20rpx;\n  padding-bottom: 20rpx;\n  border-bottom: 1px solid #eee;\n  line-height: 20px;\n}\n\n.cashlogs .profile {\n  width: 600rpx;\n  padding-left: 30rpx;\n}\n\n.cashlogs .amount {\n  width: 150rpx;\n}\n\n.tabTop {\n  width: 710rpx;\n  /* height: 500rpx; */\n  background: linear-gradient(270deg, #F6C173 0%, #FFECC0 100%);\n  border-radius: 20rpx;\n  margin-left: 20rpx;\n  /* margin-top: -380rpx; */\n  position: relative;\n  padding-bottom: 20rpx;\n  margin-bottom: 10px;\n}\n\n.tabTop2 {\n  margin-top:10px ;\n  width: 710rpx;\n  /* height: 500rpx; */\n  background: linear-gradient(270deg, #F6C173 0%, #FFECC0 100%);\n  border-radius: 20rpx;\n  margin-left: 20rpx;\n  /* margin-top: -380rpx; */\n  position: relative;\n  padding-bottom: 20rpx;\n  margin-bottom: 10px;\n}\n\n.ava {\n  width: 100rpx;\n  height: 100rpx;\n}\n\n.header-box {\n  padding: 32rpx 32rpx 0 32rpx;\n  display: flex;\n  align-items: center;\n}\n\n.header-box2 {\n  padding: 16rpx 32rpx;\n  display: flex;\n  align-items: center;\n  margin-left:10rpx ;\nfont-size: 26rpx;\nfont-family: PingFangSC-Regular, PingFang SC;\nfont-weight: 400;\ncolor: #3E240D;\n}\n\n.header-box .avatar {\n  width: 128rpx;\n  height: 128rpx;\n  border-radius: 50%;\n  border: 2px solid white;\n}\n\n.header-box .avatar2 {\n  width: 130rpx;\n  height: 130rpx;\n  position: absolute;\n}\n\n.header-box .btn {\n  margin-left: 32rpx;\n}\n\n.header-box .r {\n  margin-left: 32rpx;\n  color: #333;\n  font-size: 28rpx;\n}\n\n.line {\n  width: 558rpx;\n  height: 2px;\n  background: linear-gradient(90deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);\n  border-radius: 1px;\n  margin-left: 20px;\n}\n\n.txBtn {\n  width: 160rpx;\nheight: 56rpx;\n\nborder-radius: 28px;\nborder: 2rpx solid #3F240A;\n  line-height: 56rpx;\n  position: absolute;\n  right: 16px;\n  text-align:center;\n  font-size: 14px;\n  padding-top:2px ;\n}\n\n.tzBtn {\n  width: 160rpx;\nheight: 56rpx;\nmargin:auto;\nborder-radius: 28px;\nborder: 2rpx solid #3F240A;\n  line-height: 56rpx;\n  right: 16px;\n  text-align:center;\n  font-size: 14px;\n  padding-top:2px ;\n}\n\n.Count{\nheight: 38px;\nfont-size: 40rpx;\nfont-family: PingFangSC-Medium, PingFang SC;\nfont-weight: 500;\ncolor: #3F240A;\nline-height: 38px;\n\n}\n\n.tuan{\n  margin-left:20rpx ;\n  width: 630rpx;\n  background: #FFFFFF;\n  border-radius: 8rpx;\n  padding: 40rpx;\n}\n\n.tuan2{\n  margin-left:20rpx ;\n  width: 630rpx;\n  background: #FFFFFF;\n  border-radius: 8rpx;\n  padding: 26rpx 40rpx;\n}\n\n.line2{\n  width: 630rpx;\nheight: 1px;\nbackground: #E6E6E6;\nborder-radius: 1px;\nmargin-top:20rpx ;\n}\n.tuanItem{\n  width: 315rpx;\n  text-align: center;\n  padding-top:42rpx\n}\n\n.tI1{\nfont-size: 38rpx;\nfont-family: PingFangSC-Medium, PingFang SC;\nfont-weight: 500;\ncolor: #333333;\nmargin: 0 0 8rpx 0;\n}\n.tI2{\nfont-size: 28rpx;\nfont-family: PingFangSC-Regular, PingFang SC;\nfont-weight: 400;\ncolor: #666666;\n}\n\n.yqCode{\nbackground: #F2F5FF;\nheight: 37rpx;\nfont-size: 26rpx;\nfont-family: PingFangSC-Medium, PingFang SC;\nfont-weight: 500;\ncolor: #182442;\nline-height: 37rpx;\npadding: 2rpx 20rpx;\nmargin-left:20rpx ;\n}\n\n.cybtn{\n  width: 140rpx;\n  height: 50rpx;\n  background: #FFD43E;\n  border-radius: 28px;\n  line-height: 50rpx;\n  text-align: center;\n  font-size: 14px;\n}\n\n.yjP{\nheight: 37rpx;\nfont-size: 26rpx;\nfont-family: PingFangSC-Regular, PingFang SC;\nfont-weight: 400;\ncolor: #FF444A;\nline-height: 37rpx;\n}\n\n.yjT{\nheight: 30rpx;\nfont-size: 22rpx;\nfont-family: PingFangSC-Regular, PingFang SC;\nfont-weight: 400;\ncolor: #666666;\nline-height: 30rpx;\n}\n\n.titleXS{\n  /* width: 140px; */\nheight: 40rpx;\nfont-size: 28rpx;\n/* font-family: PingFangSC-Medium, PingFang SC; */\n/* font-weight: 400; */\ncolor: #3F240A;\nline-height: 40rpx;\nmargin-left: 22px;\nmargin-top:10px\n}\n\n.textsjtz{\nheight: 40rpx;\nfont-size: 28rpx;\nfont-family: PingFangSC-Regular, PingFang SC;\nfont-weight: 400;\ncolor: #999999;\nline-height: 40rpx;\nmargin-top:10px ;\n}\n\n.next {\n  width: 40rpx;\n  height: 40rpx;\n  position: absolute;\n  right: 20px;\n}"
  },
  {
    "path": "packageFx/pages/index/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../../utils/auth')\nconst ImageUtil = require('../../../utils/image')\nconst APP = getApp()\n\nvar sliderWidth = 96; // 需要设置slider的宽度，用于计算中间位置\n\nDate.prototype.format = function(format) {\n  var date = {\n        \"M+\": this.getMonth() + 1,\n        \"d+\": this.getDate(),\n        \"h+\": this.getHours(),\n        \"m+\": this.getMinutes(),\n        \"s+\": this.getSeconds(),\n        \"q+\": Math.floor((this.getMonth() + 3) / 3),\n        \"S+\": this.getMilliseconds()\n  };\n  if (/(y+)/i.test(format)) {\n        format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));\n  }\n  for (var k in date) {\n        if (new RegExp(\"(\" + k + \")\").test(format)) {\n                format = format.replace(RegExp.$1, RegExp.$1.length == 1\n                      ? date[k] : (\"00\" + date[k]).substr((\"\" + date[k]).length));\n        }\n  }\n  return format;\n}\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    balance: 0,\n    freeze: 0,\n    fxCommisionPaying: 0,\n    score: 0,\n    commisionData: {\n      today: 0,\n      yesday: 0,\n      thisMonth: 0,\n      lastMonth: 0,\n      todayXiaoshou: 0,\n      yesdayXiaoshou: 0,\n      thisMonthXiaoshou: 0,\n      lastMonthXiaoshou: 0,\n    },\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function (options) {\n    // wx.setStorageSync('token', '4f02de6e-914f-4439-a128-a62a6bbdc3e4')\n    this.adPosition()\n  },\n  onShow: function () {\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.doneShow();\n        this.doneShow2();\n        this.getUserApiInfo();\n      }\n    })\n  },\n\n  async commision() {\n    const uid = this.data.apiUserInfoMap.base.id\n    var commisionData = this.data.commisionData\n    const nowDate = new Date()\n    console.log('今天', nowDate.format('yyyyMMdd'))\n    console.log('本月', nowDate.format('yyyyMM'))\n    const yestoday = new Date(nowDate.getTime() - 24 * 60 * 60 * 1000)\n    console.log('昨天', yestoday.format('yyyyMMdd'))\n    // 上个月\n    let year = nowDate.getFullYear()\n    let month = nowDate.getMonth() + 1\n    if (month == 1) {\n      month = 12\n      year--\n    } else {\n      month--\n    }\n    const lastMonth = year + \"\" + (month < 10 ? ('0' + month) : month)\n    console.log('上个月', lastMonth)\n    let res = await WXAPI.siteStatisticsSaleroom({\n      dateBegin: nowDate.format('yyyyMMdd'),\n      dateEnd: nowDate.format('yyyyMMdd'),\n      uid: uid\n    })\n    if (res.code === 0) {\n      commisionData.today = res.data[0].estimateCommission\n      commisionData.todayXiaoshou = res.data[0].saleroom\n    }\n    res = await WXAPI.siteStatisticsSaleroom({\n      dateBegin: yestoday.format('yyyyMMdd'),\n      dateEnd: yestoday.format('yyyyMMdd'),\n      uid: uid\n    })\n    if (res.code === 0) {\n      commisionData.yesday = res.data[0].estimateCommission\n      commisionData.yesdayXiaoshou = res.data[0].saleroom\n    }\n    res = await WXAPI.siteStatisticsSaleroom({\n      dateBegin: nowDate.format('yyyyMM'),\n      dateEnd: nowDate.format('yyyyMM'),\n      uid: uid\n    })\n    if (res.code === 0) {\n      commisionData.thisMonth = res.data[0].estimateCommission\n      commisionData.thisMonthXiaoshou = res.data[0].saleroom\n    }\n    res = await WXAPI.siteStatisticsSaleroom({\n      dateBegin: lastMonth,\n      dateEnd: lastMonth,\n      uid: uid\n    })\n    if (res.code === 0) {\n      commisionData.lastMonth = res.data[0].estimateCommission\n      commisionData.lastMonthXiaoshou = res.data[0].saleroom\n    }\n    this.setData({\n      commisionData:commisionData\n    })\n  },\n  getUserApiInfo: function () {\n    var that = this;\n    WXAPI.userDetail(wx.getStorageSync('token')).then(function (res) {\n      if (res.code == 0) {\n        let _data = {}\n        _data.apiUserInfoMap = res.data\n        that.setData(_data);\n        that.commision();\n        if (res.data.base.isSeller) {\n          // 判断是否是市区合伙人\n          that.fxCities()\n        }\n      }\n    })\n  },\n  doneShow: function () {\n    const _this = this\n    const token = wx.getStorageSync('token')\n    if (!token) {\n      return\n    }\n    WXAPI.userAmount(token).then(function (res) {\n      if (res.code == 700) {\n        wx.showToast({\n          title: '当前账户存在异常',\n          icon: 'none'\n        })\n        return\n      }\n      if (res.code == 2000) {\n        return\n      }\n      if (res.code == 0) {\n        _this.setData({\n          balance: res.data.balance.toFixed(2),\n          freeze: res.data.freeze.toFixed(2),\n          fxCommisionPaying: res.data.fxCommisionPaying.toFixed(2),\n          totleConsumed: res.data.totleConsumed.toFixed(2),\n          score: res.data.score\n        });\n      }\n    })\n  },\n  copyContent(e) {\n    var data = e.currentTarget.dataset.id + \"\"\n    wx.setClipboardData({\n      data: data\n    })\n  },\n  async doneShow2() {\n    const _this = this\n    const userDetail = await WXAPI.userDetail(wx.getStorageSync('token'))\n    WXAPI.fxApplyProgress(wx.getStorageSync('token')).then(res => {\n      let applyStatus = userDetail.data.base.isSeller ? 2 : -1\n      if (res.code == 2000) {\n        return\n      }\n      if (res.code === 700) {\n        _this.setData({\n          applyStatus: applyStatus\n        })\n      }\n      if (res.code === 0) {\n        if (userDetail.data.base.isSeller) {\n          applyStatus = 2\n        } else {\n          applyStatus = res.data.status\n        }\n        _this.setData({\n          applyStatus: applyStatus,\n          applyInfo: res.data\n        })\n      }\n      if (applyStatus == 2) {\n        _this.fetchQrcode()\n      }\n    })\n  },\n  fetchQrcode(){\n    const _this = this\n    wx.showLoading({\n      title: '加载中',\n      mask: true\n    })\n    const accountInfo = wx.getAccountInfoSync()\n    const envVersion = accountInfo.miniProgram.envVersion\n    WXAPI.wxaQrcode({\n      scene: 'inviter_id=' + wx.getStorageSync('uid'),\n      page: 'pages/index/index',\n      is_hyaline: true,\n      autoColor: true,\n      expireHours: 1,\n      env_version: envVersion,\n      check_path: envVersion == 'release' ? true : false,\n    }).then(res => {\n      wx.hideLoading()\n      if (res.code ==  41030) {\n        wx.showToast({\n          title: '上线以后才可以获取二维码',\n          icon: 'none'\n        })\n        return\n      }\n      if (res.code == 0) {\n        _this.showCanvas(res.data)\n      }\n    })\n  },\n  showCanvas(qrcode){\n    const _this = this\n    let ctx\n    wx.getImageInfo({\n      src: qrcode,\n      success: (res) => {\n        const imageSize = ImageUtil.imageUtil(res.width, res.height)\n        const qrcodeWidth = imageSize.windowWidth / 2\n        _this.setData({\n          canvasHeight: qrcodeWidth\n        })\n        ctx = wx.createCanvasContext('firstCanvas')\n        ctx.setFillStyle('#FDF3E7')\n        ctx.fillRect(0, 0, imageSize.windowWidth, imageSize.imageHeight + qrcodeWidth)\n        ctx.drawImage(res.path, 0, 0, qrcodeWidth, qrcodeWidth)\n        setTimeout(function () {\n          wx.hideLoading()\n          ctx.draw()\n        }, 1000)\n      }\n    })\n  },\n  saveToMobile() {\n    wx.canvasToTempFilePath({\n      canvasId: 'firstCanvas',\n      success: function (res) {\n        let tempFilePath = res.tempFilePath\n        wx.saveImageToPhotosAlbum({\n          filePath: tempFilePath,\n          success: (res) => {\n            wx.showModal({\n              content: '二维码已保存到手机相册',\n              showCancel: false,\n              confirmText: '知道了',\n              confirmColor: '#333'\n            })\n          },\n          fail: (res) => {\n            if (res.errMsg.indexOf('fail privacy permission is not authorized') != -1) {\n              wx.showModal({\n                content: '请阅读并同意隐私条款以后才能继续本操作',\n                confirmText: '阅读协议',\n                cancelText: '取消',\n                success (res) {\n                  if (res.confirm) {\n                    wx.requirePrivacyAuthorize() // 弹出用户隐私授权框\n                  }\n                }\n              })\n            } else if (res.errMsg.indexOf('fail auth deny') != -1) {\n              wx.showModal({\n                content: '本次操作需要您同意并将图片写入手机相册',\n                confirmText: '立即授权',\n                cancelText: '取消',\n                success (res) {\n                  if (res.confirm) {\n                    // 弹出设置窗口，让用户去设置\n                    wx.openSetting({\n                      withSubscriptions: true,\n                      fail: aaa => console.log(aaa)\n                    });\n                  }\n                }\n              })\n            } else {\n              console.error(res);\n              wx.showToast({\n                title: res.errMsg,\n                icon: 'none'\n              })\n            }\n          }\n        })\n      }\n    })\n  },\n   // 读取市区合伙人\n   async fxCities() {\n    const res = await WXAPI.fxCities(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      this.setData({\n        fxCities: res.data\n      })\n    }\n  },\n   // 读取广告位\n   async adPosition() {\n    const res = await WXAPI.adPosition('fx_index')\n    if (res.code == 0) {\n      this.setData({\n        fxIndexAdPos: res.data\n      })\n    }\n  },\n  goUrl(e) {\n    const url = e.currentTarget.dataset.url\n    if (url) {\n      wx.navigateTo({\n        url: url,\n      })\n    }\n  },\n  onShareAppMessage() {    \n    return {\n      title: '\"' + wx.getStorageSync('mallName') + '\" ' + wx.getStorageSync('share_profile'),\n      path: '/pages/index/index?inviter_id=' + wx.getStorageSync('uid'),\n      imageUrl: wx.getStorageSync('share_pic'),\n      success: function (res) {\n        // 转发成功\n      },\n      fail: function (res) {\n        // 转发失败\n      }\n    }\n  },\n  onShareTimeline() {    \n    return {\n      title: '\"' + wx.getStorageSync('mallName') + '\" ' + wx.getStorageSync('share_profile'),\n      query: 'inviter_id=' + wx.getStorageSync('uid'),\n      imageUrl: this.data.goodsDetail.basicInfo.pic\n    }\n  },\n  goApply() {\n    wx.redirectTo({\n      url: '/packageFx/pages/apply/index',\n    })\n  }\n})"
  },
  {
    "path": "packageFx/pages/index/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"分销中心\"\n}"
  },
  {
    "path": "packageFx/pages/index/index.wxml",
    "content": "<view>\n  <image style=\"width:750rpx;height:486rpx\" mode=\"aspectFit\" src=\"../../images/index-top-bg.png\"></image>\n</view>\n\n<!-- 如果当前用户是分销商 -->\n<view wx:if=\"{{apiUserInfoMap.base && apiUserInfoMap.base.isSeller}}\">\n  <view class=\"tabTop\" style=\"margin-top:-420rpx\">\n    <view class=\"header-box\">\n      <image class=\"avatar\" src=\"{{ apiUserInfoMap.base.avatarUrl }}\" mode=\"aspectFill\"></image>\n      <view class=\"r\">\n        <view class=\"uid\">用户编号: {{ apiUserInfoMap.base.id }}</view>\n        <view style=\"display:flex\">\n          <view class=\"nick\">{{ apiUserInfoMap.base.nick }}</view>\n        </view>\n        <view wx:if=\"{{ apiUserInfoMap.saleDistributionLevel }}\" class=\"user-level\"><van-icon name=\"medal-o\" />{{ apiUserInfoMap.saleDistributionLevel.name }}</view>\n      </view>\n    </view>\n    <view class=\"header-box2\"> </view>\n    <view class=\"line\"></view>\n    <view class=\"asset\">\n      <view class='item' bindtap='goAsset' style=\"width: 170rpx\">\n        <view class=\"Count\">{{fxCommisionPaying}}</view>\n        <view>未结算金额</view>\n      </view>\n      <view class='item' bindtap='goAsset' style=\"width: 170rpx\">\n        <view class=\"Count\">{{freeze}}</view>\n        <view>冻结金额</view>\n      </view>\n      <view class='item right' bindtap='goAsset' style=\"width: 170rpx\">\n        <view class=\"Count\" style=\"color:#FF444A\">{{balance}}</view>\n        <view>可用金额</view>\n      </view>\n    </view>\n    <view class=\"line\"></view>\n    <view class=\"titleXS\">\n      我的业绩\n    </view>\n    <view class=\"asset\">\n      <view class='item'>\n        <view class=\"Count\">{{commisionData.todayXiaoshou}}</view>\n        <view>今日销售</view>\n        <view class=\"yjP\">{{commisionData.today ? commisionData.today : 0}}</view>\n        <view class=\"yjT\">（佣金）</view>\n      </view>\n      <view class='item right'>\n        <view class=\"Count\">{{commisionData.yesdayXiaoshou}}</view>\n        <view>昨天销售</view>\n        <view class=\"yjP\">{{commisionData.yesday ? commisionData.yesday : 0}}</view>\n        <view class=\"yjT\">（佣金）</view>\n      </view>\n      <view class='item right'>\n        <view class=\"Count\">{{commisionData.thisMonthXiaoshou}}</view>\n        <view>本月销售</view>\n        <view class=\"yjP\">{{commisionData.thisMonth ? commisionData.thisMonth : 0}}</view>\n        <view class=\"yjT\">（佣金）</view>\n      </view>\n      <view class='item right'>\n        <view class=\"Count\">{{commisionData.lastMonthXiaoshou}}</view>\n        <view>上月销售</view>\n        <view class=\"yjP\">{{commisionData.lastMonth ? commisionData.lastMonth : 0}}</view>\n        <view class=\"yjT\">（佣金）</view>\n      </view>\n    </view>\n  </view>\n\n  <view wx:if=\"{{ apiUserInfoMap.referrer }}\" class=\"tuan\" style=\"padding: 40rpx 40rpx 20rpx 40rpx;\">\n    <view>我的邀请人</view>\n    <view class=\"line2\"></view>\n    <view style=\"display:flex\">\n      <image style=\"width:80rpx;height:80rpx;margin:10px 20px 0px 0;border-radius:100%\"\n        src=\"{{apiUserInfoMap.referrer.avatarUrl}}\"></image>\n      <view style=\"height:120rpx;line-height:120rpx;font-size:26rpx;\">{{apiUserInfoMap.referrer.nick}}</view>\n    </view>\n  </view>\n  <image wx:if=\"{{ fxIndexAdPos }}\" src=\"{{ fxIndexAdPos.val }}\" mode=\"widthFix\" class=\"adpos\" data-url=\"{{ fxIndexAdPos.url }}\" bindtap=\"goUrl\"></image>\n  <van-cell-group title=\"分销信息\" custom-class=\"cell-class\">\n    <van-field\n      value=\"{{ apiUserInfoMap.base.id }}\"\n      readonly\n      center\n      clearable\n      label=\"我的邀请码\"\n      use-button-slot\n    >\n      <van-button slot=\"button\" size=\"small\" type=\"info\" round bindtap=\"copyContent\" data-id=\"{{ apiUserInfoMap.base.id }}\">复制</van-button\n      >\n    </van-field>\n    <van-cell title=\"我的团队\" value=\"查看\" is-link url=\"../myusers/index\" />\n    <van-cell title=\"推广订单\" value=\"查看\" is-link url=\"../commisionLog/index\" />\n    <van-cell title=\"账单明细\" value=\"查看\" is-link url=\"/pages/asset/index\" />\n  </van-cell-group>\n\n  <!-- 团队长、副队长 -->\n  <van-cell-group wx:if=\"{{apiUserInfoMap.saleDistributionTeam && (apiUserInfoMap.saleDistributionTeam.leader == apiUserInfoMap.base.id || apiUserInfoMap.saleDistributionTeam.deputyLeader == apiUserInfoMap.base.id ) }}\" custom-class=\"cell-class\" title=\"我的团队\">\n    <van-cell title=\"{{ apiUserInfoMap.saleDistributionTeam.name }}\" />\n    <van-cell title=\"身份\" value=\"{{ apiUserInfoMap.saleDistributionTeam.leader == apiUserInfoMap.base.id ? '队长' : '副队长' }}\" />\n    <van-cell title=\"销售目标\" value=\"¥{{ apiUserInfoMap.saleDistributionTeam.standardSaleroom }}/月\" />\n    <van-cell title=\"本月销售\" value=\"¥{{ apiUserInfoMap.saleDistributionTeam.curSaleroom }}\" />\n    <van-cell title=\"月度报表\" is-link url=\"../report/team?teamId={{ apiUserInfoMap.base.teamId }}\" />\n  </van-cell-group>\n\n  <!-- 城市合伙人 -->\n  <van-cell-group wx:for=\"{{fxCities}}\" wx:key=\"id\" custom-class=\"cell-class\" title=\"{{ item.provinceName }}{{ item.cityName }}合伙人\">\n    <van-cell title=\"销售目标\" value=\"¥{{ item.standardSaleroom }}/月\" />\n    <van-cell title=\"本月销售\" value=\"¥{{ item.curSaleroom }}\" />\n    <van-cell title=\"月度报表\" is-link url=\"../report/city?provinceId={{ item.provinceId }}&cityId={{ item.cityId }}\" />\n  </van-cell-group>\n  \n  <view class='noApply' style=\"padding-top:10px;padding-bottom:20px\">\n    <view style=\"text-align:center;\">\n      <view class=\"canvas-box\">\n        <canvas class=\"canvas\" style=\"width:{{canvasHeight}}px;height:{{canvasHeight}}px\" canvas-id=\"firstCanvas\"></canvas>\n      </view>\n      <view class=\"tzBtn\" bindtap=\"saveToMobile\" style=\"margin-top:10px;background: #F5D795;padding: 0 16rpx;\">\n        保存到相册\n      </view>\n    </view>\n  </view>\n\n</view>\n\n<!-- 还不是分销商 -->\n<view wx:if=\"{{apiUserInfoMap.base && !apiUserInfoMap.base.isSeller}}\" class=\"tabTop\" style=\"margin-top:-450rpx\">\n  <view class=\"header-box\">\n    <image class=\"avatar\" src=\"{{ apiUserInfoMap.base.avatarUrl }}\" mode=\"aspectFill\"></image>\n    <view class=\"r\">\n      <view class=\"uid\">用户ID: {{ apiUserInfoMap.base.id }}</view>\n      <view class=\"nick\">{{ apiUserInfoMap.base.nick }}</view>\n    </view>\n  </view>\n  <view class=\"header-box2\">您当前还不是分销商</view>\n  <view class=\"line\"></view>\n  <view class=\"header-box2\" bindtap=\"goApply\">立即前往申请成为分销商 ></view>\n</view>"
  },
  {
    "path": "packageFx/pages/index/index.wxss",
    "content": "page {\n  background:#FDF3E7\n}\n\n.asset {\n  display: flex;\n  padding: 20rpx 32rpx;\n  justify-content: space-between;\n}\n\n.asset .item {\n  display: flex;\n  flex-direction: column;\n  text-align: center;\n  font-size: 26rpx;\n  color: #3F240A;\n}\n\n.btn-view {\n  height: 88rpx;\n  /* background-color: #e85654; */\n  padding-right: 40rpx;\n  padding-bottom: 30rpx;\n  width: 100vw;\n  display: flex;\n  flex-direction: row-reverse;\n}\n\n.btn-view .btn {\n  border-color: #fff !important;\n  color: #fff !important;\n  margin-right: 20rpx;\n}\n\n.btn-hover {\n  border-color: #fff;\n  color: #fff;\n}\n\n.no-data {\n  margin-top: 100rpx;\n  text-align: center;\n  font-size: 13px;\n  color: #ccc;\n}\n\n.cashlogs {\n  display: flex;\n  font-size: 12px;\n  margin-top: 20rpx;\n  padding-bottom: 20rpx;\n  border-bottom: 1px solid #eee;\n  line-height: 20px;\n}\n\n.cashlogs .profile {\n  width: 600rpx;\n  padding-left: 30rpx;\n}\n\n.cashlogs .amount {\n  width: 150rpx;\n}\n\n.tabTop {\n  width: 710rpx;\n  /* height: 500rpx; */\n  background: linear-gradient(270deg, #F6C173 0%, #FFECC0 100%);\n  border-radius: 20rpx;\n  margin-left: 20rpx;\n  /* margin-top: -380rpx; */\n  position: relative;\n  padding-bottom: 20rpx;\n  margin-bottom: 10px;\n}\n\n.tabTop2 {\n  margin-top:10px ;\n  width: 710rpx;\n  /* height: 500rpx; */\n  background: linear-gradient(270deg, #F6C173 0%, #FFECC0 100%);\n  border-radius: 20rpx;\n  margin-left: 20rpx;\n  /* margin-top: -380rpx; */\n  position: relative;\n  padding-bottom: 20rpx;\n  margin-bottom: 10px;\n}\n\n.ava {\n  width: 100rpx;\n  height: 100rpx;\n}\n\n.header-box {\n  padding: 32rpx 32rpx 0 32rpx;\n  display: flex;\n  align-items: center;\n}\n\n.header-box2 {\n  padding: 16rpx 32rpx;\n  display: flex;\n  align-items: center;\n  margin-left:10rpx ;\n  font-size: 26rpx;\n  font-family: PingFangSC-Regular, PingFang SC;\n  font-weight: 400;\n  color: #3E240D;\n}\n\n.header-box .avatar {\n  width: 128rpx;\n  height: 128rpx;\n  border-radius: 50%;\n  border: 2px solid white;\n  flex-shrink: 0;\n}\n\n.header-box .avatar2 {\n  width: 130rpx;\n  height: 130rpx;\n  position: absolute;\n}\n\n.header-box .btn {\n  margin-left: 32rpx;\n}\n\n.header-box .r {\n  margin-left: 32rpx;\n  color: #333;\n  font-size: 28rpx;\n}\n\n.line {\n  width: 558rpx;\n  height: 2px;\n  background: linear-gradient(90deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);\n  border-radius: 1px;\n  margin-left: 20px;\n}\n\n.txBtn {\n  width: 160rpx;\nheight: 56rpx;\n\nborder-radius: 28px;\nborder: 2rpx solid #3F240A;\n  line-height: 56rpx;\n  position: absolute;\n  right: 16px;\n  text-align:center;\n  font-size: 14px;\n  padding-top:2px ;\n}\n\n.tzBtn {\n  width: 160rpx;\nheight: 56rpx;\nmargin:auto;\nborder-radius: 28px;\nborder: 2rpx solid #3F240A;\n  line-height: 56rpx;\n  right: 16px;\n  text-align:center;\n  font-size: 14px;\n  padding-top:2px ;\n}\n\n.Count{\nheight: 38px;\nfont-size: 40rpx;\nfont-family: PingFangSC-Medium, PingFang SC;\nfont-weight: 500;\ncolor: #3F240A;\nline-height: 38px;\n\n}\n\n.tuan{\n  margin-left:20rpx ;\n  width: 630rpx;\n  background: #FFFFFF;\n  border-radius: 8rpx;\n  padding: 40rpx;\n}\n\n.tuan2{\n  margin-left:20rpx ;\n  width: 630rpx;\n  background: #FFFFFF;\n  border-radius: 8rpx;\n  padding: 26rpx 40rpx;\n}\n\n.line2{\n  width: 630rpx;\nheight: 1px;\nbackground: #E6E6E6;\nborder-radius: 1px;\nmargin-top:20rpx ;\n}\n.tuanItem{\n  width: 315rpx;\n  text-align: center;\n  padding-top:42rpx\n}\n\n.tI1{\nfont-size: 38rpx;\nfont-family: PingFangSC-Medium, PingFang SC;\nfont-weight: 500;\ncolor: #333333;\nmargin: 0 0 8rpx 0;\n}\n.tI2{\nfont-size: 28rpx;\nfont-family: PingFangSC-Regular, PingFang SC;\nfont-weight: 400;\ncolor: #666666;\n}\n\n.yqCode{\nbackground: #F2F5FF;\nheight: 37rpx;\nfont-size: 26rpx;\nfont-family: PingFangSC-Medium, PingFang SC;\nfont-weight: 500;\ncolor: #182442;\nline-height: 37rpx;\npadding: 2rpx 20rpx;\nmargin-left:20rpx ;\n}\n\n.cybtn{\n  width: 140rpx;\n  height: 50rpx;\n  background: #FFD43E;\n  border-radius: 28px;\n  line-height: 50rpx;\n  text-align: center;\n  font-size: 14px;\n}\n\n.yjP{\nheight: 37rpx;\nfont-size: 26rpx;\nfont-family: PingFangSC-Regular, PingFang SC;\nfont-weight: 400;\ncolor: #FF444A;\nline-height: 37rpx;\n}\n\n.yjT{\nheight: 30rpx;\nfont-size: 22rpx;\nfont-family: PingFangSC-Regular, PingFang SC;\nfont-weight: 400;\ncolor: #666666;\nline-height: 30rpx;\n}\n\n.titleXS{\n  /* width: 140px; */\nheight: 40rpx;\nfont-size: 28rpx;\n/* font-family: PingFangSC-Medium, PingFang SC; */\n/* font-weight: 400; */\ncolor: #3F240A;\nline-height: 40rpx;\nmargin-left: 22px;\nmargin-top:10px\n}\n\n.textsjtz{\nheight: 40rpx;\nfont-size: 28rpx;\nfont-family: PingFangSC-Regular, PingFang SC;\nfont-weight: 400;\ncolor: #999999;\nline-height: 40rpx;\nmargin-top:10px ;\n}\n\n.next {\n  width: 40rpx;\n  height: 40rpx;\n  position: absolute;\n  right: 20px;\n}\n\n\n/* -----------商品列表------------- */\n.goods-container {\n  display: flex;\n  justify-content: space-between;\n  flex-wrap: wrap;\n  box-sizing: content-box;\n  padding: 22rpx;\n  margin-bottom: 100rpx;\n}\n\n.goods-box {\n  width: 339rpx;\n  height: 472rpx;\n  background-color: #fff;\n  overflow: hidden;\n  margin-bottom: 24rpx;\n  border-radius: 5px;\n}\n\n.goods-box .img-box {\n  width: 339rpx;\n  height: 339rpx;\n  overflow: hidden;\n}\n\n.goods-box .img-box image {\n  width: 339rpx;\n  height: 339rpx;\n}\n\n.goods-box .goods-title {\n  width: 280rpx;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  overflow: hidden;\n  font-size: 26rpx;\n  padding: 20rpx 0 0rpx 0;\n  color: #000;\n  margin-left: 24rpx;\n}\n\n.goods-box .goods-price {\n  /* width: 280rpx; */\n  overflow: hidden;\n  font-size: 36rpx;\n  padding: 8rpx 0;\n  color: #e64340;\n  margin-left: 24rpx;\n}\n/* -------商品列表------------- */\n\n.cell-class {\n  padding: 0 24rpx;\n}\n.canvas-box {\n  width: 100vw;\n  display: flex;\n  justify-content: center;\n}\n.adpos {\n  padding: 0 24rpx;\n  width: 100vw;\n  box-sizing: border-box;\n  border-radius: 16rpx;\n}\n.user-level {\n  color: #e64340;\n  margin-top: 8rpx;\n}"
  },
  {
    "path": "packageFx/pages/myusers/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    number1: 0, // 直推用户数\n    number2: 0, // 间推用户数\n    activeIndex: 0, // tab点亮索引\n    page: 1 // 读取第几页\n  },\n\n  onLoad: function () {\n    this.fxMembersStatistics()\n    this.fxMembers()\n  },\n  onShow: function () {\n\n  },\n  async fxMembersStatistics() {\n    const res = await WXAPI.fxMembersStatistics(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      this.setData({\n        number1: res.data.totleFansLevel1,\n        number2: res.data.totleFansLevel2\n      })\n    }\n  },\n  async fxMembers() {\n    const res = await WXAPI.fxMembers({\n      token: wx.getStorageSync('token'),\n      page: this.data.page,\n      level: this.data.activeIndex == 0 ? 1 : 2\n    })\n    if (res.code == 700) {\n      if (this.data.page == 1) {\n        this.setData({\n          members: []\n        })\n      } else {\n        wx.showToast({\n          title: '没有更多了',\n          icon: 'none'\n        })\n      }\n    }\n    if (res.code == 0) {\n      const statisticsCommisionMap = res.data.statisticsCommisionMap\n      const userCashMap = res.data.userCashMap\n      res.data.result.forEach(ele => {\n        if (!ele.avatarUrls) {\n          ele.avatarUrls = '/images/default.png'\n        }\n        if (!ele.nicks) {\n          ele.nicks = '用户' + ele.uids\n        }\n        const _statisticsCommisionMap = statisticsCommisionMap[ele.uids]\n        if (_statisticsCommisionMap) {\n          ele.saleroom = _statisticsCommisionMap.saleroom\n          ele.numberOrder = _statisticsCommisionMap.numberOrder\n        }\n        if (userCashMap) {\n          const _userCashMap = userCashMap[ele.uids]\n          if (_userCashMap) {\n            ele.totleConsumed = _userCashMap.totleConsumed\n            ele.totalPayNumber = _userCashMap.totalPayNumber\n            ele.totalPayAmount = _userCashMap.totalPayAmount\n          }\n        }\n      })\n      if (this.data.page == 1) {\n        this.setData({\n          members: res.data.result\n        })\n      } else {\n        this.setData({\n          members: this.data.members.concat(res.data.result)\n        })\n      }\n    }\n  },\n  tabChange(e) {\n    this.setData({\n      activeIndex: e.detail.index,\n      page: 1\n    })\n    this.fxMembers()\n  },\n  onReachBottom: function() {\n    this.data.page += 1\n    this.fxMembers()\n  },\n  onPullDownRefresh: function() {\n    this.data.page = 1\n    this.fxMembersStatistics()\n    this.fxMembers()\n    wx.stopPullDownRefresh()\n  },\n})"
  },
  {
    "path": "packageFx/pages/myusers/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"我的团队\",\n  \"enablePullDownRefresh\": true\n}"
  },
  {
    "path": "packageFx/pages/myusers/index.wxml",
    "content": "<view class=\"page-container\">\n  <!-- 顶部统计卡片 -->\n  <view class=\"header-stats\">\n    <view class=\"stat-card stat-card-left\">\n      <view class=\"stat-icon\">👥</view>\n      <view class=\"stat-info\">\n        <view class=\"stat-label\">直推团队</view>\n        <view class=\"stat-value\">{{ number1 || 0 }}</view>\n      </view>\n    </view>\n    <view class=\"stat-card stat-card-right\">\n      <view class=\"stat-icon\">🔗</view>\n      <view class=\"stat-info\">\n        <view class=\"stat-label\">间推团队</view>\n        <view class=\"stat-value\">{{ number2 || 0 }}</view>\n      </view>\n    </view>\n  </view>\n\n  <!-- Tab切换 -->\n  <van-sticky>\n    <view class=\"tabs-wrapper\">\n      <van-tabs active=\"{{ activeIndex }}\" bind:change=\"tabChange\" color=\"#1989fa\" line-width=\"60rpx\" line-height=\"6rpx\">\n        <van-tab title=\"直推团队\" />\n        <van-tab title=\"间推团队\" />\n      </van-tabs>\n    </view>\n  </van-sticky>\n\n  <!-- 团队成员列表 -->\n  <view class=\"team-list\">\n    <van-empty wx:if=\"{{ !members || members.length == 0 }}\" description=\"暂无团队成员\" image=\"search\" />\n    \n    <navigator wx:for=\"{{members}}\" wx:key=\"id\" url=\"myusers-detail?id={{ item.uids }}\" class=\"member-card\">\n      <!-- 顶部用户信息 -->\n      <view class=\"member-header\">\n        <view class=\"avatar-wrapper\">\n          <image src=\"{{ item.avatarUrls }}\" mode=\"aspectFill\" class=\"avatar\"></image>\n          <view class=\"avatar-border\"></view>\n        </view>\n        <view class=\"member-info\">\n          <view class=\"member-name\">{{ item.nicks }}</view>\n          <view class=\"member-phone\">{{ item.mobileMasks }}</view>\n        </view>\n        <view class=\"arrow-icon\">›</view>\n      </view>\n\n      <!-- 业绩数据 -->\n      <view class=\"member-stats\">\n        <view class=\"stat-item\">\n          <view class=\"stat-item-label\">成交额</view>\n          <view class=\"stat-item-value amount\">¥{{ item.totalPayAmount || 0 }}</view>\n        </view>\n        <view class=\"stat-divider\"></view>\n        <view class=\"stat-item\">\n          <view class=\"stat-item-label\">订单数</view>\n          <view class=\"stat-item-value\">{{ item.totalPayNumber || 0 }}<text class=\"unit\">笔</text></view>\n        </view>\n      </view>\n\n      <!-- 最近活动 -->\n      <view class=\"member-activity\" wx:if=\"{{ item.lastOrderDate }}\">\n        <view class=\"activity-icon\">🕒</view>\n        <view class=\"activity-text\">最近下单：{{ item.lastOrderDate }}</view>\n      </view>\n    </navigator>\n  </view>\n</view>"
  },
  {
    "path": "packageFx/pages/myusers/index.wxss",
    "content": "/* 页面容器 */\n.page-container {\n  min-height: 100vh;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  padding-bottom: 40rpx;\n}\n\n/* 顶部统计卡片区域 */\n.header-stats {\n  display: flex;\n  padding: 40rpx 30rpx 30rpx;\n  gap: 20rpx;\n}\n\n.stat-card {\n  flex: 1;\n  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);\n  border-radius: 24rpx;\n  padding: 30rpx 24rpx;\n  display: flex;\n  align-items: center;\n  gap: 20rpx;\n  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.12);\n  backdrop-filter: blur(10rpx);\n  transition: all 0.3s ease;\n}\n\n.stat-icon {\n  font-size: 48rpx;\n  width: 80rpx;\n  height: 80rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  border-radius: 20rpx;\n}\n\n.stat-card-left .stat-icon {\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n}\n\n.stat-card-right .stat-icon {\n  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);\n}\n\n.stat-info {\n  flex: 1;\n}\n\n.stat-label {\n  font-size: 24rpx;\n  color: #666;\n  margin-bottom: 8rpx;\n  font-weight: 500;\n}\n\n.stat-value {\n  font-size: 40rpx;\n  font-weight: bold;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  -webkit-background-clip: text;\n  -webkit-text-fill-color: transparent;\n  background-clip: text;\n}\n\n/* Tab包装器 */\n.tabs-wrapper {\n  background: white;\n  border-radius: 24rpx 24rpx 0 0;\n  padding-top: 10rpx;\n}\n\n/* 团队列表 */\n.team-list {\n  padding: 0 30rpx;\n  background: white;\n}\n\n/* 成员卡片 */\n.member-card {\n  display: block;\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);\n  border-radius: 24rpx;\n  margin-bottom: 24rpx;\n  padding: 32rpx;\n  box-shadow: 0 4rpx 20rpx rgba(102, 126, 234, 0.08);\n  border: 2rpx solid rgba(102, 126, 234, 0.05);\n  transition: all 0.3s ease;\n  position: relative;\n  overflow: hidden;\n}\n\n.member-card:active {\n  transform: scale(0.98);\n  box-shadow: 0 2rpx 12rpx rgba(102, 126, 234, 0.1);\n}\n\n.member-card::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  height: 6rpx;\n  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);\n  opacity: 0.8;\n}\n\n/* 成员头部信息 */\n.member-header {\n  display: flex;\n  align-items: center;\n  margin-bottom: 24rpx;\n}\n\n.avatar-wrapper {\n  position: relative;\n  margin-right: 24rpx;\n}\n\n.avatar {\n  width: 100rpx;\n  height: 100rpx;\n  border-radius: 50%;\n  border: 4rpx solid #fff;\n  box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.15);\n}\n\n.avatar-border {\n  position: absolute;\n  top: -4rpx;\n  left: -4rpx;\n  right: -4rpx;\n  bottom: -4rpx;\n  border-radius: 50%;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  z-index: -1;\n}\n\n.member-info {\n  flex: 1;\n}\n\n.member-name {\n  font-size: 32rpx;\n  font-weight: bold;\n  color: #333;\n  margin-bottom: 8rpx;\n}\n\n.member-phone {\n  font-size: 24rpx;\n  color: #999;\n}\n\n.arrow-icon {\n  font-size: 48rpx;\n  color: #ddd;\n  font-weight: 300;\n}\n\n/* 业绩统计 */\n.member-stats {\n  display: flex;\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);\n  border-radius: 16rpx;\n  padding: 24rpx;\n  margin-bottom: 20rpx;\n}\n\n.stat-item {\n  flex: 1;\n  text-align: center;\n}\n\n.stat-item-label {\n  font-size: 24rpx;\n  color: #999;\n  margin-bottom: 12rpx;\n}\n\n.stat-item-value {\n  font-size: 36rpx;\n  font-weight: bold;\n  color: #333;\n}\n\n.stat-item-value.amount {\n  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);\n  -webkit-background-clip: text;\n  -webkit-text-fill-color: transparent;\n  background-clip: text;\n}\n\n.stat-item-value .unit {\n  font-size: 24rpx;\n  font-weight: normal;\n  color: #666;\n}\n\n.stat-divider {\n  width: 2rpx;\n  background: linear-gradient(180deg, rgba(102, 126, 234, 0) 0%, rgba(102, 126, 234, 0.2) 50%, rgba(102, 126, 234, 0) 100%);\n  margin: 0 20rpx;\n}\n\n/* 最近活动 */\n.member-activity {\n  display: flex;\n  align-items: center;\n  background: rgba(102, 126, 234, 0.03);\n  border-radius: 12rpx;\n  padding: 16rpx 20rpx;\n  border-left: 4rpx solid #667eea;\n}\n\n.activity-icon {\n  font-size: 28rpx;\n  margin-right: 12rpx;\n}\n\n.activity-text {\n  font-size: 24rpx;\n  color: #666;\n  flex: 1;\n}"
  },
  {
    "path": "packageFx/pages/myusers/myusers-detail.js",
    "content": "const WXAPI = require('apifm-wxapi')\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function (options) {\n    // options.id = 1871848\n    this.userDetailSpreadUser(options.id)\n  },\n  onShow: function () {\n\n  },\n  async userDetailSpreadUser(uid) {\n    const res = await WXAPI.userDetailSpreadUser(wx.getStorageSync('token'), uid)\n    if (res.code != 0) {\n      wx.showModal({\n        title: '错误',\n        content: res.msg,\n        showCancel: false\n      })\n      return\n    }\n    this.setData({\n      userInfoMap: res.data\n    })\n  },\n})"
  },
  {
    "path": "packageFx/pages/myusers/myusers-detail.json",
    "content": "{\n  \"navigationBarTitleText\": \"用户详情\"\n}"
  },
  {
    "path": "packageFx/pages/myusers/myusers-detail.wxml",
    "content": "<view class=\"member-detail-container\">\n  <!-- 顶部卡片 - 头像和基本信息 -->\n  <view class=\"top-card\">\n    <view class=\"bg-decoration\"></view>\n    <view class=\"avatar-wrapper\">\n      <image class=\"avatar-image\" src=\"{{ userInfoMap.base.avatarUrl }}\" mode=\"aspectFill\"></image>\n      <view class=\"avatar-border\"></view>\n    </view>\n    <view class=\"member-name\">{{ userInfoMap.base.nick }}</view>\n    <view class=\"member-id\">ID: {{ userInfoMap.base.id }}</view>\n    \n    <!-- 分销商徽章 -->\n    <view class=\"seller-badge\" wx:if=\"{{ userInfoMap.base.isSeller }}\">\n      <view class=\"badge-icon\">★</view>\n      <text class=\"badge-text\">认证分销商</text>\n    </view>\n  </view>\n\n  <!-- 详细信息卡片 -->\n  <view class=\"info-section\">\n    <view class=\"section-title\">\n      <view class=\"title-line\"></view>\n      <text class=\"title-text\">会员信息</text>\n      <view class=\"title-line\"></view>\n    </view>\n\n    <view class=\"info-card\">\n      <!-- 手机号码 -->\n      <view class=\"info-item\">\n        <view class=\"item-icon phone-icon\">📱</view>\n        <view class=\"item-content\">\n          <view class=\"item-label\">手机号码</view>\n          <view class=\"item-value\">{{ userInfoMap.base.mobile || '-' }}</view>\n        </view>\n      </view>\n\n      <!-- 会员编号 -->\n      <view class=\"info-item\">\n        <view class=\"item-icon id-icon\">🔖</view>\n        <view class=\"item-content\">\n          <view class=\"item-label\">会员编号</view>\n          <view class=\"item-value\">{{ userInfoMap.base.id }}</view>\n        </view>\n      </view>\n\n      <!-- 会员等级 -->\n      <view class=\"info-item\" wx:if=\"{{ userInfoMap.userLevel }}\">\n        <view class=\"item-icon level-icon\">👑</view>\n        <view class=\"item-content\">\n          <view class=\"item-label\">会员等级</view>\n          <view class=\"item-value level-value\">{{ userInfoMap.userLevel.name }}</view>\n        </view>\n      </view>\n\n      <!-- 分销商状态 -->\n      <view class=\"info-item\">\n        <view class=\"item-icon status-icon\">💼</view>\n        <view class=\"item-content\">\n          <view class=\"item-label\">分销商身份</view>\n          <view class=\"item-value\">\n            <text class=\"status-tag {{ userInfoMap.base.isSeller ? 'active' : 'inactive' }}\">{{ userInfoMap.base.isSeller ? '已开通' : '未开通' }}</text>\n          </view>\n        </view>\n      </view>\n    </view>\n  </view>\n</view>"
  },
  {
    "path": "packageFx/pages/myusers/myusers-detail.wxss",
    "content": "/* 页面容器 */\n.member-detail-container {\n  min-height: 100vh;\n  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);\n  padding-bottom: 60rpx;\n}\n\n/* 顶部卡片 */\n.top-card {\n  position: relative;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  padding: 60rpx 40rpx 80rpx;\n  margin: 32rpx 30rpx 40rpx;\n  border-radius: 32rpx;\n  box-shadow: 0 20rpx 60rpx rgba(102, 126, 234, 0.3);\n  overflow: hidden;\n}\n\n/* 背景装饰 */\n.bg-decoration {\n  position: absolute;\n  top: -100rpx;\n  right: -100rpx;\n  width: 400rpx;\n  height: 400rpx;\n  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);\n  border-radius: 50%;\n}\n\n/* 头像容器 */\n.avatar-wrapper {\n  position: relative;\n  width: 180rpx;\n  height: 180rpx;\n  margin: 0 auto 32rpx;\n}\n\n/* 头像图片 */\n.avatar-image {\n  width: 180rpx;\n  height: 180rpx;\n  border-radius: 50%;\n  border: 6rpx solid rgba(255, 255, 255, 0.9);\n  box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.15);\n  display: block;\n}\n\n/* 头像边框动画 */\n.avatar-border {\n  position: absolute;\n  top: -8rpx;\n  left: -8rpx;\n  right: -8rpx;\n  bottom: -8rpx;\n  border-radius: 50%;\n  border: 4rpx solid rgba(255, 255, 255, 0.3);\n  animation: pulse 2s infinite;\n}\n\n@keyframes pulse {\n  0%, 100% {\n    transform: scale(1);\n    opacity: 1;\n  }\n  50% {\n    transform: scale(1.05);\n    opacity: 0.6;\n  }\n}\n\n/* 会员名称 */\n.member-name {\n  text-align: center;\n  font-size: 40rpx;\n  font-weight: bold;\n  color: #ffffff;\n  margin-bottom: 12rpx;\n  text-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);\n}\n\n/* 会员ID */\n.member-id {\n  text-align: center;\n  font-size: 26rpx;\n  color: rgba(255, 255, 255, 0.85);\n  letter-spacing: 2rpx;\n}\n\n/* 分销商徽章 */\n.seller-badge {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-top: 32rpx;\n  padding: 16rpx 36rpx;\n  background: linear-gradient(90deg, rgba(255, 215, 0, 0.95) 0%, rgba(255, 193, 7, 0.95) 100%);\n  border-radius: 50rpx;\n  box-shadow: 0 8rpx 24rpx rgba(255, 193, 7, 0.4);\n}\n\n.badge-icon {\n  font-size: 32rpx;\n  margin-right: 12rpx;\n  animation: rotate 3s linear infinite;\n}\n\n@keyframes rotate {\n  0% {\n    transform: rotate(0deg);\n  }\n  100% {\n    transform: rotate(360deg);\n  }\n}\n\n.badge-text {\n  font-size: 28rpx;\n  font-weight: bold;\n  color: #663300;\n  letter-spacing: 2rpx;\n}\n\n/* 信息区域 */\n.info-section {\n  padding: 0 30rpx;\n}\n\n/* 区域标题 */\n.section-title {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-bottom: 40rpx;\n}\n\n.title-line {\n  flex: 1;\n  height: 2rpx;\n  background: linear-gradient(90deg, transparent 0%, #e0e0e0 50%, transparent 100%);\n}\n\n.title-text {\n  padding: 0 32rpx;\n  font-size: 32rpx;\n  font-weight: bold;\n  color: #333333;\n  letter-spacing: 4rpx;\n}\n\n/* 信息卡片 */\n.info-card {\n  background: #ffffff;\n  border-radius: 24rpx;\n  padding: 20rpx;\n  box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.06);\n}\n\n/* 信息项 */\n.info-item {\n  display: flex;\n  align-items: center;\n  padding: 32rpx 24rpx;\n  border-bottom: 2rpx solid #f5f5f5;\n  transition: all 0.3s ease;\n}\n\n.info-item:last-child {\n  border-bottom: none;\n}\n\n/* 图标 */\n.item-icon {\n  width: 80rpx;\n  height: 80rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-size: 40rpx;\n  border-radius: 20rpx;\n  margin-right: 24rpx;\n  flex-shrink: 0;\n}\n\n.phone-icon {\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  box-shadow: 0 8rpx 16rpx rgba(102, 126, 234, 0.3);\n}\n\n.id-icon {\n  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);\n  box-shadow: 0 8rpx 16rpx rgba(245, 87, 108, 0.3);\n}\n\n.level-icon {\n  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);\n  box-shadow: 0 8rpx 16rpx rgba(255, 215, 0, 0.3);\n}\n\n.status-icon {\n  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);\n  box-shadow: 0 8rpx 16rpx rgba(79, 172, 254, 0.3);\n}\n\n/* 内容区 */\n.item-content {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n}\n\n/* 标签 */\n.item-label {\n  font-size: 26rpx;\n  color: #999999;\n  margin-bottom: 8rpx;\n  letter-spacing: 1rpx;\n}\n\n/* 值 */\n.item-value {\n  font-size: 32rpx;\n  color: #333333;\n  font-weight: 500;\n  letter-spacing: 1rpx;\n}\n\n/* 等级值特殊样式 */\n.level-value {\n  background: linear-gradient(90deg, #ffd700 0%, #ff8c00 100%);\n  -webkit-background-clip: text;\n  -webkit-text-fill-color: transparent;\n  background-clip: text;\n  font-weight: bold;\n}\n\n/* 状态标签 */\n.status-tag {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  padding: 10rpx 24rpx;\n  border-radius: 30rpx;\n  font-size: 26rpx;\n  font-weight: bold;\n}\n\n.status-tag.active {\n  background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);\n  color: #ffffff;\n  box-shadow: 0 4rpx 12rpx rgba(56, 239, 125, 0.3);\n}\n\n.status-tag.inactive {\n  background: #f5f5f5;\n  color: #999999;\n}\n"
  },
  {
    "path": "packageFx/pages/report/city.js",
    "content": "const WXAPI = require('apifm-wxapi')\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    page: 1 // 读取第几页\n  },\n\n  onLoad(e) {\n    this.data.provinceId = e.provinceId\n    this.data.cityId = e.cityId\n    this.fxCityReport()\n  },\n  onShow: function () {\n\n  },\n  async fxCityReport() {\n    const res = await WXAPI.fxCityReport({\n      token: wx.getStorageSync('token'),\n      provinceId: this.data.provinceId,\n      cityId: this.data.cityId,\n      page: this.data.page\n    })\n    if (res.code == 700) {\n      if (this.data.page == 1) {\n        this.setData({\n          members: []\n        })\n      } else {\n        wx.showToast({\n          title: '没有更多了',\n          icon: 'none'\n        })\n      }\n    }\n    if (res.code == 0) {\n      if (this.data.page == 1) {\n        this.setData({\n          members: res.data.result\n        })\n      } else {\n        this.setData({\n          members: this.data.members.concat(res.data.result)\n        })\n      }\n    }\n  },\n  onReachBottom: function() {\n    this.data.page += 1\n    this.fxCityReport()\n  },\n  onPullDownRefresh: function() {\n    this.data.page = 1\n    this.fxCityReport()\n    wx.stopPullDownRefresh()\n  },\n})"
  },
  {
    "path": "packageFx/pages/report/city.json",
    "content": "{\n  \"navigationBarTitleText\": \"合伙人月报表\",\n  \"enablePullDownRefresh\": true\n}"
  },
  {
    "path": "packageFx/pages/report/city.wxml",
    "content": "<van-empty wx:if=\"{{ !members || members.length == 0 }}\" description=\"暂无记录\" />\n<van-cell\n  wx:for=\"{{members}}\" wx:key=\"id\"\n  size=\"large\"\n  title=\"月份{{ item.month }}\"\n  label=\"目标¥{{ item.standardSaleroom}}\"\n  value=\"¥{{ item.curSaleroom}}\"\n/>"
  },
  {
    "path": "packageFx/pages/report/city.wxss",
    "content": ".list {\n  display: flex;\n  align-items: center;\n  width: 100vw;\n  padding: 8rpx 32rpx;\n  box-sizing: border-box;\n}\n.list .l {\n  width: 88rpx;\n  height: 88rpx;\n}\n.list .r {\n  flex: 1;\n}"
  },
  {
    "path": "packageFx/pages/report/team.js",
    "content": "const WXAPI = require('apifm-wxapi')\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    page: 1 // 读取第几页\n  },\n\n  onLoad(e) {\n    this.data.teamId = e.teamId\n    this.fxTeamReport()\n  },\n  onShow: function () {\n\n  },\n  async fxTeamReport() {\n    const res = await WXAPI.fxTeamReport({\n      token: wx.getStorageSync('token'),\n      teamId: this.data.teamId,\n      page: this.data.page\n    })\n    if (res.code == 700) {\n      if (this.data.page == 1) {\n        this.setData({\n          members: []\n        })\n      } else {\n        wx.showToast({\n          title: '没有更多了',\n          icon: 'none'\n        })\n      }\n    }\n    if (res.code == 0) {\n      if (this.data.page == 1) {\n        this.setData({\n          members: res.data.result\n        })\n      } else {\n        this.setData({\n          members: this.data.members.concat(res.data.result)\n        })\n      }\n    }\n  },\n  onReachBottom: function() {\n    this.data.page += 1\n    this.fxTeamReport()\n  },\n  onPullDownRefresh: function() {\n    this.data.page = 1\n    this.fxTeamReport()\n    wx.stopPullDownRefresh()\n  },\n})"
  },
  {
    "path": "packageFx/pages/report/team.json",
    "content": "{\n  \"navigationBarTitleText\": \"团队月报表\",\n  \"enablePullDownRefresh\": true\n}"
  },
  {
    "path": "packageFx/pages/report/team.wxml",
    "content": "<van-empty wx:if=\"{{ !members || members.length == 0 }}\" description=\"暂无记录\" />\n<van-cell\n  wx:for=\"{{members}}\" wx:key=\"id\"\n  size=\"large\"\n  title=\"月份{{ item.month }}\"\n  label=\"目标¥{{ item.standardSaleroom}}\"\n  value=\"¥{{ item.curSaleroom}}\"\n/>"
  },
  {
    "path": "packageFx/pages/report/team.wxss",
    "content": ".list {\n  display: flex;\n  align-items: center;\n  width: 100vw;\n  padding: 8rpx 32rpx;\n  box-sizing: border-box;\n}\n.list .l {\n  width: 88rpx;\n  height: 88rpx;\n}\n.list .r {\n  flex: 1;\n}"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/TRTCCalling.js",
    "content": "import EventEmitter from './utils/event.js'\nimport TSignaling from './utils/tsignaling-wx'\nimport * as ENV from 'utils/environment.js'\nimport MTA from 'libs/mta_analysis.js'\nimport { EVENT, TRTC_EVENT } from './common/constants.js'\nimport UserController from './controller/user-controller'\n\nconst app = getApp()\n\nconst TAG_NAME = 'TRTCCalling-Component'\n// 组件旨在跨终端维护一个通话状态管理机，以事件发布机制驱动上层进行管理，并通过API调用进行状态变更。\n// 组件设计思路将UI和状态管理分离。您可以通过修改`template`文件夹下的文件，适配您的业务场景，\n// 在UI展示上，您可以通过属性的方式，将上层的用户头像，名称等数据传入组件内部，`static`下的用户头像图片，\n// 只是为了展示基础的效果，您需要根据业务场景进行修改。\nComponent({\n  properties: {\n    config: {\n      type: Object,\n      value: {\n        sdkAppID: app.globalData.sdkAppID,\n        userID: '',\n        userSig: '',\n        type: 0,\n      },\n      observer: function(newVal, oldVal) {\n        this.setData({\n          config: newVal,\n        })\n      },\n    },\n    pusherAvatar: {\n      type: String,\n      value: '',\n    },\n    remoteAvatar: {\n      type: String,\n      value: '',\n    },\n\n  },\n  data: {\n    soundMode: 'speaker', // 声音模式 听筒/扬声器\n    callingFlag: false,\n    active: false,\n    pusherConfig: { // 本地上行状态管理\n      pushUrl: '',\n      frontCamera: 'front',\n      enableMic: true,\n      enableCamera: true,\n      volume: 0,\n    },\n    playerList: [], // 通话成员列表\n    streamList: [],\n    invitation: { // 接收到的邀请\n      inviteID: '',\n    },\n    invitationAccept: { // 发出的邀请，以及返回的状态\n      inviteID: '',\n      acceptFlag: false,\n      rejectFlag: false,\n    },\n    _historyUserList: [], // 房间内进过房的成员列表，用于发送call_end\n  },\n\n  methods: {\n    _initEventEmitter() {\n      // 监听TSignaling事件\n      this.tsignaling.on(TSignaling.EVENT.NEW_INVITATION_RECEIVED, (event) => {\n        console.log(TAG_NAME, 'onNewInvitationReceived', `是否在通话：${this.data.callingFlag || this.data.invitationAccept.acceptFlag}, inviteID:${event.data.inviteID} inviter:${event.data.inviter} inviteeList:${event.data.inviteeList} data:${event.data.data}`)\n        const data = JSON.parse(event.data.data)\n        // 新的通话邀请\n        // {\n        //   \"version\":0,\n        //   \"call_type\":1,\n        //   \"room_id\":\"123\"\n        // }\n        // 通话结束，发出的 call_end\n        // {\n        //   \"version\":0,\n        //   \"call_type\":1,\n        //   \"call_end\":123123\n        // }\n        // 通话中，接收的新的邀请时，忙线拒绝\n        if (this.data.callingFlag || this.data.invitationAccept.acceptFlag) {\n          this.tsignaling.reject({\n            inviteID: event.data.inviteID,\n            data: JSON.stringify({\n              version: 0,\n              call_type: data.call_type,\n              line_busy: '',\n            }),\n          })\n          return\n        }\n        if (data.call_end) {\n          // 小程序端对 call_end 的接收不做业务处理，这里只是向外抛出这个事件\n          this._emitter.emit(EVENT.CALL_END, {\n            call_end: data.call_end,\n          })\n        } else {\n          this.data.invitation.inviteID = event.data.inviteID\n          this.data.invitation.inviter = event.data.inviter\n\n          this.data.invitation.type = data.call_type\n          this.data.invitation.roomID = data.room_id\n          this.setData({\n            invitation: this.data.invitation,\n            callingFlag: true, // 当前invitation未处理完成时，下一个invitation都将会忙线\n          }, () => {\n            console.log(`${TAG_NAME} NEW_INVITATION_RECEIVED invitation: `, this.data.callingFlag, this.data.invitation)\n            this._emitter.emit(EVENT.INVITED, {\n              inviter: this.data.invitation.inviter,\n              type: this.data.invitation.type,\n            })\n          })\n        }\n      })\n      this.tsignaling.on(TSignaling.EVENT.INVITEE_ACCEPTED, (event) => {\n        // 发出的邀请收到接受的回调\n        console.log(`${TAG_NAME} INVITEE_ACCEPTED inviteID:${event.data.inviteID} invitee:${event.data.invitee} data:${event.data.data}`)\n        if (this.data.invitationAccept.inviteID === event.data.inviteID) {\n          this.data.invitationAccept.acceptFlag = true\n          this.setData({\n            invitationAccept: this.data.invitationAccept,\n          })\n        }\n      })\n      this.tsignaling.on(TSignaling.EVENT.INVITEE_REJECTED, (event) => {\n        // 发出的邀请收到拒绝的回调\n        console.log(`${TAG_NAME} INVITEE_REJECTED inviteID:${event.data.inviteID} invitee:${event.data.invitee} data:${event.data.data}`)\n        // 小程序使用双向绑定模式，这里只向外抛出拒绝的用户 userID 业务逻辑由业务层进行处理\n        const data = JSON.parse(event.data.data)\n        if (this.data.invitationAccept.inviteID === event.data.inviteID) {\n          this.data.invitationAccept.rejectFlag = true\n          this.setData({\n            invitationAccept: this.data.invitationAccept,\n          }, () => {\n            if (data.line_busy === '') {\n              this._emitter.emit(EVENT.LINE_BUSY, {\n                inviteID: event.data.inviteID,\n                invitee: event.data.invitee,\n                reason: 'line busy',\n              })\n            } else {\n              this._emitter.emit(EVENT.REJECT, {\n                inviteID: event.data.inviteID,\n                invitee: event.data.invitee,\n                reason: 'reject',\n              })\n            }\n          })\n        }\n      })\n      this.tsignaling.on(TSignaling.EVENT.INVITATION_CANCELLED, (event) => {\n        // 收到的邀请收到该邀请取消的回调\n        console.log('demo | onInvitationCancelled', `inviteID:${event.data.inviteID} inviter:${event.data.invitee} data:${event.data.data}`)\n        // invitation取消，收到此消息的时候应该还没有接通，为防止时序的问题，还是走一下挂断流程\n        this.setData({\n          callingFlag: false,\n        })\n        this._emitter.emit(EVENT.CALLING_CANCEL, {\n          inviteID: event.data.inviteID,\n          invitee: event.data.invitee,\n        })\n      })\n      this.tsignaling.on(TSignaling.EVENT.INVITATION_TIMEOUT, (event) => {\n        console.log(TAG_NAME, 'onInvitationTimeout 邀请超时', `inviteID:${event.data.inviteID} inviteeList:${event.data.inviteeList}`)\n        // 邀请超时, 无人应答\n        this._emitter.emit(EVENT.NO_RESP, {\n          inviteID: event.data.inviteID,\n          inviteeList: event.data.inviteeList,\n        })\n      })\n      this.tsignaling.on(TSignaling.EVENT.SDK_READY, () => {\n        console.log(TAG_NAME, 'TSignaling SDK ready')\n      })\n      this.tsignaling.on(TSignaling.EVENT.SDK_NOT_READY, () => {\n        this._emitter.emit(EVENT.ERROR, {\n          errorMsg: 'TSignaling SDK not ready !!! 如果想使用发送消息等功能，接入侧需驱动 SDK 进入 ready 状态',\n        })\n      })\n      this.tsignaling.on(TSignaling.EVENT.TEXT_MESSAGE_RECEIVED, () => {\n\n      })\n      this.tsignaling.on(TSignaling.EVENT.CUSTOM_MESSAGE_RECEIVED, () => {\n\n      })\n      this.tsignaling.on(TSignaling.EVENT.REMOTE_USER_JOIN, () => {\n        //\n      })\n      this.tsignaling.on(TSignaling.EVENT.REMOTE_USER_LEAVE, () => {\n        // 离开\n      })\n      this.tsignaling.on(TSignaling.EVENT.KICKED_OUT, () => {\n        // 被踢下线 TODO\n        wx.showToast({\n          title: '您已被踢下线',\n        })\n        this.hangup()\n      })\n      this.tsignaling.on(TSignaling.EVENT.NET_STATE_CHANGE, () => {\n\n      })\n      // 监听TRTC SDK抛出的事件\n      this.userController.on(TRTC_EVENT.REMOTE_USER_JOIN, (event)=>{\n        console.log(TAG_NAME, '远端用户进房', event, event.data.userID)\n        this.setData({\n          playerList: event.data.userList,\n        }, () => {\n          // this._emitter.emit(EVENT.REMOTE_USER_JOIN, { userID: event.data.userID })\n          this._emitter.emit(EVENT.USER_ENTER, {\n            userID: event.data.userID,\n          })\n          if (this.data._historyUserList.indexOf(event.data.userID) > -1) {\n            this.data._historyUserList.push(event.data.userID)\n          }\n        })\n        console.log(TAG_NAME, 'REMOTE_USER_JOIN', 'streamList:', this.data.streamList, 'userList:', this.data.userList)\n      })\n      // 远端用户离开\n      this.userController.on(TRTC_EVENT.REMOTE_USER_LEAVE, (event)=>{\n        console.log(TAG_NAME, '远端用户离开', event, event.data.userID)\n        if (event.data.userID) {\n          this.setData({\n            playerList: event.data.userList,\n            streamList: event.data.streamList,\n          }, () => {\n            // TODO: 房间内没有远端用户时就退房, 并且发出invite消息，带call_end信息\n            this._emitter.emit(EVENT.USER_LEAVE, {\n              userID: event.data.userID,\n            })\n          })\n        }\n        console.log(TAG_NAME, 'REMOTE_USER_LEAVE', 'streamList:', this.data.streamList, 'userList:', this.data.userList)\n      })\n      // 视频状态 true\n      this.userController.on(TRTC_EVENT.REMOTE_VIDEO_ADD, (event)=>{\n        console.log(TAG_NAME, '远端视频可用', event, event.data.stream.userID)\n        const stream = event.data.stream\n        this.setData({\n          playerList: event.data.userList,\n          streamList: event.data.streamList,\n        }, () => {\n          stream.playerContext = wx.createLivePlayerContext(stream.streamID, this)\n        })\n        console.log(TAG_NAME, 'REMOTE_VIDEO_ADD', 'streamList:', this.data.streamList, 'userList:', this.data.userList)\n      })\n      // 视频状态 false\n      this.userController.on(TRTC_EVENT.REMOTE_VIDEO_REMOVE, (event)=>{\n        console.log(TAG_NAME, '远端视频移除', event, event.data.stream.userID)\n        const stream = event.data.stream\n        this.setData({\n          playerList: event.data.userList,\n          streamList: event.data.streamList,\n        }, () => {\n          // 有可能先触发了退房事件，用户名下的所有stream都已清除\n          if (stream.userID && stream.streamType) {\n            // this._emitter.emit(EVENT.REMOTE_VIDEO_REMOVE, { userID: stream.userID, streamType: stream.streamType })\n          }\n        })\n        console.log(TAG_NAME, 'REMOTE_VIDEO_REMOVE', 'streamList:', this.data.streamList, 'userList:', this.data.userList)\n      })\n      // 音频可用\n      this.userController.on(TRTC_EVENT.REMOTE_AUDIO_ADD, (event)=>{\n        console.log(TAG_NAME, '远端音频可用', event)\n        const stream = event.data.stream\n        this.setData({\n          playerList: event.data.userList,\n          streamList: event.data.streamList,\n        }, () => {\n          stream.playerContext = wx.createLivePlayerContext(stream.streamID, this)\n          // 新增的需要触发一次play 默认属性才能生效\n          // stream.playerContext.play()\n          // console.log(TAG_NAME, 'REMOTE_AUDIO_ADD playerContext.play()', stream)\n          // this._emitter.emit(EVENT.REMOTE_AUDIO_ADD, { userID: stream.userID, streamType: stream.streamType })\n        })\n        console.log(TAG_NAME, 'REMOTE_AUDIO_ADD', 'streamList:', this.data.streamList, 'userList:', this.data.userList)\n      })\n      // 音频不可用\n      this.userController.on(TRTC_EVENT.REMOTE_AUDIO_REMOVE, (event)=>{\n        console.log(TAG_NAME, '远端音频移除', event, event.data.stream.userID)\n        const stream = event.data.stream\n        this.setData({\n          playerList: event.data.userList,\n          streamList: event.data.streamList,\n        }, () => {\n          // 有可能先触发了退房事件，用户名下的所有stream都已清除\n          if (stream.userID && stream.streamType) {\n            // this._emitter.emit(EVENT.REMOTE_AUDIO_REMOVE, { userID: stream.userID, streamType: stream.streamType })\n          }\n        })\n        console.log(TAG_NAME, 'REMOTE_AUDIO_REMOVE', 'streamList:', this.data.streamList, 'userList:', this.data.userList)\n      })\n    },\n    /**\n     * 登录IM接口，所有功能需要先进行登录后才能使用\n     *\n     */\n    login() {\n      return new Promise((resolve, reject) => {\n        this.tsignaling.setLogLevel(0)\n        MTA.Page.stat()\n        this.tsignaling.login({\n          userID: this.data.config.userID,\n          userSig: this.data.config.userSig,\n        }).then( () => {\n          console.log(TAG_NAME, 'login', 'IM登入成功')\n          this._initEventEmitter()\n          resolve()\n        })\n      })\n    },\n    /**\n     * 登出接口，登出后无法再进行拨打操作\n     */\n    logout() {\n      this.tsignaling.logout({\n        userID: this.data.config.userID,\n        userSig: this.data.config.userSig,\n      }).then( () => {\n        console.log(TAG_NAME, 'login', 'IM登出成功')\n      }).catch( () => {\n        console.error(TAG_NAME, 'login', 'IM登出失败')\n      })\n    },\n    /**\n     * 监听事件\n     *\n     * @param eventCode 事件名\n     * @param handler 事件响应回调\n     */\n    on(eventCode, handler, context) {\n      this._emitter.on(eventCode, handler, context)\n    },\n\n    off(eventCode, handler) {\n      this._emitter.off(eventCode, handler)\n    },\n    /**\n     * C2C邀请通话，被邀请方会收到的回调\n     * 如果当前处于通话中，可以调用该函数以邀请第三方进入通话\n     *\n     * @param userID 被邀请方\n     * @param type 0-为之， 1-语音通话，2-视频通话\n     */\n    call({ userID, type }) {\n      // 生成房间号，拼接URL地址\n      const roomID = Math.floor(Math.random() * 100000000 + 1) // 随机生成房间号\n      this._getPushUrl(roomID)\n      this._enterTRTCRoom()\n      this.tsignaling.invite({\n        userID: userID,\n        data: JSON.stringify({\n          version: 0,\n          call_type: type,\n          room_id: roomID,\n        }),\n        timeout: 30,\n      }).then( (res) => {\n        console.log(`${TAG_NAME} call(userID: ${userID}, type: ${type}) success`)\n        this.data.invitationAccept.inviteID = res.inviteID\n        this.setData({\n          invitationAccept: this.data.invitationAccept,\n          callingFlag: true,\n        })\n      }).catch((error) => {\n        console.log(`${TAG_NAME} call(userID:${userID},type:${type}) failed', error: ${error}`)\n      })\n    },\n    /**\n     * IM群组邀请通话，被邀请方会收到的回调\n     * 如果当前处于通话中，可以继续调用该函数继续邀请他人进入通话，同时正在通话的用户会收到的回调\n     *\n     * @param userIDList 邀请列表\n     * @param type 1-语音通话，2-视频通话\n     * @param groupID IM群组ID\n     */\n    groupCall(params) {\n      this.tsignaling.inviteInGroup({\n        groupID: params.groupID,\n        inviteeList: params.userIDList,\n        timeout: 30,\n        data: JSON.stringify({\n          version: 0,\n          call_type: params.type,\n          room_id: Math.floor(Math.random() * 100000000 + 1),\n        }),\n      }).then(function(res) {\n        console.log(TAG_NAME, 'inviteInGroup OK', res)\n      }).catch(function(error) {\n        console.log(TAG_NAME, 'inviteInGroup failed', error)\n      })\n    },\n    /**\n     * 当您作为被邀请方收到 {@link TRTCCallingDelegate#onInvited } 的回调时，可以调用该函数接听来电\n     */\n    accept() {\n      // 拼接pusherURL进房\n      console.log(TAG_NAME, 'accept() inviteID: ', this.data.invitation.inviteID)\n      this.tsignaling.accept({\n        inviteID: this.data.invitation.inviteID,\n        data: JSON.stringify({\n          version: 0,\n          call_type: this.data.config.type,\n        }),\n      }).then( () => {\n        console.log('接受成功')\n      }).catch( () => {\n        console.error('接受失败')\n      })\n      this._getPushUrl(this.data.invitation.roomID)\n      this._enterTRTCRoom()\n    },\n    /**\n     * 当您作为被邀请方收到的回调时，可以调用该函数拒绝来电\n     */\n    reject() {\n      if (this.data.invitation.inviteID) {\n        this.tsignaling.reject({\n          inviteID: this.data.invitation.inviteID,\n          data: JSON.stringify({\n            version: 0,\n            call_type: this.data.config.type,\n          }),\n        }).then( (res) => {\n          console.log('demo reject OK', res)\n          this._reset()\n        }).catch( (error) => {\n          console.log('demo reject failed', error)\n        })\n      } else {\n        console.warn(`${TAG_NAME} 未收到邀请，无法拒绝`)\n        return\n      }\n    },\n    /**\n     * 当您处于通话中，可以调用该函数结束通话\n     */\n    hangup() {\n      const inviterFlag = !this.data.invitation.inviteID && this.data.invitationAccept.inviteID && true // 是否是邀请者\n      if (inviterFlag && !this.data.invitationAccept.acceptFlag && !this.data.invitationAccept.rejectFlag) {\n        console.log(TAG_NAME, 'cancel() inviteID: ', this.data.invitationAccept.inviteID)\n        this.tsignaling.cancel({\n          inviteID: this.data.invitationAccept.inviteID,\n        })\n      }\n      if (this.data.playerList.length === 0 && this.data.invitationAccept.acceptFlag) {\n        const currentTime = Date.parse(new Date())\n        // console.log('发送call_end信息', currentTime)\n        this.data._historyUserList.forEach( (user) => {\n          this.tsignaling.invite({\n            userID: user,\n            data: JSON.stringify({\n              version: 0,\n              call_type: this.data.config.type,\n              call_end: currentTime,\n            }),\n          })\n        })\n        this._emitter.emit(EVENT.CALL_END, {\n          inviteID: this.data.invitationAccept.inviteID,\n          call_end: currentTime,\n        })\n      }\n      this._reset().then( () => {\n        this._emitter.emit(EVENT.HANG_UP)\n        console.log(TAG_NAME, 'hangup() pusherConfig: ', this.data.pusherConfig)\n      })\n    },\n\n    _reset() {\n      return new Promise( (resolve, reject) => {\n        console.log(TAG_NAME, ' _reset()')\n        const result = this.userController.reset()\n        this.data.pusherConfig = {\n          pushUrl: '',\n          frontCamera: 'front',\n          enableMic: true,\n          enableCamera: true,\n          volume: 0,\n        },\n        // 清空状态\n        this.setData({\n          pusherConfig: this.data.pusherConfig,\n          soundMode: 'speaker',\n          invitation: {\n            inviteID: '',\n          },\n          playerList: result.userList,\n          streamList: result.streamList,\n          _historyUserList: [],\n          active: false,\n          callingFlag: false,\n          invitationAccept: {\n            inviteID: '',\n            acceptFlag: false,\n            rejectFlag: false,\n          },\n        }, () => {\n          resolve()\n        })\n      })\n    },\n    /**\n     *\n     * @param userID 远端用户id\n     */\n    startRemoteView(userID) {\n      this.data.streamList.forEach( (stream) => {\n        if (stream.userID === userID) {\n          stream.muteVideo = false\n          this.setData({\n            streamList: this.data.streamList,\n          }, () => {\n            console.log(`${TAG_NAME}, startRemoteView(${userID})`)\n          })\n          return\n        }\n      })\n    },\n    /**\n     * 当您收到 onUserVideoAvailable 回调为false时，可以停止渲染数据\n     *\n     * @param userID 远端用户id\n     */\n    stopRemoteView(userID) {\n      this.data.streamList.forEach( (stream) => {\n        if (stream.userID === userID) {\n          stream.muteVideo = true\n          this.setData({\n            streamList: this.data.streamList,\n          }, () => {\n            console.log(`${TAG_NAME}, stopRemoteView(${userID})`)\n          })\n          return\n        }\n      })\n    },\n    /**\n     * 您可以调用该函数开启摄像头\n     */\n    openCamera() {\n      this.data.pusherConfig.enableCamera = true\n      this.setData({\n        pusherConfig: this.data.pusherConfig,\n      }, () => {\n        console.log(`${TAG_NAME}, closeCamera() pusherConfig: ${this.data.pusherConfig}`)\n      })\n    },\n    /**\n     * 您可以调用该函数关闭摄像头\n     * 处于通话中的用户会收到回调\n     */\n    closeCamera() {\n      this.data.pusherConfig.enableCamera = false\n      this.setData({\n        pusherConfig: this.data.pusherConfig,\n      }, () => {\n        console.log(`${TAG_NAME}, closeCamera() pusherConfig: ${this.data.pusherConfig}`)\n      })\n    },\n    /**\n     * 是否静音mic\n     *\n     * @param isMute true:麦克风关闭 false:麦克风打开\n     */\n    // setMicMute(isMute) {\n    //   this.data.pusherConfig.enableMic = !isMute\n    //   this.setData({\n    //     pusherConfig: this.data.pusherConfig,\n    //   }, () => {\n    //     console.log(`${TAG_NAME}, setMicMute(${isMute}) enableMic: ${this.data.pusherConfig.enableMic}`)\n    //   })\n    // },\n    setMicMute(isMute) {\n      this.data.pusherConfig.enableMic = !isMute\n      this.setData({\n        pusherConfig: this.data.pusherConfig,\n      }, () => {\n        console.log(`${TAG_NAME}, setMicMute(${isMute}) enableMic: ${this.data.pusherConfig.enableMic}`)\n        wx.createLivePusherContext().setMICVolume({ volume: isMute ? 0 : 1 })\n      })\n    },\n\n    switchCamera(isFrontCamera) {\n      this.data.pusherConfig.frontCamera = isFrontCamera ? 'front' : 'back'\n      this.setData({\n        pusherConfig: this.data.pusherConfig,\n      }, () => {\n        console.log(`${TAG_NAME}, switchCamera(), frontCamera${this.data.pusherConfig.frontCamera}`)\n      })\n    },\n    setHandsFree(isHandsFree) {\n      this.data.soundMode = isHandsFree ? 'speaker' : 'ear'\n      this.setData({\n        soundMode: this.data.soundMode,\n      }, () => {\n        console.log(`${TAG_NAME}, setHandsFree() result: ${this.data.soundMode}`)\n      })\n    },\n\n    _toggleAudio() {\n      if (this.data.pusherConfig.enableMic) {\n        this.setMicMute(true)\n      } else {\n        this.setMicMute(false)\n      }\n    },\n\n    _toggleSoundMode() {\n      if (this.data.soundMode === 'speaker') {\n        this.setHandsFree(false)\n      } else {\n        this.setHandsFree(true)\n      }\n    },\n\n    _getPushUrl(roomId) {\n      // 拼接 puhser url rtmp 方案\n      console.log(TAG_NAME, '_getPushUrl', roomId)\n      // TODO: 解注释\n      if (ENV.IS_TRTC) {\n        // 版本高于7.0.8，基础库版本高于2.10.0 使用新的 url\n        return new Promise((resolve, reject) => {\n          this.setData({\n            active: true,\n          })\n          let roomID = ''\n          if (/^\\d+$/.test(roomId)) {\n            // 数字房间号\n            roomID = '&roomid=' + roomId\n          } else {\n            // 字符串房间号\n            roomID = '&strroomid=' + roomId\n          }\n          setTimeout(()=> {\n            const pushUrl = 'room://cloud.tencent.com/rtc?sdkappid=' + this.data.config.sdkAppID +\n                            roomID +\n                            '&userid=' + this.data.config.userID +\n                            '&usersig=' + this.data.config.userSig +\n                            '&appscene=videocall' +\n                            '&cloudenv=PRO' // ios此参数必填\n            console.warn(TAG_NAME, 'getPushUrl result:', pushUrl)\n            this.data.pusherConfig.pushUrl = pushUrl\n            this.setData({\n              pusherConfig: this.data.pusherConfig,\n            })\n            resolve(pushUrl)\n          }, 0)\n        })\n      }\n      console.error(TAG_NAME, '组件仅支持微信 App iOS >=7.0.9, Android >= 7.0.8, 小程序基础库版 >= 2.10.0')\n      console.error(TAG_NAME, '需要真机运行，开发工具不支持实时音视频')\n    },\n\n    _enterTRTCRoom() {\n      // 开始推流\n      wx.createLivePusherContext().start()\n    },\n\n    _hangUp() {\n      this.hangup()\n    },\n\n    _pusherStateChangeHandler(event) {\n      const code = event.detail.code\n      const message = event.detail.message\n      const TAG_NAME = 'TRTCCalling pusherStateChange: '\n      switch (code) {\n        case 0: // 未知状态码，不做处理\n          console.log(TAG_NAME, message, code)\n          break\n        case 1001:\n          console.log(TAG_NAME, '已经连接推流服务器', code)\n          break\n        case 1002:\n          console.log(TAG_NAME, '已经与服务器握手完毕,开始推流', code)\n          break\n        case 1003:\n          console.log(TAG_NAME, '打开摄像头成功', code)\n          break\n        case 1005:\n          console.log(TAG_NAME, '推流动态调整分辨率', code)\n          break\n        case 1006:\n          console.log(TAG_NAME, '推流动态调整码率', code)\n          break\n        case 1007:\n          console.log(TAG_NAME, '首帧画面采集完成', code)\n          break\n        case 1008:\n          console.log(TAG_NAME, '编码器启动', code)\n          break\n        case 1018:\n          console.log(TAG_NAME, '进房成功', code)\n          break\n        case 1019:\n          console.log(TAG_NAME, '退出房间', code)\n          // 20200421 iOS 仍然没有1019事件通知退房，退房事件移动到 exitRoom 方法里，但不是后端通知的退房成功\n          // this._emitter.emit(EVENT.LOCAL_LEAVE, { userID: this.data.pusher.userID })\n          break\n        case 2003:\n          console.log(TAG_NAME, '渲染首帧视频', code)\n          break\n        case 1020:\n        case 1031:\n        case 1032:\n        case 1033:\n        case 1034:\n          // 通过 userController 处理 1020 1031 1032 1033 1034\n          this.userController.userEventHandler(event)\n          break\n        case -1301:\n          console.error(TAG_NAME, '打开摄像头失败: ', code)\n          this._emitter.emit(EVENT.ERROR, { code, message })\n          break\n        case -1302:\n          console.error(TAG_NAME, '打开麦克风失败: ', code)\n          this._emitter.emit(EVENT.ERROR, { code, message })\n          break\n        case -1303:\n          console.error(TAG_NAME, '视频编码失败: ', code)\n          this._emitter.emit(EVENT.ERROR, { code, message })\n          break\n        case -1304:\n          console.error(TAG_NAME, '音频编码失败: ', code)\n          this._emitter.emit(EVENT.ERROR, { code, message })\n          break\n        case -1307:\n          console.error(TAG_NAME, '推流连接断开: ', code)\n          this._emitter.emit(EVENT.ERROR, { code, message })\n          break\n        case -100018:\n          console.error(TAG_NAME, '进房失败: userSig 校验失败，请检查 userSig 是否填写正确', code, message)\n          this._emitter.emit(EVENT.ERROR, { code, message })\n          break\n        case 5000:\n          console.log(TAG_NAME, '小程序被挂起: ', code)\n          // 20200421 iOS 微信点击胶囊圆点会触发该事件\n          // 触发 5000 后，底层SDK会退房，返回前台后会自动进房\n          break\n        case 5001:\n          // 20200421 仅有 Android 微信会触发该事件\n          console.log(TAG_NAME, '小程序悬浮窗被关闭: ', code)\n          break\n        case 1021:\n          console.log(TAG_NAME, '网络类型发生变化，需要重新进房', code)\n          break\n        case 2007:\n          console.log(TAG_NAME, '本地视频播放loading: ', code)\n          break\n        case 2004:\n          console.log(TAG_NAME, '本地视频播放开始: ', code)\n          break\n        default:\n          console.log(TAG_NAME, message, code)\n      }\n    },\n\n    _playerStateChange(event) {\n      // console.log(TAG_NAME, '_playerStateChange', event)\n      this._emitter.emit(EVENT.REMOTE_STATE_UPDATE, event)\n    },\n\n    _playerAudioVolumeNotify(event) {\n      const userID = event.target.dataset.userid\n      const volume = event.detail.volume\n      const stream = this.userController.getStream({\n        userID: userID,\n        streamType: 'main',\n      })\n      if (stream) {\n        stream.volume = volume\n      }\n      this.setData({\n        streamList: this.data.streamList,\n      }, () => {\n        this._emitter.emit(EVENT.USER_VOICE_VOLUME, {\n          userID: userID,\n          volume: volume,\n        })\n      })\n    },\n    _pusherAudioVolumeNotify(event) {\n      this.data.pusherConfig.volume = event.detail.volume\n      this._emitter.emit(EVENT.USER_VOICE_VOLUME, {\n        userID: this.data.config.userID,\n        volume: event.detail.volume,\n      })\n      this.setData({\n        pusherConfig: this.data.pusherConfig,\n      })\n    },\n  },\n\n  /**\n   * 生命周期方法\n   */\n  lifetimes: {\n    created: function() {\n      // 在组件实例刚刚被创建时执行\n      console.log(TAG_NAME, 'created', ENV)\n      this.tsignaling = new TSignaling({ SDKAppID: this.data.config.sdkAppID })\n      wx.setKeepScreenOn({\n        keepScreenOn: true,\n      })\n      MTA.App.init({\n        'appID': '500728728',\n        'eventID': '500730148',\n        'autoReport': true,\n        'statParam': true,\n        'ignoreParams': [],\n      })\n    },\n    attached: function() {\n      // 在组件实例进入页面节点树时执行\n      console.log(TAG_NAME, 'attached')\n      this.EVENT = EVENT\n      this._emitter = new EventEmitter()\n      this.userController = new UserController()\n      MTA.Page.stat()\n    },\n    ready: function() {\n      // 在组件在视图层布局完成后执行\n      console.log(TAG_NAME, 'ready')\n    },\n    detached: function() {\n      // 在组件实例被从页面节点树移除时执行\n      console.log(TAG_NAME, 'detached')\n      this._reset()\n    },\n    error: function(error) {\n      // 每当组件方法抛出错误时执行\n      console.log(TAG_NAME, 'error', error)\n    },\n  },\n  pageLifetimes: {\n    show: function() {\n    },\n    hide: function() {\n      // 组件所在的页面被隐藏时执行\n      console.log(TAG_NAME, 'hide')\n    },\n    resize: function(size) {\n      // 组件所在的页面尺寸变化时执行\n      console.log(TAG_NAME, 'resize', size)\n    },\n  },\n})\n"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/TRTCCalling.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {\n    \"TRTCCalling\": \"../../components/TRTCCalling/TRTCCalling\"\n  },\n  \"navigationStyle\": \"custom\",\n  \"disableScroll\": true\n}"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/TRTCCalling.wxml",
    "content": "<import src=\"./template/audio-template/audio-template\"></import>\n<import src=\"./template/video-template/video-template\"></import>\n\n<view class=\"TRTCCaling-container\">\n  <view wx:if=\"{{config.type === 1 && active}}\" class=\"TRTCCalling-call-audio\">\n    <!-- 语音通话 以下为语音通话模版 您可以根据您业务需求进行扩展，此处仅进行基础能力的展示 -->\n    <view style=\"width: 100%; height: 100%\">\n      <template is='audio-template' data=\"{{streamList, pusherConfig, soundMode, _pusherStateChangeHandler, _pusherAudioVolumeNotify, _playerStateChange, _playerAudioVolumeNotify, _toggleAudio, _hangUp, _toggleSoundMode}}\"></template>\n    </view>\n  </view>\n  <view wx:if=\"{{config.type === 2 && pusherConfig.pushUrl !== '' && active}}\" class=\"TRTCCalling-call\">\n    <!-- 视频通话 以下为视频通话模版 您可以根据您业务需求进行扩展，此处仅进行基础能力的展示-->\n    <view style=\"width: 100%; height: 100%\">\n      <template is='video-template' data=\"{{streamList, pusherConfig, soundMode, _pusherStateChangeHandler, _pusherAudioVolumeNotify, _playerStateChange, _playerAudioVolumeNotify, _toggleAudio, _hangUp, _toggleSoundMode}}\"></template>\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/TRTCCalling.wxss",
    "content": "@import \"./template/audio-template/audio-template.wxss\";\n@import \"./template/video-template/video-template.wxss\";\n\n.TRTCCaling-container {\n\twidth: 100vw;\n\theight: 100vh;\n\toverflow: hidden;\n\tbackground-image: url(https://mc.qcloudimg.com/static/img/7da57e0050d308e2e1b1e31afbc42929/bg.png);\n\tmargin: 0;\n}\n"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/common/constants.js",
    "content": "export const EVENT = {\n  INVITED: 'INVITED',\n  GROUP_CALL_INVITEE_LIST_UPDATE: 'GROUP_CALL_INVITEE_LIST_UPDATE',\n  USER_ENTER: 'USER_ENTER',\n  USER_LEAVE: 'USER_LEAVE',\n  REJECT: 'REJECT',\n  NO_RESP: 'NO_RESP',\n  LINE_BUSY: 'LINE_BUSY',\n  CALLING_CANCEL: 'CALLING_CANCEL',\n  CALLING_TIMEOUT: 'CALLING_TIMEOUT',\n  CALL_END: 'CALL_END',\n  USER_VIDEO_AVAILABLE: 'USER_VIDEO_AVAILABLE',\n  USER_AUDIO_AVAILABLE: 'USER_AUDIO_AVAILABLE',\n  USER_VOICE_VOLUME: 'USER_VOICE_VOLUME',\n\n  HANG_UP: 'HANG_UP',\n  ERROR: 'ERROR', // 组件内部抛出的错误\n}\n\nexport const TRTC_EVENT = {\n  REMOTE_USER_JOIN: 'REMOTE_USER_JOIN', // 远端用户进房\n  REMOTE_USER_LEAVE: 'REMOTE_USER_LEAVE', // 远端用户退房\n  REMOTE_VIDEO_ADD: 'REMOTE_VIDEO_ADD', // 远端视频流添加事件，当远端用户取消发布音频流后会收到该通知\n  REMOTE_VIDEO_REMOVE: 'REMOTE_VIDEO_REMOVE', // 远端视频流移出事件，当远端用户取消发布音频流后会收到该通知\n  REMOTE_AUDIO_ADD: 'REMOTE_AUDIO_ADD', // 远端音频流添加事件，当远端用户取消发布音频流后会收到该通知\n  REMOTE_AUDIO_REMOVE: 'REMOTE_AUDIO_REMOVE', // 远端音频流移除事件，当远端用户取消发布音频流后会收到该通知\n  REMOTE_STATE_UPDATE: 'REMOTE_STATE_UPDATE', // 远端用户播放状态变更\n  LOCAL_NET_STATE_UPDATE: 'LOCAL_NET_STATE_UPDATE', // 本地推流网络状态变更\n  REMOTE_NET_STATE_UPDATE: 'REMOTE_NET_STATE_UPDATE', // 远端用户网络状态变更\n  LOCAL_AUDIO_VOLUME_UPDATE: 'LOCAL_AUDIO_VOLUME_UPDATE', // 本地音量变更\n  REMOTE_AUDIO_VOLUME_UPDATE: 'REMOTE_AUDIO_VOLUME_UPDATE', // 远端用户音量变更\n}\n\nexport const DEFAULT_PLAYER_CONFIG = {\n  src: '',\n  mode: 'RTC',\n  autoplay: true, // 7.0.9 必须设置为true，否则 Android 有概率调用play()失败\n  muteAudio: false, // 默认不拉取音频，需要手动订阅，如果要快速播放，需要设置false\n  muteVideo: false, // 默认不拉取视频，需要手动订阅，如果要快速播放，需要设置false\n  orientation: 'vertical', // 画面方向 vertical horizontal\n  objectFit: 'fillCrop', // 填充模式，可选值有 contain，fillCrop\n  enableBackgroundMute: false, // 进入后台时是否静音（已废弃，默认退台静音）\n  minCache: 0.6, // 最小缓冲区，单位s（RTC 模式推荐 0.2s）\n  maxCache: 0.8, // 最大缓冲区，单位s（RTC 模式推荐 0.8s）\n  soundMode: 'speaker', // 声音输出方式 ear speaker\n  enableRecvMessage: 'false', // 是否接收SEI消息\n  autoPauseIfNavigate: true, // 当跳转到其它小程序页面时，是否自动暂停本页面的实时音视频播放\n  autoPauseIfOpenNative: true, // 当跳转到其它微信原生页面时，是否自动暂停本页面的实时音视频播放\n}\n"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/controller/user-controller.js",
    "content": "import Event from '../utils/event.js'\nimport User from '../model/user.js'\nimport Stream from '../model/stream.js'\nimport { TRTC_EVENT } from '../common/constants.js'\n\nconst TAG_NAME = 'UserController'\n/**\n * 通讯成员管理\n */\nclass UserController {\n  constructor(componentContext) {\n    // userMap 用于存储完整的数据结构\n    this.userMap = new Map()\n    // userList 用于存储简化的用户数据 Object，包括 {userID hasMainAudio hasMainVideo hasAuxAudio hasAuxVideo}\n    this.userList = []\n    // streamList 存储steam 对象列表，用于 trtc-room 渲染 player\n    this.streamList = []\n    this._emitter = new Event()\n    this.componentContext = componentContext\n  }\n  userEventHandler(event) {\n    const code = event.detail.code\n    let data\n    if (event.detail.message && typeof event.detail.message === 'string') {\n      try {\n        data = JSON.parse(event.detail.message)\n      } catch (exception) {\n        console.warn(TAG_NAME, 'userEventHandler 数据格式错误', exception)\n        return false\n      }\n    } else {\n      console.warn(TAG_NAME, 'userEventHandler 数据格式错误')\n      return false\n    }\n    switch (code) {\n      case 1031:\n        // console.log(TAG_NAME, '远端用户进房通知：', code)\n        // 1031 有新用户\n        // {\n        //   \"userlist\":[\n        //          {\n        //              \"userid\":\"webrtc11\"\n        //          }\n        //      ]\n        // }\n        this.addUser(data)\n        break\n      case 1032:\n        // console.log(TAG_NAME, '远端用户退房通知：', code)\n        // 1032 有用户退出\n        this.removeUser(data)\n        break\n      case 1033:\n        // console.log(TAG_NAME, '远端用户视频状态位变化通知：', code)\n        // 1033 用户视频状态变化，新增stream或者更新stream 状态\n        // {\n        //   \"userlist\":[\n        //          {\n        //              \"userid\":\"webrtc11\",\n        //              \"playurl\":\" room://rtc.tencent.com?userid=xxx&streamtype=main\",\n        //              \"streamtype\":\"main\",\n        //              \"hasvideo\":true\n        //          }\n        //      ]\n        // }\n        this.updateUserVideo(data)\n        break\n      case 1034:\n        // console.log(TAG_NAME, '远端用户音频状态位变化通知：', code)\n        // 1034 用户音频状态变化\n        // {\n        //   \"userlist\":[\n        //          {\n        //              \"userid\":\"webrtc11\",\n        //              \"playurl\":\" room://rtc.tencent.com?userid=xxx&streamtype=main\",\n        //              \"hasaudio\":false\n        //          }\n        //      ]\n        // }\n        this.updateUserAudio(data)\n        break\n    }\n  }\n  /**\n   * 处理用户进房事件\n   * @param {Object} data pusher 下发的数据\n   */\n  addUser(data) {\n    // console.log(TAG_NAME, 'addUser', data)\n    const incomingUserList = data.userlist\n    const userMap = this.userMap\n    if (Array.isArray(incomingUserList) && incomingUserList.length > 0) {\n      incomingUserList.forEach((item) => {\n        const userID = item.userid\n        // 已经在 map 中的用户\n        let user = this.getUser(userID)\n        if (!user) {\n          // 新增用户\n          user = new User({ userID: userID })\n          this.userList.push({\n            userID: userID,\n          })\n        }\n        userMap.set(userID, user)\n        this._emitter.emit(TRTC_EVENT.REMOTE_USER_JOIN, { userID: userID, userList: this.userList })\n        // console.log(TAG_NAME, 'addUser', item, userMap.get(userID), this.userMap)\n      })\n    }\n  }\n  /**\n   * 处理用户退房事件\n   * @param {Object} data pusher 下发的数据 {userlist}\n   */\n  removeUser(data) {\n    // console.log(TAG_NAME, 'removeUser', data)\n    const incomingUserList = data.userlist\n    if (Array.isArray(incomingUserList) && incomingUserList.length > 0) {\n      incomingUserList.forEach((item) => {\n        const userID = item.userid\n        let user = this.getUser(userID)\n        // 偶现SDK触发退房事件前没有触发进房事件\n        if (!user || !user.streams) {\n          return\n        }\n        // 从userList 里删除指定的用户和 stream\n        this._removeUserAndStream(userID)\n        // 重置\n        user.streams['main'] && user.streams['main'].reset()\n        user.streams['aux'] && user.streams['aux'].reset()\n        // 用户退出，释放引用，外部调用该 user 所有stream 的 playerContext.stop() 方法停止播放\n        // TODO 触发时机提前了，方便外部用户做出处理，时机仍需进一步验证\n        this._emitter.emit(TRTC_EVENT.REMOTE_USER_LEAVE, { userID: userID, userList: this.userList, streamList: this.streamList })\n        user = undefined\n        this.userMap.delete(userID)\n        // console.log(TAG_NAME, 'removeUser', this.userMap)\n      })\n    }\n  }\n  /**\n   * 处理用户视频通知事件\n   * @param {Object} data pusher 下发的数据 {userlist}\n   */\n  updateUserVideo(data) {\n    console.log(TAG_NAME, 'updateUserVideo', data)\n    const incomingUserList = data.userlist\n    if (Array.isArray(incomingUserList) && incomingUserList.length > 0) {\n      incomingUserList.forEach((item) => {\n        const userID = item.userid\n        const streamType = item.streamtype\n        const streamID = userID + '_' + streamType\n        const hasVideo = item.hasvideo\n        const src = item.playurl\n        const user = this.getUser(userID)\n        // 更新指定用户的属性\n        if (user) {\n          // 查找对应的 stream\n          let stream = user.streams[streamType]\n          console.log(TAG_NAME, 'updateUserVideo start', user, streamType, stream)\n          // 常规逻辑\n          // 新来的stream，新增到 user.steams 和 streamList，streamList 包含所有用户(有音频或视频)的 stream\n          if (!stream) {\n            // 不在 user streams 里，需要新建\n            user.streams[streamType] = stream = new Stream({ userID, streamID, hasVideo, src, streamType })\n            this._addStream(stream)\n          } else {\n            // 更新 stream 属性\n            stream.setProperty({ hasVideo })\n            // if (!hasVideo && !stream.hasAudio) {\n            //   this._removeStream(stream)\n            // }\n            // or\n            // if (hasVideo) {\n            //   stream.setProperty({ hasVideo })\n            // } else if (!stream.hasAudio) {\n            //   // hasVideo == false && hasAudio == false\n            //   this._removeStream(stream)\n            // }\n          }\n          // 更新所属user 的 hasXxx 值\n          this.userList.find((item)=>{\n            if (item.userID === userID) {\n              item[`has${streamType.replace(/^\\S/, (s) => s.toUpperCase())}Video`] = hasVideo\n              return true\n            }\n          })\n          console.log(TAG_NAME, 'updateUserVideo end', user, streamType, stream)\n          const eventName = hasVideo ? TRTC_EVENT.REMOTE_VIDEO_ADD : TRTC_EVENT.REMOTE_VIDEO_REMOVE\n          this._emitter.emit(eventName, { stream: stream, streamList: this.streamList, userList: this.userList })\n          // console.log(TAG_NAME, 'updateUserVideo', user, stream, this.userMap)\n        }\n      })\n    }\n  }\n  /**\n   * 处理用户音频通知事件\n   * @param {Object} data pusher 下发的数据 {userlist}\n   */\n  updateUserAudio(data) {\n    // console.log(TAG_NAME, 'updateUserAudio', data)\n    const incomingUserList = data.userlist\n    if (Array.isArray(incomingUserList) && incomingUserList.length > 0) {\n      incomingUserList.forEach((item) => {\n        const userID = item.userid\n        // 音频只跟着 stream main ，这里只修改 main\n        const streamType = 'main'\n        const streamID = userID + '_' + streamType\n        const hasAudio = item.hasaudio\n        const src = item.playurl\n        const user = this.getUser(userID)\n        if (user) {\n          let stream = user.streams[streamType]\n          // if (!stream) {\n          //   user.streams[streamType] = stream = new Stream({ streamType: streamType })\n          //   this._addStream(stream)\n          // }\n\n          // 常规逻辑\n          // 新来的stream，新增到 user.steams 和 streamList，streamList 包含所有用户的 stream\n          if (!stream) {\n            // 不在 user streams 里，需要新建\n            user.streams[streamType] = stream = new Stream({ userID, streamID, hasAudio, src, streamType })\n            this._addStream(stream)\n          } else {\n            // 更新 stream 属性\n            stream.setProperty({ hasAudio })\n            // if (!hasAudio && !stream.hasVideo) {\n            //   this._removeStream(stream)\n            // }\n            // or\n            // if (hasAudio) {\n            //   stream.setProperty({ hasAudio })\n            // } else if (!stream.hasVideo) {\n            // // hasVideo == false && hasAudio == false\n            //   this._removeStream(stream)\n            // }\n          }\n\n          // stream.userID = userID\n          // stream.streamID = userID + '_' + streamType\n          // stream.hasAudio = hasAudio\n          // stream.src = src\n          // 更新所属 user 的 hasXxx 值\n          this.userList.find((item)=>{\n            if (item.userID === userID) {\n              item[`has${streamType.replace(/^\\S/, (s) => s.toUpperCase())}Audio`] = hasAudio\n              return true\n            }\n          })\n          const eventName = hasAudio ? TRTC_EVENT.REMOTE_AUDIO_ADD : TRTC_EVENT.REMOTE_AUDIO_REMOVE\n          this._emitter.emit(eventName, { stream: stream, streamList: this.streamList, userList: this.userList })\n          // console.log(TAG_NAME, 'updateUserAudio', user, stream, this.userMap)\n        }\n      })\n    }\n  }\n  /**\n   *\n   * @param {String} userID 用户ID\n   * @returns {Object}\n   */\n  getUser(userID) {\n    return this.userMap.get(userID)\n  }\n  getStream({ userID, streamType }) {\n    const user = this.userMap.get(userID)\n    if (user) {\n      return user.streams[streamType]\n    }\n    return undefined\n  }\n  getUserList() {\n    return this.userList\n  }\n  getStreamList() {\n    return this.streamList\n  }\n  /**\n   * 重置所有user 和 steam\n   * @returns {Object}\n   */\n  reset() {\n    this.streamList.forEach((item)=>{\n      item.reset()\n    })\n    this.streamList = []\n    this.userList = []\n    this.userMap.clear()\n    return {\n      userList: this.userList,\n      streamList: this.streamList,\n    }\n  }\n  on(eventCode, handler, context) {\n    this._emitter.on(eventCode, handler, context)\n  }\n  off(eventCode, handler) {\n    this._emitter.off(eventCode, handler)\n  }\n  /**\n   * 删除用户和所有的 stream\n   * @param {String} userID 用户ID\n   */\n  _removeUserAndStream(userID) {\n    this.streamList = this.streamList.filter((item)=>{\n      return item.userID !== userID && item.userID !== ''\n    })\n    this.userList = this.userList.filter((item)=>{\n      return item.userID !== userID\n    })\n  }\n  _addStream(stream) {\n    if (!this.streamList.includes(stream)) {\n      this.streamList.push(stream)\n    }\n  }\n  _removeStream(stream) {\n    console.warn('==========', stream)\n    this.streamList = this.streamList.filter((item)=>{\n      if (item.userID === stream.userID && item.streamType === stream.streamType) {\n        return false\n      }\n      return true\n    })\n    const user = this.getUser(stream.userID)\n    user.streams[stream.streamType] = undefined\n  }\n}\n\nexport default UserController\n"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/libs/mta_analysis.js",
    "content": "var MTA_CONFIG={app_id:\"\",event_id:\"\",api_base:\"https://pingtas.qq.com/pingd\",prefix:\"_mta_\",version:\"1.3.10\",stat_share_app:!1,stat_pull_down_fresh:!1,stat_reach_bottom:!1,stat_param:!0};function getNetworkType(a){wx.getNetworkType({success:function(b){a(b.networkType)}})}\nfunction getSystemInfo(){var a=wx.getSystemInfoSync();return{adt:encodeURIComponent(a.model),scl:a.pixelRatio,scr:a.windowWidth+\"x\"+a.windowHeight,lg:a.language,fl:a.version,jv:encodeURIComponent(a.system),tz:encodeURIComponent(a.platform)}}function getUID(){try{return wx.getStorageSync(MTA_CONFIG.prefix+\"auid\")}catch(a){}}function setUID(){try{var a=getRandom();wx.setStorageSync(MTA_CONFIG.prefix+\"auid\",a);return a}catch(b){}}\nfunction getSID(){try{return wx.getStorageSync(MTA_CONFIG.prefix+\"ssid\")}catch(a){}}function setSID(){try{var a=\"s\"+getRandom();wx.setStorageSync(MTA_CONFIG.prefix+\"ssid\",a);return a}catch(b){}}function getRandom(a){for(var b=[0,1,2,3,4,5,6,7,8,9],c=10;1<c;c--){var d=Math.floor(10*Math.random()),f=b[d];b[d]=b[c-1];b[c-1]=f}for(c=d=0;5>c;c++)d=10*d+b[c];return(a||\"\")+(d+\"\"+ +new Date)}\nfunction getPagePath(){try{var a=getCurrentPages(),b=\"/\";0<a.length&&(b=a.pop().__route__);return b}catch(c){console.log(\"get current page path error:\"+c)}}function getMainInfo(){var a={dm:\"wechat.apps.xx\",url:encodeURIComponent(getPagePath()+getQuery(MTA.Data.pageQuery)),pvi:\"\",si:\"\",ty:0};a.pvi=function(){var b=getUID();b||(b=setUID(),a.ty=1);return b}();a.si=function(){var a=getSID();a||(a=setSID());return a}();return a}\nfunction getBasicInfo(){var a=getSystemInfo();getNetworkType(function(a){try{wx.setStorageSync(MTA_CONFIG.prefix+\"ntdata\",a)}catch(c){}});a.ct=wx.getStorageSync(MTA_CONFIG.prefix+\"ntdata\")||\"4g\";return a}function getExtentInfo(){var a=MTA.Data.userInfo;var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c+\"=\"+a[c]);a=b.join(\";\");return{r2:MTA_CONFIG.app_id,r4:\"wx\",ext:\"v=\"+MTA_CONFIG.version+(null!==a&&\"\"!==a?\";ui=\"+encodeURIComponent(a):\"\")}}\nfunction getQuery(a){if(!MTA_CONFIG.stat_param||!a)return\"\";a=ignoreParams(a);var b=[],c;for(c in a)b.push(c+\"=\"+a[c]);return 0<b.length?\"?\"+b.join(\"&\"):\"\"}function ignoreParams(a){if(1>MTA_CONFIG.ignore_params.length)return a;var b={},c;for(c in a)0<=MTA_CONFIG.ignore_params.indexOf(c)||(b[c]=a[c]);return b}\nfunction initOnload(){var a=Page;Page=function(b){var c=b.onLoad;b.onLoad=function(a){c&&c.call(this,a);MTA.Data.lastPageQuery=MTA.Data.pageQuery;MTA.Data.pageQuery=a;MTA.Data.lastPageUrl=MTA.Data.pageUrl;MTA.Data.pageUrl=getPagePath();MTA.Data.show=!1;MTA.Page.init()};a(b)}}\nvar MTA={App:{init:function(a){\"appID\"in a&&(MTA_CONFIG.app_id=a.appID);\"eventID\"in a&&(MTA_CONFIG.event_id=a.eventID);\"statShareApp\"in a&&(MTA_CONFIG.stat_share_app=a.statShareApp);\"statPullDownFresh\"in a&&(MTA_CONFIG.stat_pull_down_fresh=a.statPullDownFresh);\"statReachBottom\"in a&&(MTA_CONFIG.stat_reach_bottom=a.statReachBottom);\"ignoreParams\"in a&&(MTA_CONFIG.ignore_params=a.ignoreParams);\"statParam\"in a&&(MTA_CONFIG.stat_param=a.statParam);setSID();try{\"lauchOpts\"in a&&(MTA.Data.lanchInfo=a.lauchOpts,\n  MTA.Data.lanchInfo.landing=1)}catch(b){}\"autoReport\"in a&&a.autoReport&&initOnload()}},Page:{init:function(){var a=getCurrentPages()[getCurrentPages().length-1];a.onShow&&!function(){var b=a.onShow;a.onShow=function(){if(!0===MTA.Data.show){var a=MTA.Data.lastPageQuery;MTA.Data.lastPageQuery=MTA.Data.pageQuery;MTA.Data.pageQuery=a;MTA.Data.lastPageUrl=MTA.Data.pageUrl;MTA.Data.pageUrl=getPagePath()}MTA.Data.show=!0;MTA.Page.stat();b.apply(this,arguments)}}();MTA_CONFIG.stat_pull_down_fresh&&a.onPullDownRefresh&&\n!function(){var b=a.onPullDownRefresh;a.onPullDownRefresh=function(){MTA.Event.stat(MTA_CONFIG.prefix+\"pulldownfresh\",{url:a.__route__});b.apply(this,arguments)}}();MTA_CONFIG.stat_reach_bottom&&a.onReachBottom&&!function(){var b=a.onReachBottom;a.onReachBottom=function(){MTA.Event.stat(MTA_CONFIG.prefix+\"reachbottom\",{url:a.__route__});b.apply(this,arguments)}}();MTA_CONFIG.stat_share_app&&a.onShareAppMessage&&!function(){var b=a.onShareAppMessage;a.onShareAppMessage=function(){MTA.Event.stat(MTA_CONFIG.prefix+\n  \"shareapp\",{url:a.__route__});return b.apply(this,arguments)}}()},multiStat:function(a,b){if(1==b)MTA.Page.stat(a),!0;else{var c=getCurrentPages()[getCurrentPages().length-1];c.onShow&&!function(){var b=c.onShow;c.onShow=function(){MTA.Page.stat(a);b.call(this,arguments)}}()}},stat:function(a){if(\"\"!=MTA_CONFIG.app_id){var b=[],c=getExtentInfo();a&&(c.r2=a);a=[getMainInfo(),c,getBasicInfo()];if(MTA.Data.lanchInfo){a.push({ht:MTA.Data.lanchInfo.scene});MTA.Data.pageQuery&&MTA.Data.pageQuery._mta_ref_id&&\na.push({rarg:MTA.Data.pageQuery._mta_ref_id});try{1==MTA.Data.lanchInfo.landing&&(c.ext+=\";lp=1\",MTA.Data.lanchInfo.landing=0)}catch(e){}}a.push({rdm:\"/\",rurl:0>=MTA.Data.lastPageUrl.length?MTA.Data.pageUrl+getQuery(MTA.Data.lastPageQuery):encodeURIComponent(MTA.Data.lastPageUrl+getQuery(MTA.Data.lastPageQuery))});a.push({rand:+new Date});c=0;for(var d=a.length;c<d;c++)for(var f in a[c])a[c].hasOwnProperty(f)&&b.push(f+\"=\"+(\"undefined\"==typeof a[c][f]?\"\":a[c][f]));wx.request({url:MTA_CONFIG.api_base+\n\"?\"+b.join(\"&\").toLowerCase()})}}},Event:{stat:function(a,b){if(\"\"!=MTA_CONFIG.event_id){var c=[],d=getMainInfo(),f=getExtentInfo();d.dm=\"wxapps.click\";d.url=a;f.r2=MTA_CONFIG.event_id;var e=\"undefined\"===typeof b?{}:b;var k=[],g;for(g in e)e.hasOwnProperty(g)&&k.push(encodeURIComponent(g)+\"=\"+encodeURIComponent(e[g]));e=k.join(\";\");f.r5=e;e=0;d=[d,f,getBasicInfo(),{rand:+new Date}];for(f=d.length;e<f;e++)for(var h in d[e])d[e].hasOwnProperty(h)&&c.push(h+\"=\"+(\"undefined\"==typeof d[e][h]?\"\":d[e][h]));\n  wx.request({url:MTA_CONFIG.api_base+\"?\"+c.join(\"&\").toLowerCase()})}}},Data:{userInfo:null,lanchInfo:null,pageQuery:null,lastPageQuery:null,pageUrl:\"\",lastPageUrl:\"\",show:!1}};module.exports=MTA;"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/model/stream.js",
    "content": "// 一个stream 对应一个 player\nimport { DEFAULT_PLAYER_CONFIG } from '../common/constants.js'\n\nclass Stream {\n  constructor(options) {\n    Object.assign(this, DEFAULT_PLAYER_CONFIG, {\n      userID: '', // 该stream 关联的userID\n      streamType: '', // stream 类型 [main small] aux\n      streamID: '', // userID + '_' + streamType\n      isVisible: true, // 手Q初始化时不能隐藏 puser和player 否则黑屏。iOS 微信初始化时不能隐藏，否则同层渲染失败，player会置顶\n      hasVideo: false,\n      hasAudio: false,\n      volume: 0, // 音量大小 0～100\n      playerContext: undefined, // playerContext 依赖component context来获取，目前只能在渲染后获取\n    }, options)\n  }\n  setProperty(options) {\n    Object.assign(this, options)\n  }\n  reset() {\n    if (this.playerContext) {\n      this.playerContext.stop()\n      this.playerContext = undefined\n    }\n    Object.assign(this, DEFAULT_PLAYER_CONFIG, {\n      userID: '', // 该stream 关联的userID\n      streamType: '', // stream 类型 [main small] aux\n      streamID: '',\n      isVisible: true,\n      hasVideo: false,\n      hasAudio: false,\n      volume: 0, // 音量大小 0～100\n      playerContext: undefined,\n    })\n  }\n}\n\nexport default Stream\n"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/model/user.js",
    "content": "class User {\n  constructor(options) {\n    Object.assign(this, {\n      userID: '',\n      // hasMainStream: false, // 触发 1034 且stream type 为 main 即为true\n      // hasAuxStream: false, // 触发 1034 且stream type 为 aux 即为true\n      // hasSmallStream: false, // 触发 1034 且stream type 为 small 即为true\n      streams: {\n        // main: mainStream\n        // aux: auxStream\n      }, // 有0~2个Stream， 进房没有推流，main aux， small 特殊处理，small 和 main 同时只播放一路\n      // stream 是用于渲染 live-player 的数据源\n    }, options)\n  }\n}\n\nexport default User\n"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/template/audio-template/audio-template.wxml",
    "content": "<!-- 语音通话模版占位样式 您应根据自己的业务需要进行调整 -->\n<template name=\"audio-template\">\n    <view  class=\"audio-place-holder\">\n        <view class=\"{{'TRTCCalling-call-audio-img' + streamList.length}}\">\n            <image src=\"./static/avatar1_100.png\" class=\"img-place-holder\">\n                <view class=\"audio-volume\">\n                <image wx:if=\"{{pusherConfig.volume>10}}\" class=\"image\" src=\"./static/micro-open.png\"></image>\n                </view>\n            </image>\n        </view>\n        <view class=\"{{'TRTCCalling-call-audio-img' + streamList.length}}\" wx:for=\"{{streamList}}\" wx:key=\"userID\">\n            <image src=\"./static/avatar2_100.png\" class=\"img-place-holder\">\n                <view class=\"audio-volume\">\n                <image wx:if=\"{{item.volume>10}}\" class=\"image\" src=\"./static/micro-open.png\"></image>\n                </view>\n            </image>\n        </view>\n        <live-pusher\n        class=\"pusher-audio\"\n        id=\"pusher\"\n        mode=\"RTC\"\n        autopush=\"{{true}}\"\n        url=\"{{pusherConfig.pushUrl}}\"\n        audio-volume-type=\"voicecall\"\n        enable-camera=\"{{false}}\"\n        enable-mic=\"{{true}}\"\n        bindstatechange=\"_pusherStateChangeHandler\"\n        bindaudiovolumenotify=\"_pusherAudioVolumeNotify\"\n        />\n        <view wx:for=\"{{streamList}}\" wx:key=\"streamID\" class=\"view-container player-container player-audio\">\n        <live-player\n            class=\"player-audio\" \n            id=\"{{item.streamID}}\"\n            data-userid=\"{{item.userID}}\"\n            data-streamid=\"{{item.streamID}}\"\n            data-streamtype=\"{{item.streamType}}\"\n            src= \"{{item.src}}\"\n            mode= \"RTC\"\n            object-fit=\"fillCrop\"\n            autoplay= \"{{true}}\"\n            mute-video=\"{{true}}\"\n            mute-audio=\"{{item.muteAudio}}\"\n            min-cache= \"0.2\"\n            max-cache= \"0.8\"\n            sound-mode= \"{{soundMode}}\"\n            auto-pause-if-navigate= \"{{item.autoPauseIfNavigate}}\"\n            auto-pause-if-open-native= \"{{item.autoPauseIfOpenNative}}\"\n            bindstatechange=\"_playerStateChange\"\n            bindaudiovolumenotify=\"_playerAudioVolumeNotify\"\n        />\n        </view>\n    </view>\n    <view class=\"handle-btns\">\n        <view class=\"btn-normal\" bindtap=\"_toggleAudio\">\n            <image class=\"btn-image\" src=\"{{pusherConfig.enableMic ? './static/audio-true.png': './static/audio-false.png'}} \"></image>\n        </view>\n        <view class=\"btn-hangup\" bindtap=\"_hangUp\">\n            <image class=\"btn-image\" src=\"./static/hangup.png\"></image>\n        </view>\n        <view class=\"btn-normal\" bindtap=\"_toggleSoundMode\">\n            <image class=\"btn-image\" src=\"{{soundMode === 'ear' ? './static/phone.png': './static/speaker-true.png'}} \"></image>\n        </view>\n    </view>\n</template>"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/template/audio-template/audio-template.wxss",
    "content": ".audio-place-holder {\n    width: 100%;\n    height: 100%;\n}\n\n.audio-place-holder .TRTCCalling-call-audio-img0 {\n  margin: 30vw 30vw;\n  width: 40vw;\n  height: 40vw;\n}\n.audio-place-holder  .TRTCCalling-call-audio-img1 {\n  display: inline-block;\n  width: 40vw;\n  height: 40vw;\n  margin-left: 6.5vw;\n  margin-top: 40vw;\n}\n\n.audio-place-holder .pusher-audio {\n  width: 0;\n  height: 0;\n}\n\n.audio-place-holder .player-audio{\n  width: 0;\n  height: 0;\n}\n\n.audio-place-holder .audio-volume {\n  position: absolute;\n  bottom: 20rpx;\n  left: 20rpx;\n  width: 36rpx;\n  height: 36rpx;\n}\n\n.audio-place-holder .audio-active {\n  position: absolute;\n  left: 0;\n  bottom: 0;\n  width: 100%;\n  height: 0;\n  overflow: hidden;\n}\n\n.audio-place-holder .audio-active .image{\n  position: absolute;\n  bottom: 0;\n}\n\n.audio-place-holder .img-place-holder {\n  position: absolute;\n  width: 40vw;\n  height: 40vw;\n}\n\n.audio-place-holder .handle-btns {\n    position: absolute;\n    z-index: 3;\n    bottom: 3vh;\n    width: 100vw;\n    z-index: 3;\n    display: flex;\n    flex-direction: row;\n    justify-content: space-around;\n  }\n  \n  .audio-place-holder .btn-normal {\n    width: 8vh;\n    height: 8vh;\n    box-sizing: border-box;\n    display: flex;\n    background: white;\n    justify-content: center;\n    align-items: center;\n    border-radius: 50%;\n  }\n  .audio-place-holder .btn-image{\n    width: 4vh;\n    height: 4vh;\n  }\n  .audio-place-holder .btn-hangup  {\n    width: 8vh;\n    height: 8vh;\n    background: #f75c45;\n    box-sizing: border-box;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    border-radius: 50%;\n  }\n  "
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/template/video-template/video-template.wxml",
    "content": "<template name=\"video-template\">\n\t<live-pusher\n\t\tclass=\"pusher-video\"\n\t\tid=\"pusher\"\n\t\tautopush=\"{{true}}\"\n\t\turl=\"{{pusherConfig.pushUrl}}\"\n\t\tenable-camera=\"{{pusherConfig.enableCamera}}\"\n\t\taudio-volume-type=\"voicecall\"\n\t\tbeauty=\"5\"\n\t\tenable-mic=\"{{true}}\"\n\t\tbindstatechange=\"_pusherStateChangeHandler\"\n\t\tbindaudiovolumenotify=\"_pusherAudioVolumeNotify\"\n\t/>\n\t<view wx:for=\"{{streamList}}\" wx:key=\"streamID\" class=\"view-container player-container\">\n\t\t<live-player\n\t\t\tclass=\"{{'player'+streamList.length}}\"\n\t\t\tid=\"{{item.streamID}}\"\n\t\t\tdata-userid=\"{{item.userID}}\"\n\t\t\tdata-streamid=\"{{item.streamID}}\"\n\t\t\tdata-streamtype=\"{{item.streamType}}\"\n\t\t\tsrc= \"{{item.src}}\"\n\t\t\tmode= \"RTC\"\n\t\t\tobject-fit=\"fillCrop\"\n\t\t\tautoplay= \"{{true}}\"\n\t\t\tmute-video=\"{{item.muteVideo}}\"\n\t\t\tmute-audio=\"{{item.muteAudio}}\"\n\t\t\tmin-cache= \"0.2\"\n\t\t\tmax-cache= \"0.8\"\n\t\t\tsound-mode= \"{{soundMode}}\"\n\t\t\tauto-pause-if-navigate= \"{{item.autoPauseIfNavigate}}\"\n\t\t\tauto-pause-if-open-native= \"{{item.autoPauseIfOpenNative}}\"\n\t\t\tbindstatechange=\"_playerStateChange\"\n\t\t\tbindaudiovolumenotify  =\"_playerAudioVolumeNotify\"\n\t\t/>\n\t</view>\n\t<view class=\"handle-btns\">\n\t\t<view class=\"btn-normal\" bindtap=\"_toggleAudio\">\n\t\t\t<image class=\"btn-image\" src=\"{{pusherConfig.enableMic? './static/audio-true.png': './static/audio-false.png'}} \"></image>\n\t\t</view>\n\t\t<view class=\"btn-hangup\" bindtap=\"_hangUp\">\n\t\t\t<image class=\"btn-image\" src=\"./static/hangup.png\"></image>\n\t\t</view>\n\t\t<view class=\"btn-normal\" bindtap=\"_toggleSoundMode\">\n\t\t\t<image class=\"btn-image\" src=\"{{soundMode === 'ear' ? './static/phone.png': './static/speaker-true.png'}} \"></image>\n\t\t</view>\n\t</view>\n</template>"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/template/video-template/video-template.wxss",
    "content": ".pusher-video {\n  position: absolute;\n  right: 2vw;\n  top: 2vw;\n  width: 160px;\n  height: 200px;\n  z-index: 3;\n}\n\n.player1 {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  background-color: #f75c45;\n  z-index: 1;\n}\n\n.player2 {\n  width: 40vw;\n  height: 40vw;\n  background-color: #f75c45;\n  z-index: 1;\n}\n\n.handle-btns {\n  position: absolute;\n  z-index: 3;\n  bottom: 3vh;\n  width: 100vw;\n  z-index: 3;\n  display: flex;\n  flex-direction: row;\n  justify-content: space-around;\n}\n\n.btn-normal {\n  width: 8vh;\n  height: 8vh;\n  box-sizing: border-box;\n  display: flex;\n  background: white;\n  justify-content: center;\n  align-items: center;\n  border-radius: 50%;\n}\n.btn-image{\n  width: 4vh;\n  height: 4vh;\n}\n.btn-hangup  {\n  width: 8vh;\n  height: 8vh;\n  background: #f75c45;\n  box-sizing: border-box;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  border-radius: 50%;\n}\n\n.TRTCCalling-call-audio {\n  width: 100%;\n  height: 100%;\n}\n\nimage {\n  width: 100%;\n  height: 100%;\n}"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/utils/compare-version.js",
    "content": "export default function compareVersion(v1, v2) {\n  v1 = v1.split('.')\n  v2 = v2.split('.')\n  const len = Math.max(v1.length, v2.length)\n  while (v1.length < len) {\n    v1.push('0')\n  }\n  while (v2.length < len) {\n    v2.push('0')\n  }\n  for (let i = 0; i < len; i++) {\n    const num1 = parseInt(v1[i])\n    const num2 = parseInt(v2[i])\n    if (num1 > num2) {\n      return 1\n    } if (num1 < num2) {\n      return -1\n    }\n  }\n  return 0\n}\n"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/utils/environment.js",
    "content": "import compareVersion from './compare-version.js'\nconst TAG_NAME = 'TRTC-ROOM'\n\nconst env = wx ? wx : qq\nif (!env) {\n  console.error(TAG_NAME, '不支持当前小程序环境')\n}\nconst systemInfo = env.getSystemInfoSync()\nconst safeArea = systemInfo.safeArea\nif (systemInfo.system === 'iOS 13.3' || (systemInfo.model === 'iPhoneX' && systemInfo.system === 'iOS 13.3.1') ) {\n  // audio-volume-type = media\n  console.log('use media audio volume type')\n}\nconsole.log(TAG_NAME, 'SystemInfo', systemInfo)\nlet isNewVersion\nif (typeof qq !== 'undefined') {\n  isNewVersion = true\n} else if (typeof wx !== 'undefined') {\n  if (compareVersion(systemInfo.version, '7.0.8') >= 0 || // mobile pc\n  (compareVersion(systemInfo.version, '2.4.0') >= 0 && compareVersion(systemInfo.version, '6.0.0') < 0) && // mac os\n  compareVersion(systemInfo.SDKVersion, '2.10.0') >= 0) {\n    isNewVersion = true\n  } else {\n    isNewVersion = false\n  }\n}\n\nexport const IS_TRTC = isNewVersion\nexport const IS_QQ = typeof qq !== 'undefined'\nexport const IS_WX = typeof wx !== 'undefined'\nexport const IS_IOS = /iOS/i.test(systemInfo.system)\nexport const IS_ANDROID = /Android/i.test(systemInfo.system)\nexport const IS_MAC = /mac/i.test(systemInfo.system)\nexport const APP_VERSION = systemInfo.version\nexport const LIB_VERSION = (function() {\n  if (systemInfo.SDKBuild) {\n    return systemInfo.SDKVersion + '-' + systemInfo.SDKBuild\n  }\n  return systemInfo.SDKVersion\n})()\n\nlet isFullscreenDevie = false\nif (systemInfo.screenHeight > safeArea.bottom) {\n// if (/iphone\\s{0,}x/i.test(systemInfo.model)) {\n  isFullscreenDevie = true\n}\n\nexport const IS_FULLSCREEN_DEVICE = isFullscreenDevie\n\nconsole.log(TAG_NAME, 'APP_VERSION:', APP_VERSION, ' LIB_VERSION:', LIB_VERSION, ' is new version:', IS_TRTC)\n"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/utils/event.js",
    "content": "class EventEmitter {\n  on(event, fn, ctx) {\n    if (typeof fn !== 'function') {\n      console.error('listener must be a function')\n      return\n    }\n\n    this._stores = this._stores || {};\n    (this._stores[event] = this._stores[event] || []).push({ cb: fn, ctx: ctx })\n  }\n\n  emit(event) {\n    this._stores = this._stores || {}\n    let store = this._stores[event]\n    let args\n\n    if (store) {\n      store = store.slice(0)\n      args = [].slice.call(arguments, 1),\n      args[0] = {\n        eventCode: event,\n        data: args[0],\n      }\n      for (let i = 0, len = store.length; i < len; i++) {\n        store[i].cb.apply(store[i].ctx, args)\n      }\n    }\n  }\n\n  off(event, fn) {\n    this._stores = this._stores || {}\n\n    // all\n    if (!arguments.length) {\n      this._stores = {}\n      return\n    }\n\n    // specific event\n    const store = this._stores[event]\n    if (!store) return\n\n    // remove all handlers\n    if (arguments.length === 1) {\n      delete this._stores[event]\n      return\n    }\n\n    // remove specific handler\n    let cb\n    for (let i = 0, len = store.length; i < len; i++) {\n      cb = store[i].cb\n      if (cb === fn) {\n        store.splice(i, 1)\n        break\n      }\n    }\n    return\n  }\n}\n\nmodule.exports = EventEmitter\n"
  },
  {
    "path": "packageStreamMedia/components/TRTCCalling/utils/tsignaling-wx.js",
    "content": "!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.TSignaling=t():e.TSignaling=t()}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"\",n(n.s=7)}([function(e,t,n){\"use strict\";n.d(t,\"e\",(function(){return g})),n.d(t,\"g\",(function(){return m})),n.d(t,\"c\",(function(){return _})),n.d(t,\"f\",(function(){return v})),n.d(t,\"b\",(function(){return I})),n.d(t,\"d\",(function(){return M})),n.d(t,\"a\",(function(){return T})),n.d(t,\"h\",(function(){return S}));const o=\"undefined\"!=typeof window,r=(\"undefined\"!=typeof wx&&wx.getSystemInfoSync,o&&window.navigator&&window.navigator.userAgent||\"\"),i=/AppleWebKit\\/([\\d.]+)/i.exec(r),s=(i&&parseFloat(i.pop()),/iPad/i.test(r)),a=/iPhone/i.test(r)&&!s,u=/iPod/i.test(r),c=a||s||u,l=(function(){const e=r.match(/OS (\\d+)_/i);e&&e[1]&&e[1]}(),/Android/i.test(r)),p=function(){const e=r.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+\".\"+e[2]):t||null}(),h=(l&&/webkit/i.test(r),/Firefox/i.test(r),/Edge/i.test(r)),d=!h&&/Chrome/i.test(r),f=(function(){const e=r.match(/Chrome\\/(\\d+)/);e&&e[1]&&parseFloat(e[1])}(),/MSIE/.test(r),/MSIE\\s8\\.0/.test(r),function(){const e=/MSIE\\s(\\d+)\\.\\d/.exec(r);let t=e&&parseFloat(e[1]);!t&&/Trident\\/7.0/i.test(r)&&/rv:11.0/.test(r)&&(t=11)}(),/Safari/i.test(r),/TBS\\/\\d+/i.test(r));(function(){const e=r.match(/TBS\\/(\\d+)/i);if(e&&e[1])e[1]})(),!f&&/MQQBrowser\\/\\d+/i.test(r),!f&&/ QQBrowser\\/\\d+/i.test(r),/(micromessenger|webbrowser)/i.test(r),/Windows/i.test(r),/MAC OS X/i.test(r),/MicroMessenger/i.test(r);n(2),n(1);const g=function(e){return\"map\"===C(e)},m=function(e){return\"set\"===C(e)},_=function(e){return\"file\"===C(e)},v=function(e){if(\"object\"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;let n=t;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n},y=function(e){return\"function\"==typeof Array.isArray?Array.isArray(e):\"array\"===C(e)},I=function(e){return y(e)||function(e){return null!==e&&\"object\"==typeof e}(e)},M=function(e){return e instanceof Error},C=function(e){return Object.prototype.toString.call(e).match(/^\\[object (.*)\\]$/)[1].toLowerCase()};let E=0;Date.now||(Date.now=function(){return(new Date).getTime()});const T={now:function(){0===E&&(E=Date.now()-1);const e=Date.now()-E;return e>4294967295?(E+=4294967295,Date.now()-E):e},utc:function(){return Math.round(Date.now()/1e3)}},S=function(e){return JSON.stringify(e,[\"message\",\"code\"])}},function(e,t,n){\"use strict\";n.r(t);var o=n(3),r=n(0);let i=0;const s=new Map;function a(){const e=new Date;return\"TSignaling \"+e.toLocaleTimeString(\"en-US\",{hour12:!1})+\".\"+function(e){let t;switch(e.toString().length){case 1:t=\"00\"+e;break;case 2:t=\"0\"+e;break;default:t=e}return t}(e.getMilliseconds())+\":\"}const u={_data:[],_length:0,_visible:!1,arguments2String(e){let t;if(1===e.length)t=a()+e[0];else{t=a();for(let n=0,o=e.length;n<o;n++)Object(r.b)(e[n])?Object(r.d)(e[n])?t+=Object(r.h)(e[n]):t+=JSON.stringify(e[n]):t+=e[n],t+=\" \"}return t},debug:function(){if(i<=-1){const e=this.arguments2String(arguments);u.record(e,\"debug\"),o.a.debug(e)}},log:function(){if(i<=0){const e=this.arguments2String(arguments);u.record(e,\"log\"),o.a.log(e)}},info:function(){if(i<=1){const e=this.arguments2String(arguments);u.record(e,\"info\"),o.a.info(e)}},warn:function(){if(i<=2){const e=this.arguments2String(arguments);u.record(e,\"warn\"),o.a.warn(e)}},error:function(){if(i<=3){const e=this.arguments2String(arguments);u.record(e,\"error\"),o.a.error(e)}},time:function(e){s.set(e,r.a.now())},timeEnd:function(e){if(s.has(e)){const t=r.a.now()-s.get(e);return s.delete(e),t}return o.a.warn(`未找到对应label: ${e}, 请在调用 logger.timeEnd 前，调用 logger.time`),0},setLevel:function(e){e<4&&o.a.log(a()+\"set level from \"+i+\" to \"+e),i=e},record:function(e,t){1100===u._length&&(u._data.splice(0,100),u._length=1e3),u._length++,u._data.push(`${e} [${t}] \\n`)},getLog:function(){return u._data}};t.default=u},function(e,t,n){\"use strict\";n.r(t);t.default={MSG_PRIORITY_HIGH:\"High\",MSG_PRIORITY_NORMAL:\"Normal\",MSG_PRIORITY_LOW:\"Low\",MSG_PRIORITY_LOWEST:\"Lowest\",KICKED_OUT_MULT_ACCOUNT:\"multipleAccount\",KICKED_OUT_MULT_DEVICE:\"multipleDevice\",KICKED_OUT_USERSIG_EXPIRED:\"userSigExpired\",NET_STATE_CONNECTED:\"connected\",NET_STATE_CONNECTING:\"connecting\",NET_STATE_DISCONNECTED:\"disconnected\",ENTER_ROOM_SUCCESS:\"JoinedSuccess\",ALREADY_IN_ROOM:\"AlreadyInGroup\"}},function(e,t,n){\"use strict\";(function(e){let n,o;n=\"undefined\"!=typeof console?console:void 0!==e&&e.console?e.console:\"undefined\"!=typeof window&&window.console?window.console:{};const r=function(){},i=[\"assert\",\"clear\",\"count\",\"debug\",\"dir\",\"dirxml\",\"error\",\"exception\",\"group\",\"groupCollapsed\",\"groupEnd\",\"info\",\"log\",\"markTimeline\",\"profile\",\"profileEnd\",\"table\",\"time\",\"timeEnd\",\"timeStamp\",\"trace\",\"warn\"];let s=i.length;for(;s--;)o=i[s],console[o]||(n[o]=r);n.methods=i,t.a=n}).call(this,n(6))},function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});t.default={NEW_INVITATION_RECEIVED:\"ts_new_invitation_received\",INVITEE_ACCEPTED:\"ts_invitee_accepted\",INVITEE_REJECTED:\"ts_invitee_rejected\",INVITATION_CANCELLED:\"ts_invitation_cancelled\",INVITATION_TIMEOUT:\"ts_invitation_timeout\",SDK_READY:\"ts_im_ready\",SDK_NOT_READY:\"ts_im_not_ready\",TEXT_MESSAGE_RECEIVED:\"ts_text_message_received\",CUSTOM_MESSAGE_RECEIVED:\"ts_custom_message_received\",REMOTE_USER_JOIN:\"ts_remote_user_join\",REMOTE_USER_LEAVE:\"ts_remote_user_leave\",KICKED_OUT:\"ts_kicked_out\",NET_STATE_CHANGE:\"ts_net_state_change\"}},function(e,t){function n(e){return e=window.localStorage?localStorage.getItem(e)||sessionStorage.getItem(e):(e=document.cookie.match(new RegExp(\"(?:^|;\\\\s)\"+e+\"=(.*?)(?:;\\\\s|$)\")))?e[1]:\"\"}function o(e,t,n){if(window.localStorage)try{n?localStorage.setItem(e,t):sessionStorage.setItem(e,t)}catch(e){}else document.cookie=e+\"=\"+t+\";path=/;domain=\"+function(){var e=window.location.host,t=e.split(\".\");return 2<t.length&&(e=({\"com.cn\":1,\"js.cn\":1,\"net.cn\":1,\"gov.cn\":1,\"com.hk\":1,\"co.nz\":1}[t.slice(-2).join(\".\")]?t.slice(-3):t.slice(-2)).join(\".\")),e}()+(n?\";expires=\"+n:\"\")}function r(e,t){var n,o={};if(void 0===t)var r=window.location,i=r.host,s=r.pathname,a=r.search.substr(1),u=r.hash;else i=(r=t.match(/\\w+:\\/\\/((?:[\\w-]+\\.)+\\w+)(?::\\d+)?(\\/[^\\?\\\\\"'\\|:<>]*)?(?:\\?([^'\"\\\\<>#]*))?(?:#(\\w+))?/i)||[])[1],s=r[2],a=r[3],u=r[4];return void 0!==u&&(u=u.replace(/\"|'|<|>/gi,\"M\")),a&&function(){for(var e=a.split(\"&\"),t=0,n=e.length;t<n;t++)if(-1!=e[t].indexOf(\"=\")){var r=e[t].indexOf(\"=\"),i=e[t].slice(0,r);r=e[t].slice(r+1),o[i]=r}}(),a=function(){if(void 0===a)return a;for(var t=a.split(\"&\"),n=[],o=0,r=t.length;o<r;o++)if(-1!=t[o].indexOf(\"=\")){var i=t[o].indexOf(\"=\"),s=t[o].slice(0,i);i=t[o].slice(i+1),e.ignoreParams&&-1!=e.ignoreParams.indexOf(s)||n.push(s+\"=\"+i)}return n.join(\"&\")}(),u&&function(){for(var e=0==u.indexOf(\"#\")?u.substr(1).split(\"&\"):u.split(\"&\"),t=0,o=e.length;t<o;t++)if(-1!=e[t].indexOf(\"=\")){var r=e[t].indexOf(\"=\"),i=e[t].slice(0,r);if(r=e[t].slice(r+1),\"adtag\"===i.toLowerCase()){n=r;break}}}(),{host:i,path:s,search:a,hash:u,param:o,adtag:n}}function i(e){var t,i=r(e),a={dm:i.host,pvi:\"\",si:\"\",url:i.path,arg:encodeURIComponent(i.search||\"\").substr(0,512),ty:0};return a.pvi=function(){var t=new Date((new Date).getTime()+63072e6).toGMTString();if(e.userReport){var r=n(\"pgv_uid\");r&&r==e.user.user_id||(a.ty=1,o(\"pgv_uid\",e.user.user_id,t)),r=e.user.user_id}else(r=n(\"pgv_pvi\"))||(a.ty=1,o(\"pgv_pvi\",r=s(),t));return r}(),a.si=((t=n(\"pgv_si\"))||o(\"pgv_si\",t=s(\"s\")),t),a.url=function(){var t=i.path;return e.senseQuery&&(t+=i.search?\"?\"+encodeURIComponent(i.search||\"\").substr(0,512):\"\"),e.senseHash&&(t+=i.hash?encodeURIComponent(i.hash):\"\"),t}(),a}function s(e){for(var t=[0,1,2,3,4,5,6,7,8,9],n=10;1<n;n--){var o=Math.floor(10*Math.random()),r=t[o];t[o]=t[n-1],t[n-1]=r}for(n=o=0;5>n;n++)o=10*o+t[n];return(e||\"\")+(o+\"\")+ +new Date}function a(e){return{r2:e.sid}}function u(e){var t={};if(e){var n,o=[];for(n in e)e.hasOwnProperty(n)&&o.push(encodeURIComponent(n)+\"=\"+encodeURIComponent(e[n]));e=o.join(\";\"),t.ext=e}return t}function c(e){var t=r(e,document.referrer);return e=r(e),{rdm:t.host,rurl:t.path,rarg:encodeURIComponent(t.search||\"\").substr(0,512),adt:e.param.ADTAG||e.param.adtag||e.param.CKTAG||e.param.cktag||e.param.PTAG||e.param.ptag||e.adtag}}function l(){try{var e=navigator,t=screen||{width:\"\",height:\"\",colorDepth:\"\"},n={scr:t.width+\"x\"+t.height,scl:t.colorDepth+\"-bit\",lg:(e.language||e.userLanguage).toLowerCase(),tz:(new Date).getTimezoneOffset()/60}}catch(e){return{}}return n}e.exports={conf:{},version:\"2.0.19\",init:function(e){var t={sid:0,cid:0,autoReport:0,senseHash:0,senseQuery:0,userReport:0,performanceMonitor:0,ignoreParams:[]};if(e)for(var n in e)e.hasOwnProperty(n)&&t.hasOwnProperty(n)&&(t[n]=e[n]);this.conf=t,this.conf.autoReport&&this.pgv()},pgv:function(){var e=this.conf,t=[],n=this.version;if(e.sid)if(!e.userReport||e.user&&e.user.user_id&&!parseInt(e.user.user_id,10)!==conf.user.user_id){for(var o=0,r=[i(e),c(e),a(e),l(),u({version:n}),{random:+new Date}],s=r.length;o<s;o++)for(var p in r[o])r[o].hasOwnProperty(p)&&t.push(p+\"=\"+(void 0===r[o][p]?\"\":r[o][p]));var h=function(e){e=\"https://pingtas.qq.com/webview/pingd?\"+e.join(\"&\").toLowerCase();var t=new Image;t.onload=t.onerror=t.onabort=function(){t=t.onload=t.onerror=t.onabort=null},t.src=e};h(t),e.performanceMonitor&&(t=function(){for(var t=function(){if(window.performance){var e=window.performance.timing,t={value:e.domainLookupEnd-e.domainLookupStart},n={value:e.connectEnd-e.connectStart},o={value:e.responseStart-(e.requestStart||e.responseStart+1)},r=e.responseEnd-e.responseStart;e.domContentLoadedEventStart?0>r&&(r=0):r=-1,e={domainLookupTime:t,connectTime:n,requestTime:o,resourcesLoadedTime:{value:r},domParsingTime:{value:e.domContentLoadedEventStart?e.domInteractive-e.domLoading:-1},domContentLoadedTime:{value:e.domContentLoadedEventStart?e.domContentLoadedEventStart-e.fetchStart:-1}}}else e=\"\";return e}(),o=[],r=[],s=0,a=[i(e),{r2:e.cid},l(),{random:+new Date}],c=a.length;s<c;s++)for(var p in a[s])a[s].hasOwnProperty(p)&&r.push(p+\"=\"+(void 0===a[s][p]?\"\":a[s][p]));for(p in t)t.hasOwnProperty(p)&&(\"domContentLoadedTime\"==p?r.push(\"r3=\"+t[p].value):o.push(t[p].value));t=u({pfm:o.join(\"_\"),version:n}),r.push(\"ext=\"+t.ext),h(r)},void 0!==window.performance&&void 0!==window.performance.timing&&0!=window.performance.timing.loadEventEnd?t():window.attachEvent?window.attachEvent(\"onload\",t):window.addEventListener&&window.addEventListener(\"load\",t,!1))}else console.log(\"MTA H5分析错误提示：您选择了用户统计uv，请设置业务的user_id，需为int类型\");else console.log(\"MTA H5分析错误提示：您没有设置sid\")},clickStat:function(e,t){var n=this.conf,o=[],r=i(n),s=a(n);if(n.cid){r.dm=\"taclick\",r.url=e,s.r2=n.cid,s.r5=function(e){e=void 0===e?{}:e;var t,n=[];for(t in e)e.hasOwnProperty(t)&&n.push(t+\"=\"+encodeURIComponent(e[t]));return n.join(\";\")}(t);var p=0;for(r=(n=[r,c(n),s,l(),u({version:this.version}),{random:+new Date}]).length;p<r;p++)for(var h in n[p])n[p].hasOwnProperty(h)&&o.push(h+\"=\"+(void 0===n[p][h]?\"\":n[p][h]));o=\"https://pingtas.qq.com/webview/pingd?\"+o.join(\"&\");var d=new Image;d.onload=d.onerror=d.onabort=function(){d=d.onload=d.onerror=d.onabort=null},d.src=o}else console.log(\"MTA H5分析错误提示：您没有设置cid,请到管理台开通自定义事件并更新统计代码\")},clickShare:function(e){var t,n,o=this.conf,s=r(o),p=void 0===(s=s.param.CKTAG||s.param.ckatg)?[]:s.split(\".\");if(o.cid){s=[];var h=i(o),d=a(o);for(h.dm=\"taclick_share\",h.url=\"mtah5-share-\"+e,d.r2=o.cid,d.r5=(n=[],2===(t=p).length&&\"mtah5_share\"==t[0]&&n.push(t[0]+\"=\"+t[1]),n.join(\";\")),e=0,h=(o=[h,c(o),d,l(),u({version:this.version}),{random:+new Date}]).length;e<h;e++)for(var f in o[e])o[e].hasOwnProperty(f)&&s.push(f+\"=\"+(void 0===o[e][f]?\"\":o[e][f]));f=\"https://pingtas.qq.com/webview/pingd?\"+s.join(\"&\");var g=new Image;g.onload=g.onerror=g.onabort=function(){g=g.onload=g.onerror=g.onabort=null},g.src=f}else console.log(\"MTA H5分析错误提示：您没有设置cid,请到管理台开通自定义事件并更新统计代码\")}}},function(e,t){var n;n=function(){return this}();try{n=n||new Function(\"return this\")()}catch(e){\"object\"==typeof window&&(n=window)}e.exports=n},function(e,t,n){\"use strict\";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},\"function\"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError(\"Generator is already executing.\");for(;s;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){s.label=i[1];break}if(6===i[0]&&s.label<r[1]){s.label=r[1],r=i;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(i);break}r[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,\"__esModule\",{value:!0});var i=n(8),s=n(9),a=n(4),u=n(2),c=n(1),l=n(10),p=n(11),h=n(12),d=n(13),f=n(15),g=n(16).version,m=function(){function e(e){if(this._outerEmitter=null,this._safetyCallbackFactory=null,this._tim=null,this._imSDKAppID=0,this._userID=null,this._groupID=\"\",this._isHandling=!1,this._inviteInfoMap=new Map,c.default.info(\"TSignaling version:\"+g),l.default(e.SDKAppID))return c.default.error(\"TSignaling 请传入 SDKAppID !!!\"),null;this._outerEmitter=new s.default,this._outerEmitter._emit=this._outerEmitter.emit,this._outerEmitter.emit=function(e,t){var n=arguments[0],o=[n,{name:arguments[0],data:arguments[1]}];this._outerEmitter._emit.apply(this._outerEmitter,o)}.bind(this),this._safetyCallbackFactory=new p.default,this._tim=f.create({SDKAppID:e.SDKAppID}),this._imSDKAppID=e.SDKAppID,this._tim.on(f.EVENT.SDK_READY,this._onIMReady.bind(this)),this._tim.on(f.EVENT.SDK_NOT_READY,this._onIMNotReady.bind(this)),this._tim.on(f.EVENT.KICKED_OUT,this._onKickedOut.bind(this)),this._tim.on(f.EVENT.NET_STATE_CHANGE,this._onNetStateChange.bind(this)),this._tim.on(f.EVENT.MESSAGE_RECEIVED,this._onMessageReceived.bind(this))}return e.prototype.setLogLevel=function(e){c.default.setLevel(e),this._tim.setLogLevel(e)},e.prototype.login=function(e){return o(this,void 0,void 0,(function(){return r(this,(function(t){return c.default.log(\"TSignaling.login\",e),this._userID=e.userID,[2,this._tim.login(e)]}))}))},e.prototype.logout=function(){return o(this,void 0,void 0,(function(){return r(this,(function(e){return c.default.log(\"TSignaling.logout\"),this._userID=\"\",this._inviteInfoMap.clear(),[2,this._tim.logout()]}))}))},e.prototype.on=function(e,t,n){c.default.log(\"TSignaling.on eventName:\"+e),this._outerEmitter.on(e,this._safetyCallbackFactory.defense(e,t,n),n)},e.prototype.joinGroup=function(e){return o(this,void 0,void 0,(function(){return r(this,(function(t){return c.default.log(\"TSignaling.joinGroup groupID:\"+e),this._groupID=e,[2,this._tim.joinGroup({groupID:e})]}))}))},e.prototype.quitGroup=function(e){return o(this,void 0,void 0,(function(){return r(this,(function(t){return c.default.log(\"TSignaling.quitGroup groupID:\"+e),[2,this._tim.quitGroup(e)]}))}))},e.prototype.sendTextMessage=function(e){return o(this,void 0,void 0,(function(){var t;return r(this,(function(n){return t=this._tim.createTextMessage({to:e.to,conversationType:!0===e.groupFlag?f.TYPES.CONV_GROUP:f.TYPES.CONV_C2C,priority:e.priority||f.TYPES.MSG_PRIORITY_NORMAL,payload:{text:e.text}}),[2,this._tim.sendMessage(t)]}))}))},e.prototype.sendCustomMessage=function(e){return o(this,void 0,void 0,(function(){var t;return r(this,(function(n){return t=this._tim.createCustomMessage({to:e.to,conversationType:!0===e.groupFlag?f.TYPES.CONV_GROUP:f.TYPES.CONV_C2C,priority:e.priority||f.TYPES.MSG_PRIORITY_NORMAL,payload:{data:e.data||\"\",description:e.description||\"\",extension:e.extension||\"\"}}),[2,this._tim.sendMessage(t)]}))}))},e.prototype.invite=function(e){return o(this,void 0,void 0,(function(){var t,n,o,s,a,u;return r(this,(function(r){switch(r.label){case 0:return t=d.generate(),c.default.log(\"TSignaling.invite\",e,\"inviteID=\"+t),l.default(e)||l.default(e.userID)?[2,Promise.reject({code:i.ErrorCode.ERR_INVALID_PARAMETERS,message:\"userID is invalid\"})]:(n=e.userID,o=e.data,s=e.timeout,a={businessID:i.BusinessID.SIGNAL,inviteID:t,inviter:this._userID,actionType:i.ActionType.INVITE,inviteeList:[n],data:o,timeout:l.default(s)?0:s,groupID:\"\"},[4,this._sendCustomMessage(n,a)]);case 1:return 0===(u=r.sent()).code?(c.default.log(\"TSignaling.invite ok\"),this._inviteInfoMap.set(t,a),this._startTimer(a,!0),[2,{inviteID:t,code:u.code,data:u.data}]):[2,u]}}))}))},e.prototype.inviteInGroup=function(e){return o(this,void 0,void 0,(function(){var t,n,o,s,a,u,p;return r(this,(function(r){switch(r.label){case 0:return t=d.generate(),c.default.log(\"TSignaling.inviteInGroup\",e,\"inviteID=\"+t),l.default(e)||l.default(e.groupID)?[2,Promise.reject({code:i.ErrorCode.ERR_INVALID_PARAMETERS,message:\"groupID is invalid\"})]:(n=e.groupID,o=e.inviteeList,s=e.data,a=e.timeout,u={businessID:i.BusinessID.SIGNAL,inviteID:t,inviter:this._userID,actionType:i.ActionType.INVITE,inviteeList:o,data:s,timeout:l.default(a)?0:a,groupID:n},[4,this._sendCustomMessage(n,u)]);case 1:return 0===(p=r.sent()).code?(c.default.log(\"TSignaling.inviteInGroup ok\"),this._inviteInfoMap.set(t,u),this._startTimer(u,!0),[2,{inviteID:t,code:p.code,data:p.data}]):[2,p]}}))}))},e.prototype.cancel=function(e){return o(this,void 0,void 0,(function(){var t,n,o,s,a,u,p,h,d;return r(this,(function(r){switch(r.label){case 0:return c.default.log(\"TSignaling.cancel\",e),l.default(e)||l.default(e.inviteID)||!this._inviteInfoMap.has(e.inviteID)||this._isHandling?[2,Promise.reject({code:i.ErrorCode.ERR_SDK_SIGNALING_INVALID_INVITE_ID,message:\"inviteID is invalid or invitation has been processed\"})]:[3,1];case 1:return this._isHandling=!0,t=e.inviteID,n=e.data,o=this._inviteInfoMap.get(t),s=o.inviter,a=o.groupID,u=o.inviteeList,s!==this._userID?[3,3]:(p={businessID:i.BusinessID.SIGNAL,inviteID:t,inviter:s,actionType:i.ActionType.CANCEL_INVITE,inviteeList:u,data:n,timeout:0,groupID:a},h=a||u[0],[4,this._sendCustomMessage(h,p)]);case 2:return d=r.sent(),this._isHandling=!1,d&&0===d.code?(c.default.log(\"TSignaling.cancel ok\"),this._deleteInviteInfoByID(t),[2,{inviteID:t,code:d.code,data:d.data}]):[2,d];case 3:return c.default.error(\"TSignaling.cancel unmatched inviter=\"+s+\" and userID=\"+this._userID),this._isHandling=!1,[2,Promise.reject({code:i.ErrorCode.ERR_SDK_SIGNALING_NO_PERMISSION,message:\"信令请求无权限，比如取消非自己发起的邀请，接受或则拒绝非发给自己的邀请\"})]}}))}))},e.prototype.accept=function(e){return o(this,void 0,void 0,(function(){var t,n,o,s,a,u,p,h;return r(this,(function(r){switch(r.label){case 0:return c.default.log(\"TSignaling.accept\",e),l.default(e)||l.default(e.inviteID)||!this._inviteInfoMap.has(e.inviteID)||this._isHandling?[2,Promise.reject({code:i.ErrorCode.ERR_SDK_SIGNALING_INVALID_INVITE_ID,message:\"inviteID is invalid or invitation has been processed\"})]:[3,1];case 1:return this._isHandling=!0,t=e.inviteID,n=e.data,o=this._inviteInfoMap.get(t),s=o.inviter,a=o.groupID,o.inviteeList.includes(this._userID)?(u={businessID:i.BusinessID.SIGNAL,inviteID:t,inviter:s,actionType:i.ActionType.ACCEPT_INVITE,inviteeList:[this._userID],data:n,timeout:0,groupID:a},p=a||s,[4,this._sendCustomMessage(p,u)]):[3,3];case 2:return h=r.sent(),this._isHandling=!1,h&&0===h.code?(c.default.log(\"TSignaling.accept ok\"),this._updateLocalInviteInfo(u),[2,{inviteID:t,code:h.code,data:h.data}]):[2,h];case 3:return c.default.error(\"TSignaling.accept inviteeList do not include userID=\"+this._userID+\". inviteID=\"+t+\" groupID=\"+a),this._isHandling=!1,[2,Promise.reject({code:i.ErrorCode.ERR_SDK_SIGNALING_INVALID_INVITE_ID,message:\"inviteID is invalid or invitation has been processed\"})]}}))}))},e.prototype.reject=function(e){return o(this,void 0,void 0,(function(){var t,n,o,s,a,u,p,h;return r(this,(function(r){switch(r.label){case 0:return c.default.log(\"TSignaling.reject\",e),l.default(e)||l.default(e.inviteID)||!this._inviteInfoMap.has(e.inviteID)||this._isHandling?[2,Promise.reject({code:i.ErrorCode.ERR_SDK_SIGNALING_INVALID_INVITE_ID,message:\"inviteID is invalid or invitation has been processed\"})]:[3,1];case 1:return this._isHandling=!0,t=e.inviteID,n=e.data,o=this._inviteInfoMap.get(t),s=o.inviter,a=o.groupID,o.inviteeList.includes(this._userID)?(u={businessID:i.BusinessID.SIGNAL,inviteID:t,inviter:s,actionType:i.ActionType.REJECT_INVITE,inviteeList:[this._userID],data:n,timeout:0,groupID:a},p=a||s,[4,this._sendCustomMessage(p,u)]):[3,3];case 2:return h=r.sent(),this._isHandling=!1,h&&0===h.code?(c.default.log(\"TSignaling.reject ok\"),this._updateLocalInviteInfo(u),[2,{inviteID:t,code:h.code,data:h.data}]):[2,h];case 3:return c.default.error(\"TSignaling.reject inviteeList do not include userID=\"+this._userID+\". inviteID=\"+t+\" groupID=\"+a),this._isHandling=!1,[2,Promise.reject({code:i.ErrorCode.ERR_SDK_SIGNALING_INVALID_INVITE_ID,message:\"inviteID is invalid or invitation has been processed\"})]}}))}))},e.prototype._stat=function(){h.default.clickStat(\"sdkappid\",{value:this._imSDKAppID}),h.default.clickStat(\"tsignaling_version\",{value:g}),h.default.pgv()},e.prototype._onIMReady=function(e){c.default.log(\"TSignaling._onIMReady\"),this._stat(),this._outerEmitter.emit(a.default.SDK_READY)},e.prototype._onIMNotReady=function(e){c.default.log(\"TSignaling.onSdkNotReady\"),this._outerEmitter.emit(a.default.SDK_NOT_READY)},e.prototype._onKickedOut=function(e){c.default.log(\"TSignaling._onKickedOut\"),this._outerEmitter.emit(a.default.KICKED_OUT,e.data)},e.prototype._onNetStateChange=function(e){c.default.log(\"TSignaling._onNetStateChange\"),this._outerEmitter.emit(a.default.NET_STATE_CHANGE,e.data)},e.prototype._onMessageReceived=function(e){var t=this,n=e.data,o=n.filter((function(e){return e.type===f.TYPES.MSG_TEXT}));l.default(o)||this._outerEmitter.emit(a.default.TEXT_MESSAGE_RECEIVED,o);var r=n.filter((function(e){return e.type===f.TYPES.MSG_GRP_TIP&&e.payload.operationType===f.TYPES.GRP_TIP_MBR_JOIN}));l.default(r)||this._outerEmitter.emit(a.default.REMOTE_USER_JOIN,r);var s=n.filter((function(e){return e.type===f.TYPES.MSG_GRP_TIP&&e.payload.operationType===f.TYPES.GRP_TIP_MBR_QUIT}));l.default(s)||this._outerEmitter.emit(a.default.REMOTE_USER_LEAVE,s);var u=n.filter((function(e){return e.type===f.TYPES.MSG_CUSTOM})),p=[];u.forEach((function(e){var n,o=e.payload.data,r=!0;try{n=JSON.parse(o)}catch(e){r=!1}if(r){var s=n.businessID,a=n.actionType;if(1===s)switch(console.warn(\"信令消息类型\",a),a){case i.ActionType.INVITE:t._onNewInvitationReceived(n);break;case i.ActionType.REJECT_INVITE:t._onInviteeRejected(n);break;case i.ActionType.ACCEPT_INVITE:t._onInviteeAccepted(n);break;case i.ActionType.CANCEL_INVITE:t._onInvitationCancelled(n);break;case i.ActionType.INVITE_TIMEOUT:t._onInvitationTimeout(n)}else c.default.warn(\"TSignaling._onMessageReceived unknown businessID=\"+s),p.push(e)}else p.push(e)})),l.default(p)||this._outerEmitter.emit(a.default.CUSTOM_MESSAGE_RECEIVED,p)},e.prototype._hasLocalInviteInfo=function(e,t){var n=e.inviteID,o=e.groupID;if(!this._inviteInfoMap.has(n))return!1;var r=this._inviteInfoMap.get(n).inviteeList;return!o||(t?r.length>0:r.length>0&&r.includes(this._userID))},e.prototype._startTimer=function(e,t){var n=this;void 0===t&&(t=!0);var o=e.timeout;if(c.default.log(\"TSignaling._startTimer timeout=\"+o+\" isInvitator=\"+t),0!==o)var r=t?o+5:o,i=1,s=setInterval((function(){var o=n._hasLocalInviteInfo(e,t);i<r&&o?++i:(o&&n._sendTimeoutNotice(e,t),clearInterval(s))}),1e3)},e.prototype._sendTimeoutNotice=function(e,t){return o(this,void 0,void 0,(function(){var n,o,s,u,l,p,h,d;return r(this,(function(r){switch(r.label){case 0:return n=e.inviteID,o=e.groupID,s=e.inviteeList,u=e.inviter,l=e.data,p=t?o||s[0]:o||u,c.default.log(\"TSignaling._sendTimeoutNotice inviteID=\"+n+\" to=\"+p+\" isInvitator=\"+t),h={businessID:i.BusinessID.SIGNAL,inviteID:n,inviter:u,actionType:i.ActionType.INVITE_TIMEOUT,inviteeList:t?s:[this._userID],data:l,timeout:0,groupID:o},[4,this._sendCustomMessage(p,h)];case 1:return(d=r.sent())&&0===d.code&&(this._outerEmitter.emit(a.default.INVITATION_TIMEOUT,{inviteID:n,inviteeList:h.inviteeList,isSelfTimeout:!0}),t?this._deleteInviteInfoByID(n):this._updateLocalInviteInfo(h)),[2,d]}}))}))},e.prototype._onNewInvitationReceived=function(t){var n=t.inviteID,o=t.inviter,r=t.inviteeList,i=t.groupID,s=r.includes(this._userID);c.default.log(\"TSignaling._onNewInvitationReceived\",t,\"myselfIncluded=\"+s),(i&&s||!i)&&(this._inviteInfoMap.set(n,t),this._outerEmitter.emit(e.EVENT.NEW_INVITATION_RECEIVED,{inviteID:n,inviter:o,groupID:i,inviteeList:r,data:t.data||\"\"}),this._startTimer(t,!1))},e.prototype._onInviteeRejected=function(e){var t=e.inviteID,n=e.inviter,o=e.groupID,r=this._inviteInfoMap.has(t);c.default.log(\"TSignaling._onInviteeRejected inviteID=\"+t+\" hasInviteID=\"+r+\" inviter=\"+n+\" groupID=\"+o),(o&&r||!o)&&(this._updateLocalInviteInfo(e),this._outerEmitter.emit(a.default.INVITEE_REJECTED,{inviteID:t,invitee:e.inviteeList[0],data:e.data||\"\"}))},e.prototype._onInviteeAccepted=function(e){var t=e.inviteID,n=e.inviter,o=e.groupID,r=this._inviteInfoMap.has(t);c.default.log(\"TSignaling._onInviteeAccepted inviteID=\"+t+\" hasInviteID=\"+r+\" inviter=\"+n+\" groupID=\"+o),(o&&r||!o)&&(this._updateLocalInviteInfo(e),this._outerEmitter.emit(a.default.INVITEE_ACCEPTED,{inviteID:t,invitee:e.inviteeList[0],data:e.data||\"\"}))},e.prototype._onInvitationCancelled=function(e){var t=e.inviteID,n=e.inviter,o=e.groupID,r=this._inviteInfoMap.has(t);c.default.log(\"TSignaling._onInvitationCancelled inviteID=\"+t+\" hasInviteID=\"+r+\" inviter=\"+n+\" groupID=\"+o),(o&&r||!o)&&(this._deleteInviteInfoByID(t),this._outerEmitter.emit(a.default.INVITATION_CANCELLED,{inviteID:t,inviter:n,data:e.data||\"\"}))},e.prototype._onInvitationTimeout=function(e){var t=e.inviteID,n=e.inviter,o=e.groupID,r=this._inviteInfoMap.has(t);c.default.log(\"TSignaling._onInvitationTimeout inviteID=\"+t+\" hasInviteID=\"+r+\" inviter=\"+n+\" groupID=\"+o),(o&&r||!o)&&(this._updateLocalInviteInfo(e),this._outerEmitter.emit(a.default.INVITATION_TIMEOUT,{inviteID:t,inviteeList:e.inviteeList,isSelfTimeout:!1}))},e.prototype._updateLocalInviteInfo=function(e){var t=e.inviteID,n=e.inviter,o=e.inviteeList,r=e.groupID;if(c.default.log(\"TSignaling._updateLocalInviteInfo inviteID=\"+t+\" inviter=\"+n+\" groupID=\"+r),r){if(this._inviteInfoMap.has(t)){var i=o[0],s=this._inviteInfoMap.get(t).inviteeList;s.includes(i)&&(s.splice(s.indexOf(i),1),c.default.log(\"TSignaling._updateLocalInviteInfo remove \"+i+\" from localInviteeList. \"+s.length+\" invitees left\")),0===s.length&&this._deleteInviteInfoByID(t)}}else this._deleteInviteInfoByID(t)},e.prototype._deleteInviteInfoByID=function(e){this._inviteInfoMap.has(e)&&(c.default.log(\"TSignaling._deleteInviteInfoByID remove \"+e+\" from inviteInfoMap.\"),this._inviteInfoMap.delete(e))},e.prototype._sendCustomMessage=function(e,t){return o(this,void 0,void 0,(function(){var n,o;return r(this,(function(r){return n=t.groupID,o=this._tim.createCustomMessage({to:e,conversationType:n?f.TYPES.CONV_GROUP:f.TYPES.CONV_C2C,priority:f.TYPES.MSG_PRIORITY_HIGH,payload:{data:JSON.stringify(t)}}),t.actionType===i.ActionType.INVITE?[2,this._tim.sendMessage(o,{offlinePushInfo:{title:\"\",description:\"您有一个通话请求\",androidOPPOChannelID:\"\"}})]:[2,this._tim.sendMessage(o)]}))}))},e.EVENT=a.default,e.TYPES=u.default,e}();t.default=m},function(e,t,n){\"use strict\";var o,r,i;Object.defineProperty(t,\"__esModule\",{value:!0}),t.ErrorCode=t.BusinessID=t.ActionType=void 0,function(e){e[e.INVITE=1]=\"INVITE\",e[e.CANCEL_INVITE=2]=\"CANCEL_INVITE\",e[e.ACCEPT_INVITE=3]=\"ACCEPT_INVITE\",e[e.REJECT_INVITE=4]=\"REJECT_INVITE\",e[e.INVITE_TIMEOUT=5]=\"INVITE_TIMEOUT\"}(o||(o={})),t.ActionType=o,function(e){e[e.SIGNAL=1]=\"SIGNAL\"}(r||(r={})),t.BusinessID=r,function(e){e[e.ERR_INVALID_PARAMETERS=6017]=\"ERR_INVALID_PARAMETERS\",e[e.ERR_SDK_SIGNALING_INVALID_INVITE_ID=8010]=\"ERR_SDK_SIGNALING_INVALID_INVITE_ID\",e[e.ERR_SDK_SIGNALING_NO_PERMISSION=8011]=\"ERR_SDK_SIGNALING_NO_PERMISSION\"}(i||(i={})),t.ErrorCode=i},function(e,t,n){\"use strict\";n.r(t),n.d(t,\"default\",(function(){return s}));const o=Function.prototype.apply,r=new WeakMap;function i(e){return r.has(e)||r.set(e,{}),r.get(e)}class s{constructor(e=null,t=console){const n=i(this);return n._events=new Set,n._callbacks={},n._console=t,n._maxListeners=null===e?null:parseInt(e,10),this}_addCallback(e,t,n,o){return this._getCallbacks(e).push({callback:t,context:n,weight:o}),this._getCallbacks(e).sort((e,t)=>e.weight>t.weight),this}_getCallbacks(e){return i(this)._callbacks[e]}_getCallbackIndex(e,t){return this._has(e)?this._getCallbacks(e).findIndex(e=>e.callback===t):null}_achieveMaxListener(e){return null!==i(this)._maxListeners&&i(this)._maxListeners<=this.listenersNumber(e)}_callbackIsExists(e,t,n){const o=this._getCallbackIndex(e,t),r=-1!==o?this._getCallbacks(e)[o]:void 0;return-1!==o&&r&&r.context===n}_has(e){return i(this)._events.has(e)}on(e,t,n=null,o=1){const r=i(this);if(\"function\"!=typeof t)throw new TypeError(t+\" is not a function\");return this._has(e)?(this._achieveMaxListener(e)&&r._console.warn(`Max listeners (${r._maxListeners}) for event \"${e}\" is reached!`),this._callbackIsExists(...arguments)&&r._console.warn(`Event \"${e}\" already has the callback ${t}.`)):(r._events.add(e),r._callbacks[e]=[]),this._addCallback(...arguments),this}once(e,t,n=null,r=1){const i=(...r)=>(this.off(e,i),o.call(t,n,r));return this.on(e,i,n,r)}off(e,t=null){const n=i(this);let o;return this._has(e)&&(null===t?(n._events.delete(e),n._callbacks[e]=null):(o=this._getCallbackIndex(e,t),-1!==o&&(n._callbacks[e].splice(o,1),this.off(...arguments)))),this}emit(e,...t){return this._has(e)&&this._getCallbacks(e).forEach(e=>o.call(e.callback,e.context,t)),this}clear(){const e=i(this);return e._events.clear(),e._callbacks={},this}listenersNumber(e){return this._has(e)?this._getCallbacks(e).length:null}}},function(e,t,n){\"use strict\";n.r(t);var o=n(0);const r=Object.prototype.hasOwnProperty;t.default=function(e){if(null==e)return!0;if(\"boolean\"==typeof e)return!1;if(\"number\"==typeof e)return 0===e;if(\"string\"==typeof e)return 0===e.length;if(\"function\"==typeof e)return 0===e.length;if(Array.isArray(e))return 0===e.length;if(e instanceof Error)return\"\"===e.message;if(Object(o.f)(e)){for(const t in e)if(r.call(e,t))return!1;return!0}return!!(Object(o.e)(e)||Object(o.g)(e)||Object(o.c)(e))&&0===e.size}},function(e,t,n){\"use strict\";n.r(t);var o=n(1),r=n(4),i=n.n(r);t.default=class{constructor(){this._funcMap=new Map}defense(e,t,n){if(\"string\"!=typeof e)return null;if(0===e.length)return null;if(\"function\"!=typeof t)return null;if(this._funcMap.has(e)&&this._funcMap.get(e).has(t))return this._funcMap.get(e).get(t);this._funcMap.has(e)||this._funcMap.set(e,new Map);let o=null;return this._funcMap.get(e).has(t)?o=this._funcMap.get(e).get(t):(o=this._pack(e,t,n),this._funcMap.get(e).set(t,o)),o}defenseOnce(e,t,n){return\"function\"!=typeof t?null:this._pack(e,t,n)}find(e,t){return\"string\"!=typeof e||0===e.length||\"function\"!=typeof t?null:this._funcMap.has(e)?this._funcMap.get(e).has(t)?this._funcMap.get(e).get(t):(o.default.log(`SafetyCallback.find: 找不到 func —— ${e}/${\"\"!==t.name?t.name:\"[anonymous]\"}`),null):(o.default.log(`SafetyCallback.find: 找不到 eventName-${e} 对应的 func`),null)}delete(e,t){return\"function\"==typeof t&&(!!this._funcMap.has(e)&&(!!this._funcMap.get(e).has(t)&&(this._funcMap.get(e).delete(t),0===this._funcMap.get(e).size&&this._funcMap.delete(e),!0)))}_pack(e,t,n){return function(){try{t.apply(n,Array.from(arguments))}catch(t){const n=Object.values(i.a).indexOf(e),r=Object.keys(i.a)[n];o.default.error(`接入侧事件 EVENT.${r} 对应的回调函数逻辑存在问题，请检查！`,t)}}}}},function(e,t,n){\"use strict\";n.r(t);var o=n(5),r=n.n(o);r.a.init({sid:\"500721619\",cid:\"500721777\",autoReport:0,senseHash:0,senseQuery:0,performanceMonitor:0,ignoreParams:[]}),t.default=r.a},function(e,t,n){\n/**\n * UUID.js - RFC-compliant UUID Generator for JavaScript\n *\n * @file\n * @author  LiosK\n * @version v4.2.5\n * @license Apache License 2.0: Copyright (c) 2010-2020 LiosK\n */\nvar o;o=function(t){\"use strict\";function o(){var e=r._getRandomInt;this.timestamp=0,this.sequence=e(14),this.node=1099511627776*(1|e(8))+e(40),this.tick=e(4)}function r(){}return r.generate=function(){var e=r._getRandomInt,t=r._hexAligner;return t(e(32),8)+\"-\"+t(e(16),4)+\"-\"+t(16384|e(12),4)+\"-\"+t(32768|e(14),4)+\"-\"+t(e(48),12)},r._getRandomInt=function(e){if(e<0||e>53)return NaN;var t=0|1073741824*Math.random();return e>30?t+1073741824*(0|Math.random()*(1<<e-30)):t>>>30-e},r._hexAligner=function(e,t){for(var n=e.toString(16),o=t-n.length,r=\"0\";o>0;o>>>=1,r+=r)1&o&&(n=r+n);return n},r.overwrittenUUID=t,function(){var e=r._getRandomInt;r.useMathRandom=function(){r._getRandomInt=e};var t=null,o=e;\"undefined\"!=typeof window&&(t=window.crypto||window.msCrypto)?t.getRandomValues&&\"undefined\"!=typeof Uint32Array&&(o=function(e){if(e<0||e>53)return NaN;var n=new Uint32Array(e>32?2:1);return n=t.getRandomValues(n)||n,e>32?n[0]+4294967296*(n[1]>>>64-e):n[0]>>>32-e}):(t=n(14))&&t.randomBytes&&(o=function(e){if(e<0||e>53)return NaN;var n=t.randomBytes(e>32?8:4),o=n.readUInt32BE(0);return e>32?o+4294967296*(n.readUInt32BE(4)>>>64-e):o>>>32-e}),r._getRandomInt=o}(),r.FIELD_NAMES=[\"timeLow\",\"timeMid\",\"timeHiAndVersion\",\"clockSeqHiAndReserved\",\"clockSeqLow\",\"node\"],r.FIELD_SIZES=[32,16,16,8,8,48],r.genV4=function(){var e=r._getRandomInt;return(new r)._init(e(32),e(16),16384|e(12),128|e(6),e(8),e(48))},r.parse=function(e){var t;if(t=/^\\s*(urn:uuid:|\\{)?([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{2})([0-9a-f]{2})-([0-9a-f]{12})(\\})?\\s*$/i.exec(e)){var n=t[1]||\"\",o=t[8]||\"\";if(n+o===\"\"||\"{\"===n&&\"}\"===o||\"urn:uuid:\"===n.toLowerCase()&&\"\"===o)return(new r)._init(parseInt(t[2],16),parseInt(t[3],16),parseInt(t[4],16),parseInt(t[5],16),parseInt(t[6],16),parseInt(t[7],16))}return null},r.prototype._init=function(){var e=r.FIELD_NAMES,t=r.FIELD_SIZES,n=r._binAligner,o=r._hexAligner;this.intFields=new Array(6),this.bitFields=new Array(6),this.hexFields=new Array(6);for(var i=0;i<6;i++){var s=parseInt(arguments[i]||0);this.intFields[i]=this.intFields[e[i]]=s,this.bitFields[i]=this.bitFields[e[i]]=n(s,t[i]),this.hexFields[i]=this.hexFields[e[i]]=o(s,t[i]>>>2)}return this.version=this.intFields.timeHiAndVersion>>>12&15,this.bitString=this.bitFields.join(\"\"),this.hexNoDelim=this.hexFields.join(\"\"),this.hexString=this.hexFields[0]+\"-\"+this.hexFields[1]+\"-\"+this.hexFields[2]+\"-\"+this.hexFields[3]+this.hexFields[4]+\"-\"+this.hexFields[5],this.urn=\"urn:uuid:\"+this.hexString,this},r._binAligner=function(e,t){for(var n=e.toString(2),o=t-n.length,r=\"0\";o>0;o>>>=1,r+=r)1&o&&(n=r+n);return n},r.prototype.toString=function(){return this.hexString},r.prototype.equals=function(e){if(!(e instanceof r))return!1;for(var t=0;t<6;t++)if(this.intFields[t]!==e.intFields[t])return!1;return!0},r.NIL=(new r)._init(0,0,0,0,0,0),r.genV1=function(){null==r._state&&r.resetState();var e=(new Date).getTime(),t=r._state;e!=t.timestamp?(e<t.timestamp&&t.sequence++,t.timestamp=e,t.tick=r._getRandomInt(4)):Math.random()<r._tsRatio&&t.tick<9984?t.tick+=1+r._getRandomInt(4):t.sequence++;var n=r._getTimeFieldValues(t.timestamp),o=n.low+t.tick,i=4095&n.hi|4096;t.sequence&=16383;var s=t.sequence>>>8|128,a=255&t.sequence;return(new r)._init(o,n.mid,i,s,a,t.node)},r.resetState=function(){r._state=new o},r._tsRatio=1/4,r._state=null,r._getTimeFieldValues=function(e){var t=e-Date.UTC(1582,9,15),n=t/4294967296*1e4&268435455;return{low:1e4*(268435455&t)%4294967296,mid:65535&n,hi:n>>>16,timestamp:t}},\"object\"==typeof e.exports&&(e.exports=r),r}(o)},function(e,t){},function(e,t,n){(function(t){e.exports=function(){var e={SDK_READY:\"sdkStateReady\",SDK_NOT_READY:\"sdkStateNotReady\",SDK_DESTROY:\"sdkDestroy\",MESSAGE_RECEIVED:\"onMessageReceived\",MESSAGE_REVOKED:\"onMessageRevoked\",MESSAGE_READ_BY_PEER:\"onMessageReadByPeer\",CONVERSATION_LIST_UPDATED:\"onConversationListUpdated\",GROUP_LIST_UPDATED:\"onGroupListUpdated\",GROUP_SYSTEM_NOTICE_RECEIVED:\"receiveGroupSystemNotice\",PROFILE_UPDATED:\"onProfileUpdated\",BLACKLIST_UPDATED:\"blacklistUpdated\",KICKED_OUT:\"kickedOut\",ERROR:\"error\",NET_STATE_CHANGE:\"netStateChange\",SDK_RELOAD:\"sdkReload\"},n={MSG_TEXT:\"TIMTextElem\",MSG_IMAGE:\"TIMImageElem\",MSG_SOUND:\"TIMSoundElem\",MSG_AUDIO:\"TIMSoundElem\",MSG_FILE:\"TIMFileElem\",MSG_FACE:\"TIMFaceElem\",MSG_VIDEO:\"TIMVideoFileElem\",MSG_GEO:\"TIMLocationElem\",MSG_GRP_TIP:\"TIMGroupTipElem\",MSG_GRP_SYS_NOTICE:\"TIMGroupSystemNoticeElem\",MSG_CUSTOM:\"TIMCustomElem\",MSG_PRIORITY_HIGH:\"High\",MSG_PRIORITY_NORMAL:\"Normal\",MSG_PRIORITY_LOW:\"Low\",MSG_PRIORITY_LOWEST:\"Lowest\",CONV_C2C:\"C2C\",CONV_GROUP:\"GROUP\",CONV_SYSTEM:\"@TIM#SYSTEM\",GRP_PRIVATE:\"Private\",GRP_WORK:\"Private\",GRP_PUBLIC:\"Public\",GRP_CHATROOM:\"ChatRoom\",GRP_MEETING:\"ChatRoom\",GRP_AVCHATROOM:\"AVChatRoom\",GRP_MBR_ROLE_OWNER:\"Owner\",GRP_MBR_ROLE_ADMIN:\"Admin\",GRP_MBR_ROLE_MEMBER:\"Member\",GRP_TIP_MBR_JOIN:1,GRP_TIP_MBR_QUIT:2,GRP_TIP_MBR_KICKED_OUT:3,GRP_TIP_MBR_SET_ADMIN:4,GRP_TIP_MBR_CANCELED_ADMIN:5,GRP_TIP_GRP_PROFILE_UPDATED:6,GRP_TIP_MBR_PROFILE_UPDATED:7,MSG_REMIND_ACPT_AND_NOTE:\"AcceptAndNotify\",MSG_REMIND_ACPT_NOT_NOTE:\"AcceptNotNotify\",MSG_REMIND_DISCARD:\"Discard\",GENDER_UNKNOWN:\"Gender_Type_Unknown\",GENDER_FEMALE:\"Gender_Type_Female\",GENDER_MALE:\"Gender_Type_Male\",KICKED_OUT_MULT_ACCOUNT:\"multipleAccount\",KICKED_OUT_MULT_DEVICE:\"multipleDevice\",KICKED_OUT_USERSIG_EXPIRED:\"userSigExpired\",ALLOW_TYPE_ALLOW_ANY:\"AllowType_Type_AllowAny\",ALLOW_TYPE_NEED_CONFIRM:\"AllowType_Type_NeedConfirm\",ALLOW_TYPE_DENY_ANY:\"AllowType_Type_DenyAny\",FORBID_TYPE_NONE:\"AdminForbid_Type_None\",FORBID_TYPE_SEND_OUT:\"AdminForbid_Type_SendOut\",JOIN_OPTIONS_FREE_ACCESS:\"FreeAccess\",JOIN_OPTIONS_NEED_PERMISSION:\"NeedPermission\",JOIN_OPTIONS_DISABLE_APPLY:\"DisableApply\",JOIN_STATUS_SUCCESS:\"JoinedSuccess\",JOIN_STATUS_ALREADY_IN_GROUP:\"AlreadyInGroup\",JOIN_STATUS_WAIT_APPROVAL:\"WaitAdminApproval\",GRP_PROFILE_OWNER_ID:\"ownerID\",GRP_PROFILE_CREATE_TIME:\"createTime\",GRP_PROFILE_LAST_INFO_TIME:\"lastInfoTime\",GRP_PROFILE_MEMBER_NUM:\"memberNum\",GRP_PROFILE_MAX_MEMBER_NUM:\"maxMemberNum\",GRP_PROFILE_JOIN_OPTION:\"joinOption\",GRP_PROFILE_INTRODUCTION:\"introduction\",GRP_PROFILE_NOTIFICATION:\"notification\",GRP_PROFILE_MUTE_ALL_MBRS:\"muteAllMembers\",NET_STATE_CONNECTED:\"connected\",NET_STATE_CONNECTING:\"connecting\",NET_STATE_DISCONNECTED:\"disconnected\"};function o(e){return(o=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,\"value\"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function f(e,t,n){return(f=d()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&h(r,n.prototype),r}).apply(null,arguments)}function g(e){var t=\"function\"==typeof Map?new Map:void 0;return(g=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf(\"[native code]\")))return e;var n;if(\"function\"!=typeof e)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return f(e,arguments,p(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),h(o,e)})(e)}function m(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}function _(e,t){return!t||\"object\"!=typeof t&&\"function\"!=typeof t?m(e):t}function v(e){return function(){var t,n=p(e);if(d()){var o=p(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return _(this,t)}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(r)throw i}}return n}}(e,t)||M(e,t)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function I(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||M(e)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function M(e,t){if(e){if(\"string\"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===n&&e.constructor&&(n=e.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(n):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function E(e){if(\"undefined\"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=M(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var o,r,i=!0,s=!1;return{s:function(){o=e[Symbol.iterator]()},n:function(){var e=o.next();return i=e.done,e},e:function(e){s=!0,r=e},f:function(){try{i||null==o.return||o.return()}finally{if(s)throw r}}}}var T=function(){function e(){r(this,e),this.cache=[],this.options=null}return s(e,[{key:\"use\",value:function(e){if(\"function\"!=typeof e)throw\"middleware must be a function\";return this.cache.push(e),this}},{key:\"next\",value:function(e){if(this.middlewares&&this.middlewares.length>0)return this.middlewares.shift().call(this,this.options,this.next.bind(this))}},{key:\"run\",value:function(e){return this.middlewares=this.cache.map((function(e){return e})),this.options=e,this.next()}}]),e}(),S=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:void 0!==t?t:\"undefined\"!=typeof self?self:{};function D(e,t){return e(t={exports:{}},t.exports),t.exports}var k,A,R,N=D((function(e,t){var n,o,r,i,s,a,u,c,l,p,h,d,f,g,m,_,v,y;e.exports=(n=\"function\"==typeof Promise,o=\"object\"==typeof self?self:S,r=\"undefined\"!=typeof Symbol,i=\"undefined\"!=typeof Map,s=\"undefined\"!=typeof Set,a=\"undefined\"!=typeof WeakMap,u=\"undefined\"!=typeof WeakSet,c=\"undefined\"!=typeof DataView,l=r&&void 0!==Symbol.iterator,p=r&&void 0!==Symbol.toStringTag,h=s&&\"function\"==typeof Set.prototype.entries,d=i&&\"function\"==typeof Map.prototype.entries,f=h&&Object.getPrototypeOf((new Set).entries()),g=d&&Object.getPrototypeOf((new Map).entries()),m=l&&\"function\"==typeof Array.prototype[Symbol.iterator],_=m&&Object.getPrototypeOf([][Symbol.iterator]()),v=l&&\"function\"==typeof String.prototype[Symbol.iterator],y=v&&Object.getPrototypeOf(\"\"[Symbol.iterator]()),function(e){var t=typeof e;if(\"object\"!==t)return t;if(null===e)return\"null\";if(e===o)return\"global\";if(Array.isArray(e)&&(!1===p||!(Symbol.toStringTag in e)))return\"Array\";if(\"object\"==typeof window&&null!==window){if(\"object\"==typeof window.location&&e===window.location)return\"Location\";if(\"object\"==typeof window.document&&e===window.document)return\"Document\";if(\"object\"==typeof window.navigator){if(\"object\"==typeof window.navigator.mimeTypes&&e===window.navigator.mimeTypes)return\"MimeTypeArray\";if(\"object\"==typeof window.navigator.plugins&&e===window.navigator.plugins)return\"PluginArray\"}if((\"function\"==typeof window.HTMLElement||\"object\"==typeof window.HTMLElement)&&e instanceof window.HTMLElement){if(\"BLOCKQUOTE\"===e.tagName)return\"HTMLQuoteElement\";if(\"TD\"===e.tagName)return\"HTMLTableDataCellElement\";if(\"TH\"===e.tagName)return\"HTMLTableHeaderCellElement\"}}var r=p&&e[Symbol.toStringTag];if(\"string\"==typeof r)return r;var l=Object.getPrototypeOf(e);return l===RegExp.prototype?\"RegExp\":l===Date.prototype?\"Date\":n&&l===Promise.prototype?\"Promise\":s&&l===Set.prototype?\"Set\":i&&l===Map.prototype?\"Map\":u&&l===WeakSet.prototype?\"WeakSet\":a&&l===WeakMap.prototype?\"WeakMap\":c&&l===DataView.prototype?\"DataView\":i&&l===g?\"Map Iterator\":s&&l===f?\"Set Iterator\":m&&l===_?\"Array Iterator\":v&&l===y?\"String Iterator\":null===l?\"Object\":Object.prototype.toString.call(e).slice(8,-1)})})),w=\"undefined\"!=typeof window,O=\"undefined\"!=typeof wx&&\"function\"==typeof wx.getSystemInfoSync,L=w&&window.navigator&&window.navigator.userAgent||\"\",b=/AppleWebKit\\/([\\d.]+)/i.exec(L),P=(b&&parseFloat(b.pop()),/iPad/i.test(L),/iPhone/i.test(L),/iPod/i.test(L),(k=L.match(/OS (\\d+)_/i))&&k[1]&&k[1],/Android/i.test(L)),G=(function(){var e=L.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);t&&n&&parseFloat(e[1]+\".\"+e[2])}(),P&&/webkit/i.test(L),/Firefox/i.test(L),!/Edge/i.test(L)&&/Chrome/i.test(L),function(){var e=L.match(/Chrome\\/(\\d+)/);e&&e[1]&&parseFloat(e[1])}(),/MSIE/.test(L)),U=(/MSIE\\s8\\.0/.test(L),function(){var e=/MSIE\\s(\\d+)\\.\\d/.exec(L),t=e&&parseFloat(e[1]);return!t&&/Trident\\/7.0/i.test(L)&&/rv:11.0/.test(L)&&(t=11),t}()),x=(/Safari/i.test(L),/TBS\\/\\d+/i.test(L)),q=(function(){var e=L.match(/TBS\\/(\\d+)/i);e&&e[1]&&e[1]}(),!x&&/MQQBrowser\\/\\d+/i.test(L),!x&&/ QQBrowser\\/\\d+/i.test(L),/(micromessenger|webbrowser)/i.test(L)),F=(/Windows/i.test(L),/MAC OS X/i.test(L),/MicroMessenger/i.test(L),void 0!==t?t:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{});A=\"undefined\"!=typeof console?console:void 0!==F&&F.console?F.console:\"undefined\"!=typeof window&&window.console?window.console:{};for(var V=function(){},K=[\"assert\",\"clear\",\"count\",\"debug\",\"dir\",\"dirxml\",\"error\",\"exception\",\"group\",\"groupCollapsed\",\"groupEnd\",\"info\",\"log\",\"markTimeline\",\"profile\",\"profileEnd\",\"table\",\"time\",\"timeEnd\",\"timeStamp\",\"trace\",\"warn\"],H=K.length;H--;)R=K[H],console[R]||(A[R]=V);A.methods=K;var B=A,j=0,Y=new Map;function $(){var e=new Date;return\"TIM \"+e.toLocaleTimeString(\"en-US\",{hour12:!1})+\".\"+function(e){var t;switch(e.toString().length){case 1:t=\"00\"+e;break;case 2:t=\"0\"+e;break;default:t=e}return t}(e.getMilliseconds())+\":\"}var W={_data:[],_length:0,_visible:!1,arguments2String:function(e){var t;if(1===e.length)t=$()+e[0];else{t=$();for(var n=0,o=e.length;n<o;n++)ne(e[n])?re(e[n])?t+=le(e[n]):t+=JSON.stringify(e[n]):t+=e[n],t+=\" \"}return t},debug:function(){if(j<=-1){var e=this.arguments2String(arguments);W.record(e,\"debug\"),B.debug(e)}},log:function(){if(j<=0){var e=this.arguments2String(arguments);W.record(e,\"log\"),B.log(e)}},info:function(){if(j<=1){var e=this.arguments2String(arguments);W.record(e,\"info\"),B.info(e)}},warn:function(){if(j<=2){var e=this.arguments2String(arguments);W.record(e,\"warn\"),B.warn(e)}},error:function(){if(j<=3){var e=this.arguments2String(arguments);W.record(e,\"error\"),B.error(e)}},time:function(e){Y.set(e,ue.now())},timeEnd:function(e){if(Y.has(e)){var t=ue.now()-Y.get(e);return Y.delete(e),t}return B.warn(\"未找到对应label: \".concat(e,\", 请在调用 logger.timeEnd 前，调用 logger.time\")),0},setLevel:function(e){e<4&&B.log($()+\"set level from \"+j+\" to \"+e),j=e},record:function(e,t){1100===W._length&&(W._data.splice(0,100),W._length=1e3),W._length++,W._data.push(\"\".concat(e,\" [\").concat(t,\"] \\n\"))},getLog:function(){return W._data}},z=function(e){return\"file\"===ie(e)},J=function(e){return null!==e&&(\"number\"==typeof e&&!isNaN(e-0)||\"object\"===o(e)&&e.constructor===Number)},X=function(e){return\"string\"==typeof e},Q=function(e){return null!==e&&\"object\"===o(e)},Z=function(e){if(\"object\"!==o(e)||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n},ee=function(e){return\"function\"==typeof Array.isArray?Array.isArray(e):\"array\"===ie(e)},te=function(e){return void 0===e},ne=function(e){return ee(e)||Q(e)},oe=function(e){return\"function\"==typeof e},re=function(e){return e instanceof Error},ie=function(e){return Object.prototype.toString.call(e).match(/^\\[object (.*)\\]$/)[1].toLowerCase()},se=function(e){if(\"string\"!=typeof e)return!1;var t=e[0];return!/[^a-zA-Z0-9]/.test(t)},ae=0;Date.now||(Date.now=function(){return(new Date).getTime()});var ue={now:function(){0===ae&&(ae=Date.now()-1);var e=Date.now()-ae;return e>4294967295?(ae+=4294967295,Date.now()-ae):e},utc:function(){return Math.round(Date.now()/1e3)}},ce=function e(t,n,o,r){if(!ne(t)||!ne(n))return 0;for(var i,s=0,a=Object.keys(n),u=0,c=a.length;u<c;u++)if(i=a[u],!(te(n[i])||o&&o.includes(i)))if(ne(t[i])&&ne(n[i]))s+=e(t[i],n[i],o,r);else{if(r&&r.includes(n[i]))continue;t[i]!==n[i]&&(t[i]=n[i],s+=1)}return s},le=function(e){return JSON.stringify(e,[\"message\",\"code\"])},pe=function(){var e,t=new Date,n=t.toISOString(),o=t.getTimezoneOffset()/60;return e=o<0?o>-10?\"+0\"+Math.abs(100*o):\"+\"+Math.abs(100*o):o>=10?\"-\"+100*o:\"-0\"+100*o,n.replace(\"Z\",e)},he=function(e){if(0===e.length)return 0;for(var t=0,n=0,o=\"undefined\"!=typeof document&&void 0!==document.characterSet?document.characterSet:\"UTF-8\";void 0!==e[t];)n+=e[t++].charCodeAt[t]<=255?1:!1===o?3:2;return n},de=function(e){var t=e||99999999;return Math.round(Math.random()*t)},fe=\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\",ge=fe.length,me=function(e,t){for(var n in e)if(e[n]===t)return!0;return!1},_e={},ve=function(){if(O)return\"https:\";var e=window.location.protocol;return[\"http:\",\"https:\"].indexOf(e)<0&&(e=\"http:\"),e},ye=function(e){return-1===e.indexOf(\"http://\")||-1===e.indexOf(\"https://\")?\"https://\"+e:e.replace(/https|http/,\"https\")};function Ie(e,t){ee(e)&&ee(t)?t.forEach((function(t){var n=t.key,o=t.value,r=e.find((function(e){return e.key===n}));r?r.value=o:e.push({key:n,value:o})})):W.warn(\"updateCustomField target 或 source 不是数组，忽略此次更新。\")}var Me=function(e){return e===n.GRP_PUBLIC},Ce=function(e){return e===n.GRP_MEETING},Ee=function(e){return e===n.GRP_AVCHATROOM},Te=function(e){return X(e)&&e===n.CONV_SYSTEM};function Se(e,t){var n={};return Object.keys(e).forEach((function(o){n[o]=t(e[o],o)})),n}var De=Object.prototype.hasOwnProperty;function ke(e){if(null==e)return!0;if(\"boolean\"==typeof e)return!1;if(\"number\"==typeof e)return 0===e;if(\"string\"==typeof e)return 0===e.length;if(\"function\"==typeof e)return 0===e.length;if(Array.isArray(e))return 0===e.length;if(e instanceof Error)return\"\"===e.message;if(Z(e)){for(var t in e)if(De.call(e,t))return!1;return!0}return!(\"map\"!==ie(e)&&!function(e){return\"set\"===ie(e)}(e)&&!z(e))&&0===e.size}function Ae(e,t,n){if(void 0===t)return!0;var o=!0;if(\"object\"===N(t).toLowerCase())Object.keys(t).forEach((function(r){var i=1===e.length?e[0][r]:void 0;o=!!Re(i,t[r],n,r)&&o}));else if(\"array\"===N(t).toLowerCase())for(var r=0;r<t.length;r++)o=!!Re(e[r],t[r],n,t[r].name)&&o;if(o)return o;throw new Error(\"Params validate failed.\")}function Re(e,t,n,o){if(void 0===t)return!0;var r=!0;return t.required&&ke(e)&&(B.error(\"TIM [\".concat(n,'] Missing required params: \"').concat(o,'\".')),r=!1),ke(e)||N(e).toLowerCase()===t.type.toLowerCase()||(B.error(\"TIM [\".concat(n,'] Invalid params: type check failed for \"').concat(o,'\".Expected ').concat(t.type,\".\")),r=!1),t.validator&&!t.validator(e)&&(B.error(\"TIM [\".concat(n,\"] Invalid params: custom validator check failed for params.\")),r=!1),r}var Ne=\"JoinedSuccess\",we=\"WaitAdminApproval\",Oe=0,Le=1,be=0,Pe=\"unSend\",Ge=\"success\",Ue=\"fail\",xe=\"notStart\",qe=\"pengding\",Fe=\"resolved\",Ve=\"rejected\",Ke=function(){function e(t){r(this,e),this.type=n.MSG_TEXT,this.content={text:t.text||\"\"}}return s(e,[{key:\"setText\",value:function(e){this.content.text=e}},{key:\"sendable\",value:function(){return 0!==this.content.text.length}}]),e}(),He={JSON:{TYPE:{C2C:{NOTICE:1,COMMON:9,EVENT:10},GROUP:{COMMON:3,TIP:4,SYSTEM:5,TIP2:6},FRIEND:{NOTICE:7},PROFILE:{NOTICE:8}},SUBTYPE:{C2C:{COMMON:0,READED:92,KICKEDOUT:96},GROUP:{COMMON:0,LOVEMESSAGE:1,TIP:2,REDPACKET:3}},OPTIONS:{GROUP:{JOIN:1,QUIT:2,KICK:3,SET_ADMIN:4,CANCEL_ADMIN:5,MODIFY_GROUP_INFO:6,MODIFY_MEMBER_INFO:7}}},PROTOBUF:{},IMAGE_TYPES:{ORIGIN:1,LARGE:2,SMALL:3},IMAGE_FORMAT:{JPG:1,JPEG:1,GIF:2,PNG:3,BMP:4,UNKNOWN:255}},Be={NICK:\"Tag_Profile_IM_Nick\",GENDER:\"Tag_Profile_IM_Gender\",BIRTHDAY:\"Tag_Profile_IM_BirthDay\",LOCATION:\"Tag_Profile_IM_Location\",SELFSIGNATURE:\"Tag_Profile_IM_SelfSignature\",ALLOWTYPE:\"Tag_Profile_IM_AllowType\",LANGUAGE:\"Tag_Profile_IM_Language\",AVATAR:\"Tag_Profile_IM_Image\",MESSAGESETTINGS:\"Tag_Profile_IM_MsgSettings\",ADMINFORBIDTYPE:\"Tag_Profile_IM_AdminForbidType\",LEVEL:\"Tag_Profile_IM_Level\",ROLE:\"Tag_Profile_IM_Role\"},je={UNKNOWN:\"Gender_Type_Unknown\",FEMALE:\"Gender_Type_Female\",MALE:\"Gender_Type_Male\"},Ye={NONE:\"AdminForbid_Type_None\",SEND_OUT:\"AdminForbid_Type_SendOut\"},$e={NEED_CONFIRM:\"AllowType_Type_NeedConfirm\",ALLOW_ANY:\"AllowType_Type_AllowAny\",DENY_ANY:\"AllowType_Type_DenyAny\"},We=function(){function e(t){r(this,e),this._imageMemoryURL=\"\",this._file=t.file,O?this.createImageDataASURLInWXMiniApp(t.file):this.createImageDataASURLInWeb(t.file),this._initImageInfoModel(),this.type=n.MSG_IMAGE,this._percent=0,this.content={imageFormat:t.imageFormat||He.IMAGE_FORMAT.UNKNOWN,uuid:t.uuid,imageInfoArray:[]},this.initImageInfoArray(t.imageInfoArray),this._defaultImage=\"http://imgcache.qq.com/open/qcloud/video/act/webim-images/default.jpg\",this._autoFixUrl()}return s(e,[{key:\"_initImageInfoModel\",value:function(){var e=this;this._ImageInfoModel=function(t){this.instanceID=de(9999999),this.sizeType=t.type||0,this.size=t.size||0,this.width=t.width||0,this.height=t.height||0,this.imageUrl=t.url||\"\",this.url=t.url||e._imageMemoryURL||e._defaultImage},this._ImageInfoModel.prototype={setSizeType:function(e){this.sizeType=e},setImageUrl:function(e){e&&(this.imageUrl=e)},getImageUrl:function(){return this.imageUrl}}}},{key:\"initImageInfoArray\",value:function(e){for(var t=2,n=null,o=null;t>=0;)o=void 0===e||void 0===e[t]?{type:0,size:0,width:0,height:0,url:\"\"}:e[t],(n=new this._ImageInfoModel(o)).setSizeType(t+1),this.addImageInfo(n),t--}},{key:\"updateImageInfoArray\",value:function(e){for(var t,n=this.content.imageInfoArray.length,o=0;o<n;o++)t=this.content.imageInfoArray[o],e.size&&(t.size=e.size),e.url&&t.setImageUrl(e.url),e.width&&(t.width=e.width),e.height&&(t.height=e.height)}},{key:\"_autoFixUrl\",value:function(){for(var e=this.content.imageInfoArray.length,t=\"\",n=\"\",o=[\"http\",\"https\"],r=null,i=0;i<e;i++)this.content.imageInfoArray[i].url&&\"\"!==(r=this.content.imageInfoArray[i]).imageUrl&&(n=r.imageUrl.slice(0,r.imageUrl.indexOf(\"://\")+1),t=r.imageUrl.slice(r.imageUrl.indexOf(\"://\")+1),o.indexOf(n)<0&&(n=\"https:\"),this.content.imageInfoArray[i].setImageUrl([n,t].join(\"\")))}},{key:\"updatePercent\",value:function(e){this._percent=e,this._percent>1&&(this._percent=1)}},{key:\"updateImageFormat\",value:function(e){this.content.imageFormat=He.IMAGE_FORMAT[e.toUpperCase()]||He.IMAGE_FORMAT.UNKNOWN}},{key:\"createImageDataASURLInWeb\",value:function(e){void 0!==e&&e.files.length>0&&(this._imageMemoryURL=window.URL.createObjectURL(e.files[0]))}},{key:\"createImageDataASURLInWXMiniApp\",value:function(e){e&&e.url&&(this._imageMemoryURL=e.url)}},{key:\"replaceImageInfo\",value:function(e,t){this.content.imageInfoArray[t]instanceof this._ImageInfoModel||(this.content.imageInfoArray[t]=e)}},{key:\"addImageInfo\",value:function(e){this.content.imageInfoArray.length>=3||this.content.imageInfoArray.push(e)}},{key:\"sendable\",value:function(){return 0!==this.content.imageInfoArray.length&&\"\"!==this.content.imageInfoArray[0].imageUrl&&0!==this.content.imageInfoArray[0].size}}]),e}(),ze=function(){function e(t){r(this,e),this.type=n.MSG_FACE,this.content=t||null}return s(e,[{key:\"sendable\",value:function(){return null!==this.content}}]),e}(),Je=function(){function e(t){r(this,e),this.type=n.MSG_AUDIO,this._percent=0,this.content={downloadFlag:2,second:t.second,size:t.size,url:t.url,remoteAudioUrl:\"\",uuid:t.uuid}}return s(e,[{key:\"updatePercent\",value:function(e){this._percent=e,this._percent>1&&(this._percent=1)}},{key:\"updateAudioUrl\",value:function(e){this.content.remoteAudioUrl=e}},{key:\"sendable\",value:function(){return\"\"!==this.content.remoteAudioUrl}}]),e}(),Xe={from:!0,groupID:!0,groupName:!0,to:!0},Qe=function(){function e(t){r(this,e),this.type=n.MSG_GRP_TIP,this.content={},this._initContent(t)}return s(e,[{key:\"_initContent\",value:function(e){var t=this;Object.keys(e).forEach((function(n){switch(n){case\"remarkInfo\":break;case\"groupProfile\":t.content.groupProfile={},t._initGroupProfile(e[n]);break;case\"operatorInfo\":case\"memberInfoList\":break;case\"msgMemberInfo\":t.content.memberList=e[n],Object.defineProperty(t.content,\"msgMemberInfo\",{get:function(){return W.warn(\"!!! 禁言的群提示消息中的 payload.msgMemberInfo 属性即将废弃，请使用 payload.memberList 属性替代。 \\n\",\"msgMemberInfo 中的 shutupTime 属性对应更改为 memberList 中的 muteTime 属性，表示禁言时长。 \\n\",\"参考：群提示消息 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/Message.html#.GroupTipPayload\"),t.content.memberList.map((function(e){return{userID:e.userID,shutupTime:e.muteTime}}))}});break;default:t.content[n]=e[n]}})),this.content.userIDList||(this.content.userIDList=[this.content.operatorID])}},{key:\"_initGroupProfile\",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var o=t[n];Xe[o]&&(this.content.groupProfile[o]=e[o])}}}]),e}(),Ze={from:!0,groupID:!0,name:!0,to:!0},et=function(){function e(t){r(this,e),this.type=n.MSG_GRP_SYS_NOTICE,this.content={},this._initContent(t)}return s(e,[{key:\"_initContent\",value:function(e){var t=this;Object.keys(e).forEach((function(n){switch(n){case\"memberInfoList\":break;case\"remarkInfo\":t.content.handleMessage=e[n];break;case\"groupProfile\":t.content.groupProfile={},t._initGroupProfile(e[n]);break;default:t.content[n]=e[n]}}))}},{key:\"_initGroupProfile\",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var o=t[n];Ze[o]&&(this.content.groupProfile[o]=e[o])}}}]),e}(),tt={70001:\"UserSig 已过期，请重新生成。建议 UserSig 有效期设置不小于24小时。\",70002:\"UserSig 长度为0，请检查传入的 UserSig 是否正确。\",70003:\"UserSig 非法，请使用官网提供的 API 重新生成 UserSig(https://cloud.tencent.com/document/product/269/32688)。\",70005:\"UserSig 非法，请使用官网提供的 API 重新生成 UserSig(https://cloud.tencent.com/document/product/269/32688)。\",70009:\"UserSig 验证失败，可能因为生成 UserSig 时混用了其他 SDKAppID 的私钥或密钥导致，请使用对应 SDKAppID 下的私钥或密钥重新生成 UserSig(https://cloud.tencent.com/document/product/269/32688)。\",70013:\"请求中的 UserID 与生成 UserSig 时使用的 UserID 不匹配，您可以在即时通信 IM 控制台的【开发辅助工具(https://console.cloud.tencent.com/im-detail/tool-usersig)】页面校验 UserSig。\",70014:\"请求中的 SDKAppID 与生成 UserSig 时使用的 SDKAppID 不匹配，您可以在即时通信 IM 控制台的【开发辅助工具(https://console.cloud.tencent.com/im-detail/tool-usersig)】页面校验 UserSig。\",70016:\"密钥不存在，UserSig 验证失败，请在即时通信 IM 控制台获取密钥(https://cloud.tencent.com/document/product/269/32578#.E8.8E.B7.E5.8F.96.E5.AF.86.E9.92.A5)。\",70020:\"SDKAppID 未找到，请在即时通信 IM 控制台确认应用信息。\",70050:\"UserSig 验证次数过于频繁。请检查 UserSig 是否正确，并于1分钟后重新验证。您可以在即时通信 IM 控制台的【开发辅助工具(https://console.cloud.tencent.com/im-detail/tool-usersig)】页面校验 UserSig。\",70051:\"帐号被拉入黑名单。\",70052:\"UserSig 已经失效，请重新生成，再次尝试。\",70107:\"因安全原因被限制登录，请不要频繁登录。\",70169:\"请求的用户帐号不存在。\",70114:\"服务端内部超时，请稍后重试。\",70202:\"服务端内部超时，请稍后重试。\",70206:\"请求中批量数量不合法。\",70402:\"参数非法，请检查必填字段是否填充，或者字段的填充是否满足协议要求。\",70403:\"请求失败，需要 App 管理员权限。\",70398:\"帐号数超限。如需创建多于100个帐号，请将应用升级为专业版，具体操作指引请参见购买指引(https://cloud.tencent.com/document/product/269/32458)。\",70500:\"服务端内部错误，请稍后重试。\",71e3:\"删除帐号失败。仅支持删除体验版帐号，您当前应用为专业版，暂不支持帐号删除。\",20001:\"请求包非法。\",20002:\"UserSig 或 A2 失效。\",20003:\"消息发送方或接收方 UserID 无效或不存在，请检查 UserID 是否已导入即时通信 IM。\",20004:\"网络异常，请重试。\",20005:\"服务端内部错误，请重试。\",20006:\"触发发送单聊消息之前回调，App 后台返回禁止下发该消息。\",20007:\"发送单聊消息，被对方拉黑，禁止发送。消息发送状态默认展示为失败，您可以登录控制台修改该场景下的消息发送状态展示结果，具体操作请参见消息保留设置(https://cloud.tencent.com/document/product/269/38656)。\",20009:\"消息发送双方互相不是好友，禁止发送（配置单聊消息校验好友关系才会出现）。\",20010:\"发送单聊消息，自己不是对方的好友（单向关系），禁止发送。\",20011:\"发送单聊消息，对方不是自己的好友（单向关系），禁止发送。\",20012:\"发送方被禁言，该条消息被禁止发送。\",20016:\"消息撤回超过了时间限制（默认2分钟）。\",20018:\"删除漫游内部错误。\",90001:\"JSON 格式解析失败，请检查请求包是否符合 JSON 规范。\",90002:\"JSON 格式请求包中 MsgBody 不符合消息格式描述，或者 MsgBody 不是 Array 类型，请参考 TIMMsgElement 对象的定义(https://cloud.tencent.com/document/product/269/2720#.E6.B6.88.E6.81.AF.E5.85.83.E7.B4.A0-timmsgelement)。\",90003:\"JSON 格式请求包体中缺少 To_Account 字段或者 To_Account 帐号不存在。\",90005:\"JSON 格式请求包体中缺少 MsgRandom 字段或者 MsgRandom 字段不是 Integer 类型。\",90006:\"JSON 格式请求包体中缺少 MsgTimeStamp 字段或者 MsgTimeStamp 字段不是 Integer 类型。\",90007:\"JSON 格式请求包体中 MsgBody 类型不是 Array 类型，请将其修改为 Array 类型。\",90008:\"JSON 格式请求包体中缺少 From_Account 字段或者 From_Account 帐号不存在。\",90009:\"请求需要 App 管理员权限。\",90010:\"JSON 格式请求包不符合消息格式描述，请参考 TIMMsgElement 对象的定义(https://cloud.tencent.com/document/product/269/2720#.E6.B6.88.E6.81.AF.E5.85.83.E7.B4.A0-timmsgelement)。\",90011:\"批量发消息目标帐号超过500，请减少 To_Account 中目标帐号数量。\",90012:\"To_Account 没有注册或不存在，请确认 To_Account 是否导入即时通信 IM 或者是否拼写错误。\",90026:\"消息离线存储时间错误（最多不能超过7天）。\",90031:\"JSON 格式请求包体中 SyncOtherMachine 字段不是 Integer 类型。\",90044:\"JSON 格式请求包体中 MsgLifeTime 字段不是 Integer 类型。\",90048:\"请求的用户帐号不存在。\",90054:\"撤回请求中的 MsgKey 不合法。\",90994:\"服务内部错误，请重试。\",90995:\"服务内部错误，请重试。\",91e3:\"服务内部错误，请重试。\",90992:\"服务内部错误，请重试；如果所有请求都返回该错误码，且 App 配置了第三方回调，请检查 App 服务端是否正常向即时通信 IM 后台服务端返回回调结果。\",93e3:\"JSON 数据包超长，消息包体请不要超过8k。\",91101:\"Web 端长轮询被踢（Web 端同时在线实例个数超出限制）。\",10002:\"服务端内部错误，请重试。\",10003:\"请求中的接口名称错误，请核对接口名称并重试。\",10004:\"参数非法，请根据错误描述检查请求是否正确。\",10005:\"请求包体中携带的帐号数量过多。\",10006:\"操作频率限制，请尝试降低调用的频率。\",10007:\"操作权限不足，例如 Work 群组中普通成员尝试执行踢人操作，但只有 App 管理员才有权限。\",10008:\"请求非法，可能是请求中携带的签名信息验证不正确，请再次尝试。\",10009:\"该群不允许群主主动退出。\",10010:\"群组不存在，或者曾经存在过，但是目前已经被解散。\",10011:\"解析 JSON 包体失败，请检查包体的格式是否符合 JSON 格式。\",10012:\"发起操作的 UserID 非法，请检查发起操作的用户 UserID 是否填写正确。\",10013:\"被邀请加入的用户已经是群成员。\",10014:\"群已满员，无法将请求中的用户加入群组，如果是批量加人，可以尝试减少加入用户的数量。\",10015:\"找不到指定 ID 的群组。\",10016:\"App 后台通过第三方回调拒绝本次操作。\",10017:\"因被禁言而不能发送消息，请检查发送者是否被设置禁言。\",10018:\"应答包长度超过最大包长（1MB），请求的内容过多，请尝试减少单次请求的数据量。\",10019:\"请求的用户帐号不存在。\",10021:\"群组 ID 已被使用，请选择其他的群组 ID。\",10023:\"发消息的频率超限，请延长两次发消息时间的间隔。\",10024:\"此邀请或者申请请求已经被处理。\",10025:\"群组 ID 已被使用，并且操作者为群主，可以直接使用。\",10026:\"该 SDKAppID 请求的命令字已被禁用。\",10030:\"请求撤回的消息不存在。\",10031:\"消息撤回超过了时间限制（默认2分钟）。\",10032:\"请求撤回的消息不支持撤回操作。\",10033:\"群组类型不支持消息撤回操作。\",10034:\"该消息类型不支持删除操作。\",10035:\"直播群和在线成员广播大群不支持删除消息。\",10036:\"直播群创建数量超过了限制，请参考价格说明(https://cloud.tencent.com/document/product/269/11673)购买预付费套餐“IM直播群”。\",10037:\"单个用户可创建和加入的群组数量超过了限制，请参考价格说明(https://cloud.tencent.com/document/product/269/11673)购买或升级预付费套餐“单人可创建与加入群组数”。\",10038:\"群成员数量超过限制，请参考价格说明(https://cloud.tencent.com/document/product/269/11673)购买或升级预付费套餐“扩展群人数上限”。\",10041:\"该应用（SDKAppID）已配置不支持群消息撤回。\"},nt=function(e){l(n,e);var t=v(n);function n(e){var o;return r(this,n),(o=t.call(this)).code=e.code,o.message=tt[e.code]||e.message,o.data=e.data||{},o}return n}(g(Error)),ot={NO_SDKAPPID:2e3,NO_ACCOUNT_TYPE:2001,NO_IDENTIFIER:2002,NO_USERSIG:2003,NO_TINYID:2022,NO_A2KEY:2023,COS_UNDETECTED:2040,MESSAGE_SEND_FAIL:2100,MESSAGE_LIST_CONSTRUCTOR_NEED_OPTIONS:2103,MESSAGE_SEND_NEED_MESSAGE_INSTANCE:2105,MESSAGE_SEND_INVALID_CONVERSATION_TYPE:2106,MESSAGE_FILE_IS_EMPTY:2108,MESSAGE_ONPROGRESS_FUNCTION_ERROR:2109,MESSAGE_REVOKE_FAIL:2110,MESSAGE_IMAGE_SELECT_FILE_FIRST:2251,MESSAGE_IMAGE_TYPES_LIMIT:2252,MESSAGE_IMAGE_SIZE_LIMIT:2253,MESSAGE_AUDIO_UPLOAD_FAIL:2300,MESSAGE_AUDIO_SIZE_LIMIT:2301,MESSAGE_VIDEO_UPLOAD_FAIL:2350,MESSAGE_VIDEO_SIZE_LIMIT:2351,MESSAGE_VIDEO_TYPES_LIMIT:2352,MESSAGE_FILE_UPLOAD_FAIL:2400,MESSAGE_FILE_SELECT_FILE_FIRST:2401,MESSAGE_FILE_SIZE_LIMIT:2402,MESSAGE_FILE_URL_IS_EMPTY:2403,CONVERSATION_NOT_FOUND:2500,USER_OR_GROUP_NOT_FOUND:2501,CONVERSATION_UN_RECORDED_TYPE:2502,ILLEGAL_GROUP_TYPE:2600,CANNOT_JOIN_WORK:2601,CANNOT_CHANGE_OWNER_IN_AVCHATROOM:2620,CANNOT_CHANGE_OWNER_TO_SELF:2621,CANNOT_DISMISS_Work:2622,JOIN_GROUP_FAIL:2660,CANNOT_ADD_MEMBER_IN_AVCHATROOM:2661,CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN:2662,CANNOT_KICK_MEMBER_IN_AVCHATROOM:2680,NOT_OWNER:2681,CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM:2682,INVALID_MEMBER_ROLE:2683,CANNOT_SET_SELF_MEMBER_ROLE:2684,CANNOT_MUTE_SELF:2685,DEL_FRIEND_INVALID_PARAM:2700,UPDATE_PROFILE_INVALID_PARAM:2721,UPDATE_PROFILE_NO_KEY:2722,ADD_BLACKLIST_INVALID_PARAM:2740,DEL_BLACKLIST_INVALID_PARAM:2741,CANNOT_ADD_SELF_TO_BLACKLIST:2742,NETWORK_ERROR:2800,NETWORK_TIMEOUT:2801,NETWORK_BASE_OPTIONS_NO_URL:2802,NETWORK_UNDEFINED_SERVER_NAME:2803,NETWORK_PACKAGE_UNDEFINED:2804,NO_NETWORK:2805,CONVERTOR_IRREGULAR_PARAMS:2900,NOTICE_RUNLOOP_UNEXPECTED_CONDITION:2901,NOTICE_RUNLOOP_OFFSET_LOST:2902,UNCAUGHT_ERROR:2903,GET_LONGPOLL_ID_FAILED:2904,SDK_IS_NOT_READY:2999,LONG_POLL_KICK_OUT:91101,MESSAGE_A2KEY_EXPIRED:20002,ACCOUNT_A2KEY_EXPIRED:70001,LONG_POLL_API_PARAM_ERROR:90001},rt=\"MessageController.constructor() 需要参数 options\",it=\"无法发送空文件\",st=\"回调函数运行时遇到错误，请检查接入侧代码\",at=\"文件大小超过100M，无法发送 \",ut=\"AVChatRoom 类型的群不支持邀请群成员\",ct=\"updateMyProfile 无标配资料字段或自定义资料字段\",lt=\"意料外的通知条件\",pt=\"_syncOffset 丢失\",ht=[\"jpg\",\"jpeg\",\"gif\",\"png\"],dt=[\"mp4\"],ft=function(){function e(t){r(this,e);var o=this._check(t);if(o instanceof nt)throw o;this.type=n.MSG_FILE,this._percent=0;var i=this._getFileInfo(t);this.content={downloadFlag:2,fileUrl:t.url||\"\",uuid:t.uuid,fileName:i.name||\"\",fileSize:i.size||0}}return s(e,[{key:\"_getFileInfo\",value:function(e){if(e.fileName&&e.fileSize)return{size:e.fileSize,name:e.fileName};if(O)return{};var t=e.file.files[0];return{size:t.size,name:t.name,type:t.type.slice(t.type.lastIndexOf(\"/\")+1).toLowerCase()}}},{key:\"updatePercent\",value:function(e){this._percent=e,this._percent>1&&(this._percent=1)}},{key:\"updateFileUrl\",value:function(e){this.content.fileUrl=e}},{key:\"_check\",value:function(e){if(e.size>104857600)return new nt({code:ot.MESSAGE_FILE_SIZE_LIMIT,message:\"\".concat(at,\": \").concat(104857600,\" bytes\")})}},{key:\"sendable\",value:function(){return\"\"!==this.content.fileUrl&&\"\"!==this.content.fileName&&0!==this.content.fileSize}}]),e}(),gt=function(){function e(t){r(this,e),this.type=n.MSG_CUSTOM,this.content={data:t.data||\"\",description:t.description||\"\",extension:t.extension||\"\"}}return s(e,[{key:\"setData\",value:function(e){return this.content.data=e,this}},{key:\"setDescription\",value:function(e){return this.content.description=e,this}},{key:\"setExtension\",value:function(e){return this.content.extension=e,this}},{key:\"sendable\",value:function(){return 0!==this.content.data.length||0!==this.content.description.length||0!==this.content.extension.length}}]),e}(),mt=function(){function e(t){r(this,e),this.type=n.MSG_VIDEO,this._percent=0,this.content={remoteVideoUrl:t.remoteVideoUrl,videoFormat:t.videoFormat,videoSecond:parseInt(t.videoSecond,10),videoSize:t.videoSize,videoUrl:t.videoUrl,videoDownloadFlag:2,videoUUID:t.videoUUID,thumbUUID:t.thumbUUID,thumbFormat:t.thumbFormat,thumbWidth:t.thumbWidth,thumbHeight:t.thumbHeight,thumbSize:t.thumbSize,thumbDownloadFlag:2,thumbUrl:t.thumbUrl}}return s(e,[{key:\"updatePercent\",value:function(e){this._percent=e,this._percent>1&&(this._percent=1)}},{key:\"updateVideoUrl\",value:function(e){e&&(this.content.remoteVideoUrl=e)}},{key:\"sendable\",value:function(){return\"\"!==this.content.remoteVideoUrl}}]),e}(),_t=function e(t){r(this,e),this.type=n.MSG_GEO,this.content=t},vt={1:n.MSG_PRIORITY_HIGH,2:n.MSG_PRIORITY_NORMAL,3:n.MSG_PRIORITY_LOW,4:n.MSG_PRIORITY_LOWEST},yt=function(){function e(t){r(this,e),this.ID=\"\",this.conversationID=t.conversationID||null,this.conversationType=t.conversationType||n.CONV_C2C,this.conversationSubType=t.conversationSubType,this.time=t.time||Math.ceil(Date.now()/1e3),this.sequence=t.sequence||0,this.clientSequence=t.clientSequence||t.sequence||0,this.random=t.random||de(),this.priority=this._computePriority(t.priority),this.nick=\"\",this.avatar=\"\",this.isPeerRead=!1,this._elements=[],this.isPlaceMessage=t.isPlaceMessage||0,this.isRevoked=2===t.isPlaceMessage||8===t.msgFlagBits,this.geo={},this.from=t.from||null,this.to=t.to||null,this.flow=\"\",this.isSystemMessage=t.isSystemMessage||!1,this.protocol=t.protocol||\"JSON\",this.isResend=!1,this.isRead=!1,this.status=t.status||Ge,this.reInitialize(t.currentUser),this.extractGroupInfo(t.groupProfile||null)}return s(e,[{key:\"getElements\",value:function(){return this._elements}},{key:\"extractGroupInfo\",value:function(e){null!==e&&(X(e.fromAccountNick)&&(this.nick=e.fromAccountNick),X(e.fromAccountHeadurl)&&(this.avatar=e.fromAccountHeadurl))}},{key:\"_initProxy\",value:function(){this.payload=this._elements[0].content,this.type=this._elements[0].type}},{key:\"reInitialize\",value:function(e){e&&(this.status=this.from?Ge:Pe,!this.from&&(this.from=e)),this._initFlow(e),this._initielizeSequence(e),this._concactConversationID(e),this.generateMessageID(e)}},{key:\"isSendable\",value:function(){return 0!==this._elements.length&&(\"function\"!=typeof this._elements[0].sendable?(W.warn(\"\".concat(this._elements[0].type,' need \"boolean : sendable()\" method')),!1):this._elements[0].sendable())}},{key:\"_initTo\",value:function(e){this.conversationType===n.CONV_GROUP&&(this.to=e.groupID)}},{key:\"_initielizeSequence\",value:function(e){0===this.clientSequence&&e&&(this.clientSequence=function(e){if(!e)return W.error(\"autoincrementIndex(string: key) need key parameter\"),!1;if(void 0===_e[e]){var t=new Date,n=\"3\".concat(t.getHours()).slice(-2),o=\"0\".concat(t.getMinutes()).slice(-2),r=\"0\".concat(t.getSeconds()).slice(-2);_e[e]=parseInt([n,o,r,\"0001\"].join(\"\")),n=null,o=null,r=null,W.warn(\"utils.autoincrementIndex() create new sequence : \".concat(e,\" = \").concat(_e[e]))}return _e[e]++}(e)),0===this.sequence&&this.conversationType===n.CONV_C2C&&(this.sequence=this.clientSequence)}},{key:\"generateMessageID\",value:function(e){var t=e===this.from?1:0,n=this.sequence>0?this.sequence:this.clientSequence;this.ID=\"\".concat(this.conversationID,\"-\").concat(n,\"-\").concat(this.random,\"-\").concat(t)}},{key:\"_initFlow\",value:function(e){\"\"!==e&&(e===this.from?(this.flow=\"out\",this.isRead=!0):this.flow=\"in\")}},{key:\"_concactConversationID\",value:function(e){var t=this.to,o=\"\",r=this.conversationType;r!==n.CONV_SYSTEM?(o=r===n.CONV_C2C?e===this.from?t:this.from:this.to,this.conversationID=\"\".concat(r).concat(o)):this.conversationID=n.CONV_SYSTEM}},{key:\"isElement\",value:function(e){return e instanceof Ke||e instanceof We||e instanceof ze||e instanceof Je||e instanceof ft||e instanceof mt||e instanceof Qe||e instanceof et||e instanceof gt||e instanceof _t}},{key:\"setElement\",value:function(e){var t=this;if(this.isElement(e))return this._elements=[e],void this._initProxy();var o=function(e){switch(e.type){case n.MSG_TEXT:t.setTextElement(e.content);break;case n.MSG_IMAGE:t.setImageElement(e.content);break;case n.MSG_AUDIO:t.setAudioElement(e.content);break;case n.MSG_FILE:t.setFileElement(e.content);break;case n.MSG_VIDEO:t.setVideoElement(e.content);break;case n.MSG_CUSTOM:t.setCustomElement(e.content);break;case n.MSG_GEO:t.setGEOElement(e.content);break;case n.MSG_GRP_TIP:t.setGroupTipElement(e.content);break;case n.MSG_GRP_SYS_NOTICE:t.setGroupSystemNoticeElement(e.content);break;case n.MSG_FACE:t.setFaceElement(e.content);break;default:W.warn(e.type,e.content,\"no operation......\")}};if(Array.isArray(e))for(var r=0;r<e.length;r++)o(e[r]);else o(e);this._initProxy()}},{key:\"setTextElement\",value:function(e){var t=\"string\"==typeof e?e:e.text,n=new Ke({text:t});this._elements.push(n)}},{key:\"setImageElement\",value:function(e){var t=new We(e);this._elements.push(t)}},{key:\"setAudioElement\",value:function(e){var t=new Je(e);this._elements.push(t)}},{key:\"setFileElement\",value:function(e){var t=new ft(e);this._elements.push(t)}},{key:\"setVideoElement\",value:function(e){var t=new mt(e);this._elements.push(t)}},{key:\"setGEOElement\",value:function(e){var t=new _t(e);this._elements.push(t)}},{key:\"setCustomElement\",value:function(e){var t=new gt(e);this._elements.push(t)}},{key:\"setGroupTipElement\",value:function(e){var t={},o=e.operationType;ke(e.memberInfoList)||o!==n.GRP_TIP_MBR_JOIN&&o!==n.GRP_TIP_MBR_KICKED_OUT?e.operatorInfo&&(t=e.operatorInfo):t=e.memberInfoList[0];var r=t,i=r.nick,s=r.avatar;X(i)&&(this.nick=i),X(s)&&(this.avatar=s);var a=new Qe(e);this._elements.push(a)}},{key:\"setGroupSystemNoticeElement\",value:function(e){var t=new et(e);this._elements.push(t)}},{key:\"setFaceElement\",value:function(e){var t=new ze(e);this._elements.push(t)}},{key:\"setIsRead\",value:function(e){this.isRead=e}},{key:\"_computePriority\",value:function(e){if(te(e))return n.MSG_PRIORITY_NORMAL;if(X(e)&&-1!==Object.values(vt).indexOf(e))return e;if(J(e)){var t=\"\"+e;if(-1!==Object.keys(vt).indexOf(t))return vt[t]}return n.MSG_PRIORITY_NORMAL}},{key:\"elements\",get:function(){return W.warn(\"！！！Message 实例的 elements 属性即将废弃，请尽快修改。使用 type 和 payload 属性处理单条消息，兼容组合消息使用 _elements 属性！！！\"),this._elements}}]),e}(),It=function(e){return!(!e||!(function(e){return X(e)&&e.slice(0,3)===n.CONV_C2C}(e)||function(e){return X(e)&&e.slice(0,5)===n.CONV_GROUP}(e)||Te(e))&&(console.warn(\"非法的会话 ID:\".concat(e,\"。会话 ID 组成方式：\\n  C2C + userID（单聊）\\n  GROUP + groupID（群聊）\\n  @TIM#SYSTEM（系统通知会话）\")),1))},Mt={login:{userID:{type:\"String\",required:!0},userSig:{type:\"String\",required:!0}},addToBlacklist:{userIDList:{type:\"Array\",required:!0}},mutilParam:[{name:\"paramName\",type:\"Number\",required:!0},{name:\"paramName\",type:\"String\",required:!0}],on:[{name:\"eventName\",type:\"String\",validator:function(e){return\"string\"==typeof e&&0!==e.length||(console.warn(\"on 接口的 eventName 参数必须是 String 类型，且不能为空。\"),!1)}},{name:\"handler\",type:\"Function\",validator:function(e){return\"function\"!=typeof e?(console.warn(\"on 接口的 handler 参数必须是 Function 类型。\"),!1):(\"\"===e.name&&console.warn(\"on 接口的 handler 参数推荐使用具名函数。具名函数可以使用 off 接口取消订阅，匿名函数无法取消订阅。\"),!0)}}],once:[{name:\"eventName\",type:\"String\",validator:function(e){return\"string\"==typeof e&&0!==e.length||(console.warn(\"once 接口的 eventName 参数必须是 String 类型，且不能为空。\"),!1)}},{name:\"handler\",type:\"Function\",validator:function(e){return\"function\"!=typeof e?(console.warn(\"once 接口的 handler 参数必须是 Function 类型。\"),!1):(\"\"===e.name&&console.warn(\"once 接口的 handler 参数推荐使用具名函数。\"),!0)}}],off:[{name:\"eventName\",type:\"String\",validator:function(e){return\"string\"==typeof e&&0!==e.length||(console.warn(\"off 接口的 eventName 参数必须是 String 类型，且不能为空。\"),!1)}},{name:\"handler\",type:\"Function\",validator:function(e){return\"function\"!=typeof e?(console.warn(\"off 接口的 handler 参数必须是 Function 类型。\"),!1):(\"\"===e.name&&console.warn(\"off 接口的 handler 参数为匿名函数，无法取消订阅。\"),!0)}}],sendMessage:[{name:\"message\",type:\"Object\",required:!0}],getMessageList:{conversationID:{type:\"String\",required:!0,validator:function(e){return It(e)}},nextReqMessageID:{type:\"String\"},count:{type:\"Number\",validator:function(e){return!(!te(e)&&!/^[1-9][0-9]*$/.test(e)&&(console.warn(\"getMessageList 接口的 count 参数必须为正整数\"),1))}}},setMessageRead:{conversationID:{type:\"String\",required:!0,validator:function(e){return It(e)}}},getConversationProfile:[{name:\"conversationID\",type:\"String\",required:!0,validator:function(e){return It(e)}}],deleteConversation:[{name:\"conversationID\",type:\"String\",required:!0,validator:function(e){return It(e)}}],getGroupList:{groupProfileFilter:{type:\"Array\"}},getGroupProfile:{groupID:{type:\"String\",required:!0},groupCustomFieldFilter:{type:\"Array\"},memberCustomFieldFilter:{type:\"Array\"}},getGroupProfileAdvance:{groupIDList:{type:\"Array\",required:!0}},createGroup:{name:{type:\"String\",required:!0}},joinGroup:{groupID:{type:\"String\",required:!0},type:{type:\"String\"},applyMessage:{type:\"String\"}},quitGroup:[{name:\"groupID\",type:\"String\",required:!0}],handleApplication:{message:{type:\"Object\",required:!0},handleAction:{type:\"String\",required:!0},handleMessage:{type:\"String\"}},changeGroupOwner:{groupID:{type:\"String\",required:!0},newOwnerID:{type:\"String\",required:!0}},updateGroupProfile:{groupID:{type:\"String\",required:!0},muteAllMembers:{type:\"Boolean\"}},dismissGroup:[{name:\"groupID\",type:\"String\",required:!0}],searchGroupByID:[{name:\"groupID\",type:\"String\",required:!0}],getGroupMemberList:{groupID:{type:\"String\",required:!0},offset:{type:\"Number\"},count:{type:\"Number\"}},getGroupMemberProfile:{groupID:{type:\"String\",required:!0},userIDList:{type:\"Array\",required:!0},memberCustomFieldFilter:{type:\"Array\"}},addGroupMemeber:{groupID:{type:\"String\",required:!0},userIDList:{type:\"Array\",required:!0}},setGroupMemberRole:{groupID:{type:\"String\",required:!0},userID:{type:\"String\",required:!0},role:{type:\"String\",required:!0}},setGroupMemberMuteTime:{groupID:{type:\"String\",required:!0},userID:{type:\"String\",required:!0},muteTime:{type:\"Number\",validator:function(e){return e>=0}}},setGroupMemberNameCard:{groupID:{type:\"String\",required:!0},userID:{type:\"String\"},nameCard:{type:\"String\",required:!0,validator:function(e){return!0!==/^\\s+$/.test(e)}}},setMessageRemindType:{groupID:{type:\"String\",required:!0},messageRemindType:{type:\"String\",required:!0}},setGroupMemberCustomField:{groupID:{type:\"String\",required:!0},userID:{type:\"String\"},memberCustomField:{type:\"Array\",required:!0}},deleteGroupMember:{groupID:{type:\"String\",required:!0}},createTextMessage:{to:{type:\"String\",required:!0},conversationType:{type:\"String\",required:!0},payload:{type:\"Object\",required:!0,validator:function(e){return X(e.text)?0!==e.text.length||(console.warn(\"createTextMessage 消息内容不能为空。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createTextMessage\"),!1):(console.warn(\"createTextMessage payload.text 类型必须为字符串。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createTextMessage\"),!1)}}},createCustomMessage:{to:{type:\"String\",required:!0},conversationType:{type:\"String\",required:!0},payload:{type:\"Object\",required:!0,validator:function(e){return e.data&&!X(e.data)?(console.warn(\"createCustomMessage payload.data 类型必须为 String。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createCustomMessage\"),!1):e.description&&!X(e.description)?(console.warn(\"createCustomMessage payload.description 类型必须为 String。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createCustomMessage\"),!1):!(e.extension&&!X(e.extension)&&(console.warn(\"createCustomMessage payload.extension 类型必须为 String。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createCustomMessage\"),1))}}},createImageMessage:{to:{type:\"String\",required:!0},conversationType:{type:\"String\",required:!0},payload:{type:\"Object\",required:!0,validator:function(e){if(te(e.file))return console.warn(\"createImageMessage payload.file 不能为 undefined。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createImageMessage\"),!1;if(w){if(!(e.file instanceof HTMLInputElement||z(e.file)))return console.warn(\"createImageMessage payload.file 的类型必须是 HTMLInputElement 或 File。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createImageMessage\"),!1;if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return console.warn(\"createImageMessage 您没有选择文件，无法发送。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createImageMessage\"),!1}return!0},onProgress:{type:\"Function\",required:!1,validator:function(e){return te(e)&&console.warn(\"createImageMessage 没有 onProgress 回调，您将无法获取图片上传进度。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createImageMessage\"),!0}}}},createAudioMessage:{to:{type:\"String\",required:!0},conversationType:{type:\"String\",required:!0},payload:{type:\"Object\",required:!0},onProgress:{type:\"Function\",required:!1,validator:function(e){return te(e)&&console.warn(\"createAudioMessage 没有 onProgress 回调，您将无法获取音频上传进度。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createAudioMessage\"),!0}}},createVideoMessage:{to:{type:\"String\",required:!0},conversationType:{type:\"String\",required:!0},payload:{type:\"Object\",required:!0,validator:function(e){if(te(e.file))return console.warn(\"createVideoMessage payload.file 不能为 undefined。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createVideoMessage\"),!1;if(w){if(!(e.file instanceof HTMLInputElement||z(e.file)))return console.warn(\"createVideoMessage payload.file 的类型必须是 HTMLInputElement 或 File。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createVideoMessage\"),!1;if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return console.warn(\"createVideoMessage 您没有选择文件，无法发送。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createVideoMessage\"),!1}return!0}},onProgress:{type:\"Function\",required:!1,validator:function(e){return te(e)&&console.warn(\"createVideoMessage 没有 onProgress 回调，您将无法获取视频上传进度。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createVideoMessage\"),!0}}},createFaceMessage:{to:{type:\"String\",required:!0},conversationType:{type:\"String\",required:!0},payload:{type:\"Object\",required:!0,validator:function(e){return!(!Z(e)||(J(e.index)?!X(e.data)&&(console.warn(\"createFaceMessage payload.data 类型必须为 String！\"),1):(console.warn(\"createFaceMessage payload.index 类型必须为 Number！\"),1)))}}},createFileMessage:{to:{type:\"String\",required:!0},conversationType:{type:\"String\",required:!0},payload:{type:\"Object\",required:!0,validator:function(e){if(te(e.file))return console.warn(\"createFileMessage payload.file 不能为 undefined。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createFileMessage\"),!1;if(w){if(!(e.file instanceof HTMLInputElement||z(e.file)))return console.warn(\"createFileMessage payload.file 的类型必须是 HTMLInputElement 或 File。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createFileMessage\"),!1;if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return console.warn(\"createFileMessage 您没有选择文件，无法发送。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createFileMessage\"),!1}return!0}},onProgress:{type:\"Function\",required:!1,validator:function(e){return te(e)&&console.warn(\"createFileMessage 没有 onProgress 回调，您将无法获取文件上传进度。请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#createFileMessage\"),!0}}},revokeMessage:[{name:\"message\",type:\"Object\",required:!0,validator:function(e){return e instanceof yt?e.conversationType===n.CONV_SYSTEM?(console.warn(\"revokeMessage 不能撤回系统会话消息，只能撤回单聊消息或群消息\"),!1):!0!==e.isRevoked||(console.warn(\"revokeMessage 消息已经被撤回，请勿重复操作\"),!1):(console.warn(\"revokeMessage 参数 message 必须为 Message(https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/Message.html) 实例。\"),!1)}}],getUserProfile:{userIDList:{type:\"Array\",validator:function(e){return ee(e)?(0===e.length&&console.warn(\"getUserProfile userIDList 不能为空数组，请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#getUserProfile\"),!0):(console.warn(\"getUserProfile userIDList 必须为数组，请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#getUserProfile\"),!1)}}},updateMyProfile:{profileCustomField:{type:\"Array\",validator:function(e){return!!te(e)||!!ee(e)||(console.warn(\"updateMyProfile profileCustomField 必须为数组，请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#updateMyProfile\"),!1)}}}},Ct={login:\"login\",logout:\"logout\",on:\"on\",once:\"once\",off:\"off\",setLogLevel:\"setLogLevel\",downloadLog:\"downloadLog\",registerPlugin:\"registerPlugin\",destroy:\"destroy\",createTextMessage:\"createTextMessage\",createImageMessage:\"createImageMessage\",createAudioMessage:\"createAudioMessage\",createVideoMessage:\"createVideoMessage\",createCustomMessage:\"createCustomMessage\",createFaceMessage:\"createFaceMessage\",createFileMessage:\"createFileMessage\",sendMessage:\"sendMessage\",resendMessage:\"resendMessage\",getMessageList:\"getMessageList\",setMessageRead:\"setMessageRead\",revokeMessage:\"revokeMessage\",getConversationList:\"getConversationList\",getConversationProfile:\"getConversationProfile\",deleteConversation:\"deleteConversation\",getGroupList:\"getGroupList\",getGroupProfile:\"getGroupProfile\",createGroup:\"createGroup\",joinGroup:\"joinGroup\",updateGroupProfile:\"updateGroupProfile\",quitGroup:\"quitGroup\",dismissGroup:\"dismissGroup\",changeGroupOwner:\"changeGroupOwner\",searchGroupByID:\"searchGroupByID\",setMessageRemindType:\"setMessageRemindType\",handleGroupApplication:\"handleGroupApplication\",getGroupMemberProfile:\"getGroupMemberProfile\",getGroupMemberList:\"getGroupMemberList\",addGroupMember:\"addGroupMember\",deleteGroupMember:\"deleteGroupMember\",setGroupMemberNameCard:\"setGroupMemberNameCard\",setGroupMemberMuteTime:\"setGroupMemberMuteTime\",setGroupMemberRole:\"setGroupMemberRole\",setGroupMemberCustomField:\"setGroupMemberCustomField\",getMyProfile:\"getMyProfile\",getUserProfile:\"getUserProfile\",updateMyProfile:\"updateMyProfile\",getBlacklist:\"getBlacklist\",addToBlacklist:\"addToBlacklist\",removeFromBlacklist:\"removeFromBlacklist\",getFriendList:\"getFriendList\"},Et=\"1.7.3\",Tt=\"537048168\",St=\"10\",Dt=\"protobuf\",kt=\"json\",At={HOST:{TYPE:3,ACCESS_LAYER_TYPES:{SANDBOX:1,TEST:2,PRODUCTION:3},CURRENT:{COMMON:\"https://webim.tim.qq.com\",PIC:\"https://pic.tim.qq.com\",COS:\"https://yun.tim.qq.com\"},PRODUCTION:{COMMON:\"https://webim.tim.qq.com\",PIC:\"https://pic.tim.qq.com\",COS:\"https://yun.tim.qq.com\"},SANDBOX:{COMMON:\"https://events.tim.qq.com\",PIC:\"https://pic.tim.qq.com\",COS:\"https://yun.tim.qq.com\"},TEST:{COMMON:\"https://test.tim.qq.com\",PIC:\"https://pic.tim.qq.com\",COS:\"https://test.tim.qq.com\"},setCurrent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;switch(e){case this.ACCESS_LAYER_TYPES.SANDBOX:this.CURRENT=this.SANDBOX,this.TYPE=this.ACCESS_LAYER_TYPES.SANDBOX;break;case this.ACCESS_LAYER_TYPES.TEST:this.CURRENT=this.TEST,this.TYPE=this.ACCESS_LAYER_TYPES.TEST;break;default:this.CURRENT=this.PRODUCTION,this.TYPE=this.ACCESS_LAYER_TYPES.PRODUCTION}}},NAME:{OPEN_IM:\"openim\",GROUP:\"group_open_http_svc\",FRIEND:\"sns\",PROFILE:\"profile\",RECENT_CONTACT:\"recentcontact\",PIC:\"openpic\",BIG_GROUP_NO_AUTH:\"group_open_http_noauth_svc\",BIG_GROUP_LONG_POLLING:\"group_open_long_polling_http_svc\",BIG_GROUP_LONG_POLLING_NO_AUTH:\"group_open_long_polling_http_noauth_svc\",IM_OPEN_STAT:\"imopenstat\",WEB_IM:\"webim\",IM_COS_SIGN:\"im_cos_sign_svr\"},CMD:{ACCESS_LAYER:\"accesslayer\",LOGIN:\"login\",LOGOUT_LONG_POLL:\"longpollinglogout\",LOGOUT_ALL:\"logout\",PORTRAIT_GET:\"portrait_get_all\",PORTRAIT_SET:\"portrait_set\",GET_LONG_POLL_ID:\"getlongpollingid\",LONG_POLL:\"longpolling\",AVCHATROOM_LONG_POLL:\"get_msg\",FRIEND_ADD:\"friend_add\",FRIEND_GET_ALL:\"friend_get_all\",FRIEND_DELETE:\"friend_delete\",RESPONSE_PENDENCY:\"friend_response\",GET_PENDENCY:\"pendency_get\",DELETE_PENDENCY:\"pendency_delete\",GET_GROUP_PENDENCY:\"get_pendency\",GET_BLACKLIST:\"black_list_get\",ADD_BLACKLIST:\"black_list_add\",DELETE_BLACKLIST:\"black_list_delete\",CREATE_GROUP:\"create_group\",GET_JOINED_GROUPS:\"get_joined_group_list\",SEND_MESSAGE:\"sendmsg\",REVOKE_C2C_MESSAGE:\"msgwithdraw\",SEND_GROUP_MESSAGE:\"send_group_msg\",REVOKE_GROUP_MESSAGE:\"group_msg_recall\",GET_GROUP_INFO:\"get_group_info\",GET_GROUP_MEMBER_INFO:\"get_specified_group_member_info\",GET_GROUP_MEMBER_LIST:\"get_group_member_info\",QUIT_GROUP:\"quit_group\",CHANGE_GROUP_OWNER:\"change_group_owner\",DESTROY_GROUP:\"destroy_group\",ADD_GROUP_MEMBER:\"add_group_member\",DELETE_GROUP_MEMBER:\"delete_group_member\",SEARCH_GROUP_BY_ID:\"get_group_public_info\",APPLY_JOIN_GROUP:\"apply_join_group\",HANDLE_APPLY_JOIN_GROUP:\"handle_apply_join_group\",MODIFY_GROUP_INFO:\"modify_group_base_info\",MODIFY_GROUP_MEMBER_INFO:\"modify_group_member_info\",DELETE_GROUP_SYSTEM_MESSAGE:\"deletemsg\",GET_CONVERSATION_LIST:\"get\",PAGING_GET_CONVERSATION_LIST:\"page_get\",DELETE_CONVERSATION:\"delete\",GET_MESSAGES:\"getmsg\",GET_C2C_ROAM_MESSAGES:\"getroammsg\",GET_GROUP_ROAM_MESSAGES:\"group_msg_get\",SET_C2C_MESSAGE_READ:\"msgreaded\",GET_PEER_READ_TIME:\"get_peer_read_time\",SET_GROUP_MESSAGE_READ:\"msg_read_report\",FILE_READ_AND_WRITE_AUTHKEY:\"authkey\",FILE_UPLOAD:\"pic_up\",COS_SIGN:\"cos\",TIM_WEB_REPORT:\"tim_web_report\",BIG_DATA_HALLWAY_AUTH_KEY:\"authkey\"},CHANNEL:{SOCKET:1,XHR:2,AUTO:0},NAME_VERSION:{openim:\"v4\",group_open_http_svc:\"v4\",sns:\"v4\",profile:\"v4\",recentcontact:\"v4\",openpic:\"v4\",group_open_http_noauth_svc:\"v4\",group_open_long_polling_http_svc:\"v4\",group_open_long_polling_http_noauth_svc:\"v4\",imopenstat:\"v4\",im_cos_sign_svr:\"v4\",webim:\"v4\"}};At.HOST.setCurrent(At.HOST.ACCESS_LAYER_TYPES.PRODUCTION);var Rt={request:{toAccount:\"To_Account\",fromAccount:\"From_Account\",to:\"To_Account\",from:\"From_Account\",groupID:\"GroupId\",avatar:\"FaceUrl\"},response:{GroupId:\"groupID\",Member_Account:\"userID\",MsgList:\"messageList\",SyncFlag:\"syncFlag\",To_Account:\"to\",From_Account:\"from\",MsgSeq:\"sequence\",MsgRandom:\"random\",MsgTimeStamp:\"time\",MsgContent:\"content\",MsgBody:\"elements\",GroupWithdrawInfoArray:\"revokedInfos\",WithdrawC2cMsgNotify:\"c2cMessageRevokedNotify\",C2cWithdrawInfoArray:\"revokedInfos\",C2cReadedReceipt:\"c2cMessageReadReceipt\",LastReadTime:\"peerReadTime\",MsgRand:\"random\",MsgType:\"type\",MsgShow:\"messageShow\",NextMsgSeq:\"nextMessageSeq\",FaceUrl:\"avatar\",ProfileDataMod:\"profileModify\",Profile_Account:\"userID\",ValueBytes:\"value\",ValueNum:\"value\",NoticeSeq:\"noticeSequence\",NotifySeq:\"notifySequence\",MsgFrom_AccountExtraInfo:\"messageFromAccountExtraInformation\",Operator_Account:\"operatorID\",OpType:\"operationType\",ReportType:\"operationType\",UserId:\"userID\",User_Account:\"userID\",List_Account:\"userIDList\",MsgOperatorMemberExtraInfo:\"operatorInfo\",MsgMemberExtraInfo:\"memberInfoList\",ImageUrl:\"avatar\",NickName:\"nick\",MsgGroupNewInfo:\"newGroupProfile\",MsgAppDefinedData:\"groupCustomField\",Owner_Account:\"ownerID\",GroupName:\"name\",GroupFaceUrl:\"avatar\",GroupIntroduction:\"introduction\",GroupNotification:\"notification\",GroupApplyJoinOption:\"joinOption\",MsgKey:\"messageKey\",GroupInfo:\"groupProfile\",ShutupTime:\"muteTime\",Desc:\"description\",Ext:\"extension\"},ignoreKeyWord:[\"C2C\",\"ID\",\"USP\"]},Nt=\"_contextWasUpdated\",wt=\"_contextWasReset\",Ot=\"_a2KeyAndTinyIDUpdated\",Lt=\"_specifiedConfigUpdated\",bt=\"_noticeIsSynchronizing\",Pt=\"_noticeIsSynchronized\",Gt=\"_messageSent\",Ut=\"_syncMessageProcessing\",xt=\"_syncMessageFinished\",qt=\"_receiveInstantMessage\",Ft=\"_receiveGroupInstantMessage\",Vt=\"_receveGroupSystemNotice\",Kt=\"_messageRevoked\",Ht=\"_longPollGetIDFailed\",Bt=\"_longPollRequestFailed\",jt=\"_longPollResponseOK\",Yt=\"_longPollKickedOut\",$t=\"_longPollMitipuleDeviceKickedOut\",Wt=\"_longPollGetNewC2CNotice\",zt=\"_longPollGetNewGroupMessages\",Jt=\"_longPollGetNewGroupTips\",Xt=\"_longPollGetNewGroupNotice\",Qt=\"_longPollGetNewFriendMessages\",Zt=\"_longPollProfileModified\",en=\" _longpollGroupMessageRevoked\",tn=\"_longpollC2CMessageRevoked\",nn=\"_longpollC2CMessageReadReceipt\",on=\"_avlongPollRequestFailed\",rn=\"_avlongPollResponseOK\",sn=\"_onGroupListUpdated\",an=\"_loginSuccess\",un=\"_signLogoutExcuting\",cn=\"_logoutSuccess\",ln=\"_a2keyExpired\",pn=\"_errorHasBeenDetected\",hn=\"_onConversationListUpdated\",dn=\"_onConversationListProfileUpdated\",fn=\"_conversationDeleted\",gn=\"onProfileUpdated\",mn=\"joinAVChatRoomSuccess\",_n=\"joinAVChatRoomSuccessNoAuth\",vn=\"_sdkStateReady\",yn=\"_sdkReload\";function In(e,t){if(\"string\"!=typeof e&&!Array.isArray(e))throw new TypeError(\"Expected the input to be `string | string[]`\");var n;return t=Object.assign({pascalCase:!1},t),0===(e=Array.isArray(e)?e.map((function(e){return e.trim()})).filter((function(e){return e.length})).join(\"-\"):e.trim()).length?\"\":1===e.length?t.pascalCase?e.toUpperCase():e.toLowerCase():(e!==e.toLowerCase()&&(e=Mn(e)),n=e=e.replace(/^[_.\\- ]+/,\"\").toLowerCase().replace(/[_.\\- ]+(\\w|$)/g,(function(e,t){return t.toUpperCase()})).replace(/\\d+(\\w|$)/g,(function(e){return e.toUpperCase()})),t.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n)}var Mn=function(e){for(var t=!1,n=!1,o=!1,r=0;r<e.length;r++){var i=e[r];t&&/[a-zA-Z]/.test(i)&&i.toUpperCase()===i?(e=e.slice(0,r)+\"-\"+e.slice(r),t=!1,o=n,n=!0,r++):n&&o&&/[a-zA-Z]/.test(i)&&i.toLowerCase()===i?(e=e.slice(0,r-1)+\"-\"+e.slice(r-1),o=n,n=!1,t=!0):(t=i.toLowerCase()===i&&i.toUpperCase()!==i,o=n,n=i.toUpperCase()===i&&i.toLowerCase()!==i)}return e};function Cn(e,t,n){var o=[],r=0,i=function e(t,n){if(++r>10)return r--,t;if(ee(t)){var i=t.map((function(t){return Q(t)?e(t,n):t}));return r--,i}if(Q(t)){var s=(a=t,u=function(e,t){if(!se(t))return!1;if((s=t)!==In(s)){for(var r=!0,i=0;i<Rt.ignoreKeyWord.length;i++)if(t.includes(Rt.ignoreKeyWord[i])){r=!1;break}r&&o.push(t)}var s;return te(n[t])?function(e){return\"OPPOChannelID\"===e?e:e[0].toUpperCase()+In(e).slice(1)}(t):n[t]},c=Object.create(null),Object.keys(a).forEach((function(e){var t=u(a[e],e);t&&(c[t]=a[e])})),c);return s=Se(s,(function(t,o){return ee(t)||Q(t)?e(t,n):t})),r--,s}var a,u,c}(e,t=c({},Rt.request,{},t));return o.length>0&&n.innerEmitter.emit(pn,{code:ot.CONVERTOR_IRREGULAR_PARAMS,message:\"不规范的参数名称\"}),i}var En=function(){function e(t){var n=this;r(this,e),this.url=\"\",this.requestData=null,this.method=t.method||\"POST\",this.callback=function(e){return function e(t,n){if(n=c({},Rt.response,{},n),ee(t))return t.map((function(t){return Q(t)?e(t,n):t}));if(Q(t)){var o=(r=t,i=function(e,t){return te(n[t])?In(t):n[t]},s={},Object.keys(r).forEach((function(e){s[i(r[e],e)]=r[e]})),s);return Se(o,(function(t){return ee(t)||Q(t)?e(t,n):t}))}var r,i,s}(e=t.decode(e),n._getResponseMap(t))},this._initializeServerMap(),this._initializeURL(t),this._initializeRequestData(t)}return s(e,[{key:\"_initializeServerMap\",value:function(){this._serverMap=Object.create(null);var e=\"\";for(var t in At.NAME)if(Object.prototype.hasOwnProperty.call(At.NAME,t))switch(e=At.NAME[t]){case At.NAME.PIC:this._serverMap[e]=At.HOST.CURRENT.PIC;break;case At.NAME.IM_COS_SIGN:this._serverMap[e]=At.HOST.CURRENT.COS;break;default:this._serverMap[e]=At.HOST.CURRENT.COMMON}}},{key:\"_getHost\",value:function(e){if(void 0!==this._serverMap[e])return this._serverMap[e];throw new nt({code:ot.NETWORK_UNDEFINED_SERVER_NAME,message:\"打包错误，未定义的 serverName\"})}},{key:\"_initializeURL\",value:function(e){var t=e.serverName,n=e.cmd,o=this._getHost(t),r=\"\".concat(o,\"/\").concat(At.NAME_VERSION[t],\"/\").concat(t,\"/\").concat(n);r+=\"?\".concat(this._getQueryString(e.queryString)),this.url=r}},{key:\"getUrl\",value:function(){return this.url.replace(/&reqtime=(\\d+)/,\"&reqtime=\".concat(Math.ceil(+new Date/1e3)))}},{key:\"_initializeRequestData\",value:function(e){var t,n=e.requestData;t=this._requestDataCleaner(n),this.requestData=e.encode(t)}},{key:\"_requestDataCleaner\",value:function(e){var t=Array.isArray(e)?[]:Object.create(null);for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&se(n)&&null!==e[n]&&(\"object\"!==o(e[n])?t[n]=e[n]:t[n]=this._requestDataCleaner.bind(this)(e[n]));return t}},{key:\"_getQueryString\",value:function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(\"function\"!=typeof e[n]?t.push(\"\".concat(n,\"=\").concat(e[n])):t.push(\"\".concat(n,\"=\").concat(e[n]())));return t.join(\"&\")}},{key:\"_getResponseMap\",value:function(e){if(e.keyMaps&&e.keyMaps.response&&Object.keys(e.keyMaps.response).length>0)return e.keyMaps.response}}]),e}();function Tn(e){this.mixin(e)}Tn.mixin=function(e){var t=e.prototype||e;t._isReady=!1,t.ready=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this._isReady?void(t?e.call(this):setTimeout(e,1)):(this._readyQueue=this._readyQueue||[],void this._readyQueue.push(e))},t.triggerReady=function(){var e=this;this._isReady=!0,setTimeout((function(){var t=e._readyQueue;e._readyQueue=[],t&&t.length>0&&t.forEach((function(e){e.call(this)}),e)}),1)},t.resetReady=function(){this._isReady=!1,this._readyQueue=[]},t.isReady=function(){return this._isReady}};var Sn=function(){function e(t){r(this,e),Tn.mixin(this),this.tim=t}return s(e,[{key:\"isLoggedIn\",value:function(){return this.tim.context.login===Le||!!this.tim.context.a2Key}},{key:\"createTransportCapsule\",value:function(e){var t=this.tim.packageConfig.get(e);return t?new En(t):null}},{key:\"request\",value:function(e){var t=this.createTransportCapsule(e);return t||W.error(\"unknown transport capsule, please check!\",e),this.tim.connectionController.request(t)}},{key:\"emitInnerEvent\",value:function(e,t){this.tim.innerEmitter.emit(e,t)}},{key:\"emitOuterEvent\",value:function(e,t){this.tim.outerEmitter.emit(e,t)}},{key:\"reset\",value:function(){W.warn([\"method: IMController.reset() method must be implemented\"].join())}},{key:\"probeNetwork\",value:function(){return this.tim.netMonitor.probe()}},{key:\"getNetworkType\",value:function(){return this.tim.netMonitor.getNetworkType()}},{key:\"getPlatform\",value:function(){var e=\"web\";return q?e=\"wechat\":O&&(e=\"wxmp\"),e}}]),e}(),Dn=function(){function e(t,n){r(this,e),this.data=t,this._innerEmitter=n,this.defaultData={},Object.assign(this.defaultData,t),this.initGetterAndSetter()}return s(e,[{key:\"initGetterAndSetter\",value:function(){var e=this,t=function(t){Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){return e.data[t]},set:function(n){e.data[t]!==n&&(e.data[t]=n,e.onChange.bind(e)(t,n))}})};for(var n in e.data)Object.prototype.hasOwnProperty.call(e.data,n)&&t(n)}},{key:\"onChange\",value:function(e,t){this._innerEmitter.emit(Nt,{key:e,value:t})}},{key:\"reset\",value:function(){for(var e in W.log(\"Context.reset\"),this.data)Object.prototype.hasOwnProperty.call(this.data,e)&&(this.data[e]=this.defaultData.hasOwnProperty(e)?this.defaultData[e]:null)}}]),e}(),kn=function(e){l(n,e);var t=v(n);function n(e){var o;r(this,n);var i=(o=t.call(this,e)).tim.loginInfo;return o._context=new Dn({login:be,SDKAppID:i.SDKAppID,appIDAt3rd:null,accountType:i.accountType,identifier:i.identifier,tinyID:null,identifierNick:i.identifierNick,userSig:i.userSig,a2Key:null,contentType:\"json\",apn:1,unlimitedAVChatRoom:i.unlimitedAVChatRoom,scene:i.scene},o.tim.innerEmitter),o._initListener(),o}return s(n,[{key:\"reset\",value:function(){this._context.reset(),this.emitInnerEvent(wt)}},{key:\"_initListener\",value:function(){this.tim.innerEmitter.on(Nt,this._onContextMemberChange,this),this.tim.innerEmitter.on(an,this._updateA2KeyAndTinyID,this)}},{key:\"_updateA2KeyAndTinyID\",value:function(e){var t=e.data,n=t.a2Key,o=t.tinyID;this._context.a2Key=n,this._context.tinyID=o,this.emitInnerEvent(Ot),this.triggerReady()}},{key:\"getContext\",value:function(){return this._context}},{key:\"_onContextMemberChange\",value:function(e){var t=e.data,n=t.key,o=t.value;(\"tinyID\"===n||\"a2Key\"===n)&&(o.length<=0?this._context.login=be:this._context.login=null!==this._context.a2Key?Le:be)}}]),n}(Sn),An=function e(t){r(this,e),this.code=0,this.data=t||{}},Rn=null,Nn=function(e){return e instanceof An?(W.warn(\"IMPromise.resolve 此函数会自动用options创建IMResponse实例，调用侧不需创建，建议修改！\"),Promise.resolve(e)):Promise.resolve(new An(e))},wn=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t instanceof nt)return n&&null!==Rn&&Rn.emit(e.ERROR,t),Promise.reject(t);if(t instanceof Error){var o=new nt({code:ot.UNCAUGHT_ERROR,message:t.message});return n&&null!==Rn&&Rn.emit(e.ERROR,o),Promise.reject(o)}if(te(t)||te(t.code)||te(t.message))W.error(\"IMPromise.reject 必须指定code(错误码)和message(错误信息)!!!\");else{if(J(t.code)&&X(t.message)){var r=new nt(t);return n&&null!==Rn&&Rn.emit(e.ERROR,r),Promise.reject(r)}W.error(\"IMPromise.reject code(错误码)必须为数字，message(错误信息)必须为字符串!!!\")}},On=\"sdkReady\",Ln=\"longpolling\",bn=\"longpollingAV\",Pn=\"sendMessage\",Gn=\"sendMessageC2C\",Un=\"sendMessageGroupWork\",xn=\"sendMessageGroupPublic\",qn=\"sendMessageGroupMeeting\",Fn=\"sendMessageGroupAV\",Vn=\"messageReceived\",Kn=\"messageReceivedAV\",Hn=\"initGroupList\",Bn=function(){function e(){r(this,e),this.SDKAppID=\"\",this.version=\"\",this.tinyID=\"\",this.userID=\"\",this.platform=\"\",this.method=\"\",this.time=\"\",this.startts=0,this.endts=0,this.timespan=0,this.codeint=0,this.message=\"\",this.text=\"\",this.msgType=\"\",this.networkType=\"\",this.platform=\"\",this.scene=\"\",this._sentFlag=!1}return s(e,[{key:\"setCommonInfo\",value:function(e){var t=e.SDKAppID,n=e.version,o=e.tinyID,r=e.userID,i=e.platform,s=e.scene;this.SDKAppID=\"\".concat(t),this.version=\"\".concat(n),this.tinyID=o,this.userID=r,this.platform=i,this.scene=s,this.time=pe(),this.startts&&this.endts&&!this.timespan&&(this.timespan=Math.abs(this.endts-this.startts))}},{key:\"setMethod\",value:function(e){return this.method=e,this}},{key:\"setStart\",value:function(){this.startts=Date.now()}},{key:\"setEnd\",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._sentFlag||(this.endts=Date.now(),t?(this._sentFlag=!0,this._eventStatController.pushIn(this)):setTimeout((function(){e._sentFlag=!0,e._eventStatController.pushIn(e)}),0))}},{key:\"setError\",value:function(e,t,n){return e instanceof Error?(this._sentFlag||(this.setNetworkType(n),t?(e.code&&this.setCode(e.code),e.message&&this.setMessage(e.message)):(this.setCode(ot.NO_NETWORK),this.setMessage(\"未连接到网络\"))),this):(W.warn(\"SSOLogData.setError value not instanceof Error, please check!\"),this)}},{key:\"setCode\",value:function(e){return te(e)||this._sentFlag||(\"ECONNABORTED\"===e&&(this.codeint=103),J(e)?this.codeint=e:W.warn(\"SSOLogData.setCode value not a number, please check!\",e,o(e))),this}},{key:\"setMessage\",value:function(e){return te(e)||this._sentFlag?this:X(e)?(this.message=e,this):this}},{key:\"setText\",value:function(e){return J(e)?this.text=e.toString():X(e)&&(this.text=e),this}},{key:\"setMessageType\",value:function(e){return this.msgType=e,this}},{key:\"setNetworkType\",value:function(e){return te(e)?W.warn(\"SSOLogData.setNetworkType value is undefined, please check!\"):this.networkType=e,this}}],[{key:\"bindController\",value:function(t){e.prototype._eventStatController=t}}]),e}(),jn=\"kickedOut\",Yn=\"emptyMessageBody\",$n=\"applyJoinGroup\",Wn=\"longPollingError\",zn=\"callbackFunctionError\",Jn=function(t){l(i,t);var o=v(i);function i(e){var t;return r(this,i),(t=o.call(this,e))._initializeListener(),t}return s(i,[{key:\"login\",value:function(e){if(this.isLoggedIn()){var t=\"您已经登录账号\".concat(e.identifier,\"！如需切换账号登录，请先调用 logout 接口登出，再调用 login 接口登录。\");return W.warn(t),Nn({actionStatus:\"OK\",errorCode:0,errorInfo:t,repeatLogin:!0})}W.log(\"SignController.login userID=\",e.identifier),W.time(\"login\");var n=this._checkLoginInfo(e);return ke(n)?(this.tim.context.identifier=e.identifier,this.tim.context.userSig=e.userSig,this.tim.context.identifier&&this.tim.context.userSig?this._accessLayer():void 0):wn(n)}},{key:\"_isLoginCurrentUser\",value:function(e){return this.tim.context.identifier===e}},{key:\"_initializeListener\",value:function(){var e=this.tim.innerEmitter;e.on(Yt,this._onMultipleAccountKickedOut,this),e.on($t,this._onMultipleDeviceKickedOut,this),e.on(ln,this._onUserSigExpired,this)}},{key:\"_accessLayer\",value:function(){var e=this,t=new Bn;return t.setMethod(\"accessLayer\").setStart(),W.log(\"SignController._accessLayer.\"),this.request({name:\"accessLayer\",action:\"query\"}).then((function(n){return t.setCode(0).setNetworkType(e.getNetworkType()).setText(n.data.webImAccessLayer).setEnd(),W.log(\"SignController._accessLayer ok. webImAccessLayer=\".concat(n.data.webImAccessLayer)),1===n.data.webImAccessLayer&&At.HOST.setCurrent(n.data.webImAccessLayer),e._login()})).catch((function(n){return e.probeNetwork().then((function(o){var r=y(o,2),i=r[0],s=r[1];t.setError(n,i,s).setEnd(!0),e.tim.eventStatController.reportAtOnce()})),W.error(\"SignController._accessLayer failed. error:\",n),wn(n)}))}},{key:\"_login\",value:function(){var e=this,t=new Bn;return t.setMethod(\"login\").setStart(),this.request({name:\"login\",action:\"query\"}).then((function(n){var o=null;if(!n.data.tinyID)throw o=new nt({code:ot.NO_TINYID,message:\"无 tinyID\"}),t.setError(o,!0,e.getNetworkType()).setEnd(),o;if(!n.data.a2Key)throw o=new nt({code:ot.NO_A2KEY,message:\"无 a2key\"}),t.setError(o,!0,e.getNetworkType()).setEnd(),o;return t.setCode(0).setNetworkType(e.getNetworkType()).setText(\"\".concat(e.tim.loginInfo.identifier)).setEnd(),W.log(\"SignController.login ok. userID=\".concat(e.tim.loginInfo.identifier,\" loginCost=\").concat(W.timeEnd(\"login\"),\"ms\")),e.emitInnerEvent(an,{a2Key:n.data.a2Key,tinyID:n.data.tinyID}),Nn(n.data)})).catch((function(n){return e.probeNetwork().then((function(e){var o=y(e,2),r=o[0],i=o[1];t.setError(n,r,i).setEnd(!0)})),W.error(\"SignController.login failed. error:\",n),wn(n)}))}},{key:\"logout\",value:function(){var e=new Bn;return e.setMethod(\"logout\").setStart(),e.setCode(0).setNetworkType(this.getNetworkType()).setText(\"userID=\".concat(this.tim.loginInfo.identifier,\" type=\").concat(\"longPollLogout\")).setEnd(!0),W.info(\"SignController.logout\"),this.emitInnerEvent(un),this._logout(1).then(this._emitLogoutSuccess.bind(this)).catch(this._emitLogoutSuccess.bind(this))}},{key:\"_logout\",value:function(e){var t=this.tim.notificationController,n=0===e?\"logout\":\"longPollLogout\",o=0===e?{name:n,action:\"query\"}:{name:n,action:\"query\",param:{longPollID:t.getLongPollID()}};return this.request(o).catch((function(e){return W.error(\"SignController._logout error:\",e),wn(e)}))}},{key:\"_checkLoginInfo\",value:function(e){var t=0,n=\"\";return null===e.SDKAppID?(t=ot.NO_SDKAPPID,n=\"无 SDKAppID\"):null===e.accountType?(t=ot.NO_ACCOUNT_TYPE,n=\"无 accountType\"):null===e.identifier?(t=ot.NO_IDENTIFIER,n=\"无 userID\"):null===e.userSig&&(t=ot.NO_USERSIG,n=\"无 userSig\"),ke(t)||ke(n)?{}:{code:t,message:n}}},{key:\"_emitLogoutSuccess\",value:function(){return this.emitInnerEvent(cn),Nn({})}},{key:\"_onMultipleAccountKickedOut\",value:function(){var t=this,o=new Bn;o.setMethod(jn).setStart(),o.setCode(0).setNetworkType(this.getNetworkType()).setText(n.KICKED_OUT_MULT_ACCOUNT).setEnd(!0),W.warn(\"SignController._onMultipleAccountKickedOut kicked out. userID=\".concat(this.tim.loginInfo.identifier)),this.tim.logout().then((function(){t.emitOuterEvent(e.KICKED_OUT,{type:n.KICKED_OUT_MULT_ACCOUNT})}))}},{key:\"_onMultipleDeviceKickedOut\",value:function(){var t=this,o=new Bn;o.setMethod(jn).setStart(),o.setCode(0).setNetworkType(this.getNetworkType()).setText(n.KICKED_OUT_MULT_DEVICE).setEnd(!0),W.warn(\"SignController._onMultipleDeviceKickedOut kicked out. userID=\".concat(this.tim.loginInfo.identifier)),this.tim.logout().then((function(){t.emitOuterEvent(e.KICKED_OUT,{type:n.KICKED_OUT_MULT_DEVICE})}))}},{key:\"_onUserSigExpired\",value:function(){var t=new Bn;t.setMethod(jn).setStart(),t.setCode(0).setNetworkType(this.getNetworkType()).setText(n.KICKED_OUT_USERSIG_EXPIRED).setEnd(!0),W.warn(\"SignController._onUserSigExpired: userSig 签名过期被踢下线\"),this.emitOuterEvent(e.KICKED_OUT,{type:n.KICKED_OUT_USERSIG_EXPIRED}),this.tim.resetSDK()}},{key:\"reset\",value:function(){W.info(\"SignController.reset\")}}]),i}(Sn),Xn=function(e,t){return function(){for(var n=new Array(arguments.length),o=0;o<n.length;o++)n[o]=arguments[o];return e.apply(t,n)}},Qn=Object.prototype.toString;function Zn(e){return\"[object Array]\"===Qn.call(e)}function eo(e){return void 0===e}function to(e){return null!==e&&\"object\"==typeof e}function no(e){return\"[object Function]\"===Qn.call(e)}function oo(e,t){if(null!=e)if(\"object\"!=typeof e&&(e=[e]),Zn(e))for(var n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}var ro={isArray:Zn,isArrayBuffer:function(e){return\"[object ArrayBuffer]\"===Qn.call(e)},isBuffer:function(e){return null!==e&&!eo(e)&&null!==e.constructor&&!eo(e.constructor)&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return\"undefined\"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return\"undefined\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return\"string\"==typeof e},isNumber:function(e){return\"number\"==typeof e},isObject:to,isUndefined:eo,isDate:function(e){return\"[object Date]\"===Qn.call(e)},isFile:function(e){return\"[object File]\"===Qn.call(e)},isBlob:function(e){return\"[object Blob]\"===Qn.call(e)},isFunction:no,isStream:function(e){return to(e)&&no(e.pipe)},isURLSearchParams:function(e){return\"undefined\"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return(\"undefined\"==typeof navigator||\"ReactNative\"!==navigator.product&&\"NativeScript\"!==navigator.product&&\"NS\"!==navigator.product)&&\"undefined\"!=typeof window&&\"undefined\"!=typeof document},forEach:oo,merge:function e(){var t={};function n(n,o){\"object\"==typeof t[o]&&\"object\"==typeof n?t[o]=e(t[o],n):t[o]=n}for(var o=0,r=arguments.length;o<r;o++)oo(arguments[o],n);return t},deepMerge:function e(){var t={};function n(n,o){\"object\"==typeof t[o]&&\"object\"==typeof n?t[o]=e(t[o],n):t[o]=\"object\"==typeof n?e({},n):n}for(var o=0,r=arguments.length;o<r;o++)oo(arguments[o],n);return t},extend:function(e,t,n){return oo(t,(function(t,o){e[o]=n&&\"function\"==typeof t?Xn(t,n):t})),e},trim:function(e){return e.replace(/^\\s*/,\"\").replace(/\\s*$/,\"\")}};function io(e){return encodeURIComponent(e).replace(/%40/gi,\"@\").replace(/%3A/gi,\":\").replace(/%24/g,\"$\").replace(/%2C/gi,\",\").replace(/%20/g,\"+\").replace(/%5B/gi,\"[\").replace(/%5D/gi,\"]\")}var so=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(ro.isURLSearchParams(t))o=t.toString();else{var r=[];ro.forEach(t,(function(e,t){null!=e&&(ro.isArray(e)?t+=\"[]\":e=[e],ro.forEach(e,(function(e){ro.isDate(e)?e=e.toISOString():ro.isObject(e)&&(e=JSON.stringify(e)),r.push(io(t)+\"=\"+io(e))})))})),o=r.join(\"&\")}if(o){var i=e.indexOf(\"#\");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf(\"?\")?\"?\":\"&\")+o}return e};function ao(){this.handlers=[]}ao.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},ao.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},ao.prototype.forEach=function(e){ro.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var uo=ao,co=function(e,t,n){return ro.forEach(n,(function(n){e=n(e,t)})),e},lo=function(e){return!(!e||!e.__CANCEL__)};function po(){throw new Error(\"setTimeout has not been defined\")}function ho(){throw new Error(\"clearTimeout has not been defined\")}var fo=po,go=ho;function mo(e){if(fo===setTimeout)return setTimeout(e,0);if((fo===po||!fo)&&setTimeout)return fo=setTimeout,setTimeout(e,0);try{return fo(e,0)}catch(t){try{return fo.call(null,e,0)}catch(t){return fo.call(this,e,0)}}}\"function\"==typeof F.setTimeout&&(fo=setTimeout),\"function\"==typeof F.clearTimeout&&(go=clearTimeout);var _o,vo=[],yo=!1,Io=-1;function Mo(){yo&&_o&&(yo=!1,_o.length?vo=_o.concat(vo):Io=-1,vo.length&&Co())}function Co(){if(!yo){var e=mo(Mo);yo=!0;for(var t=vo.length;t;){for(_o=vo,vo=[];++Io<t;)_o&&_o[Io].run();Io=-1,t=vo.length}_o=null,yo=!1,function(e){if(go===clearTimeout)return clearTimeout(e);if((go===ho||!go)&&clearTimeout)return go=clearTimeout,clearTimeout(e);try{go(e)}catch(t){try{return go.call(null,e)}catch(t){return go.call(this,e)}}}(e)}}function Eo(e,t){this.fun=e,this.array=t}function To(){}Eo.prototype.run=function(){this.fun.apply(null,this.array)};var So=To,Do=To,ko=To,Ao=To,Ro=To,No=To,wo=To,Oo=F.performance||{},Lo=Oo.now||Oo.mozNow||Oo.msNow||Oo.oNow||Oo.webkitNow||function(){return(new Date).getTime()},bo=new Date,Po={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];vo.push(new Eo(e,t)),1!==vo.length||yo||mo(Co)},title:\"browser\",browser:!0,env:{},argv:[],version:\"\",versions:{},on:So,addListener:Do,once:ko,off:Ao,removeListener:Ro,removeAllListeners:No,emit:wo,binding:function(e){throw new Error(\"process.binding is not supported\")},cwd:function(){return\"/\"},chdir:function(e){throw new Error(\"process.chdir is not supported\")},umask:function(){return 0},hrtime:function(e){var t=.001*Lo.call(Oo),n=Math.floor(t),o=Math.floor(t%1*1e9);return e&&(n-=e[0],(o-=e[1])<0&&(n--,o+=1e9)),[n,o]},platform:\"browser\",release:{},config:{},uptime:function(){return(new Date-bo)/1e3}},Go=function(e,t){ro.forEach(e,(function(n,o){o!==t&&o.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[o])}))},Uo=function(e,t,n,o,r){return function(e,t,n,o,r){return e.config=t,n&&(e.code=n),e.request=o,e.response=r,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}(new Error(e),t,n,o,r)},xo=[\"age\",\"authorization\",\"content-length\",\"content-type\",\"etag\",\"expires\",\"from\",\"host\",\"if-modified-since\",\"if-unmodified-since\",\"last-modified\",\"location\",\"max-forwards\",\"proxy-authorization\",\"referer\",\"retry-after\",\"user-agent\"],qo=ro.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement(\"a\");function o(e){var o=e;return t&&(n.setAttribute(\"href\",o),o=n.href),n.setAttribute(\"href\",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,\"\"):\"\",host:n.host,search:n.search?n.search.replace(/^\\?/,\"\"):\"\",hash:n.hash?n.hash.replace(/^#/,\"\"):\"\",hostname:n.hostname,port:n.port,pathname:\"/\"===n.pathname.charAt(0)?n.pathname:\"/\"+n.pathname}}return e=o(window.location.href),function(t){var n=ro.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},Fo=ro.isStandardBrowserEnv()?{write:function(e,t,n,o,r,i){var s=[];s.push(e+\"=\"+encodeURIComponent(t)),ro.isNumber(n)&&s.push(\"expires=\"+new Date(n).toGMTString()),ro.isString(o)&&s.push(\"path=\"+o),ro.isString(r)&&s.push(\"domain=\"+r),!0===i&&s.push(\"secure\"),document.cookie=s.join(\"; \")},read:function(e){var t=document.cookie.match(new RegExp(\"(^|;\\\\s*)(\"+e+\")=([^;]*)\"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,\"\",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},Vo={\"Content-Type\":\"application/x-www-form-urlencoded\"};function Ko(e,t){!ro.isUndefined(e)&&ro.isUndefined(e[\"Content-Type\"])&&(e[\"Content-Type\"]=t)}var Ho,Bo={adapter:((\"undefined\"!=typeof XMLHttpRequest||void 0!==Po&&\"[object process]\"===Object.prototype.toString.call(Po))&&(Ho=function(e){return new Promise((function(t,n){var o=e.data,r=e.headers;ro.isFormData(o)&&delete r[\"Content-Type\"];var i=new XMLHttpRequest;if(e.auth){var s=e.auth.username||\"\",a=e.auth.password||\"\";r.Authorization=\"Basic \"+btoa(s+\":\"+a)}var u,c,l=(u=e.baseURL,c=e.url,u&&!/^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(c)?function(e,t){return t?e.replace(/\\/+$/,\"\")+\"/\"+t.replace(/^\\/+/,\"\"):e}(u,c):c);if(i.open(e.method.toUpperCase(),so(l,e.params,e.paramsSerializer),!0),i.timeout=e.timeout,i.onreadystatechange=function(){if(i&&4===i.readyState&&(0!==i.status||i.responseURL&&0===i.responseURL.indexOf(\"file:\"))){var o,r,s,a,u,c=\"getAllResponseHeaders\"in i?(o=i.getAllResponseHeaders(),u={},o?(ro.forEach(o.split(\"\\n\"),(function(e){if(a=e.indexOf(\":\"),r=ro.trim(e.substr(0,a)).toLowerCase(),s=ro.trim(e.substr(a+1)),r){if(u[r]&&xo.indexOf(r)>=0)return;u[r]=\"set-cookie\"===r?(u[r]?u[r]:[]).concat([s]):u[r]?u[r]+\", \"+s:s}})),u):u):null,l={data:e.responseType&&\"text\"!==e.responseType?i.response:i.responseText,status:i.status,statusText:i.statusText,headers:c,config:e,request:i};!function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(Uo(\"Request failed with status code \"+n.status,n.config,null,n.request,n))}(t,n,l),i=null}},i.onabort=function(){i&&(n(Uo(\"Request aborted\",e,\"ECONNABORTED\",i)),i=null)},i.onerror=function(){n(Uo(\"Network Error\",e,null,i)),i=null},i.ontimeout=function(){var t=\"timeout of \"+e.timeout+\"ms exceeded\";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(Uo(t,e,\"ECONNABORTED\",i)),i=null},ro.isStandardBrowserEnv()){var p=Fo,h=(e.withCredentials||qo(l))&&e.xsrfCookieName?p.read(e.xsrfCookieName):void 0;h&&(r[e.xsrfHeaderName]=h)}if(\"setRequestHeader\"in i&&ro.forEach(r,(function(e,t){void 0===o&&\"content-type\"===t.toLowerCase()?delete r[t]:i.setRequestHeader(t,e)})),ro.isUndefined(e.withCredentials)||(i.withCredentials=!!e.withCredentials),e.responseType)try{i.responseType=e.responseType}catch(t){if(\"json\"!==e.responseType)throw t}\"function\"==typeof e.onDownloadProgress&&i.addEventListener(\"progress\",e.onDownloadProgress),\"function\"==typeof e.onUploadProgress&&i.upload&&i.upload.addEventListener(\"progress\",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){i&&(i.abort(),n(e),i=null)})),void 0===o&&(o=null),i.send(o)}))}),Ho),transformRequest:[function(e,t){return Go(t,\"Accept\"),Go(t,\"Content-Type\"),ro.isFormData(e)||ro.isArrayBuffer(e)||ro.isBuffer(e)||ro.isStream(e)||ro.isFile(e)||ro.isBlob(e)?e:ro.isArrayBufferView(e)?e.buffer:ro.isURLSearchParams(e)?(Ko(t,\"application/x-www-form-urlencoded;charset=utf-8\"),e.toString()):ro.isObject(e)?(Ko(t,\"application/json;charset=utf-8\"),JSON.stringify(e)):e}],transformResponse:[function(e){if(\"string\"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:\"XSRF-TOKEN\",xsrfHeaderName:\"X-XSRF-TOKEN\",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:\"application/json, text/plain, */*\"}}};ro.forEach([\"delete\",\"get\",\"head\"],(function(e){Bo.headers[e]={}})),ro.forEach([\"post\",\"put\",\"patch\"],(function(e){Bo.headers[e]=ro.merge(Vo)}));var jo=Bo;function Yo(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var $o=function(e){return Yo(e),e.headers=e.headers||{},e.data=co(e.data,e.headers,e.transformRequest),e.headers=ro.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),ro.forEach([\"delete\",\"get\",\"head\",\"post\",\"put\",\"patch\",\"common\"],(function(t){delete e.headers[t]})),(e.adapter||jo.adapter)(e).then((function(t){return Yo(e),t.data=co(t.data,t.headers,e.transformResponse),t}),(function(t){return lo(t)||(Yo(e),t&&t.response&&(t.response.data=co(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Wo=function(e,t){t=t||{};var n={},o=[\"url\",\"method\",\"params\",\"data\"],r=[\"headers\",\"auth\",\"proxy\"],i=[\"baseURL\",\"url\",\"transformRequest\",\"transformResponse\",\"paramsSerializer\",\"timeout\",\"withCredentials\",\"adapter\",\"responseType\",\"xsrfCookieName\",\"xsrfHeaderName\",\"onUploadProgress\",\"onDownloadProgress\",\"maxContentLength\",\"validateStatus\",\"maxRedirects\",\"httpAgent\",\"httpsAgent\",\"cancelToken\",\"socketPath\"];ro.forEach(o,(function(e){void 0!==t[e]&&(n[e]=t[e])})),ro.forEach(r,(function(o){ro.isObject(t[o])?n[o]=ro.deepMerge(e[o],t[o]):void 0!==t[o]?n[o]=t[o]:ro.isObject(e[o])?n[o]=ro.deepMerge(e[o]):void 0!==e[o]&&(n[o]=e[o])})),ro.forEach(i,(function(o){void 0!==t[o]?n[o]=t[o]:void 0!==e[o]&&(n[o]=e[o])}));var s=o.concat(r).concat(i),a=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return ro.forEach(a,(function(o){void 0!==t[o]?n[o]=t[o]:void 0!==e[o]&&(n[o]=e[o])})),n};function zo(e){this.defaults=e,this.interceptors={request:new uo,response:new uo}}zo.prototype.request=function(e){\"string\"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=Wo(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method=\"get\";var t=[$o,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},zo.prototype.getUri=function(e){return e=Wo(this.defaults,e),so(e.url,e.params,e.paramsSerializer).replace(/^\\?/,\"\")},ro.forEach([\"delete\",\"get\",\"head\",\"options\"],(function(e){zo.prototype[e]=function(t,n){return this.request(ro.merge(n||{},{method:e,url:t}))}})),ro.forEach([\"post\",\"put\",\"patch\"],(function(e){zo.prototype[e]=function(t,n,o){return this.request(ro.merge(o||{},{method:e,url:t,data:n}))}}));var Jo=zo;function Xo(e){this.message=e}Xo.prototype.toString=function(){return\"Cancel\"+(this.message?\": \"+this.message:\"\")},Xo.prototype.__CANCEL__=!0;var Qo=Xo;function Zo(e){if(\"function\"!=typeof e)throw new TypeError(\"executor must be a function.\");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new Qo(e),t(n.reason))}))}Zo.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Zo.source=function(){var e;return{token:new Zo((function(t){e=t})),cancel:e}};var er=Zo;function tr(e){var t=new Jo(e),n=Xn(Jo.prototype.request,t);return ro.extend(n,Jo.prototype,t),ro.extend(n,t),n}var nr=tr(jo);nr.Axios=Jo,nr.create=function(e){return tr(Wo(nr.defaults,e))},nr.Cancel=Qo,nr.CancelToken=er,nr.isCancel=lo,nr.all=function(e){return Promise.all(e)},nr.spread=function(e){return function(t){return e.apply(null,t)}};var or=nr,rr=nr;or.default=rr;var ir=or,sr=ir.create({timeout:3e4,headers:{\"Content-Type\":\"application/x-www-form-urlencoded;charset=UTF-8\"}});sr.interceptors.response.use((function(e){var t=e.data,n=t.error_code,o=t.ErrorCode;return J(n)&&(o=n),o!==Oe&&(e.data.ErrorCode=Number(o)),e}),(function(e){return\"Network Error\"===e.message&&(!0===sr.defaults.withCredentials&&W.warn(\"Network Error, try to close `IMAxios.defaults.withCredentials` to false. (IMAxios.js)\"),sr.defaults.withCredentials=!1),Promise.reject(e)}));var ar=function(){function e(){r(this,e)}return s(e,[{key:\"request\",value:function(e){console.warn(\"请注意： ConnectionBase.request() 方法必须被派生类重写:\"),console.log(\"参数如下：\\n    * @param {String} options.url string 是 开发者服务器接口地址\\n    * @param {*} options.data - string/object/ArrayBuffer 否 请求的参数\\n    * @param {Object} options.header - Object 否 设置请求的 header，\\n    * @param {String} options.method - string GET 否 HTTP 请求方法\\n    * @param {String} options.dataType - string json 否 返回的数据格式\\n    * @param {String} options.responseType - string text 否 响应的数据类型\\n    * @param {Boolean} isRetry - string text false 是否为重试的请求\\n   \")}},{key:\"_checkOptions\",value:function(e){if(0==!!e.url)throw new nt({code:ot.NETWORK_BASE_OPTIONS_NO_URL,message:\"网络层初始化错误，缺少 URL 参数\"})}},{key:\"_initOptions\",value:function(e){e.method=[\"POST\",\"GET\",\"PUT\",\"DELETE\",\"OPTION\"].indexOf(e.method)>=0?e.method:\"POST\",e.dataType=e.dataType||\"json\",e.responseType=e.responseType||\"json\"}}]),e}(),ur=function(e){l(n,e);var t=v(n);function n(){var e;return r(this,n),(e=t.call(this)).retry=2,e}return s(n,[{key:\"request\",value:function(e){return this._checkOptions(e),this._initOptions(e),this._requestWithRetry({url:e.url,data:e.data,method:e.method})}},{key:\"_requestWithRetry\",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return sr(e).catch((function(o){return t.retry&&n<t.retry?t._requestWithRetry(e,++n):wn(new nt({code:o.code||\"\",message:o.message||\"\"}))}))}}]),n}(ar),cr=[],lr=[],pr=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,hr=!1;function dr(){hr=!0;for(var e=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",t=0,n=e.length;t<n;++t)cr[t]=e[t],lr[e.charCodeAt(t)]=t;lr[\"-\".charCodeAt(0)]=62,lr[\"_\".charCodeAt(0)]=63}function fr(e,t,n){for(var o,r,i=[],s=t;s<n;s+=3)o=(e[s]<<16)+(e[s+1]<<8)+e[s+2],i.push(cr[(r=o)>>18&63]+cr[r>>12&63]+cr[r>>6&63]+cr[63&r]);return i.join(\"\")}function gr(e){var t;hr||dr();for(var n=e.length,o=n%3,r=\"\",i=[],s=0,a=n-o;s<a;s+=16383)i.push(fr(e,s,s+16383>a?a:s+16383));return 1===o?(t=e[n-1],r+=cr[t>>2],r+=cr[t<<4&63],r+=\"==\"):2===o&&(t=(e[n-2]<<8)+e[n-1],r+=cr[t>>10],r+=cr[t>>4&63],r+=cr[t<<2&63],r+=\"=\"),i.push(r),i.join(\"\")}function mr(e,t,n,o,r){var i,s,a=8*r-o-1,u=(1<<a)-1,c=u>>1,l=-7,p=n?r-1:0,h=n?-1:1,d=e[t+p];for(p+=h,i=d&(1<<-l)-1,d>>=-l,l+=a;l>0;i=256*i+e[t+p],p+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=o;l>0;s=256*s+e[t+p],p+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,o),i-=c}return(d?-1:1)*s*Math.pow(2,i-o)}function _r(e,t,n,o,r,i){var s,a,u,c=8*i-r-1,l=(1<<c)-1,p=l>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,d=o?0:i-1,f=o?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||1/0===t?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+p>=1?h/u:h*Math.pow(2,1-p))*u>=2&&(s++,u/=2),s+p>=l?(a=0,s=l):s+p>=1?(a=(t*u-1)*Math.pow(2,r),s+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,r),s=0));r>=8;e[n+d]=255&a,d+=f,a/=256,r-=8);for(s=s<<r|a,c+=r;c>0;e[n+d]=255&s,d+=f,s/=256,c-=8);e[n+d-f]|=128*g}var vr={}.toString,yr=Array.isArray||function(e){return\"[object Array]\"==vr.call(e)};function Ir(){return Cr.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Mr(e,t){if(Ir()<t)throw new RangeError(\"Invalid typed array length\");return Cr.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Cr.prototype:(null===e&&(e=new Cr(t)),e.length=t),e}function Cr(e,t,n){if(!(Cr.TYPED_ARRAY_SUPPORT||this instanceof Cr))return new Cr(e,t,n);if(\"number\"==typeof e){if(\"string\"==typeof t)throw new Error(\"If encoding is specified then the first argument must be a string\");return Sr(this,e)}return Er(this,e,t,n)}function Er(e,t,n,o){if(\"number\"==typeof t)throw new TypeError('\"value\" argument must not be a number');return\"undefined\"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,o){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError(\"'offset' is out of bounds\");if(t.byteLength<n+(o||0))throw new RangeError(\"'length' is out of bounds\");return t=void 0===n&&void 0===o?new Uint8Array(t):void 0===o?new Uint8Array(t,n):new Uint8Array(t,n,o),Cr.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Cr.prototype:e=Dr(e,t),e}(e,t,n,o):\"string\"==typeof t?function(e,t,n){if(\"string\"==typeof n&&\"\"!==n||(n=\"utf8\"),!Cr.isEncoding(n))throw new TypeError('\"encoding\" must be a valid string encoding');var o=0|Rr(t,n),r=(e=Mr(e,o)).write(t,n);return r!==o&&(e=e.slice(0,r)),e}(e,t,n):function(e,t){if(Ar(t)){var n=0|kr(t.length);return 0===(e=Mr(e,n)).length||t.copy(e,0,0,n),e}if(t){if(\"undefined\"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||\"length\"in t)return\"number\"!=typeof t.length||(o=t.length)!=o?Mr(e,0):Dr(e,t);if(\"Buffer\"===t.type&&yr(t.data))return Dr(e,t.data)}var o;throw new TypeError(\"First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.\")}(e,t)}function Tr(e){if(\"number\"!=typeof e)throw new TypeError('\"size\" argument must be a number');if(e<0)throw new RangeError('\"size\" argument must not be negative')}function Sr(e,t){if(Tr(t),e=Mr(e,t<0?0:0|kr(t)),!Cr.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function Dr(e,t){var n=t.length<0?0:0|kr(t.length);e=Mr(e,n);for(var o=0;o<n;o+=1)e[o]=255&t[o];return e}function kr(e){if(e>=Ir())throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+Ir().toString(16)+\" bytes\");return 0|e}function Ar(e){return!(null==e||!e._isBuffer)}function Rr(e,t){if(Ar(e))return e.length;if(\"undefined\"!=typeof ArrayBuffer&&\"function\"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;\"string\"!=typeof e&&(e=\"\"+e);var n=e.length;if(0===n)return 0;for(var o=!1;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return n;case\"utf8\":case\"utf-8\":case void 0:return ti(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*n;case\"hex\":return n>>>1;case\"base64\":return ni(e).length;default:if(o)return ti(e).length;t=(\"\"+t).toLowerCase(),o=!0}}function Nr(e,t,n){var o=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return\"\";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return\"\";if((n>>>=0)<=(t>>>=0))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return Br(this,t,n);case\"utf8\":case\"utf-8\":return Vr(this,t,n);case\"ascii\":return Kr(this,t,n);case\"latin1\":case\"binary\":return Hr(this,t,n);case\"base64\":return Fr(this,t,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return jr(this,t,n);default:if(o)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),o=!0}}function wr(e,t,n){var o=e[t];e[t]=e[n],e[n]=o}function Or(e,t,n,o,r){if(0===e.length)return-1;if(\"string\"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if(\"string\"==typeof t&&(t=Cr.from(t,o)),Ar(t))return 0===t.length?-1:Lr(e,t,n,o,r);if(\"number\"==typeof t)return t&=255,Cr.TYPED_ARRAY_SUPPORT&&\"function\"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):Lr(e,[t],n,o,r);throw new TypeError(\"val must be string, number or Buffer\")}function Lr(e,t,n,o,r){var i,s=1,a=e.length,u=t.length;if(void 0!==o&&(\"ucs2\"===(o=String(o).toLowerCase())||\"ucs-2\"===o||\"utf16le\"===o||\"utf-16le\"===o)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var l=-1;for(i=n;i<a;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(n+u>a&&(n=a-u),i=n;i>=0;i--){for(var p=!0,h=0;h<u;h++)if(c(e,i+h)!==c(t,h)){p=!1;break}if(p)return i}return-1}function br(e,t,n,o){n=Number(n)||0;var r=e.length-n;o?(o=Number(o))>r&&(o=r):o=r;var i=t.length;if(i%2!=0)throw new TypeError(\"Invalid hex string\");o>i/2&&(o=i/2);for(var s=0;s<o;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function Pr(e,t,n,o){return oi(ti(t,e.length-n),e,n,o)}function Gr(e,t,n,o){return oi(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,o)}function Ur(e,t,n,o){return Gr(e,t,n,o)}function xr(e,t,n,o){return oi(ni(t),e,n,o)}function qr(e,t,n,o){return oi(function(e,t){for(var n,o,r,i=[],s=0;s<e.length&&!((t-=2)<0);++s)o=(n=e.charCodeAt(s))>>8,r=n%256,i.push(r),i.push(o);return i}(t,e.length-n),e,n,o)}function Fr(e,t,n){return 0===t&&n===e.length?gr(e):gr(e.slice(t,n))}function Vr(e,t,n){n=Math.min(e.length,n);for(var o=[],r=t;r<n;){var i,s,a,u,c=e[r],l=null,p=c>239?4:c>223?3:c>191?2:1;if(r+p<=n)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[r+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[r+1],s=e[r+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[r+1],s=e[r+2],a=e[r+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,p=1):l>65535&&(l-=65536,o.push(l>>>10&1023|55296),l=56320|1023&l),o.push(l),r+=p}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n=\"\",o=0;o<t;)n+=String.fromCharCode.apply(String,e.slice(o,o+=4096));return n}(o)}function Kr(e,t,n){var o=\"\";n=Math.min(e.length,n);for(var r=t;r<n;++r)o+=String.fromCharCode(127&e[r]);return o}function Hr(e,t,n){var o=\"\";n=Math.min(e.length,n);for(var r=t;r<n;++r)o+=String.fromCharCode(e[r]);return o}function Br(e,t,n){var o=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>o)&&(n=o);for(var r=\"\",i=t;i<n;++i)r+=ei(e[i]);return r}function jr(e,t,n){for(var o=e.slice(t,n),r=\"\",i=0;i<o.length;i+=2)r+=String.fromCharCode(o[i]+256*o[i+1]);return r}function Yr(e,t,n){if(e%1!=0||e<0)throw new RangeError(\"offset is not uint\");if(e+t>n)throw new RangeError(\"Trying to access beyond buffer length\")}function $r(e,t,n,o,r,i){if(!Ar(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>r||t<i)throw new RangeError('\"value\" argument is out of bounds');if(n+o>e.length)throw new RangeError(\"Index out of range\")}function Wr(e,t,n,o){t<0&&(t=65535+t+1);for(var r=0,i=Math.min(e.length-n,2);r<i;++r)e[n+r]=(t&255<<8*(o?r:1-r))>>>8*(o?r:1-r)}function zr(e,t,n,o){t<0&&(t=4294967295+t+1);for(var r=0,i=Math.min(e.length-n,4);r<i;++r)e[n+r]=t>>>8*(o?r:3-r)&255}function Jr(e,t,n,o,r,i){if(n+o>e.length)throw new RangeError(\"Index out of range\");if(n<0)throw new RangeError(\"Index out of range\")}function Xr(e,t,n,o,r){return r||Jr(e,0,n,4),_r(e,t,n,o,23,4),n+4}function Qr(e,t,n,o,r){return r||Jr(e,0,n,8),_r(e,t,n,o,52,8),n+8}Cr.TYPED_ARRAY_SUPPORT=void 0===F.TYPED_ARRAY_SUPPORT||F.TYPED_ARRAY_SUPPORT,Cr.poolSize=8192,Cr._augment=function(e){return e.__proto__=Cr.prototype,e},Cr.from=function(e,t,n){return Er(null,e,t,n)},Cr.TYPED_ARRAY_SUPPORT&&(Cr.prototype.__proto__=Uint8Array.prototype,Cr.__proto__=Uint8Array),Cr.alloc=function(e,t,n){return function(e,t,n,o){return Tr(t),t<=0?Mr(e,t):void 0!==n?\"string\"==typeof o?Mr(e,t).fill(n,o):Mr(e,t).fill(n):Mr(e,t)}(null,e,t,n)},Cr.allocUnsafe=function(e){return Sr(null,e)},Cr.allocUnsafeSlow=function(e){return Sr(null,e)},Cr.isBuffer=function(e){return null!=e&&(!!e._isBuffer||ri(e)||function(e){return\"function\"==typeof e.readFloatLE&&\"function\"==typeof e.slice&&ri(e.slice(0,0))}(e))},Cr.compare=function(e,t){if(!Ar(e)||!Ar(t))throw new TypeError(\"Arguments must be Buffers\");if(e===t)return 0;for(var n=e.length,o=t.length,r=0,i=Math.min(n,o);r<i;++r)if(e[r]!==t[r]){n=e[r],o=t[r];break}return n<o?-1:o<n?1:0},Cr.isEncoding=function(e){switch(String(e).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},Cr.concat=function(e,t){if(!yr(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return Cr.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var o=Cr.allocUnsafe(t),r=0;for(n=0;n<e.length;++n){var i=e[n];if(!Ar(i))throw new TypeError('\"list\" argument must be an Array of Buffers');i.copy(o,r),r+=i.length}return o},Cr.byteLength=Rr,Cr.prototype._isBuffer=!0,Cr.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(var t=0;t<e;t+=2)wr(this,t,t+1);return this},Cr.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(var t=0;t<e;t+=4)wr(this,t,t+3),wr(this,t+1,t+2);return this},Cr.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(var t=0;t<e;t+=8)wr(this,t,t+7),wr(this,t+1,t+6),wr(this,t+2,t+5),wr(this,t+3,t+4);return this},Cr.prototype.toString=function(){var e=0|this.length;return 0===e?\"\":0===arguments.length?Vr(this,0,e):Nr.apply(this,arguments)},Cr.prototype.equals=function(e){if(!Ar(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===Cr.compare(this,e)},Cr.prototype.inspect=function(){var e=\"\";return this.length>0&&(e=this.toString(\"hex\",0,50).match(/.{2}/g).join(\" \"),this.length>50&&(e+=\" ... \")),\"<Buffer \"+e+\">\"},Cr.prototype.compare=function(e,t,n,o,r){if(!Ar(e))throw new TypeError(\"Argument must be a Buffer\");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===r&&(r=this.length),t<0||n>e.length||o<0||r>this.length)throw new RangeError(\"out of range index\");if(o>=r&&t>=n)return 0;if(o>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(r>>>=0)-(o>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(i,s),u=this.slice(o,r),c=e.slice(t,n),l=0;l<a;++l)if(u[l]!==c[l]){i=u[l],s=c[l];break}return i<s?-1:s<i?1:0},Cr.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},Cr.prototype.indexOf=function(e,t,n){return Or(this,e,t,n,!0)},Cr.prototype.lastIndexOf=function(e,t,n){return Or(this,e,t,n,!1)},Cr.prototype.write=function(e,t,n,o){if(void 0===t)o=\"utf8\",n=this.length,t=0;else if(void 0===n&&\"string\"==typeof t)o=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");t|=0,isFinite(n)?(n|=0,void 0===o&&(o=\"utf8\")):(o=n,n=void 0)}var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");o||(o=\"utf8\");for(var i=!1;;)switch(o){case\"hex\":return br(this,e,t,n);case\"utf8\":case\"utf-8\":return Pr(this,e,t,n);case\"ascii\":return Gr(this,e,t,n);case\"latin1\":case\"binary\":return Ur(this,e,t,n);case\"base64\":return xr(this,e,t,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return qr(this,e,t,n);default:if(i)throw new TypeError(\"Unknown encoding: \"+o);o=(\"\"+o).toLowerCase(),i=!0}},Cr.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}},Cr.prototype.slice=function(e,t){var n,o=this.length;if((e=~~e)<0?(e+=o)<0&&(e=0):e>o&&(e=o),(t=void 0===t?o:~~t)<0?(t+=o)<0&&(t=0):t>o&&(t=o),t<e&&(t=e),Cr.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=Cr.prototype;else{var r=t-e;n=new Cr(r,void 0);for(var i=0;i<r;++i)n[i]=this[i+e]}return n},Cr.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||Yr(e,t,this.length);for(var o=this[e],r=1,i=0;++i<t&&(r*=256);)o+=this[e+i]*r;return o},Cr.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||Yr(e,t,this.length);for(var o=this[e+--t],r=1;t>0&&(r*=256);)o+=this[e+--t]*r;return o},Cr.prototype.readUInt8=function(e,t){return t||Yr(e,1,this.length),this[e]},Cr.prototype.readUInt16LE=function(e,t){return t||Yr(e,2,this.length),this[e]|this[e+1]<<8},Cr.prototype.readUInt16BE=function(e,t){return t||Yr(e,2,this.length),this[e]<<8|this[e+1]},Cr.prototype.readUInt32LE=function(e,t){return t||Yr(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Cr.prototype.readUInt32BE=function(e,t){return t||Yr(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Cr.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||Yr(e,t,this.length);for(var o=this[e],r=1,i=0;++i<t&&(r*=256);)o+=this[e+i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},Cr.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||Yr(e,t,this.length);for(var o=t,r=1,i=this[e+--o];o>0&&(r*=256);)i+=this[e+--o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},Cr.prototype.readInt8=function(e,t){return t||Yr(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Cr.prototype.readInt16LE=function(e,t){t||Yr(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},Cr.prototype.readInt16BE=function(e,t){t||Yr(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},Cr.prototype.readInt32LE=function(e,t){return t||Yr(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Cr.prototype.readInt32BE=function(e,t){return t||Yr(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Cr.prototype.readFloatLE=function(e,t){return t||Yr(e,4,this.length),mr(this,e,!0,23,4)},Cr.prototype.readFloatBE=function(e,t){return t||Yr(e,4,this.length),mr(this,e,!1,23,4)},Cr.prototype.readDoubleLE=function(e,t){return t||Yr(e,8,this.length),mr(this,e,!0,52,8)},Cr.prototype.readDoubleBE=function(e,t){return t||Yr(e,8,this.length),mr(this,e,!1,52,8)},Cr.prototype.writeUIntLE=function(e,t,n,o){e=+e,t|=0,n|=0,o||$r(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,i=0;for(this[t]=255&e;++i<n&&(r*=256);)this[t+i]=e/r&255;return t+n},Cr.prototype.writeUIntBE=function(e,t,n,o){e=+e,t|=0,n|=0,o||$r(this,e,t,n,Math.pow(2,8*n)-1,0);var r=n-1,i=1;for(this[t+r]=255&e;--r>=0&&(i*=256);)this[t+r]=e/i&255;return t+n},Cr.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||$r(this,e,t,1,255,0),Cr.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Cr.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||$r(this,e,t,2,65535,0),Cr.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Wr(this,e,t,!0),t+2},Cr.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||$r(this,e,t,2,65535,0),Cr.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Wr(this,e,t,!1),t+2},Cr.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||$r(this,e,t,4,4294967295,0),Cr.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):zr(this,e,t,!0),t+4},Cr.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||$r(this,e,t,4,4294967295,0),Cr.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):zr(this,e,t,!1),t+4},Cr.prototype.writeIntLE=function(e,t,n,o){if(e=+e,t|=0,!o){var r=Math.pow(2,8*n-1);$r(this,e,t,n,r-1,-r)}var i=0,s=1,a=0;for(this[t]=255&e;++i<n&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},Cr.prototype.writeIntBE=function(e,t,n,o){if(e=+e,t|=0,!o){var r=Math.pow(2,8*n-1);$r(this,e,t,n,r-1,-r)}var i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},Cr.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||$r(this,e,t,1,127,-128),Cr.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Cr.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||$r(this,e,t,2,32767,-32768),Cr.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Wr(this,e,t,!0),t+2},Cr.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||$r(this,e,t,2,32767,-32768),Cr.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Wr(this,e,t,!1),t+2},Cr.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||$r(this,e,t,4,2147483647,-2147483648),Cr.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):zr(this,e,t,!0),t+4},Cr.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||$r(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Cr.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):zr(this,e,t,!1),t+4},Cr.prototype.writeFloatLE=function(e,t,n){return Xr(this,e,t,!0,n)},Cr.prototype.writeFloatBE=function(e,t,n){return Xr(this,e,t,!1,n)},Cr.prototype.writeDoubleLE=function(e,t,n){return Qr(this,e,t,!0,n)},Cr.prototype.writeDoubleBE=function(e,t,n){return Qr(this,e,t,!1,n)},Cr.prototype.copy=function(e,t,n,o){if(n||(n=0),o||0===o||(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o<n&&(o=n),o===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError(\"targetStart out of bounds\");if(n<0||n>=this.length)throw new RangeError(\"sourceStart out of bounds\");if(o<0)throw new RangeError(\"sourceEnd out of bounds\");o>this.length&&(o=this.length),e.length-t<o-n&&(o=e.length-t+n);var r,i=o-n;if(this===e&&n<t&&t<o)for(r=i-1;r>=0;--r)e[r+t]=this[r+n];else if(i<1e3||!Cr.TYPED_ARRAY_SUPPORT)for(r=0;r<i;++r)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},Cr.prototype.fill=function(e,t,n,o){if(\"string\"==typeof e){if(\"string\"==typeof t?(o=t,t=0,n=this.length):\"string\"==typeof n&&(o=n,n=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==o&&\"string\"!=typeof o)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof o&&!Cr.isEncoding(o))throw new TypeError(\"Unknown encoding: \"+o)}else\"number\"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError(\"Out of range index\");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),\"number\"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var s=Ar(e)?e:ti(new Cr(e,o).toString()),a=s.length;for(i=0;i<n-t;++i)this[i+t]=s[i%a]}return this};var Zr=/[^+\\/0-9A-Za-z-_]/g;function ei(e){return e<16?\"0\"+e.toString(16):e.toString(16)}function ti(e,t){var n;t=t||1/0;for(var o=e.length,r=null,i=[],s=0;s<o;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===o){(t-=3)>-1&&i.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&i.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error(\"Invalid code point\");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function ni(e){return function(e){var t,n,o,r,i,s;hr||dr();var a=e.length;if(a%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");i=\"=\"===e[a-2]?2:\"=\"===e[a-1]?1:0,s=new pr(3*a/4-i),o=i>0?a-4:a;var u=0;for(t=0,n=0;t<o;t+=4,n+=3)r=lr[e.charCodeAt(t)]<<18|lr[e.charCodeAt(t+1)]<<12|lr[e.charCodeAt(t+2)]<<6|lr[e.charCodeAt(t+3)],s[u++]=r>>16&255,s[u++]=r>>8&255,s[u++]=255&r;return 2===i?(r=lr[e.charCodeAt(t)]<<2|lr[e.charCodeAt(t+1)]>>4,s[u++]=255&r):1===i&&(r=lr[e.charCodeAt(t)]<<10|lr[e.charCodeAt(t+1)]<<4|lr[e.charCodeAt(t+2)]>>2,s[u++]=r>>8&255,s[u++]=255&r),s}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\\s+|\\s+$/g,\"\")}(e).replace(Zr,\"\")).length<2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}(e))}function oi(e,t,n,o){for(var r=0;r<o&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function ri(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var ii=function(e){l(n,e);var t=v(n);function n(){var e;return r(this,n),(e=t.call(this)).retry=2,e._request=e.promisify(wx.request),e}return s(n,[{key:\"request\",value:function(e){return this._checkOptions(e),this._initOptions(e),e=c({},e,{responseType:\"text\"}),this._requestWithRetry(e)}},{key:\"_requestWithRetry\",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._request(e).then(this._handleResolve).catch((function(o){if(X(o.errMsg)){if(o.errMsg.includes(\"abort\"))return Nn({});if(o.errMsg.includes(\"timeout\"))return t.retry>0&&n<t.retry?t._requestWithRetry(e,++n):wn(new nt({code:ot.NETWORK_TIMEOUT,message:o.errMsg}));if(o.errMsg.includes(\"fail\"))return t.retry>0&&n<t.retry?t._requestWithRetry(e,++n):wn(new nt({code:ot.NETWORK_ERROR,message:o.errMsg}))}return wn(new nt(c({code:ot.UNCAUGHT_ERROR,message:o.message},o)))}))}},{key:\"_handleResolve\",value:function(e){var t=e.data,n=t.error_code,o=t.ErrorCode;return\"number\"==typeof n&&(o=n),o!==Oe&&(e.data.ErrorCode=Number(\"\".concat(o))),e}},{key:\"promisify\",value:function(e){return function(t){return new Promise((function(n,o){var r=e(Object.assign({},t,{success:n,fail:o}));t.updateAbort&&t.updateAbort((function(){r&&oe(r.abort)&&r.abort()}))}))}}}]),n}(ar),si=function(){function e(){r(this,e),this.request=0,this.success=0,this.fail=0,this.reportRate=10,this.requestTimeCost=[]}return s(e,[{key:\"report\",value:function(){if(1!==this.request){if(this.request%this.reportRate!=0)return null;var e=this.avgRequestTime(),t=\"runLoop reports: success=\".concat(this.success,\",fail=\").concat(this.fail,\",total=\").concat(this.request,\",avg=\").concat(e,\",cur=\").concat(this.requestTimeCost[this.requestTimeCost.length-1],\",max=\").concat(Math.max.apply(null,this.requestTimeCost),\",min=\").concat(Math.min.apply(null,this.requestTimeCost));W.log(t)}}},{key:\"setRequestTime\",value:function(e,t){var n=Math.abs(t-e);100===this.requestTimeCost.length&&this.requestTimeCost.shift(),this.requestTimeCost.push(n)}},{key:\"avgRequestTime\",value:function(){for(var e,t=this.requestTimeCost.length,n=0,o=0;o<t;o++)n+=this.requestTimeCost[o];return e=n/t,Math.round(100*e)/100}}]),e}(),ai=ir.create({timeout:6e3,headers:{\"Content-Type\":\"application/x-www-form-urlencoded;charset=UTF-8\"}});ai.interceptors.response.use((function(e){var t=e.data,n=t.error_code,o=t.ErrorCode;return J(n)&&(o=n),o!==Oe&&(e.data.ErrorCode=Number(o)),e}),(function(e){return\"Network Error\"===e.message&&(!0===ai.defaults.withCredentials&&W.warn(\"Network Error, try to close `IMAxiosAVChatroom.defaults.withCredentials` to false. (IMAxiosAVChatroom.js)\"),ai.defaults.withCredentials=!1),Promise.reject(e)}));var ui=ir.CancelToken,ci=function(){function e(t){r(this,e),this._initializeOptions(t),this._initializeMembers(),this.status=new si}return s(e,[{key:\"destructor\",value:function(){clearTimeout(this._seedID);var e=this._index();for(var t in this)Object.prototype.hasOwnProperty.call(this,t)&&(this[t]=null);return e}},{key:\"setIndex\",value:function(e){this._index=e}},{key:\"getIndex\",value:function(){return this._index}},{key:\"isRunning\",value:function(){return!this._stoped}},{key:\"_initializeOptions\",value:function(e){this.options=e}},{key:\"_initializeMembers\",value:function(){this._index=-1,this._seedID=0,this._requestStatus=!1,this._stoped=!1,this._intervalTime=0,this._intervalIncreaseStep=1e3,this._intervalDecreaseStep=1e3,this._intervalTimeMax=5e3,this._protectTimeout=3e3,this._getNoticeSeq=this.options.getNoticeSeq,this._retryCount=0,this._responseTime=Date.now(),this._responseTimeThreshold=2e3,this.options.isAVChatRoomLoop?this.requestor=ai:this.requestor=sr,W.log(\"XHRRunLoop._initializeMembers isAVChatRoomLoop=\".concat(!!this.options.isAVChatRoomLoop)),this.abort=null}},{key:\"start\",value:function(){0===this._seedID?(this._stoped=!1,this._send()):W.log('XHRRunLoop.start(), XHRRunLoop is running now, if you want to restart runLoop , please run \"stop()\" first.')}},{key:\"_reset\",value:function(){W.log(\"XHRRunLoop._reset(), reset long poll _intervalTime\",this._intervalTime),this.stop(),this.start()}},{key:\"_intervalTimeIncrease\",value:function(){this._intervalTime!==this._responseTimeThreshold&&(this._intervalTime<this._responseTimeThreshold&&(this._intervalTime+=this._intervalIncreaseStep),this._intervalTime>this._responseTimeThreshold&&(this._intervalTime=this._responseTimeThreshold))}},{key:\"_intervalTimeDecrease\",value:function(){0!==this._intervalTime&&(this._intervalTime>0&&(this._intervalTime-=this._intervalDecreaseStep),this._intervalTime<0&&(this._intervalTime=0))}},{key:\"_intervalTimeAdjustment\",value:function(){var e=Date.now();100*Math.floor((e-this._responseTime)/100)<=this._responseTimeThreshold?this._intervalTimeIncrease():this._intervalTimeDecrease(),this._responseTime=e}},{key:\"_intervalTimeAdjustmentBaseOnResponseData\",value:function(e){e.ErrorCode===Oe?this._intervalTimeDecrease():this._intervalTimeIncrease()}},{key:\"_send\",value:function(){var e=this;if(!0!==this._requestStatus){this._requestStatus=!0,this.status.request++,\"function\"==typeof this.options.before&&this.options.before(this.options.pack.requestData);var t=Date.now(),n=0;this.requestor.request({url:this.options.pack.getUrl(),data:this.options.pack.requestData,method:this.options.pack.method,cancelToken:new ui((function(t){e.abort=t}))}).then((function(o){if(e._intervalTimeAdjustmentBaseOnResponseData.bind(e)(o.data),e._retryCount>0&&(e._retryCount=0),e.status.success++,n=Date.now(),e.status.setRequestTime(t,n),o.data.timecost=n-t,\"function\"==typeof e.options.success)try{e.options.success({pack:e.options.pack,error:!1,data:e.options.pack.callback(o.data)})}catch(e){W.warn(\"XHRRunLoop._send(), error:\",e)}e._requestStatus=!1,!1===e._stoped&&(e._seedID=setTimeout(e._send.bind(e),e._intervalTime)),e.status.report()})).catch((function(o){if(e.status.fail++,e._retryCount++,e._intervalTimeAdjustment.bind(e)(),!1===e._stoped&&(e._seedID=setTimeout(e._send.bind(e),e._intervalTime)),e._requestStatus=!1,\"function\"==typeof e.options.fail&&void 0!==o.request)try{e.options.fail({pack:e.options.pack,error:o,data:!1})}catch(e){W.warn(\"XHRRunLoop._send(), fail callback error:\",e),W.error(e)}n=Date.now(),e.status.setRequestTime(t,n),e.status.report()}))}}},{key:\"stop\",value:function(){this._clearAllTimeOut(),this._stoped=!0}},{key:\"_clearAllTimeOut\",value:function(){clearTimeout(this._seedID),this._seedID=0}}]),e}(),li=function(){function e(t){r(this,e),this._initializeOptions(t),this._initializeMembers(),this.status=new si}return s(e,[{key:\"destructor\",value:function(){clearTimeout(this._seedID);var e=this._index();for(var t in this)Object.prototype.hasOwnProperty.call(this,t)&&(this[t]=null);return e}},{key:\"setIndex\",value:function(e){this._index=e}},{key:\"isRunning\",value:function(){return!this._stoped}},{key:\"getIndex\",value:function(){return this._index}},{key:\"_initializeOptions\",value:function(e){this.options=e}},{key:\"_initializeMembers\",value:function(){this._index=-1,this._seedID=0,this._requestStatus=!1,this._stoped=!1,this._intervalTime=0,this._intervalIncreaseStep=1e3,this._intervalDecreaseStep=1e3,this._intervalTimeMax=5e3,this._protectTimeout=3e3,this._getNoticeSeq=this.options.getNoticeSeq,this._retryCount=0,this._responseTime=Date.now(),this._responseTimeThreshold=2e3,this.requestor=new ii,this.abort=null}},{key:\"start\",value:function(){0===this._seedID?(this._stoped=!1,this._send()):W.log('WXRunLoop.start(): WXRunLoop is running now, if you want to restart runLoop , please run \"stop()\" first.')}},{key:\"_reset\",value:function(){W.log(\"WXRunLoop.reset(), long poll _intervalMaxRate\",this._intervalMaxRate),this.stop(),this.start()}},{key:\"_intervalTimeIncrease\",value:function(){this._intervalTime!==this._responseTimeThreshold&&(this._intervalTime<this._responseTimeThreshold&&(this._intervalTime+=this._intervalIncreaseStep),this._intervalTime>this._responseTimeThreshold&&(this._intervalTime=this._responseTimeThreshold))}},{key:\"_intervalTimeDecrease\",value:function(){0!==this._intervalTime&&(this._intervalTime>0&&(this._intervalTime-=this._intervalDecreaseStep),this._intervalTime<0&&(this._intervalTime=0))}},{key:\"_intervalTimeAdjustment\",value:function(){var e=Date.now();100*Math.floor((e-this._responseTime)/100)<=this._responseTimeThreshold?this._intervalTimeIncrease():this._intervalTimeDecrease(),this._responseTime=e}},{key:\"_intervalTimeAdjustmentBaseOnResponseData\",value:function(e){e.ErrorCode===Oe?this._intervalTimeDecrease():this._intervalTimeIncrease()}},{key:\"_send\",value:function(){var e=this;if(!0!==this._requestStatus){var t=this;this._requestStatus=!0,this.status.request++,\"function\"==typeof this.options.before&&this.options.before(t.options.pack.requestData);var n=Date.now(),o=0;this.requestor.request({url:t.options.pack.getUrl(),data:t.options.pack.requestData,method:t.options.pack.method,updateAbort:function(t){e.abort=t}}).then((function(r){if(t._intervalTimeAdjustmentBaseOnResponseData.bind(e)(r.data),t._retryCount>0&&(t._retryCount=0),e.status.success++,o=Date.now(),e.status.setRequestTime(n,o),r.data.timecost=o-n,\"function\"==typeof t.options.success)try{e.options.success({pack:e.options.pack,error:!1,data:e.options.pack.callback(r.data)})}catch(e){W.warn(\"WXRunLoop._send(), error:\",e)}t._requestStatus=!1,!1===t._stoped&&(t._seedID=setTimeout(t._send.bind(t),t._intervalTime)),e.status.report()})).catch((function(r){if(e.status.fail++,t._retryCount++,t._intervalTimeAdjustment.bind(e)(),!1===t._stoped&&(t._seedID=setTimeout(t._send.bind(t),t._intervalTime)),t._requestStatus=!1,\"function\"==typeof t.options.fail)try{e.options.fail({pack:e.options.pack,error:r,data:!1})}catch(e){W.warn(\"WXRunLoop._send(), fail callback error:\",e),W.error(e)}o=Date.now(),e.status.setRequestTime(n,o),e.status.report()}))}}},{key:\"stop\",value:function(){this._clearAllTimeOut(),this._stoped=!0}},{key:\"_clearAllTimeOut\",value:function(){clearTimeout(this._seedID),this._seedID=0}}]),e}(),pi=function(){function e(t){r(this,e),this.tim=t,this.httpConnection=O?new ii:new ur,this.keepAliveConnections=[]}return s(e,[{key:\"initializeListener\",value:function(){this.tim.innerEmitter.on(un,this._stopAllRunLoop,this)}},{key:\"request\",value:function(e){var t={url:e.url,data:e.requestData,method:e.method,callback:e.callback};return this.httpConnection.request(t).then((function(t){return t.data=e.callback(t.data),t.data.errorCode!==Oe?wn(new nt({code:t.data.errorCode,message:t.data.errorInfo})):t}))}},{key:\"createRunLoop\",value:function(e){var t=this.createKeepAliveConnection(e);return t.setIndex(this.keepAliveConnections.push(t)-1),t}},{key:\"stopRunLoop\",value:function(e){e.stop()}},{key:\"_stopAllRunLoop\",value:function(){for(var e=this.keepAliveConnections.length,t=0;t<e;t++)this.keepAliveConnections[t].stop()}},{key:\"destroyRunLoop\",value:function(e){e.stop();var t=e.destructor();this.keepAliveConnections.slice(t,1)}},{key:\"startRunLoopExclusive\",value:function(e){for(var t=e.getIndex(),n=0;n<this.keepAliveConnections.length;n++)n!==t&&this.keepAliveConnections[n].stop();e.start()}},{key:\"createKeepAliveConnection\",value:function(e){return O?new li(e):(2===this.tim.options.runLoopNetType||this.tim.options.runLoopNetType,new ci(e))}},{key:\"clearAll\",value:function(){this.conn.cancelAll()}},{key:\"reset\",value:function(){this.keepAliveConnections=[]}}]),e}(),hi=function(){function t(e){r(this,t),this.tim=e,this.tim.innerEmitter.on(pn,this._onErrorDetected,this)}return s(t,[{key:\"_onErrorDetected\",value:function(t){var n=t.data,o=new Bn;o.setMethod(\"exceptionError\").setStart(),o.setCode(0).setText(\"code=\".concat(n.code,\" message=\").concat(n.message)).setNetworkType(this.tim.netMonitor.getNetworkType()).setEnd(),n.code?W.warn(\"Oops! code:\".concat(n.code,\" message:\").concat(n.message)):W.warn(\"Oops! message:\".concat(n.message,\" stack:\").concat(n.stack)),this.tim.outerEmitter.emit(e.ERROR,n)}}]),t}(),di=function(){function e(t){var o=this;r(this,e),ke(t)||(this.userID=t.userID||\"\",this.nick=t.nick||\"\",this.gender=t.gender||\"\",this.birthday=t.birthday||0,this.location=t.location||\"\",this.selfSignature=t.selfSignature||\"\",this.allowType=t.allowType||n.ALLOW_TYPE_ALLOW_ANY,this.language=t.language||0,this.avatar=t.avatar||\"\",this.messageSettings=t.messageSettings||0,this.adminForbidType=t.adminForbidType||n.FORBID_TYPE_NONE,this.level=t.level||0,this.role=t.role||0,this.lastUpdatedTime=0,this.profileCustomField=[],ke(t.profileCustomField)||t.profileCustomField.forEach((function(e){o.profileCustomField.push({key:e.key,value:e.value})})))}return s(e,[{key:\"validate\",value:function(e){var t=!0,n=\"\";if(ke(e))return{valid:!1,tips:\"empty options\"};if(e.profileCustomField)for(var o=e.profileCustomField.length,r=null,i=0;i<o;i++){if(r=e.profileCustomField[i],!X(r.key)||-1===r.key.indexOf(\"Tag_Profile_Custom\"))return{valid:!1,tips:\"自定义资料字段的前缀必须是 Tag_Profile_Custom\"};if(!X(r.value))return{valid:!1,tips:\"自定义资料字段的 value 必须是字符串\"}}for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(\"profileCustomField\"===s)continue;if(ke(e[s])&&!X(e[s])&&!J(e[s])){n=\"key:\"+s+\", invalid value:\"+e[s],t=!1;continue}switch(s){case\"nick\":X(e[s])||(n=\"nick should be a string\",t=!1),he(e[s])>500&&(n=\"nick name limited: must less than or equal to \".concat(500,\" bytes, current size: \").concat(he(e[s]),\" bytes\"),t=!1);break;case\"gender\":me(je,e.gender)||(n=\"key:gender, invalid value:\"+e.gender,t=!1);break;case\"birthday\":J(e.birthday)||(n=\"birthday should be a number\",t=!1);break;case\"location\":X(e.location)||(n=\"location should be a string\",t=!1);break;case\"selfSignature\":X(e.selfSignature)||(n=\"selfSignature should be a string\",t=!1);break;case\"allowType\":me($e,e.allowType)||(n=\"key:allowType, invalid value:\"+e.allowType,t=!1);break;case\"language\":J(e.language)||(n=\"language should be a number\",t=!1);break;case\"avatar\":X(e.avatar)||(n=\"avatar should be a string\",t=!1);break;case\"messageSettings\":0!==e.messageSettings&&1!==e.messageSettings&&(n=\"messageSettings should be 0 or 1\",t=!1);break;case\"adminForbidType\":me(Ye,e.adminForbidType)||(n=\"key:adminForbidType, invalid value:\"+e.adminForbidType,t=!1);break;case\"level\":J(e.level)||(n=\"level should be a number\",t=!1);break;case\"role\":J(e.role)||(n=\"role should be a number\",t=!1);break;default:n=\"unknown key:\"+s+\"  \"+e[s],t=!1}}return{valid:t,tips:n}}}]),e}(),fi=function(){function t(e){r(this,t),this.userController=e,this.TAG=\"profile\",this.Actions={Q:\"query\",U:\"update\"},this.accountProfileMap=new Map,this.expirationTime=864e5}return s(t,[{key:\"setExpirationTime\",value:function(e){this.expirationTime=e}},{key:\"getUserProfile\",value:function(e){var t=this,n=e.userIDList;e.fromAccount=this.userController.getMyAccount(),n.length>100&&(W.warn(\"ProfileHandler.getUserProfile 获取用户资料人数不能超过100人\"),n.length=100);for(var o,r=[],i=[],s=0,a=n.length;s<a;s++)o=n[s],this.userController.isMyFriend(o)&&this._containsAccount(o)?i.push(this._getProfileFromMap(o)):r.push(o);if(0===r.length)return Nn(i);e.toAccount=r;var u=e.bFromGetMyProfile||!1,c=[];e.toAccount.forEach((function(e){c.push({toAccount:e,standardSequence:0,customSequence:0})})),e.userItem=c;var l=new Bn;l.setMethod(\"getUserProfile\").setText(n.length>5?\"userIDList.length=\".concat(n.length):\"userIDList=\".concat(n)).setStart();var p=this.userController.generateConfig(this.TAG,this.Actions.Q,e);return this.userController.request(p).then((function(e){l.setCode(0).setNetworkType(t.userController.getNetworkType()).setEnd(),W.info(\"ProfileHandler.getUserProfile ok\");var n=t._handleResponse(e).concat(i);return u?(t.userController.onGotMyProfile(),new An(n[0])):new An(n)})).catch((function(e){return t.userController.probeNetwork().then((function(t){var n=y(t,2),o=n[0],r=n[1];l.setError(e,o,r).setEnd()})),W.error(\"ProfileHandler.getUserProfile error:\",e),wn(e)}))}},{key:\"getMyProfile\",value:function(){var e=this.userController.getMyAccount();if(W.log(\"ProfileHandler.getMyProfile myAccount=\"+e),this._fillMap(),this._containsAccount(e)){var t=this._getProfileFromMap(e);return W.debug(\"ProfileHandler.getMyProfile from cache, myProfile:\"+JSON.stringify(t)),this.userController.onGotMyProfile(),Nn(t)}return this.getUserProfile({fromAccount:e,userIDList:[e],bFromGetMyProfile:!0})}},{key:\"_handleResponse\",value:function(e){for(var t,n,o=ue.now(),r=e.data.userProfileItem,i=[],s=0,a=r.length;s<a;s++)\"@TLS#NOT_FOUND\"!==r[s].to&&\"\"!==r[s].to&&(t=r[s].to,n=this._updateMap(t,this._getLatestProfileFromResponse(t,r[s].profileItem)),i.push(n));return W.log(\"ProfileHandler._handleResponse cost \"+(ue.now()-o)+\" ms\"),i}},{key:\"_getLatestProfileFromResponse\",value:function(e,t){var n={};if(n.userID=e,n.profileCustomField=[],!ke(t))for(var o=0,r=t.length;o<r;o++)if(t[o].tag.indexOf(\"Tag_Profile_Custom\")>-1)n.profileCustomField.push({key:t[o].tag,value:t[o].value});else switch(t[o].tag){case Be.NICK:n.nick=t[o].value;break;case Be.GENDER:n.gender=t[o].value;break;case Be.BIRTHDAY:n.birthday=t[o].value;break;case Be.LOCATION:n.location=t[o].value;break;case Be.SELFSIGNATURE:n.selfSignature=t[o].value;break;case Be.ALLOWTYPE:n.allowType=t[o].value;break;case Be.LANGUAGE:n.language=t[o].value;break;case Be.AVATAR:n.avatar=t[o].value;break;case Be.MESSAGESETTINGS:n.messageSettings=t[o].value;break;case Be.ADMINFORBIDTYPE:n.adminForbidType=t[o].value;break;case Be.LEVEL:n.level=t[o].value;break;case Be.ROLE:n.role=t[o].value;break;default:W.warn(\"ProfileHandler._handleResponse unkown tag->\",t[o].tag,t[o].value)}return n}},{key:\"updateMyProfile\",value:function(t){var n=this,o=new Bn;o.setMethod(\"updateMyProfile\").setText(JSON.stringify(t)).setStart();var r=(new di).validate(t);if(!r.valid)return o.setCode(ot.UPDATE_PROFILE_INVALID_PARAM).setMessage(\"ProfileHandler.updateMyProfile info:\".concat(r.tips)).setNetworkType(this.userController.getNetworkType()).setEnd(),W.error(\"ProfileHandler.updateMyProfile info:\".concat(r.tips,\"，请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#updateMyProfile\")),wn({code:ot.UPDATE_PROFILE_INVALID_PARAM,message:\"传入 updateMyProfile 接口的参数无效\"});var i=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(\"profileCustomField\"===s?t.profileCustomField.forEach((function(e){i.push({tag:e.key,value:e.value})})):i.push({tag:Be[s.toUpperCase()],value:t[s]}));if(0===i.length)return o.setCode(ot.UPDATE_PROFILE_NO_KEY).setMessage(ct).setNetworkType(this.userController.getNetworkType()).setEnd(),W.error(\"ProfileHandler.updateMyProfile info:\".concat(ct,\"，请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#updateMyProfile\")),wn({code:ot.UPDATE_PROFILE_NO_KEY,message:ct});var a=this.userController.generateConfig(this.TAG,this.Actions.U,{fromAccount:this.userController.getMyAccount(),profileItem:i});return this.userController.request(a).then((function(r){o.setCode(0).setNetworkType(n.userController.getNetworkType()).setEnd(),W.info(\"ProfileHandler.updateMyProfile ok\");var i=n._updateMap(n.userController.getMyAccount(),t);return n.userController.emitOuterEvent(e.PROFILE_UPDATED,[i]),Nn(i)})).catch((function(e){return n.userController.probeNetwork().then((function(t){var n=y(t,2),r=n[0],i=n[1];o.setError(e,r,i).setEnd()})),W.error(\"ProfileHandler.updateMyProfile error:\",e),wn(e)}))}},{key:\"onProfileModified\",value:function(t){var n=t.data;if(!ke(n)){var o,r,i=n.length;W.info(\"ProfileHandler.onProfileModified length=\"+i);for(var s=[],a=0;a<i;a++)o=n[a].userID,r=this._updateMap(o,this._getLatestProfileFromResponse(o,n[a].profileList)),s.push(r);this.userController.emitInnerEvent(gn,s),this.userController.emitOuterEvent(e.PROFILE_UPDATED,s)}}},{key:\"_fillMap\",value:function(){if(0===this.accountProfileMap.size){for(var e=this._getCachedProfiles(),t=Date.now(),n=0,o=e.length;n<o;n++)t-e[n].lastUpdatedTime<this.expirationTime&&this.accountProfileMap.set(e[n].userID,e[n]);W.log(\"ProfileHandler._fillMap from cache, map.size=\"+this.accountProfileMap.size)}}},{key:\"_updateMap\",value:function(e,t){var n,o=Date.now();return this._containsAccount(e)?(n=this._getProfileFromMap(e),t.profileCustomField&&Ie(n.profileCustomField,t.profileCustomField),ce(n,t,[\"profileCustomField\"]),n.lastUpdatedTime=o):(n=new di(t),(this.userController.isMyFriend(e)||e===this.userController.getMyAccount())&&(n.lastUpdatedTime=o,this.accountProfileMap.set(e,n))),this._flushMap(e===this.userController.getMyAccount()),n}},{key:\"_flushMap\",value:function(e){var t=I(this.accountProfileMap.values()),n=this.userController.tim.storage;W.debug(\"ProfileHandler._flushMap length=\".concat(t.length,\" flushAtOnce=\").concat(e)),n.setItem(this.TAG,t,e)}},{key:\"_containsAccount\",value:function(e){return this.accountProfileMap.has(e)}},{key:\"_getProfileFromMap\",value:function(e){return this.accountProfileMap.get(e)}},{key:\"_getCachedProfiles\",value:function(){var e=this.userController.tim.storage.getItem(this.TAG);return ke(e)?[]:e}},{key:\"onConversationsProfileUpdated\",value:function(e){for(var t,n,o,r=[],i=0,s=e.length;i<s;i++)n=(t=e[i]).userID,this.userController.isMyFriend(n)&&(this._containsAccount(n)?(o=this._getProfileFromMap(n),ce(o,t)>0&&r.push(n)):r.push(t.userID));0!==r.length&&(W.info(\"ProfileHandler.onConversationsProfileUpdated toAccount:\",r),this.getUserProfile({userIDList:r}))}},{key:\"reset\",value:function(){this._flushMap(!0),this.accountProfileMap.clear()}}]),t}(),gi=function(){function e(t){r(this,e),this.options=t?t.options:{enablePointer:!0},this.pointsList={},this.reportText={},this.maxNameLen=0,this.gapChar=\"-\",this.log=console.log,this.currentTask=\"\"}return s(e,[{key:\"newTask\",value:function(e){!1!==this.options.enablePointer&&(e||(e=[\"task\",this._timeFormat()].join(\"-\")),this.pointsList[e]=[],this.currentTask=e,console.log(\"Pointer new Task : \".concat(this.currentTask)))}},{key:\"deleteTask\",value:function(e){!1!==this.options.enablePointer&&(e||(e=this.currentTask),this.pointsList[e].length=0,delete this.pointsList[e])}},{key:\"dot\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\",t=arguments.length>1?arguments[1]:void 0;if(!1!==this.options.enablePointer){t=t||this.currentTask;var n=+new Date;this.maxNameLen=this.maxNameLen<e.length?e.length:this.maxNameLen,this.flen=this.maxNameLen+10,this.pointsList[t].push({pointerName:e,time:n})}}},{key:\"_analisys\",value:function(e){if(!1!==this.options.enablePointer){e=e||this.currentTask;for(var t=this.pointsList[e],n=t.length,o=[],r=[],i=0;i<n;i++)0!==i&&(r=this._analisysTowPoints(t[i-1],t[i]),o.push(r.join(\"\")));return r=this._analisysTowPoints(t[0],t[n-1],!0),o.push(r.join(\"\")),o.join(\"\")}}},{key:\"_analisysTowPoints\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!1!==this.options.enablePointer){var o=this.flen,r=t.time-e.time,i=r.toString(),s=e.pointerName+this.gapChar.repeat(o-e.pointerName.length),a=t.pointerName+this.gapChar.repeat(o-t.pointerName.length),u=this.gapChar.repeat(4-i.length)+i,c=n?[\"%c\",s,a,u,\"ms\\n%c\"]:[s,a,u,\"ms\\n\"];return c}}},{key:\"report\",value:function(e){if(!1!==this.options.enablePointer){e=e||this.currentTask;var t=this._analisys(e);this.pointsList=[];var n=this._timeFormat(),o=\"Pointer[\".concat(e,\"(\").concat(n,\")]\"),r=4*this.maxNameLen,i=(r-o.length)/2;console.log([\"-\".repeat(i),o,\"-\".repeat(i)].join(\"\")),console.log(\"%c\"+t,\"color:#66a\",\"color:red\",\"color:#66a\"),console.log(\"-\".repeat(r))}}},{key:\"_timeFormat\",value:function(){var e=new Date,t=this.zeroFix(e.getMonth()+1,2),n=this.zeroFix(e.getDate(),2);return\"\".concat(t,\"-\").concat(n,\" \").concat(e.getHours(),\":\").concat(e.getSeconds(),\":\").concat(e.getMinutes(),\"~\").concat(e.getMilliseconds())}},{key:\"zeroFix\",value:function(e,t){return(\"000000000\"+e).slice(-t)}},{key:\"reportAll\",value:function(){if(!1!==this.options.enablePointer)for(var e in this.pointsList)Object.prototype.hasOwnProperty.call(this.pointsList,e)&&this.eport(e)}}]),e}(),mi=function e(t,n){r(this,e),this.userID=t;var o={};if(o.userID=t,!ke(n))for(var i=0,s=n.length;i<s;i++)switch(n[i].tag){case Be.NICK:o.nick=n[i].value;break;case Be.GENDER:o.gender=n[i].value;break;case Be.BIRTHDAY:o.birthday=n[i].value;break;case Be.LOCATION:o.location=n[i].value;break;case Be.SELFSIGNATURE:o.selfSignature=n[i].value;break;case Be.ALLOWTYPE:o.allowType=n[i].value;break;case Be.LANGUAGE:o.language=n[i].value;break;case Be.AVATAR:o.avatar=n[i].value;break;case Be.MESSAGESETTINGS:o.messageSettings=n[i].value;break;case Be.ADMINFORBIDTYPE:o.adminForbidType=n[i].value;break;case Be.LEVEL:o.level=n[i].value;break;case Be.ROLE:o.role=n[i].value;break;default:W.debug(\"snsProfileItem unkown tag->\",n[i].tag)}this.profile=new di(o)},_i=function(){function e(t){r(this,e),this.userController=t,this.TAG=\"friend\",this.Actions={G:\"get\",D:\"delete\"},this.friends=new Map,this.pointer=new gi}return s(e,[{key:\"isMyFriend\",value:function(e){var t=this.friends.has(e);return t||W.debug(\"FriendHandler.isMyFriend \"+e+\" is not my friend\"),t}},{key:\"_transformFriendList\",value:function(e){if(!ke(e)&&!ke(e.infoItem)){W.info(\"FriendHandler._transformFriendList friendNum=\"+e.friendNum);for(var t,n,o=e.infoItem,r=0,i=o.length;r<i;r++)n=o[r].infoAccount,t=new mi(n,o[r].snsProfileItem),this.friends.set(n,t)}}},{key:\"_friends2map\",value:function(e){var t=new Map;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.set(n,e[n]);return t}},{key:\"getFriendList\",value:function(){var e=this,t={};t.fromAccount=this.userController.getMyAccount(),W.info(\"FriendHandler.getFriendList myAccount=\"+t.fromAccount);var n=this.userController.generateConfig(this.TAG,this.Actions.G,t);return this.userController.request(n).then((function(t){W.info(\"FriendHandler.getFriendList ok\"),e._transformFriendList(t.data);var n=I(e.friends.values());return Nn(n)})).catch((function(e){return W.error(\"FriendHandler.getFriendList error:\",e),wn(e)}))}},{key:\"deleteFriend\",value:function(e){if(!Array.isArray(e.toAccount))return W.error(\"FriendHandler.deleteFriend options.toAccount 必需是数组\"),wn({code:ot.DEL_FRIEND_INVALID_PARAM,message:\"传入 deleteFriend 接口的参数无效\"});e.toAccount.length>1e3&&(W.warn(\"FriendHandler.deleteFriend 删除好友人数不能超过1000人\"),e.toAccount.length=1e3);var t=this.userController.generateConfig(this.TAG,this.Actions.D,e);return this.userController.request(t).then((function(e){return W.info(\"FriendHandler.deleteFriend ok\"),Nn()})).catch((function(e){return W.error(\"FriendHandler.deleteFriend error:\",e),wn(e)}))}}]),e}(),vi=function e(t){r(this,e),ke||(this.userID=t.userID||\"\",this.timeStamp=t.timeStamp||0)},yi=function(){function t(e){r(this,t),this.userController=e,this.TAG=\"blacklist\",this.Actions={G:\"get\",C:\"create\",D:\"delete\"},this.blacklistMap=new Map,this.startIndex=0,this.maxLimited=100,this.curruentSequence=0}return s(t,[{key:\"getBlacklist\",value:function(){var e=this,t={};t.fromAccount=this.userController.getMyAccount(),t.maxLimited=this.maxLimited,t.startIndex=0,t.lastSequence=this.curruentSequence;var n=new Bn;n.setMethod(\"getBlacklist\").setStart();var o=this.userController.generateConfig(this.TAG,this.Actions.G,t);return this.userController.request(o).then((function(t){var o=ke(t.data.blackListItem)?0:t.data.blackListItem.length;return n.setCode(0).setNetworkType(e.userController.getNetworkType()).setText(o).setEnd(),W.info(\"BlacklistHandler.getBlacklist ok\"),e.curruentSequence=t.data.curruentSequence,e._handleResponse(t.data.blackListItem,!0),e._onBlacklistUpdated()})).catch((function(t){return e.userController.probeNetwork().then((function(e){var o=y(e,2),r=o[0],i=o[1];n.setError(t,r,i).setEnd()})),W.error(\"BlacklistHandler.getBlacklist error:\",t),wn(t)}))}},{key:\"addBlacklist\",value:function(e){var t=this,n=new Bn;if(n.setMethod(\"addToBlacklist\").setStart(),!ee(e.userIDList))return n.setCode(ot.ADD_BLACKLIST_INVALID_PARAM).setMessage(\"BlacklistHandler.addBlacklist options.userIDList 必需是数组\").setNetworkType(this.userController.getNetworkType()).setEnd(),W.error(\"BlacklistHandler.addBlacklist options.userIDList 必需是数组\"),wn({code:ot.ADD_BLACKLIST_INVALID_PARAM,message:\"传入 addToBlacklist 接口的参数无效\"});var o=this.userController.tim.loginInfo.identifier;if(1===e.userIDList.length&&e.userIDList[0]===o)return n.setCode(ot.CANNOT_ADD_SELF_TO_BLACKLIST).setMessage(\"不能拉黑自己\").setNetworkType(this.userController.getNetworkType()).setEnd(),W.error(\"BlacklistHandler.addBlacklist 不能把自己拉黑\"),wn({code:ot.CANNOT_ADD_SELF_TO_BLACKLIST,message:\"不能拉黑自己\"});e.userIDList.includes(o)&&(e.userIDList=e.userIDList.filter((function(e){return e!==o})),W.warn(\"BlacklistHandler.addBlacklist 不能把自己拉黑，已过滤\")),e.fromAccount=this.userController.getMyAccount(),e.toAccount=e.userIDList;var r=this.userController.generateConfig(this.TAG,this.Actions.C,e);return this.userController.request(r).then((function(o){return n.setCode(0).setNetworkType(t.userController.getNetworkType()).setText(e.userIDList.length>5?\"userIDList.length=\".concat(e.userIDList.length):\"userIDList=\".concat(e.userIDList)).setEnd(),W.info(\"BlacklistHandler.addBlacklist ok\"),t._handleResponse(o.data.resultItem,!0),t._onBlacklistUpdated()})).catch((function(e){return t.userController.probeNetwork().then((function(t){var o=y(t,2),r=o[0],i=o[1];n.setError(e,r,i).setEnd()})),W.error(\"BlacklistHandler.addBlacklist error:\",e),wn(e)}))}},{key:\"_handleResponse\",value:function(e,t){if(!ke(e))for(var n,o,r,i=0,s=e.length;i<s;i++)o=e[i].to,r=e[i].resultCode,(te(r)||0===r)&&(t?((n=this.blacklistMap.has(o)?this.blacklistMap.get(o):new vi).userID=o,!ke(e[i].addBlackTimeStamp)&&(n.timeStamp=e[i].addBlackTimeStamp),this.blacklistMap.set(o,n)):this.blacklistMap.has(o)&&(n=this.blacklistMap.get(o),this.blacklistMap.delete(o)));W.log(\"BlacklistHandler._handleResponse total=\"+this.blacklistMap.size+\" bAdd=\"+t)}},{key:\"deleteBlacklist\",value:function(e){var t=this,n=new Bn;if(n.setMethod(\"removeFromBlacklist\").setStart(),!ee(e.userIDList))return n.setCode(ot.DEL_BLACKLIST_INVALID_PARAM).setMessage(\"BlacklistHandler.deleteBlacklist options.userIDList 必需是数组\").setNetworkType(this.userController.getNetworkType()).setEnd(),W.error(\"BlacklistHandler.deleteBlacklist options.userIDList 必需是数组\"),wn({code:ot.DEL_BLACKLIST_INVALID_PARAM,message:\"传入 removeFromBlacklist 接口的参数无效\"});e.fromAccount=this.userController.getMyAccount(),e.toAccount=e.userIDList;var o=this.userController.generateConfig(this.TAG,this.Actions.D,e);return this.userController.request(o).then((function(o){return n.setCode(0).setNetworkType(t.userController.getNetworkType()).setText(e.userIDList.length>5?\"userIDList.length=\".concat(e.userIDList.length):\"userIDList=\".concat(e.userIDList)).setEnd(),W.info(\"BlacklistHandler.deleteBlacklist ok\"),t._handleResponse(o.data.resultItem,!1),t._onBlacklistUpdated()})).catch((function(e){return t.userController.probeNetwork().then((function(t){var o=y(t,2),r=o[0],i=o[1];n.setError(e,r,i).setEnd()})),W.error(\"BlacklistHandler.deleteBlacklist error:\",e),wn(e)}))}},{key:\"_onBlacklistUpdated\",value:function(){var t=I(this.blacklistMap.keys());return this.userController.emitOuterEvent(e.BLACKLIST_UPDATED,t),Nn(t)}},{key:\"handleBlackListDelAccount\",value:function(t){for(var n,o=[],r=0,i=t.length;r<i;r++)n=t[r],this.blacklistMap.has(n)&&(this.blacklistMap.delete(n),o.push(n));o.length>0&&(W.log(\"BlacklistHandler.handleBlackListDelAccount delCount=\"+o.length+\" : \"+o.join(\",\")),this.userController.emitOuterEvent(e.BLACKLIST_UPDATED,I(this.blacklistMap.keys())))}},{key:\"handleBlackListAddAccount\",value:function(t){for(var n,o=[],r=0,i=t.length;r<i;r++)n=t[r],this.blacklistMap.has(n)||(this.blacklistMap.set(n,new vi({userID:n})),o.push(n));o.length>0&&(W.log(\"BlacklistHandler.handleBlackListAddAccount addCount=\"+o.length+\" : \"+o.join(\",\")),this.userController.emitOuterEvent(e.BLACKLIST_UPDATED,I(this.blacklistMap.keys())))}},{key:\"reset\",value:function(){this.blacklistMap.clear(),this.startIndex=0,this.maxLimited=100,this.curruentSequence=0}}]),t}(),Ii=function(){function e(t){r(this,e),this.userController=t,this.TAG=\"applyC2C\",this.Actions={C:\"create\",G:\"get\",D:\"delete\",U:\"update\"}}return s(e,[{key:\"applyAddFriend\",value:function(e){var t=this,n=this.userController.generateConfig(this.TAG,this.Actions.C,e),o=this.userController.request(n);return o.then((function(e){t.userController.isActionSuccessful(\"applyAddFriend\",t.Actions.C,e)})).catch((function(e){})),o}},{key:\"getPendency\",value:function(e){var t=this,n=this.userController.generateConfig(this.TAG,this.Actions.G,e),o=this.userController.request(n);return o.then((function(e){t.userController.isActionSuccessful(\"getPendency\",t.Actions.G,e)})).catch((function(e){})),o}},{key:\"deletePendency\",value:function(e){var t=this,n=this.userController.generateConfig(this.TAG,this.Actions.D,e),o=this.userController.request(n);return o.then((function(e){t.userController.isActionSuccessful(\"deletePendency\",t.Actions.D,e)})).catch((function(e){})),o}},{key:\"replyPendency\",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.userController.generateConfig(this.TAG,this.Actions.U,t),o=this.userController.request(n);return o.then((function(t){e.userController.isActionSuccessful(\"replyPendency\",e.Actions.U,t)})).catch((function(e){})),o}}]),e}(),Mi=function(e){l(n,e);var t=v(n);function n(e){var o;return r(this,n),(o=t.call(this,e)).profileHandler=new fi(m(o)),o.friendHandler=new _i(m(o)),o.blacklistHandler=new yi(m(o)),o.applyC2CHandler=new Ii(m(o)),o._initializeListener(),o}return s(n,[{key:\"_initializeListener\",value:function(e){var t=this.tim.innerEmitter;t.on(Ot,this.onContextUpdated,this),t.on(Zt,this.onProfileModified,this),t.on(Qt,this.onNewFriendMessages,this),t.on(dn,this.onConversationsProfileUpdated,this)}},{key:\"onContextUpdated\",value:function(e){var t=this.tim.context;0!=!!t.a2Key&&0!=!!t.tinyID&&(this.profileHandler.getMyProfile(),this.friendHandler.getFriendList(),this.blacklistHandler.getBlacklist())}},{key:\"onGotMyProfile\",value:function(){this.triggerReady()}},{key:\"onProfileModified\",value:function(e){this.profileHandler.onProfileModified(e)}},{key:\"onNewFriendMessages\",value:function(e){W.debug(\"onNewFriendMessages\",JSON.stringify(e.data)),ke(e.data.blackListDelAccount)||this.blacklistHandler.handleBlackListDelAccount(e.data.blackListDelAccount),ke(e.data.blackListAddAccount)||this.blacklistHandler.handleBlackListAddAccount(e.data.blackListAddAccount)}},{key:\"onConversationsProfileUpdated\",value:function(e){this.profileHandler.onConversationsProfileUpdated(e.data)}},{key:\"getMyAccount\",value:function(){return this.tim.context.identifier}},{key:\"isMyFriend\",value:function(e){return this.friendHandler.isMyFriend(e)}},{key:\"generateConfig\",value:function(e,t,n){return{name:e,action:t,param:n}}},{key:\"getMyProfile\",value:function(){return this.profileHandler.getMyProfile()}},{key:\"getUserProfile\",value:function(e){return this.profileHandler.getUserProfile(e)}},{key:\"updateMyProfile\",value:function(e){return this.profileHandler.updateMyProfile(e)}},{key:\"getFriendList\",value:function(){return this.friendHandler.getFriendList()}},{key:\"deleteFriend\",value:function(e){return this.friendHandler.deleteFriend(e)}},{key:\"getBlacklist\",value:function(){return this.blacklistHandler.getBlacklist()}},{key:\"addBlacklist\",value:function(e){return this.blacklistHandler.addBlacklist(e)}},{key:\"deleteBlacklist\",value:function(e){return this.blacklistHandler.deleteBlacklist(e)}},{key:\"applyAddFriend\",value:function(e){return this.applyC2CHandler.applyAddFriend(e)}},{key:\"getPendency\",value:function(e){return this.applyC2CHandler.getPendency(e)}},{key:\"deletePendency\",value:function(e){return this.applyC2CHandler.deletePendency(e)}},{key:\"replyPendency\",value:function(e){return this.applyC2CHandler.replyPendency(e)}},{key:\"reset\",value:function(){W.info(\"UserController.reset\"),this.resetReady(),this.profileHandler.reset(),this.blacklistHandler.reset(),this.checkTimes=0}}]),n}(Sn),Ci=[\"groupID\",\"name\",\"avatar\",\"type\",\"introduction\",\"notification\",\"ownerID\",\"selfInfo\",\"createTime\",\"infoSequence\",\"lastInfoTime\",\"lastMessage\",\"nextMessageSeq\",\"memberNum\",\"maxMemberNum\",\"memberList\",\"joinOption\",\"groupCustomField\",\"muteAllMembers\"],Ei=function(){function e(t){r(this,e),this.groupID=\"\",this.name=\"\",this.avatar=\"\",this.type=\"\",this.introduction=\"\",this.notification=\"\",this.ownerID=\"\",this.createTime=\"\",this.infoSequence=\"\",this.lastInfoTime=\"\",this.selfInfo={messageRemindType:\"\",joinTime:\"\",nameCard:\"\",role:\"\"},this.lastMessage={lastTime:\"\",lastSequence:\"\",fromAccount:\"\",messageForShow:\"\"},this.nextMessageSeq=\"\",this.memberNum=\"\",this.maxMemberNum=\"\",this.joinOption=\"\",this.groupCustomField=[],this.muteAllMembers=void 0,this._initGroup(t)}return s(e,[{key:\"_initGroup\",value:function(e){for(var t in e)Ci.indexOf(t)<0||(\"selfInfo\"!==t?this[t]=e[t]:this.updateSelfInfo(e[t]))}},{key:\"updateGroup\",value:function(e){e.lastMsgTime&&(this.lastMessage.lastTime=e.lastMsgTime),te(e.muteAllMembers)||(\"On\"===e.muteAllMembers?e.muteAllMembers=!0:e.muteAllMembers=!1),e.groupCustomField&&Ie(this.groupCustomField,e.groupCustomField),ce(this,e,[\"members\",\"errorCode\",\"lastMsgTime\",\"groupCustomField\"])}},{key:\"updateSelfInfo\",value:function(e){var t=e.nameCard,n=e.joinTime,o=e.role,r=e.messageRemindType;ce(this.selfInfo,{nameCard:t,joinTime:n,role:o,messageRemindType:r},[],[\"\",null,void 0,0,NaN])}},{key:\"setSelfNameCard\",value:function(e){this.selfInfo.nameCard=e}}]),e}(),Ti=function(e,t){if(te(t))return\"\";switch(e){case n.MSG_TEXT:return t.text;case n.MSG_IMAGE:return\"[图片]\";case n.MSG_GEO:return\"[位置]\";case n.MSG_AUDIO:return\"[语音]\";case n.MSG_VIDEO:return\"[视频]\";case n.MSG_FILE:return\"[文件]\";case n.MSG_CUSTOM:return\"[自定义消息]\";case n.MSG_GRP_TIP:return\"[群提示消息]\";case n.MSG_GRP_SYS_NOTICE:return\"[群系统通知]\";case n.MSG_FACE:return\"[动画表情]\";default:return\"\"}},Si=function(e){return te(e)?{lastTime:0,lastSequence:0,fromAccount:0,messageForShow:\"\",payload:null,type:\"\",isRevoked:!1}:e instanceof yt?{lastTime:e.time||0,lastSequence:e.sequence||0,fromAccount:e.from||\"\",messageForShow:Ti(e.type,e.payload),payload:e.payload||null,type:e.type||null,isRevoked:!1}:c({},e,{isRevoked:!1,messageForShow:Ti(e.type,e.payload)})},Di=function(){function e(t){r(this,e),this.conversationID=t.conversationID||\"\",this.unreadCount=t.unreadCount||0,this.type=t.type||\"\",this.lastMessage=Si(t.lastMessage),t.lastMsgTime&&(this.lastMessage.lastTime=t.lastMsgTime),this._isInfoCompleted=!1,this.peerReadTime=t.peerReadTime||0,this._initProfile(t)}return s(e,[{key:\"_initProfile\",value:function(e){var t=this;Object.keys(e).forEach((function(n){switch(n){case\"userProfile\":t.userProfile=e.userProfile;break;case\"groupProfile\":t.groupProfile=e.groupProfile}})),te(this.userProfile)&&this.type===n.CONV_C2C?this.userProfile=new di({userID:e.conversationID.replace(\"C2C\",\"\")}):te(this.groupProfile)&&this.type===n.CONV_GROUP&&(this.groupProfile=new Ei({groupID:e.conversationID.replace(\"GROUP\",\"\")}))}},{key:\"updateUnreadCount\",value:function(e,t){te(e)||(Ce(this.subType)||Ee(this.subType)?this.unreadCount=0:t&&this.type===n.CONV_GROUP?this.unreadCount=e:this.unreadCount=this.unreadCount+e)}},{key:\"updateLastMessage\",value:function(e){this.lastMessage=Si(e)}},{key:\"reduceUnreadCount\",value:function(){this.unreadCount>=1&&(this.unreadCount-=1)}},{key:\"isLastMessageRevoked\",value:function(e){var t=e.sequence,o=e.time;return this.type===n.CONV_C2C&&t===this.lastMessage.lastSequence&&o===this.lastMessage.lastTime||this.type===n.CONV_GROUP&&t===this.lastMessage.lastSequence}},{key:\"setLastMessageRevoked\",value:function(e){this.lastMessage.isRevoked=e}},{key:\"toAccount\",get:function(){return this.conversationID.replace(\"C2C\",\"\").replace(\"GROUP\",\"\")}},{key:\"subType\",get:function(){return this.groupProfile?this.groupProfile.type:\"\"}}]),e}(),ki=function(t){l(i,t);var o=v(i);function i(e){var t;return r(this,i),(t=o.call(this,e)).pagingStatus=xe,t.pagingTimeStamp=0,t.conversationMap=new Map,t.tempGroupList=[],t._initListeners(),t}return s(i,[{key:\"hasLocalConversationMap\",value:function(){return this.conversationMap.size>0}},{key:\"_createLocalConversation\",value:function(e){return this.conversationMap.has(e)?this.conversationMap.get(e):(W.log(\"ConversationController._createLocalConversation conversationID:\".concat(e)),new Di({conversationID:e,type:e.slice(0,3)===n.CONV_C2C?n.CONV_C2C:n.CONV_GROUP}))}},{key:\"hasLocalConversation\",value:function(e){return this.conversationMap.has(e)}},{key:\"getConversationList\",value:function(){var e=this;W.log(\"ConversationController.getConversationList.\"),this.pagingStatus===Ve&&(W.log(\"ConversationController.getConversationList. continue to sync conversationList\"),this._syncConversationList());var t=new Bn;return t.setMethod(\"getConversationList\").setStart(),this.request({name:\"conversation\",action:\"query\"}).then((function(n){var o=n.data.conversations,r=void 0===o?[]:o,i=e._getConversationOptions(r);return e._updateLocalConversationList(i,!0),e._setStorageConversationList(),e._handleC2CPeerReadTime(),t.setCode(0).setText(r.length).setNetworkType(e.getNetworkType()).setEnd(),W.log(\"ConversationController.getConversationList ok.\"),Nn({conversationList:e.getLocalConversationList()})})).catch((function(n){return e.probeNetwork().then((function(e){var o=y(e,2),r=o[0],i=o[1];t.setError(n,r,i).setEnd()})),W.error(\"ConversationController.getConversationList error:\",n),wn(n)}))}},{key:\"_syncConversationList\",value:function(){var e=this,t=new Bn;return t.setMethod(\"syncConversationList\").setStart(),this.pagingStatus===xe&&this.conversationMap.clear(),this._autoPagingSyncConversationList().then((function(n){return e.pagingStatus=Fe,e._setStorageConversationList(),e._handleC2CPeerReadTime(),t.setCode(0).setText(\"\".concat(e.conversationMap.size)).setNetworkType(e.getNetworkType()).setEnd(),n})).catch((function(n){return e.pagingStatus=Ve,t.setText(e.pagingTimeStamp),e.probeNetwork().then((function(e){var o=y(e,2),r=o[0],i=o[1];t.setError(n,r,i).setEnd()})),wn(n)}))}},{key:\"_autoPagingSyncConversationList\",value:function(){var e=this;return this.pagingStatus=qe,this.request({name:\"conversation\",action:\"pagingQuery\",param:{fromAccount:this.tim.context.identifier,timeStamp:this.pagingTimeStamp,orderType:1}}).then((function(t){var n=t.data,o=n.completeFlag,r=n.conversations,i=void 0===r?[]:r,s=n.timeStamp;if(W.log(\"ConversationController._autoPagingSyncConversationList completeFlag=\".concat(o,\" nums=\").concat(i.length)),i.length>0){var a=e._getConversationOptions(i);e._updateLocalConversationList(a,!0)}return e._isReady?e._emitConversationUpdate():e.triggerReady(),e.pagingTimeStamp=s,1!==o?e._autoPagingSyncConversationList():Nn()}))}},{key:\"_handleC2CPeerReadTime\",value:function(){var e,t=this.tim.messageController,o=E(this.conversationMap);try{for(o.s();!(e=o.n()).done;){var r=y(e.value,2),i=r[0],s=r[1];s.type===n.CONV_C2C&&(W.debug(\"ConversationController._handleC2CPeerReadTime\",i,s.peerReadTime),t.recordPeerReadTime(i,s.peerReadTime))}}catch(e){o.e(e)}finally{o.f()}}},{key:\"getConversationProfile\",value:function(e){var t=this,o=this.conversationMap.has(e)?this.conversationMap.get(e):this._createLocalConversation(e);if(o._isInfoCompleted||o.type===n.CONV_SYSTEM)return Nn({conversation:o});var r=new Bn;return r.setMethod(\"getConversationProfile\").setStart(),W.log(\"ConversationController.getConversationProfile. conversationID:\".concat(e,\" lastMessage:\"),o.lastMessage),this._updateUserOrGroupProfileCompletely(o).then((function(n){return r.setCode(0).setNetworkType(t.getNetworkType()).setText(\"conversationID=\".concat(e,\" unreadCount=\").concat(n.data.conversation.unreadCount)).setEnd(),W.log(\"ConversationController.getConversationProfile ok. conversationID:\",e),n})).catch((function(n){return t.probeNetwork().then((function(t){var o=y(t,2),i=o[0],s=o[1];r.setError(n,i,s).setText(\"conversationID=\".concat(e)).setEnd()})),W.error(\"ConversationController.getConversationProfile error:\",n),wn(n)}))}},{key:\"deleteConversation\",value:function(e){var t=this,o={};if(!this.conversationMap.has(e)){var r=new nt({code:ot.CONVERSATION_NOT_FOUND,message:\"没有找到相应的会话，请检查传入参数\"});return wn(r)}switch(this.conversationMap.get(e).type){case n.CONV_C2C:o.type=1,o.toAccount=e.replace(n.CONV_C2C,\"\");break;case n.CONV_GROUP:o.type=2,o.toGroupID=e.replace(n.CONV_GROUP,\"\");break;case n.CONV_SYSTEM:return this.tim.groupController.deleteGroupSystemNotice({messageList:this.tim.messageController.getLocalMessageList(e)}),this.deleteLocalConversation(e),Nn({conversationID:e});default:var i=new nt({code:ot.CONVERSATION_UN_RECORDED_TYPE,message:\"未记录的会话类型\"});return wn(i)}var s=new Bn;return s.setMethod(\"deleteConversation\").setText(\"conversationID=\".concat(e)).setStart(),W.log(\"ConversationController.deleteConversation. conversationID=\".concat(e)),this.tim.setMessageRead({conversationID:e}).then((function(){return t.request({name:\"conversation\",action:\"delete\",param:o})})).then((function(){return s.setCode(0).setNetworkType(t.getNetworkType()).setEnd(),W.log(\"ConversationController.deleteConversation ok.\"),t.deleteLocalConversation(e),Nn({conversationID:e})})).catch((function(e){return t.probeNetwork().then((function(t){var n=y(t,2),o=n[0],r=n[1];s.setError(e,o,r).setEnd()})),W.error(\"ConversationController.deleteConversation error:\",e),wn(e)}))}},{key:\"getLocalConversationList\",value:function(){return I(this.conversationMap.values())}},{key:\"getLocalConversation\",value:function(e){return this.conversationMap.get(e)}},{key:\"_initLocalConversationList\",value:function(){var e=new Bn;e.setMethod(\"getConversationListInStorage\").setStart(),W.time(\"initConversationList\"),W.log(\"ConversationController._initLocalConversationList init\");var t=this._getStorageConversationList();if(t){for(var n=t.length,o=0;o<n;o++)this.conversationMap.set(t[o].conversationID,new Di(t[o]));this._emitConversationUpdate(!0,!1),e.setCode(0).setNetworkType(this.getNetworkType()).setText(n).setEnd()}else e.setCode(0).setNetworkType(this.getNetworkType()).setText(0).setEnd();this._syncConversationList()}},{key:\"_getStorageConversationList\",value:function(){return this.tim.storage.getItem(\"conversationMap\")}},{key:\"_setStorageConversationList\",value:function(){var e=this.getLocalConversationList().slice(0,20).map((function(e){return{conversationID:e.conversationID,type:e.type,subType:e.subType,lastMessage:e.lastMessage,groupProfile:e.groupProfile,userProfile:e.userProfile}}));this.tim.storage.setItem(\"conversationMap\",e)}},{key:\"_initListeners\",value:function(){var e=this;this.tim.innerEmitter.once(Ot,this._initLocalConversationList,this),this.tim.innerEmitter.on(Gt,this._onSendOrReceiveMessage,this),this.tim.innerEmitter.on(Ut,this._handleSyncMessages,this),this.tim.innerEmitter.on(xt,this._handleSyncMessages,this),this.tim.innerEmitter.on(qt,this._onSendOrReceiveMessage,this),this.tim.innerEmitter.on(Ft,this._onSendOrReceiveMessage,this),this.tim.innerEmitter.on(Vt,this._onSendOrReceiveMessage,this),this.tim.innerEmitter.on(sn,this._onGroupListUpdated,this),this.tim.innerEmitter.on(gn,this._updateConversationUserProfile,this),this.tim.innerEmitter.on(Kt,this._onMessageRevoked,this),this.ready((function(){e.tempGroupList.length>0&&(e._updateConversationGroupProfile(e.tempGroupList),e.tempGroupList.length=0)}))}},{key:\"_onGroupListUpdated\",value:function(e){this._updateConversationGroupProfile(e.data)}},{key:\"_updateConversationGroupProfile\",value:function(e){var t=this;ee(e)&&0===e.length||(this.hasLocalConversationMap()?(e.forEach((function(e){var n=\"GROUP\".concat(e.groupID);if(t.conversationMap.has(n)){var o=t.conversationMap.get(n);o.groupProfile=e,o.lastMessage.lastSequence<e.nextMessageSeq&&(o.lastMessage.lastSequence=e.nextMessageSeq-1),o.subType||(o.subType=e.type)}})),this._emitConversationUpdate(!0,!1)):this.tempGroupList=e)}},{key:\"_updateConversationUserProfile\",value:function(e){var t=this;e.data.forEach((function(e){var n=\"C2C\".concat(e.userID);t.conversationMap.has(n)&&(t.conversationMap.get(n).userProfile=e)})),this._emitConversationUpdate(!0,!1)}},{key:\"_onMessageRevoked\",value:function(e){var t=this,n=e.data;if(0!==n.length){var o=null,r=!1;n.forEach((function(e){(o=t.conversationMap.get(e.conversationID))&&o.isLastMessageRevoked(e)&&(r=!0,o.setLastMessageRevoked(!0))})),r&&this._emitConversationUpdate(!0,!1)}}},{key:\"_handleSyncMessages\",value:function(e){this._onSendOrReceiveMessage(e,!0)}},{key:\"_onSendOrReceiveMessage\",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=e.data.eventDataList;this._isReady?0!==o.length&&(this._getPeerReadTime(o),this._updateLocalConversationList(o,!1,n),this._setStorageConversationList(),this._emitConversationUpdate()):this.ready((function(){t._onSendOrReceiveMessage(e,n)}))}},{key:\"_getPeerReadTime\",value:function(e){var t=this,o=[];e.forEach((function(e){t.conversationMap.has(e.conversationID)||e.type!==n.CONV_C2C||o.push(e.conversationID.replace(n.CONV_C2C,\"\"))})),o.length>0&&(W.debug(\"ConversationController._getPeerReadTime userIDList:\".concat(o)),this.tim.messageController.getPeerReadTime(o))}},{key:\"_updateLocalConversationList\",value:function(e,t,n){var o;o=this._updateTempConversations(e,t,n),this.conversationMap=new Map(this._sortConversations([].concat(I(o.conversations),I(this.conversationMap)))),t||this._updateUserOrGroupProfile(o.newerConversations)}},{key:\"_updateTempConversations\",value:function(e,t,o){for(var r=[],i=[],s=0,a=e.length;s<a;s++){var u=new Di(e[s]),c=this.conversationMap.get(u.conversationID);if(this.conversationMap.has(u.conversationID)){var l=[\"unreadCount\",\"allowType\",\"adminForbidType\",\"payload\"];o&&l.push(\"lastMessage\"),ce(c,u,l,[null,void 0,\"\",0,NaN]),c.updateUnreadCount(u.unreadCount,t),o||(c.lastMessage.payload=e[s].lastMessage.payload),this.conversationMap.delete(c.conversationID),r.push([c.conversationID,c])}else{if(u.type===n.CONV_GROUP){var p=u.groupProfile.groupID,h=this.tim.groupController.getLocalGroupProfile(p);h&&(u.groupProfile=h,u.updateUnreadCount(0))}i.push(u),r.push([u.conversationID,u])}}return{conversations:r,newerConversations:i}}},{key:\"_sortConversations\",value:function(e){return e.sort((function(e,t){return t[1].lastMessage.lastTime-e[1].lastMessage.lastTime}))}},{key:\"_updateUserOrGroupProfile\",value:function(e){var t=this;if(0!==e.length){var o=[],r=[];e.forEach((function(e){if(e.type===n.CONV_C2C)o.push(e.toAccount);else if(e.type===n.CONV_GROUP){var i=e.toAccount;t.tim.groupController.hasLocalGroup(i)?e.groupProfile=t.tim.groupController.getLocalGroupProfile(i):r.push(i)}})),o.length>0&&this.tim.getUserProfile({userIDList:o}).then((function(e){var n=e.data;ee(n)?n.forEach((function(e){t.conversationMap.get(\"C2C\".concat(e.userID)).userProfile=e})):t.conversationMap.get(\"C2C\".concat(n.userID)).userProfile=n})),r.length>0&&this.tim.groupController.getGroupProfileAdvance({groupIDList:r,responseFilter:{groupBaseInfoFilter:[\"Type\",\"Name\",\"FaceUrl\"]}}).then((function(e){e.data.successGroupList.forEach((function(e){var n=\"GROUP\".concat(e.groupID);if(t.conversationMap.has(n)){var o=t.conversationMap.get(n);ce(o.groupProfile,e,[],[null,void 0,\"\",0,NaN]),!o.subType&&e.type&&(o.subType=e.type)}}))}))}}},{key:\"_updateUserOrGroupProfileCompletely\",value:function(e){var t=this;return e.type===n.CONV_C2C?this.tim.getUserProfile({userIDList:[e.toAccount]}).then((function(n){var o=n.data;return 0===o.length?wn(new nt({code:ot.USER_OR_GROUP_NOT_FOUND,message:\"没有找到相应的用户或群组，请检查传入参数\"})):(e.userProfile=o[0],e._isInfoCompleted=!0,t._unshiftConversation(e),Nn({conversation:e}))})):this.tim.getGroupProfile({groupID:e.toAccount}).then((function(n){return e.groupProfile=n.data.group,e._isInfoCompleted=!0,t._unshiftConversation(e),Nn({conversation:e})}))}},{key:\"_unshiftConversation\",value:function(e){e instanceof Di&&!this.conversationMap.has(e.conversationID)&&(this.conversationMap=new Map([[e.conversationID,e]].concat(I(this.conversationMap))),this._setStorageConversationList(),this._emitConversationUpdate(!0,!1))}},{key:\"deleteLocalConversation\",value:function(e){this.conversationMap.delete(e),this._setStorageConversationList(),this.emitInnerEvent(fn,e),this._emitConversationUpdate(!0,!1)}},{key:\"_getConversationOptions\",value:function(e){var t=[],n=e.filter((function(e){var t=e.lastMsg;return Z(t)})).map((function(e){if(1===e.type){var n={userID:e.userID,nick:e.c2CNick,avatar:e.c2CImage};return t.push(n),{conversationID:\"C2C\".concat(e.userID),type:\"C2C\",lastMessage:{lastTime:e.time,lastSequence:e.sequence,fromAccount:e.lastC2CMsgFromAccount,messageForShow:e.messageShow,type:e.lastMsg.elements[0]?e.lastMsg.elements[0].type:null,payload:e.lastMsg.elements[0]?e.lastMsg.elements[0].content:null},userProfile:new di(n),peerReadTime:e.c2cPeerReadTime}}return{conversationID:\"GROUP\".concat(e.groupID),type:\"GROUP\",lastMessage:{lastTime:e.time,lastSequence:e.messageReadSeq+e.unreadCount,fromAccount:e.msgGroupFromAccount,messageForShow:e.messageShow,type:e.lastMsg.elements[0]?e.lastMsg.elements[0].type:null,payload:e.lastMsg.elements[0]?e.lastMsg.elements[0].content:null},groupProfile:new Ei({groupID:e.groupID,name:e.groupNick,avatar:e.groupImage}),unreadCount:e.unreadCount,peerReadTime:0}}));return t.length>0&&this.emitInnerEvent(dn,t),n}},{key:\"_emitConversationUpdate\",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=I(this.conversationMap.values());n&&this.emitInnerEvent(hn,o),t&&this.emitOuterEvent(e.CONVERSATION_LIST_UPDATED,o)}},{key:\"_conversationMapTreeShaking\",value:function(e){var t=this,o=new Map(I(this.conversationMap));e.forEach((function(e){return o.delete(e.conversationID)})),o.has(n.CONV_SYSTEM)&&o.delete(n.CONV_SYSTEM);var r=this.tim.groupController.getJoinedAVChatRoom();r&&r.forEach((function(e){o.delete(\"\".concat(n.CONV_GROUP).concat(e))})),I(o.keys()).forEach((function(e){return t.conversationMap.delete(e)}))}},{key:\"reset\",value:function(){this.pagingStatus=xe,this.pagingTimeStamp=0,this.conversationMap.clear(),this.resetReady(),this.tim.innerEmitter.once(Ot,this._initLocalConversationList,this)}}]),i}(Sn),Ai=function(){function e(t){if(r(this,e),void 0===t)throw new nt({code:ot.MESSAGE_LIST_CONSTRUCTOR_NEED_OPTIONS,message:rt});if(void 0===t.tim)throw new nt({code:ot.MESSAGE_LIST_CONSTRUCTOR_NEED_OPTIONS,message:\"\".concat(rt,\".tim\")});this.list=new Map,this.tim=t.tim,this._initializeOptions(t)}return s(e,[{key:\"getLocalOldestMessageByConversationID\",value:function(e){if(!e)return null;if(!this.list.has(e))return null;var t=this.list.get(e).values();return t?t.next().value:null}},{key:\"_initializeOptions\",value:function(e){this.options={};var t={memory:{maxDatasPerKey:100,maxBytesPerData:256,maxKeys:0},cache:{maxDatasPerKey:10,maxBytesPerData:256,maxKeys:0}};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(void 0===e[n]){this.options[n]=t[n];continue}var o=t[n];for(var r in o)if(Object.prototype.hasOwnProperty.call(o,r)){if(void 0===e[n][r]){this.options[n][r]=o[r];continue}this.options[n][r]=e[n][r]}}}},{key:\"pushIn\",value:function(e){var t=e.conversationID,n=e.ID,o=!0;return this.list.has(t)||this.list.set(t,new Map),this.list.has(t)&&this.list.get(t).has(n)?o=!1:this.list.get(t).set(n,e),o}},{key:\"unshift\",value:function(e){ee(e)?e.length>0&&this._unshiftMultipleMessages(e):this._unshiftSingleMessage(e)}},{key:\"_unshiftSingleMessage\",value:function(e){var t=e.conversationID,n=e.ID;if(!this.list.has(t))return this.list.set(t,new Map),void this.list.get(t).set(n,e);var o=Array.from(this.list.get(t));o.unshift([n,e]),this.list.set(t,new Map(o))}},{key:\"_unshiftMultipleMessages\",value:function(e){for(var t=e.length,n=[],o=e[0].conversationID,r=this.list.has(o)?Array.from(this.list.get(o)):[],i=0;i<t;i++)n.push([e[i].ID,e[i]]);this.list.set(o,new Map(n.concat(r)))}},{key:\"remove\",value:function(e){var t=e.conversationID,n=e.ID;this.list.has(t)&&this.list.get(t).delete(n)}},{key:\"revoke\",value:function(e,t,n){if(W.debug(\"revoke message\",e,t,n),this.list.has(e)){var o,r=E(this.list.get(e));try{for(r.s();!(o=r.n()).done;){var i=y(o.value,2)[1];if(i.sequence===t&&!i.isRevoked&&(te(n)||i.random===n))return i.isRevoked=!0,i}}catch(e){r.e(e)}finally{r.f()}}return null}},{key:\"removeByConversationID\",value:function(e){this.list.has(e)&&this.list.delete(e)}},{key:\"updateMessageIsPeerReadProperty\",value:function(e,t){var n=[];if(this.list.has(e)){var o,r=E(this.list.get(e));try{for(r.s();!(o=r.n()).done;){var i=y(o.value,2)[1];i.time<=t&&!i.isPeerRead&&\"out\"===i.flow&&(i.isPeerRead=!0,n.push(i))}}catch(e){r.e(e)}finally{r.f()}W.log(\"MessagesList.updateMessageIsPeerReadProperty conversationID=\".concat(e,\" peerReadTime=\").concat(t,\" count=\").concat(n.length))}return n}},{key:\"hasLocalMessageList\",value:function(e){return this.list.has(e)}},{key:\"getLocalMessageList\",value:function(e){return this.hasLocalMessageList(e)?I(this.list.get(e).values()):[]}},{key:\"hasLocalMessage\",value:function(e,t){return!!this.hasLocalMessageList(e)&&this.list.get(e).has(t)}},{key:\"getLocalMessage\",value:function(e,t){return this.hasLocalMessage(e,t)?this.list.get(e).get(t):null}},{key:\"reset\",value:function(){this.list.clear()}}]),e}(),Ri=function(){function e(t){r(this,e),this.tim=t}return s(e,[{key:\"setMessageRead\",value:function(e){var t=e.conversationID,o=e.messageID,r=this.tim.conversationController.getLocalConversation(t);if(W.log(\"ReadReportHandler.setMessageRead conversationID=\".concat(t,\" unreadCount=\").concat(r?r.unreadCount:0)),!r||0===r.unreadCount)return Nn();var i=o?this.tim.messageController.getLocalMessage(t,o):null;switch(r.type){case n.CONV_C2C:return this._setC2CMessageRead({conversationID:t,lastMessageTime:i?i.time:r.lastMessage.lastTime});case n.CONV_GROUP:return this._setGroupMessageRead({conversationID:t,lastMessageSeq:i?i.sequence:r.lastMessage.lastSequence});case n.CONV_SYSTEM:return r.unreadCount=0,Nn();default:return Nn()}}},{key:\"_setC2CMessageRead\",value:function(e){var t=this,n=e.conversationID,o=e.lastMessageTime;W.log(\"ReadReportHandler._setC2CMessageRead conversationID=\".concat(n,\" lastMessageTime=\").concat(o)),J(o)||W.warn(\"ReadReportHandler._setC2CMessageRead 请勿修改 Conversation.lastMessage.lastTime，否则可能会导致已读上报结果不准确\");var r=new Bn;return r.setMethod(\"setC2CMessageRead\").setText(\"\".concat(n,\"-\").concat(o)).setStart(),this.tim.messageController.request({name:\"conversation\",action:\"setC2CMessageRead\",param:{C2CMsgReaded:{cookie:\"\",C2CMsgReadedItem:[{toAccount:n.replace(\"C2C\",\"\"),lastMessageTime:o,receipt:1}]}}}).then((function(){return r.setCode(0).setNetworkType(t.tim.netMonitor.getNetworkType()).setEnd(),W.log(\"ReadReportHandler._setC2CMessageRead ok.\"),t._updateIsReadAfterReadReport({conversationID:n,lastMessageTime:o}),t._updateUnreadCount(n),new An})).catch((function(e){return t.tim.netMonitor.probe().then((function(t){var n=y(t,2),o=n[0],i=n[1];r.setError(e,o,i).setEnd()})),W.log(\"ReadReportHandler._setC2CMessageRead failed. \".concat(le(e))),wn(e)}))}},{key:\"_setGroupMessageRead\",value:function(e){var t=this,n=e.conversationID,o=e.lastMessageSeq;W.log(\"ReadReportHandler._setGroupMessageRead conversationID=\".concat(n,\" lastMessageSeq=\").concat(o)),J(o)||W.warn(\"ReadReportHandler._setGroupMessageRead 请勿修改 Conversation.lastMessage.lastSequence，否则可能会导致已读上报结果不准确\");var r=new Bn;return r.setMethod(\"setGroupMessageRead\").setText(\"\".concat(n,\"-\").concat(o)).setStart(),this.tim.messageController.request({name:\"conversation\",action:\"setGroupMessageRead\",param:{groupID:n.replace(\"GROUP\",\"\"),messageReadSeq:o}}).then((function(){return r.setCode(0).setNetworkType(t.tim.netMonitor.getNetworkType()).setEnd(),W.log(\"ReadReportHandler._setGroupMessageRead ok.\"),t._updateIsReadAfterReadReport({conversationID:n,lastMessageSeq:o}),t._updateUnreadCount(n),new An})).catch((function(e){return t.tim.netMonitor.probe().then((function(t){var n=y(t,2),o=n[0],i=n[1];r.setError(e,o,i).setEnd()})),W.log(\"ReadReportHandler._setGroupMessageRead failed. \".concat(le(e))),wn(e)}))}},{key:\"_updateUnreadCount\",value:function(e){var t=this.tim,n=t.conversationController,o=t.messageController,r=n.getLocalConversation(e),i=o.getLocalMessageList(e);r&&(r.unreadCount=i.filter((function(e){return!e.isRead})).length,W.log(\"ReadReportHandler._updateUnreadCount conversationID=\".concat(r.conversationID,\" unreadCount=\").concat(r.unreadCount)))}},{key:\"_updateIsReadAfterReadReport\",value:function(e){var t=e.conversationID,n=e.lastMessageSeq,o=e.lastMessageTime,r=this.tim.messageController.getLocalMessageList(t);if(0!==r.length)for(var i,s=r.length-1;s>=0;s--)if(i=r[s],!(o&&i.time>o||n&&i.sequence>n)){if(\"in\"===i.flow&&i.isRead)break;i.setIsRead(!0)}}},{key:\"updateIsRead\",value:function(e){var t=this.tim,o=t.conversationController,r=t.messageController,i=o.getLocalConversation(e),s=r.getLocalMessageList(e);if(i&&0!==s.length&&!Te(i.type)){for(var a=[],u=0;u<s.length;u++)\"in\"!==s[u].flow?\"out\"!==s[u].flow||s[u].isRead||s[u].setIsRead(!0):a.push(s[u]);var c=0;if(i.type===n.CONV_C2C){var l=a.slice(-i.unreadCount).filter((function(e){return e.isRevoked})).length;c=a.length-i.unreadCount-l}else c=a.length-i.unreadCount;for(var p=0;p<c&&!a[p].isRead;p++)a[p].setIsRead(!0)}}}]),e}(),Ni=function(){function e(t){var n=t.tim,o=t.messageController;r(this,e),this.tim=n,this.messageController=o,this.completedMap=new Map,this._initListener()}return s(e,[{key:\"getMessageList\",value:function(e){var t=this,n=e.conversationID,o=e.nextReqMessageID,r=e.count;if(this.tim.groupController.checkJoinedAVChatRoomByID(n.replace(\"GROUP\",\"\")))return W.log(\"GetMessageHandler.getMessageList not available in avchatroom. conversationID=\".concat(n)),Nn({messageList:[],nextReqMessageID:\"\",isCompleted:!0});(te(r)||r>15)&&(r=15);var i=this._computeLeftCount({conversationID:n,nextReqMessageID:o});return W.log(\"GetMessageHandler.getMessageList. conversationID=\".concat(n,\" leftCount=\").concat(i,\" count=\").concat(r,\" nextReqMessageID=\").concat(o)),this._needGetHistory({conversationID:n,leftCount:i,count:r})?this.messageController.getHistoryMessages({conversationID:n,count:20}).then((function(){return i=t._computeLeftCount({conversationID:n,nextReqMessageID:o}),new An(t._computeResult({conversationID:n,nextReqMessageID:o,count:r,leftCount:i}))})):(W.log(\"GetMessageHandler.getMessageList. get messagelist from memory\"),Nn(this._computeResult({conversationID:n,nextReqMessageID:o,count:r,leftCount:i})))}},{key:\"setCompleted\",value:function(e){W.log(\"GetMessageHandler.setCompleted. conversationID=\".concat(e)),this.completedMap.set(e,!0)}},{key:\"deleteCompletedItem\",value:function(e){W.log(\"GetMessageHandler.deleteCompletedItem. conversationID=\".concat(e)),this.completedMap.delete(e)}},{key:\"_initListener\",value:function(){var e=this;this.tim.innerEmitter.on(vn,(function(){e.setCompleted(n.CONV_SYSTEM)})),this.tim.innerEmitter.on(mn,(function(t){var o=t.data;e.setCompleted(\"\".concat(n.CONV_GROUP).concat(o))}))}},{key:\"_getMessageListSize\",value:function(e){return this.messageController.getLocalMessageList(e).length}},{key:\"_needGetHistory\",value:function(e){var t=e.conversationID,o=e.leftCount,r=e.count,i=this.tim.conversationController.getLocalConversation(t),s=!!i&&i.type===n.CONV_SYSTEM,a=!!i&&i.subType===n.GRP_AVCHATROOM;return!s&&!a&&o<r&&!this.completedMap.has(t)}},{key:\"_computeResult\",value:function(e){var t=e.conversationID,n=e.nextReqMessageID,o=e.count,r=e.leftCount,i=this._computeMessageList({conversationID:t,nextReqMessageID:n,count:o}),s=this._computeIsCompleted({conversationID:t,leftCount:r,count:o}),a=this._computeNextReqMessageID({messageList:i,isCompleted:s,conversationID:t});return W.log(\"GetMessageHandler._computeResult. conversationID=\".concat(t,\" leftCount=\").concat(r,\" count=\").concat(o,\" nextReqMessageID=\").concat(a,\" nums=\").concat(i.length,\" isCompleted=\").concat(s)),{messageList:i,nextReqMessageID:a,isCompleted:s}}},{key:\"_computeNextReqMessageID\",value:function(e){var t=e.messageList,n=e.isCompleted,o=e.conversationID;if(!n)return 0===t.length?\"\":t[0].ID;var r=this.messageController.getLocalMessageList(o);return 0===r.length?\"\":r[0].ID}},{key:\"_computeMessageList\",value:function(e){var t=e.conversationID,n=e.nextReqMessageID,o=e.count,r=this.messageController.getLocalMessageList(t),i=this._computeIndexEnd({nextReqMessageID:n,messageList:r}),s=this._computeIndexStart({indexEnd:i,count:o});return r.slice(s,i)}},{key:\"_computeIndexEnd\",value:function(e){var t=e.messageList,n=void 0===t?[]:t,o=e.nextReqMessageID;return o?n.findIndex((function(e){return e.ID===o})):n.length}},{key:\"_computeIndexStart\",value:function(e){var t=e.indexEnd,n=e.count;return t>n?t-n:0}},{key:\"_computeLeftCount\",value:function(e){var t=e.conversationID,n=e.nextReqMessageID;return n?this.messageController.getLocalMessageList(t).findIndex((function(e){return e.ID===n})):this._getMessageListSize(t)}},{key:\"_computeIsCompleted\",value:function(e){var t=e.conversationID;return!!(e.leftCount<=e.count&&this.completedMap.has(t))}},{key:\"reset\",value:function(){W.log(\"GetMessageHandler.reset\"),this.completedMap.clear()}}]),e}(),wi=function e(t){r(this,e),this.value=t,this.next=null},Oi=function(){function e(t){r(this,e),this.MAX_LENGTH=t,this.pTail=null,this.pNodeToDel=null,this.map=new Map,W.log(\"SinglyLinkedList init MAX_LENGTH=\".concat(this.MAX_LENGTH))}return s(e,[{key:\"pushIn\",value:function(e){var t=new wi(e);if(this.map.size<this.MAX_LENGTH)null===this.pTail?(this.pTail=t,this.pNodeToDel=t):(this.pTail.next=t,this.pTail=t),this.map.set(e,1);else{var n=this.pNodeToDel;this.pNodeToDel=this.pNodeToDel.next,this.map.delete(n.value),n.next=null,n=null,this.pTail.next=t,this.pTail=t,this.map.set(e,1)}}},{key:\"has\",value:function(e){return this.map.has(e)}},{key:\"tail\",value:function(){return this.pTail}},{key:\"size\",value:function(){return this.map.size}},{key:\"data\",value:function(){return Array.from(this.map.keys())}},{key:\"reset\",value:function(){for(var e;null!==this.pNodeToDel;)e=this.pNodeToDel,this.pNodeToDel=this.pNodeToDel.next,e.next=null,e=null;this.pTail=null,this.map.clear()}}]),e}(),Li=function(){function e(t){r(this,e),this.tim=t}return s(e,[{key:\"upload\",value:function(e){switch(e.type){case n.MSG_IMAGE:return this._uploadImage(e);case n.MSG_FILE:return this._uploadFile(e);case n.MSG_AUDIO:return this._uploadAudio(e);case n.MSG_VIDEO:return this._uploadVideo(e);default:return Promise.resolve()}}},{key:\"_uploadImage\",value:function(e){var t=this.tim,n=t.uploadController,o=t.messageController,r=e.getElements()[0],i=o.getMessageOptionByID(e.messageID);return n.uploadImage({file:i.payload.file,to:i.to,onProgress:function(e){if(r.updatePercent(e),oe(i.onProgress))try{i.onProgress(e)}catch(e){return wn(new nt({code:ot.MESSAGE_ONPROGRESS_FUNCTION_ERROR,message:\"\".concat(st)}))}}}).then((function(e){var t,n=e.location,o=e.fileType,i=e.fileSize,s=ye(n);return r.updateImageFormat(o),r.updateImageInfoArray({size:i,url:s}),t=r._imageMemoryURL,O?new Promise((function(e,n){wx.getImageInfo({src:t,success:function(t){e({width:t.width,height:t.height})},fail:function(){e({width:0,height:0})}})})):G&&9===U?Promise.resolve({width:0,height:0}):new Promise((function(e,n){var o=new Image;o.onload=function(){e({width:this.width,height:this.height}),o=null},o.onerror=function(){e({width:0,height:0}),o=null},o.src=t}))})).then((function(t){var n=t.width,o=t.height;return r.updateImageInfoArray({width:n,height:o}),e}))}},{key:\"_uploadFile\",value:function(e){var t=this.tim,n=t.uploadController,o=t.messageController,r=e.getElements()[0],i=o.getMessageOptionByID(e.messageID);return n.uploadFile({file:i.payload.file,to:i.to,onProgress:function(e){if(r.updatePercent(e),oe(i.onProgress))try{i.onProgress(e)}catch(e){return wn(new nt({code:ot.MESSAGE_ONPROGRESS_FUNCTION_ERROR,message:\"\".concat(st)}))}}}).then((function(t){var n=t.location,o=ye(n);return r.updateFileUrl(o),e}))}},{key:\"_uploadAudio\",value:function(e){var t=this.tim,n=t.uploadController,o=t.messageController,r=e.getElements()[0],i=o.getMessageOptionByID(e.messageID);return n.uploadAudio({file:i.payload.file,to:i.to,onProgress:function(e){if(r.updatePercent(e),oe(i.onProgress))try{i.onProgress(e)}catch(e){return wn(new nt({code:ot.MESSAGE_ONPROGRESS_FUNCTION_ERROR,message:\"\".concat(st)}))}}}).then((function(t){var n=t.location,o=ye(n);return r.updateAudioUrl(o),e}))}},{key:\"_uploadVideo\",value:function(e){var t=this.tim,n=t.uploadController,o=t.messageController,r=e.getElements()[0],i=o.getMessageOptionByID(e.messageID);return n.uploadVideo({file:i.payload.file,to:i.to,onProgress:function(e){if(r.updatePercent(e),oe(i.onProgress))try{i.onProgress(e)}catch(e){return wn(new nt({code:ot.MESSAGE_ONPROGRESS_FUNCTION_ERROR,message:\"\".concat(st)}))}}}).then((function(t){var n=ye(t.location);return r.updateVideoUrl(n),e}))}}]),e}(),bi=function(t){l(i,t);var o=v(i);function i(e){var t;return r(this,i),(t=o.call(this,e))._initializeMembers(),t._initializeListener(),t._initialzeHandlers(),t.messageOptionMap=new Map,t}return s(i,[{key:\"_initializeMembers\",value:function(){this.messagesList=new Ai({tim:this.tim}),this.currentMessageKey={},this.singlyLinkedList=new Oi(100),this._peerReadTimeMap=new Map}},{key:\"_initialzeHandlers\",value:function(){this.readReportHandler=new Ri(this.tim,this),this.getMessageHandler=new Ni({messageController:this,tim:this.tim}),this.uploadFileHandler=new Li(this.tim)}},{key:\"reset\",value:function(){this.messagesList.reset(),this.currentMessageKey={},this.getMessageHandler.reset(),this.singlyLinkedList.reset(),this._peerReadTimeMap.clear(),this.messageOptionMap.clear()}},{key:\"_initializeListener\",value:function(){var e=this.tim.innerEmitter;e.on(Wt,this._onReceiveC2CMessage,this),e.on(bt,this._onSyncMessagesProcessing,this),e.on(Pt,this._onSyncMessagesFinished,this),e.on(zt,this._onReceiveGroupMessage,this),e.on(Jt,this._onReceiveGroupTips,this),e.on(Xt,this._onReceiveSystemNotice,this),e.on(en,this._onReceiveGroupMessageRevokedNotice,this),e.on(tn,this._onReceiveC2CMessageRevokedNotice,this),e.on(nn,this._onC2CMessageReadReceipt,this),e.on(fn,this._clearConversationMessages,this)}},{key:\"_guardForAVChatRoom\",value:function(e){if(e.conversationType===n.CONV_GROUP){var t=this.tim.groupController,o=e.to;return t.hasLocalGroup(o)?Promise.resolve():t.getGroupProfile({groupID:o}).then((function(t){var r=t.data.group.type;return W.log(\"MessageController._guardForAVChatRoom. groupID=\".concat(o,\" type=\").concat(r)),r===n.GRP_AVCHATROOM?(W.warn(\"MessageController._guardForAVChatRoom sendMessage not allowed. userId=\".concat(e.from,\" 未加入群 groupID=\").concat(o,\"。发消息前先使用 joinGroup 接口申请加群，详细请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#joinGroup\")),wn(new nt({code:ot.MESSAGE_SEND_FAIL,message:\"消息发送失败\",data:{message:e}}))):Promise.resolve()}))}return Promise.resolve()}},{key:\"sendMessageInstance\",value:function(e,t){var o,r=this,i=null;switch(e.conversationType){case n.CONV_C2C:i=this._handleOnSendC2CMessageSuccess.bind(this);break;case n.CONV_GROUP:i=this._handleOnSendGroupMessageSuccess.bind(this);break;default:return wn(new nt({code:ot.MESSAGE_SEND_INVALID_CONVERSATION_TYPE,message:'Message.conversationType 只能为 \"C2C\" 或 \"GROUP\"'}))}return this.singlyLinkedList.pushIn(e.random),this.uploadFileHandler.upload(e).then((function(){return r._guardForAVChatRoom(e).then((function(){var i=null;return e.isSendable()?(r._addSendMessageTotalCount(e),o=Date.now(),e.conversationType===n.CONV_C2C?i=r._createC2CMessagePack(e,t):e.conversationType===n.CONV_GROUP&&(i=r._createGroupMessagePack(e,t)),r.request(i)):wn({code:ot.MESSAGE_FILE_URL_IS_EMPTY,message:\"缺少必要的参数文件 URL\"})})).then((function(t){return r._addSendMessageSuccessCount(e,o),e.conversationType===n.CONV_GROUP&&(e.sequence=t.data.sequence,e.time=t.data.time,e.generateMessageID(r.tim.context.identifier)),r.messagesList.pushIn(e),i(e,t.data),r.messageOptionMap.delete(e.messageID),r.emitInnerEvent(Gt,{eventDataList:[{conversationID:e.conversationID,unreadCount:0,type:e.conversationType,subType:e.conversationSubType,lastMessage:e}]}),new An({message:e})})).catch((function(t){e.status=Ue;var n=new Bn;return n.setMethod(\"sendMessage\").setMessageType(e.type).setText(\"\".concat(r._generateTjgID(e),\"-\").concat(e.type,\"-\").concat(e.from,\"-\").concat(e.to)).setStart(),r.probeNetwork().then((function(e){var o=y(e,2),r=o[0],i=o[1];n.setError(t,r,i).setEnd()})),W.error(\"MessageController.sendMessageInstance error:\",t),wn(new nt({code:t&&t.code?t.code:ot.MESSAGE_SEND_FAIL,message:t&&t.message?t.message:\"消息发送失败\",data:{message:e}}))}))}))}},{key:\"_getSendMessageSpecifiedKey\",value:function(e){if(e.conversationType===n.CONV_C2C)return Gn;if(e.conversationType===n.CONV_GROUP){var t=this.tim.groupController.getLocalGroupProfile(e.to);if(!t)return;var o=t.type;if(function(e){return e===n.GRP_WORK}(o))return Un;if(Me(o))return xn;if(Ce(o))return qn;if(Ee(o))return Fn}}},{key:\"_addSendMessageTotalCount\",value:function(e){var t=this.tim.sumStatController;t.addTotalCount(Pn);var n=this._getSendMessageSpecifiedKey(e);n&&t.addTotalCount(n)}},{key:\"_addSendMessageSuccessCount\",value:function(e,t){var n=this.tim.sumStatController,o=Math.abs(Date.now()-t);n.addSuccessCount(Pn),n.addCost(Pn,o);var r=this._getSendMessageSpecifiedKey(e);r&&(n.addSuccessCount(r),n.addCost(r,o))}},{key:\"resendMessage\",value:function(e){return e.isResend=!0,e.status=Pe,this.sendMessageInstance(e)}},{key:\"_isFileLikeMessage\",value:function(e){return[n.MSG_IMAGE,n.MSG_FILE,n.MSG_AUDIO,n.MSG_VIDEO].indexOf(e.type)>=0}},{key:\"_resendBinaryTypeMessage\",value:function(){}},{key:\"_canIUseOnlineOnlyFlag\",value:function(e){var t=this.tim.groupController.getJoinedAVChatRoom();return!t||!t.includes(e.to)||e.conversationType!==n.CONV_GROUP}},{key:\"_createC2CMessagePack\",value:function(e,t){var n=0,o=null;return t&&(t.offlinePushInfo&&(o=t.offlinePushInfo),!0===t.onlineUserOnly&&(n=1,o?o.disablePush=!0:o={disablePush:!0})),{name:\"c2cMessage\",action:\"create\",tjgID:this._generateTjgID(e),param:{toAccount:e.to,msgBody:e.getElements(),msgSeq:e.sequence,msgRandom:e.random,msgLifeTime:this._canIUseOnlineOnlyFlag(e)&&n?0:void 0,offlinePushInfo:o?{pushFlag:!0===o.disablePush?1:0,title:o.title||\"\",desc:o.description||\"\",ext:o.extension||\"\",apnsInfo:{badgeMode:!0===o.ignoreIOSBadge?1:0},androidInfo:{OPPOChannelID:o.androidOPPOChannelID||\"\"}}:void 0}}}},{key:\"_handleOnSendC2CMessageSuccess\",value:function(e,t){e.status=Ge,e.time=t.time}},{key:\"_createGroupMessagePack\",value:function(e,t){var n=0,o=null;return t&&(!0===t.onlineUserOnly&&(n=1),t.offlinePushInfo&&(o=t.offlinePushInfo)),{name:\"groupMessage\",action:\"create\",tjgID:this._generateTjgID(e),param:{groupID:e.to,msgBody:e.getElements(),random:e.random,priority:e.priority,clientSequence:e.clientSequence,onlineOnlyFlag:this._canIUseOnlineOnlyFlag(e)?n:0,offlinePushInfo:o?{pushFlag:!0===o.disablePush?1:0,title:o.title||\"\",desc:o.description||\"\",ext:o.extension||\"\",apnsInfo:{badgeMode:!0===o.ignoreIOSBadge?1:0},androidInfo:{OPPOChannelID:o.androidOPPOChannelID||\"\"}}:void 0}}}},{key:\"_handleOnSendGroupMessageSuccess\",value:function(e,t){e.sequence=t.sequence,e.time=t.time,e.status=Ge}},{key:\"_onReceiveC2CMessage\",value:function(t){W.debug(\"MessageController._onReceiveC2CMessage nums=\".concat(t.data.length));var o=Date.now(),r=this._newC2CMessageStoredAndSummary({notifiesList:t.data,type:n.CONV_C2C,C2CRemainingUnreadList:t.C2CRemainingUnreadList}),i=r.eventDataList,s=r.result;if(i.length>0&&this.emitInnerEvent(qt,{eventDataList:i,result:s}),s.length>0){var a=this.tim.sumStatController;a.addTotalCount(Vn),a.addSuccessCount(Vn),a.addCost(Vn,Date.now()-o),this.emitOuterEvent(e.MESSAGE_RECEIVED,s)}}},{key:\"_onReceiveGroupMessage\",value:function(t){W.debug(\"MessageController._onReceiveGroupMessage nums=\".concat(t.data.length));var n=Date.now(),o=this.newGroupMessageStoredAndSummary(t.data),r=o.eventDataList,i=o.result;if(r.length>0&&this.emitInnerEvent(Ft,{eventDataList:r,result:i,isGroupTip:!1}),i.length>0){var s=this.tim.sumStatController;s.addTotalCount(Vn),s.addSuccessCount(Vn),s.addCost(Vn,Date.now()-n),this.emitOuterEvent(e.MESSAGE_RECEIVED,i)}}},{key:\"_onReceiveGroupTips\",value:function(t){var n=Date.now(),o=t.data;W.debug(\"MessageController._onReceiveGroupTips nums=\".concat(o.length));var r=this.newGroupTipsStoredAndSummary(o),i=r.eventDataList,s=r.result;if(i.length>0&&this.emitInnerEvent(Ft,{eventDataList:i,result:s,isGroupTip:!0}),s.length>0){var a=this.tim.sumStatController;a.addTotalCount(Vn),a.addSuccessCount(Vn),a.addCost(Vn,Date.now()-n),this.emitOuterEvent(e.MESSAGE_RECEIVED,s)}}},{key:\"_onReceiveSystemNotice\",value:function(t){var n=Date.now(),o=t.data,r=o.groupSystemNotices,i=o.type;W.debug(\"MessageController._onReceiveSystemNotice nums=\".concat(r.length));var s=this.newSystemNoticeStoredAndSummary({notifiesList:r,type:i}),a=s.eventDataList,u=s.result;if(a.length>0&&this.emitInnerEvent(Vt,{eventDataList:a,result:u,type:i}),u.length>0&&\"poll\"===i){var c=this.tim.sumStatController;c.addTotalCount(Vn),c.addSuccessCount(Vn),c.addCost(Vn,Date.now()-n),this.emitOuterEvent(e.MESSAGE_RECEIVED,u)}}},{key:\"_onReceiveGroupMessageRevokedNotice\",value:function(t){var n=this;W.debug(\"MessageController._onReceiveGroupMessageRevokedNotice nums=\".concat(t.data.length));var o=[],r=null;t.data.forEach((function(e){e.elements.revokedInfos.forEach((function(e){(r=n.messagesList.revoke(\"GROUP\".concat(e.groupID),e.sequence))&&o.push(r)}))})),0!==o.length&&(this.emitInnerEvent(Kt,o),this.emitOuterEvent(e.MESSAGE_REVOKED,o))}},{key:\"_onReceiveC2CMessageRevokedNotice\",value:function(t){var n=this;W.debug(\"MessageController._onReceiveC2CMessageRevokedNotice nums=\".concat(t.data.length));var o=[],r=null;t.data.forEach((function(e){e.c2cMessageRevokedNotify.revokedInfos.forEach((function(e){var t=n.tim.context.identifier===e.from?\"C2C\".concat(e.to):\"C2C\".concat(e.from);(r=n.messagesList.revoke(t,e.sequence,e.random))&&o.push(r)}))})),0!==o.length&&(this.emitInnerEvent(Kt,o),this.emitOuterEvent(e.MESSAGE_REVOKED,o))}},{key:\"_onC2CMessageReadReceipt\",value:function(e){var t=this;e.data.forEach((function(e){var n=e.c2cMessageReadReceipt.to;e.c2cMessageReadReceipt.uinPairReadArray.forEach((function(e){var o=e.peerReadTime;W.debug(\"MessageController._onC2CMessageReadReceipt to=\".concat(n,\" peerReadTime=\").concat(o));var r=\"C2C\".concat(n);t.recordPeerReadTime(r,o),t._updateMessageIsPeerReadProperty(r,o)}))}))}},{key:\"_updateMessageIsPeerReadProperty\",value:function(t,o){if(t.startsWith(n.CONV_C2C)&&o>0){var r=this.messagesList.updateMessageIsPeerReadProperty(t,o);r.length>0&&this.emitOuterEvent(e.MESSAGE_READ_BY_PEER,r)}}},{key:\"getPeerReadTime\",value:function(e){var t=this;if(!ke(e)){var n=new Bn;return n.setMethod(\"getPeerReadTime\").setStart(),W.log(\"MessageController.getPeerReadTime userIDList:\".concat(e)),this.request({name:\"c2cPeerReadTime\",action:\"get\",param:{userIDList:e}}).then((function(o){var r=o.data.peerReadTimeList;W.log(\"MessageController.getPeerReadTime ok. peerReadTimeList:\".concat(r));for(var i=\"\",s=0;s<e.length;s++)i+=\"\".concat(e[s],\"-\").concat(r[s],\" \"),r[s]>0&&t.recordPeerReadTime(\"C2C\".concat(e[s]),r[s]);n.setCode(0).setNetworkType(t.getNetworkType()).setText(i).setEnd()})).catch((function(e){t.probeNetwork().then((function(t){var o=y(t,2),r=o[0],i=o[1];n.setError(e,r,i).setEnd()})),W.warn(\"MessageController.getPeerReadTime failed. error:\",e)}))}}},{key:\"recordPeerReadTime\",value:function(e,t){this._peerReadTimeMap.has(e)?this._peerReadTimeMap.get(e)<t&&this._peerReadTimeMap.set(e,t):this._peerReadTimeMap.set(e,t)}},{key:\"_clearConversationMessages\",value:function(e){var t=e.data;this.messagesList.removeByConversationID(t),this.getMessageHandler.deleteCompletedItem(t)}},{key:\"_pushIntoNoticeResult\",value:function(e,t){return!(!this.messagesList.pushIn(t)||this.singlyLinkedList.has(t.random)||(e.push(t),0))}},{key:\"_newC2CMessageStoredAndSummary\",value:function(e){for(var t=e.notifiesList,o=e.type,r=e.C2CRemainingUnreadList,i=e.isFromSync,s=null,a=[],u=[],c={},l=this.tim.bigDataHallwayController,p=0,h=t.length;p<h;p++){var d=t[p];d.currentUser=this.tim.context.identifier,d.conversationType=o,d.isSystemMessage=!!d.isSystemMessage,s=new yt(d),d.elements=l.parseElements(d.elements,d.from),s.setElement(d.elements),(i||this._pushIntoNoticeResult(u,s))&&(void 0===c[s.conversationID]?c[s.conversationID]=a.push({conversationID:s.conversationID,unreadCount:\"out\"===s.flow?0:1,type:s.conversationType,subType:s.conversationSubType,lastMessage:s})-1:(a[c[s.conversationID]].type=s.conversationType,a[c[s.conversationID]].subType=s.conversationSubType,a[c[s.conversationID]].lastMessage=s,\"in\"===s.flow&&a[c[s.conversationID]].unreadCount++))}if(ee(r))for(var f=function(e,t){var o=a.find((function(t){return t.conversationID===\"C2C\".concat(r[e].from)}));o?o.unreadCount+=r[e].count:a.push({conversationID:\"C2C\".concat(r[e].from),unreadCount:r[e].count,type:n.CONV_C2C,lastMsgTime:r[e].lastMsgTime})},g=0,m=r.length;g<m;g++)f(g);return{eventDataList:a,result:u}}},{key:\"newGroupMessageStoredAndSummary\",value:function(e){var t=null,o=[],r={},i=[],s=n.CONV_GROUP,a=this.tim.bigDataHallwayController,u=e.length;u>1&&e.sort((function(e,t){return e.sequence-t.sequence}));for(var c=0;c<u;c++){var l=e[c];l.currentUser=this.tim.context.identifier,l.conversationType=s,l.isSystemMessage=!!l.isSystemMessage,t=new yt(l),l.elements=a.parseElements(l.elements,l.from),t.setElement(l.elements),this._isMessageFromAVChatroom(t)||this._pushIntoNoticeResult(i,t)&&(void 0===r[t.conversationID]?r[t.conversationID]=o.push({conversationID:t.conversationID,unreadCount:\"out\"===t.flow?0:1,type:t.conversationType,subType:t.conversationSubType,lastMessage:t})-1:(o[r[t.conversationID]].type=t.conversationType,o[r[t.conversationID]].subType=t.conversationSubType,o[r[t.conversationID]].lastMessage=t,\"in\"===t.flow&&o[r[t.conversationID]].unreadCount++))}return{eventDataList:o,result:i}}},{key:\"_isMessageFromAVChatroom\",value:function(e){var t=e.conversationID.slice(5);return this.tim.groupController.checkJoinedAVChatRoomByID(t)}},{key:\"newGroupTipsStoredAndSummary\",value:function(e){for(var t=null,o=[],r=[],i={},s=0,a=e.length;s<a;s++){var u=e[s];u.currentUser=this.tim.context.identifier,u.conversationType=n.CONV_GROUP,(t=new yt(u)).setElement({type:n.MSG_GRP_TIP,content:c({},u.elements,{groupProfile:u.groupProfile})}),t.isSystemMessage=!1,this._isMessageFromAVChatroom(t)||this._pushIntoNoticeResult(r,t)&&(void 0===i[t.conversationID]?i[t.conversationID]=o.push({conversationID:t.conversationID,unreadCount:\"out\"===t.flow?0:1,type:t.conversationType,subType:t.conversationSubType,lastMessage:t})-1:(o[i[t.conversationID]].type=t.conversationType,o[i[t.conversationID]].subType=t.conversationSubType,o[i[t.conversationID]].lastMessage=t,\"in\"===t.flow&&o[i[t.conversationID]].unreadCount++))}return{eventDataList:o,result:r}}},{key:\"newSystemNoticeStoredAndSummary\",value:function(e){var t=e.notifiesList,o=e.type,r=null,i=t.length,s=0,a=[],u={conversationID:n.CONV_SYSTEM,unreadCount:0,type:n.CONV_SYSTEM,subType:null,lastMessage:null};for(s=0;s<i;s++){var l=t[s];15!==l.elements.operationType&&(l.currentUser=this.tim.context.identifier,l.conversationType=n.CONV_SYSTEM,l.conversationID=n.CONV_SYSTEM,(r=new yt(l)).setElement({type:n.MSG_GRP_SYS_NOTICE,content:c({},l.elements,{groupProfile:l.groupProfile})}),r.isSystemMessage=!0,(1===r.sequence&&1===r.random||2===r.sequence&&2===r.random)&&(r.sequence=de(),r.random=de(),r.generateMessageID(l.currentUser),W.log(\"MessageController.newSystemNoticeStoredAndSummary sequence and random maybe duplicated, regenerate. ID=\".concat(r.ID))),this._pushIntoNoticeResult(a,r)&&(\"poll\"===o?u.unreadCount++:\"sync\"===o&&r.setIsRead(!0),u.subType=r.conversationSubType))}return u.lastMessage=a[a.length-1],{eventDataList:a.length>0?[u]:[],result:a}}},{key:\"_onSyncMessagesProcessing\",value:function(e){var t=this._newC2CMessageStoredAndSummary({notifiesList:e.data,type:n.CONV_C2C,isFromSync:!0,C2CRemainingUnreadList:e.C2CRemainingUnreadList}),o=t.eventDataList,r=t.result;this.emitInnerEvent(Ut,{eventDataList:o,result:r})}},{key:\"_onSyncMessagesFinished\",value:function(e){this.triggerReady();var t=this._newC2CMessageStoredAndSummary({notifiesList:e.data.messageList,type:n.CONV_C2C,isFromSync:!0,C2CRemainingUnreadList:e.data.C2CRemainingUnreadList}),o=t.eventDataList,r=t.result;this.emitInnerEvent(xt,{eventDataList:o,result:r})}},{key:\"getHistoryMessages\",value:function(e){if(e.conversationID===n.CONV_SYSTEM)return Nn();!e.count&&(e.count=15),e.count>20&&(e.count=20);var t=this.messagesList.getLocalOldestMessageByConversationID(e.conversationID);t||((t={}).time=0,t.sequence=0,0===e.conversationID.indexOf(n.CONV_C2C)?(t.to=e.conversationID.replace(n.CONV_C2C,\"\"),t.conversationType=n.CONV_C2C):0===e.conversationID.indexOf(n.CONV_GROUP)&&(t.to=e.conversationID.replace(n.CONV_GROUP,\"\"),t.conversationType=n.CONV_GROUP));var o=\"\";switch(t.conversationType){case n.CONV_C2C:return o=e.conversationID.replace(n.CONV_C2C,\"\"),this.getC2CRoamMessages({conversationID:e.conversationID,peerAccount:o,count:e.count,lastMessageTime:void 0===this.currentMessageKey[e.conversationID]?0:t.time});case n.CONV_GROUP:return this.getGroupRoamMessages({conversationID:e.conversationID,groupID:t.to,count:e.count,sequence:t.sequence-1});default:return Nn()}}},{key:\"getC2CRoamMessages\",value:function(e){var t=this,o=e.conversationID,r=void 0!==this.currentMessageKey[o]?this.currentMessageKey[o]:\"\";W.log(\"MessageController.getC2CRoamMessages toAccount=\".concat(e.peerAccount,\" count=\").concat(e.count||15,\" lastMessageTime=\").concat(e.lastMessageTime||0,\" messageKey=\").concat(r));var i=new Bn;return i.setMethod(\"getC2CRoamingMessages\").setStart(),this.request({name:\"c2cMessage\",action:\"query\",param:{peerAccount:e.peerAccount,count:e.count||15,lastMessageTime:e.lastMessageTime||0,messageKey:r}}).then((function(s){var a=s.data,u=a.complete,c=a.messageList;te(c)?W.log(\"MessageController.getC2CRoamMessages ok. complete=\".concat(u,\" but messageList is undefined!\")):W.log(\"MessageController.getC2CRoamMessages ok. complete=\".concat(u,\" nums=\").concat(c.length)),i.setCode(0).setNetworkType(t.getNetworkType()).setText(\"\".concat(e.peerAccount,\"-\").concat(e.count||15,\"-\").concat(e.lastMessageTime||0,\"-\").concat(r,\"-\").concat(u,\"-\").concat(c?c.length:\"undefined\")).setEnd(),1===u&&t.getMessageHandler.setCompleted(o);var l=t._roamMessageStore(c,n.CONV_C2C,o);t.readReportHandler.updateIsRead(o),t.currentMessageKey[o]=s.data.messageKey;var p=t._peerReadTimeMap.get(o);if(W.log(\"MessageController.getC2CRoamMessages update isPeerRead property. conversationID=\".concat(o,\" peerReadTime=\").concat(p)),p)t._updateMessageIsPeerReadProperty(o,p);else{var h=o.replace(n.CONV_C2C,\"\");t.getPeerReadTime([h]).then((function(){t._updateMessageIsPeerReadProperty(o,t._peerReadTimeMap.get(o))}))}return l})).catch((function(n){return t.probeNetwork().then((function(t){var o=y(t,2),s=o[0],a=o[1];i.setError(n,s,a).setText(\"\".concat(e.peerAccount,\"-\").concat(e.count||15,\"-\").concat(e.lastMessageTime||0,\"-\").concat(r)).setEnd()})),W.warn(\"MessageController.getC2CRoamMessages failed. \".concat(n)),wn(n)}))}},{key:\"_computeLastSequence\",value:function(e){return e.sequence>=0?Promise.resolve(e.sequence):this.tim.groupController.getGroupLastSequence(e.groupID)}},{key:\"getGroupRoamMessages\",value:function(e){var t=this,o=new Bn,r=0;return this._computeLastSequence(e).then((function(n){return r=n,W.log(\"MessageController.getGroupRoamMessages groupID=\".concat(e.groupID,\" lastSequence=\").concat(r)),o.setMethod(\"getGroupRoamingMessages\").setStart(),t.request({name:\"groupMessage\",action:\"query\",param:{groupID:e.groupID,count:21,sequence:r}})})).then((function(i){var s=i.data,a=s.messageList,u=s.complete;te(a)?W.log(\"MessageController.getGroupRoamMessages ok. complete=\".concat(u,\" but messageList is undefined!\")):W.log(\"MessageController.getGroupRoamMessages ok. complete=\".concat(u,\" nums=\").concat(a.length)),o.setCode(0).setNetworkType(t.getNetworkType()).setText(\"\".concat(e.groupID,\"-\").concat(r,\"-\").concat(u,\"-\").concat(a?a.length:\"undefined\")).setEnd();var c=\"GROUP\".concat(e.groupID);if(2===u||ke(a))return t.getMessageHandler.setCompleted(c),[];var l=t._roamMessageStore(a,n.CONV_GROUP,c);return t.readReportHandler.updateIsRead(c),t._patchConversationLastMessage(c),l})).catch((function(n){return t.probeNetwork().then((function(t){var i=y(t,2),s=i[0],a=i[1];o.setError(n,s,a).setText(\"\".concat(e.groupID,\"-\").concat(r)).setEnd()})),W.warn(\"MessageController.getGroupRoamMessages failed. \".concat(n)),wn(n)}))}},{key:\"_patchConversationLastMessage\",value:function(e){var t=this.tim.conversationController.getLocalConversation(e);if(t){var n=t.lastMessage,o=n.messageForShow,r=n.payload;if(ke(o)||ke(r)){var i=this.messagesList.getLocalMessageList(e);if(0===i.length)return;var s=i[i.length-1];W.log(\"MessageController._patchConversationLastMessage conversationID:\".concat(e,\" payload:\"),s.payload),t.updateLastMessage(s)}}}},{key:\"_roamMessageStore\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0,r=null,i=[],s=0,a=e.length,u=null,l=t===n.CONV_GROUP,p=this.tim.bigDataHallwayController,h=function(){s=l?e.length-1:0,a=l?0:e.length},d=function(){l?--s:++s},f=function(){return l?s>=a:s<a};for(h();f();d())if(l&&1===e[s].sequence&&this.getMessageHandler.setCompleted(o),1!==e[s].isPlaceMessage)if((r=new yt(e[s])).to=e[s].to,r.isSystemMessage=!!e[s].isSystemMessage,r.conversationType=t,e[s].event===He.JSON.TYPE.GROUP.TIP?u={type:n.MSG_GRP_TIP,content:c({},e[s].elements,{groupProfile:e[s].groupProfile})}:(e[s].elements=p.parseElements(e[s].elements,e[s].from),u=e[s].elements),ke(u)){var g=new Bn;g.setMethod(Yn).setText(\"from:\".concat(r.from,\" to:\").concat(r.to,\" sequence:\").concat(r.sequence,\" event:\").concat(e[s].event)).setStart(),g.setCode(0).setNetworkType(this.getNetworkType()).setEnd()}else r.setElement(u),r.reInitialize(this.tim.context.identifier),i.push(r);return this.messagesList.unshift(i),h=d=f=null,i}},{key:\"getLocalMessageList\",value:function(e){return this.messagesList.getLocalMessageList(e)}},{key:\"getLocalMessage\",value:function(e,t){return this.messagesList.getLocalMessage(e,t)}},{key:\"hasLocalMessage\",value:function(e,t){return this.messagesList.hasLocalMessage(e,t)}},{key:\"deleteLocalMessage\",value:function(e){e instanceof yt&&this.messagesList.remove(e)}},{key:\"revokeMessage\",value:function(e){var t,o=this;e.conversationType===n.CONV_C2C?t={name:\"c2cMessageWillBeRevoked\",action:\"create\",param:{msgInfo:{fromAccount:e.from,toAccount:e.to,msgSeq:e.sequence,msgRandom:e.random,msgTimeStamp:e.time}}}:e.conversationType===n.CONV_GROUP&&(t={name:\"groupMessageWillBeRevoked\",action:\"create\",param:{to:e.to,msgSeqList:[{msgSeq:e.sequence}]}});var r=new Bn;return r.setMethod(\"revokeMessage\").setMessageType(e.type).setText(\"\".concat(this._generateTjgID(e),\"-\").concat(e.type,\"-\").concat(e.from,\"-\").concat(e.to)).setStart(),this.request(t).then((function(t){var n=t.data.recallRetList;if(!ke(n)&&0!==n[0].retCode){var i=new nt({code:n[0].retCode,message:tt[n[0].retCode]||\"消息撤回失败\",data:{message:e}});return r.setCode(i.code).setMessage(i.message).setEnd(),wn(i)}return W.info(\"MessageController.revokeMessage ok. ID=\".concat(e.ID)),e.isRevoked=!0,r.setCode(0).setEnd(),o.emitInnerEvent(Kt,[e]),new An({message:e})})).catch((function(t){o.probeNetwork().then((function(e){var n=y(e,2),o=n[0],i=n[1];r.setError(t,o,i).setEnd()}));var n=new nt({code:t&&t.code?t.code:ot.MESSAGE_REVOKE_FAIL,message:t&&t.message?t.message:\"消息撤回失败\",data:{message:e}});return W.warn(\"MessageController.revokeMessage failed. ID=\".concat(e.ID,\" code=\").concat(n.code,\" message=\").concat(n.message)),wn(n)}))}},{key:\"setMessageRead\",value:function(e){var t=this;return new Promise((function(n,o){t.ready((function(){t.readReportHandler.setMessageRead(e).then(n).catch(o)}))}))}},{key:\"getMessageList\",value:function(e){return this.getMessageHandler.getMessageList(e)}},{key:\"createTextMessage\",value:function(e){e.currentUser=this.tim.context.identifier;var t=new yt(e),n=\"string\"==typeof e.payload?e.payload:e.payload.text,o=new Ke({text:n});return t.setElement(o),t}},{key:\"createCustomMessage\",value:function(e){e.currentUser=this.tim.context.identifier;var t=new yt(e),n=new gt({data:e.payload.data,description:e.payload.description,extension:e.payload.extension});return t.setElement(n),t}},{key:\"createImageMessage\",value:function(e){e.currentUser=this.tim.context.identifier;var t=new yt(e);if(O){var n=e.payload.file;if(z(n))return void W.warn(\"微信小程序环境下调用 createImageMessage 接口时，payload.file 不支持传入 File 对象\");var o=n.tempFilePaths[0],r={url:o,name:o.slice(o.lastIndexOf(\"/\")+1),size:n.tempFiles[0].size,type:o.slice(o.lastIndexOf(\".\")+1).toLowerCase()};e.payload.file=r}else if(w&&z(e.payload.file)){var i=e.payload.file;e.payload.file={files:[i]}}var s=new We({imageFormat:He.IMAGE_FORMAT.UNKNOWN,uuid:this._generateUUID(),file:e.payload.file});return t.setElement(s),this.messageOptionMap.set(t.messageID,e),t}},{key:\"createFileMessage\",value:function(e){if(!O){if(w&&z(e.payload.file)){var t=e.payload.file;e.payload.file={files:[t]}}e.currentUser=this.tim.context.identifier;var n=new yt(e),o=new ft({uuid:this._generateUUID(),file:e.payload.file});return n.setElement(o),this.messageOptionMap.set(n.messageID,e),n}W.warn(\"微信小程序目前不支持选择文件， createFileMessage 接口不可用！\")}},{key:\"createAudioMessage\",value:function(e){if(O){var t=e.payload.file;if(O){var n={url:t.tempFilePath,name:t.tempFilePath.slice(t.tempFilePath.lastIndexOf(\"/\")+1),size:t.fileSize,second:parseInt(t.duration)/1e3,type:t.tempFilePath.slice(t.tempFilePath.lastIndexOf(\".\")+1).toLowerCase()};e.payload.file=n}e.currentUser=this.tim.context.identifier;var o=new yt(e),r=new Je({second:Math.floor(t.duration/1e3),size:t.fileSize,url:t.tempFilePath,uuid:this._generateUUID()});return o.setElement(r),this.messageOptionMap.set(o.messageID,e),o}W.warn(\"createAudioMessage 目前只支持微信小程序发语音消息\")}},{key:\"createVideoMessage\",value:function(e){e.currentUser=this.tim.context.identifier,e.payload.file.thumbUrl=\"https://webim-1252463788.cos.ap-shanghai.myqcloud.com/assets/images/transparent.png\",e.payload.file.thumbSize=1668;var t={};if(O){if(z(e.payload.file))return void W.warn(\"微信小程序环境下调用 createVideoMessage 接口时，payload.file 不支持传入 File 对象\");var n=e.payload.file;t.url=n.tempFilePath,t.name=n.tempFilePath.slice(n.tempFilePath.lastIndexOf(\"/\")+1),t.size=n.size,t.second=n.duration,t.type=n.tempFilePath.slice(n.tempFilePath.lastIndexOf(\".\")+1).toLowerCase()}else if(w){if(z(e.payload.file)){var o=e.payload.file;e.payload.file.files=[o]}var r=e.payload.file;t.url=window.URL.createObjectURL(r.files[0]),t.name=r.files[0].name,t.size=r.files[0].size,t.second=r.files[0].duration||0,t.type=r.files[0].type.split(\"/\")[1]}e.payload.file.videoFile=t;var i=new yt(e),s=new mt({videoFormat:t.type,videoSecond:Number(t.second.toFixed(0)),videoSize:t.size,remoteVideoUrl:\"\",videoUrl:t.url,videoUUID:this._generateUUID(),thumbUUID:this._generateUUID(),thumbWidth:e.payload.file.width||200,thumbHeight:e.payload.file.height||200,thumbUrl:e.payload.file.thumbUrl,thumbSize:e.payload.file.thumbSize,thumbFormat:e.payload.file.thumbUrl.slice(e.payload.file.thumbUrl.lastIndexOf(\".\")+1).toLowerCase()});return i.setElement(s),this.messageOptionMap.set(i.messageID,e),i}},{key:\"createFaceMessage\",value:function(e){e.currentUser=this.tim.context.identifier;var t=new yt(e),n=new ze(e.payload);return t.setElement(n),t}},{key:\"_generateUUID\",value:function(){var e=this.tim.context;return\"\".concat(e.SDKAppID,\"-\").concat(e.identifier,\"-\").concat(function(){for(var e=\"\",t=32;t>0;--t)e+=fe[Math.floor(Math.random()*ge)];return e}())}},{key:\"_generateTjgID\",value:function(e){return this.tim.context.tinyID+\"-\"+e.random}},{key:\"getMessageOptionByID\",value:function(e){return this.messageOptionMap.get(e)}},{key:\"isMessageSentByCurrentInstance\",value:function(e){return!(!this.messagesList.hasLocalMessage(e.conversationID,e.ID)&&!this.singlyLinkedList.has(e.random))}}]),i}(Sn),Pi=function(){function e(t){r(this,e),this.userID=\"\",this.avatar=\"\",this.nick=\"\",this.role=\"\",this.joinTime=\"\",this.lastSendMsgTime=\"\",this.nameCard=\"\",this.muteUntil=0,this.memberCustomField=[],this._initMember(t)}return s(e,[{key:\"_initMember\",value:function(e){this.updateMember(e)}},{key:\"updateMember\",value:function(e){var t=[null,void 0,\"\",0,NaN];e.memberCustomField&&Ie(this.memberCustomField,e.memberCustomField),ce(this,e,[\"memberCustomField\"],t)}},{key:\"updateRole\",value:function(e){[\"Owner\",\"Admin\",\"Member\"].indexOf(e)<0||(this.role=e)}},{key:\"updateMuteUntil\",value:function(e){te(e)||(this.muteUntil=Math.floor((Date.now()+1e3*e)/1e3))}},{key:\"updateNameCard\",value:function(e){te(e)||(this.nameCard=e)}},{key:\"updateMemberCustomField\",value:function(e){e&&Ie(this.memberCustomField,e)}}]),e}(),Gi=function(){function e(t){r(this,e),this.tim=t.tim,this.groupController=t.groupController,this._initListeners()}return s(e,[{key:\"_initListeners\",value:function(){this.tim.innerEmitter.on(Ft,this._onReceivedGroupTips,this)}},{key:\"_onReceivedGroupTips\",value:function(e){var t=this,n=e.data,o=n.result;n.isGroupTip&&o.forEach((function(e){switch(e.payload.operationType){case 1:t._onNewMemberComeIn(e);break;case 2:t._onMemberQuit(e);break;case 3:t._onMemberKickedOut(e);break;case 4:t._onMemberSetAdmin(e);break;case 5:t._onMemberCancelledAdmin(e);break;case 6:t._onGroupProfileModified(e);break;case 7:t._onMemberInfoModified(e);break;default:W.warn(\"GroupTipsHandler._onReceivedGroupTips Unhandled groupTips. operationType=\",e.payload.operationType)}}))}},{key:\"_onNewMemberComeIn\",value:function(e){var t=e.payload,n=t.memberNum,o=t.groupProfile.groupID,r=this.groupController.getLocalGroupProfile(o);r&&J(n)&&(r.memberNum=n)}},{key:\"_onMemberQuit\",value:function(e){var t=e.payload,n=t.memberNum,o=t.groupProfile.groupID,r=this.groupController.getLocalGroupProfile(o);r&&J(n)&&(r.memberNum=n),this.groupController.deleteLocalGroupMembers(o,e.payload.userIDList)}},{key:\"_onMemberKickedOut\",value:function(e){var t=e.payload,n=t.memberNum,o=t.groupProfile.groupID,r=this.groupController.getLocalGroupProfile(o);r&&J(n)&&(r.memberNum=n),this.groupController.deleteLocalGroupMembers(o,e.payload.userIDList)}},{key:\"_onMemberSetAdmin\",value:function(e){var t=this,o=e.payload.groupProfile.groupID;e.payload.userIDList.forEach((function(e){var r=t.groupController.getLocalGroupMemberInfo(o,e);r&&r.updateRole(n.GRP_MBR_ROLE_ADMIN)}))}},{key:\"_onMemberCancelledAdmin\",value:function(e){var t=this,o=e.payload.groupProfile.groupID;e.payload.userIDList.forEach((function(e){var r=t.groupController.getLocalGroupMemberInfo(o,e);r&&r.updateRole(n.GRP_MBR_ROLE_MEMBER)}))}},{key:\"_onGroupProfileModified\",value:function(e){var t=this,n=e.payload.newGroupProfile,o=e.payload.groupProfile.groupID,r=this.groupController.getLocalGroupProfile(o);Object.keys(n).forEach((function(e){switch(e){case\"ownerID\":t._ownerChaged(r,n);break;default:r[e]=n[e]}})),this.groupController.emitGroupListUpdate(!0,!0)}},{key:\"_ownerChaged\",value:function(e,t){var o=e.groupID,r=this.groupController.getLocalGroupProfile(o),i=this.tim.context.identifier;if(i===t.ownerID){r.updateGroup({selfInfo:{role:n.GRP_MBR_ROLE_OWNER}});var s=this.groupController.getLocalGroupMemberInfo(o,i),a=this.groupController.getLocalGroupProfile(o).ownerID,u=this.groupController.getLocalGroupMemberInfo(o,a);s&&s.updateRole(n.GRP_MBR_ROLE_OWNER),u&&u.updateRole(n.GRP_MBR_ROLE_MEMBER)}}},{key:\"_onMemberInfoModified\",value:function(e){var t=this,n=e.payload.groupProfile.groupID;e.payload.memberList.forEach((function(e){var o=t.groupController.getLocalGroupMemberInfo(n,e.userID);o&&e.muteTime&&o.updateMuteUntil(e.muteTime)}))}}]),e}(),Ui=function(){function t(e){r(this,t),this.groupController=e.groupController,this.tim=e.tim,this.pendencyMap=new Map,this._initLiceners()}return s(t,[{key:\"_initLiceners\",value:function(){this.tim.innerEmitter.on(Vt,this._onReceivedGroupSystemNotice,this),this.tim.innerEmitter.on(Pt,this._clearGroupSystemNotice,this)}},{key:\"_clearGroupSystemNotice\",value:function(){var e=this;this.getPendencyList().then((function(t){t.forEach((function(t){e.pendencyMap.set(\"\".concat(t.from,\"_\").concat(t.groupID,\"_\").concat(t.to),t)}));var o=e.tim.messageController.getLocalMessageList(n.CONV_SYSTEM),r=[];o.forEach((function(t){var n=t.payload,o=n.operatorID,i=n.operationType,s=n.groupProfile;if(1===i){var a=\"\".concat(o,\"_\").concat(s.groupID,\"_\").concat(s.to),u=e.pendencyMap.get(a);u&&J(u.handled)&&0!==u.handled&&r.push(t)}})),e.groupController.deleteGroupSystemNotice({messageList:r})}))}},{key:\"getPendencyList\",value:function(e){var t=this;return this.groupController.request({name:\"group\",action:\"getGroupPendency\",param:{startTime:e&&e.startTime?e.startTime:0,limit:e&&e.limit?e.limit:10,handleAccount:this.tim.context.identifier}}).then((function(e){var n=e.data,o=n.pendencyList;return 0!==n.nextStartTime?t.getPendencyList({startTime:n.nextStartTime}).then((function(e){return[].concat(I(o),I(e))})):o}))}},{key:\"_onReceivedGroupSystemNotice\",value:function(t){var n=this,o=t.data,r=o.result;\"sync\"!==o.type&&r.forEach((function(t){switch(t.payload.operationType){case 1:n._onApplyGroupRequest(t);break;case 2:n._onApplyGroupRequestAgreed(t);break;case 3:n._onApplyGroupRequestRefused(t);break;case 4:n._onMemberKicked(t);break;case 5:n._onGroupDismissed(t);break;case 6:break;case 7:n._onInviteGroup(t);break;case 8:n._onQuitGroup(t);break;case 9:n._onSetManager(t);break;case 10:n._onDeleteManager(t);break;case 11:case 12:case 15:break;case 255:n.groupController.emitOuterEvent(e.GROUP_SYSTEM_NOTICE_RECEIVED,{message:t,type:255})}}))}},{key:\"_onApplyGroupRequest\",value:function(t){this.groupController.emitOuterEvent(e.GROUP_SYSTEM_NOTICE_RECEIVED,{message:t,type:1})}},{key:\"_onApplyGroupRequestAgreed\",value:function(t){var n=this,o=t.payload.groupProfile.groupID;this.groupController.hasLocalGroup(o)||this.groupController.getGroupProfile({groupID:o}).then((function(e){var t=e.data.group;t&&(n.groupController.updateGroupMap([t]),n.groupController.emitGroupListUpdate())})),this.groupController.emitOuterEvent(e.GROUP_SYSTEM_NOTICE_RECEIVED,{message:t,type:2})}},{key:\"_onApplyGroupRequestRefused\",value:function(t){this.groupController.emitOuterEvent(e.GROUP_SYSTEM_NOTICE_RECEIVED,{message:t,type:3})}},{key:\"_onMemberKicked\",value:function(t){var n=t.payload.groupProfile.groupID;this.groupController.hasLocalGroup(n)&&this.groupController.deleteLocalGroupAndConversation(n),this.groupController.emitOuterEvent(e.GROUP_SYSTEM_NOTICE_RECEIVED,{message:t,type:4})}},{key:\"_onGroupDismissed\",value:function(t){var n=t.payload.groupProfile.groupID,o=this.groupController.hasLocalGroup(n),r=this.groupController.AVChatRoomHandler;o&&this.groupController.deleteLocalGroupAndConversation(n),r.checkJoinedAVChatRoomByID(n)&&r.reset(n),this.groupController.emitOuterEvent(e.GROUP_SYSTEM_NOTICE_RECEIVED,{message:t,type:5})}},{key:\"_onInviteGroup\",value:function(t){var n=this,o=t.payload.groupProfile.groupID;this.groupController.hasLocalGroup(o)||this.groupController.getGroupProfile({groupID:o}).then((function(e){var t=e.data.group;t&&(n.groupController.updateGroupMap([t]),n.groupController.emitGroupListUpdate())})),this.groupController.emitOuterEvent(e.GROUP_SYSTEM_NOTICE_RECEIVED,{message:t,type:7})}},{key:\"_onQuitGroup\",value:function(t){var n=t.payload.groupProfile.groupID;this.groupController.hasLocalGroup(n)&&this.groupController.deleteLocalGroupAndConversation(n),this.groupController.emitOuterEvent(e.GROUP_SYSTEM_NOTICE_RECEIVED,{message:t,type:8})}},{key:\"_onSetManager\",value:function(t){var o=t.payload.groupProfile,r=o.to,i=o.groupID,s=this.groupController.getLocalGroupMemberInfo(i,r);s&&s.updateRole(n.GRP_MBR_ROLE_ADMIN),this.groupController.emitOuterEvent(e.GROUP_SYSTEM_NOTICE_RECEIVED,{message:t,type:9})}},{key:\"_onDeleteManager\",value:function(t){var o=t.payload.groupProfile,r=o.to,i=o.groupID,s=this.groupController.getLocalGroupMemberInfo(i,r);s&&s.updateRole(n.GRP_MBR_ROLE_MEMBER),this.groupController.emitOuterEvent(e.GROUP_SYSTEM_NOTICE_RECEIVED,{message:t,type:10})}},{key:\"reset\",value:function(){this.pendencyMap.clear()}}]),t}(),xi={3:!0,4:!0,5:!0,6:!0},qi=function(){function t(e){var n=e.tim,o=e.groupController;r(this,t),this.tim=n,this.groupController=o,this.sequencesLinkedList=new Oi(100),this.receivedMessageCount=0,this._pollingRequestInfoMap=new Map,this._pollingInstanceMap=new Map,this._joinedGroupMap=new Map,this._reportMessageStackedCount=0}return s(t,[{key:\"hasJoinedAVChatRoom\",value:function(){return this._joinedGroupMap.size>0}},{key:\"checkJoinedAVChatRoomByID\",value:function(e){return this._joinedGroupMap.has(e)}},{key:\"getJoinedAVChatRoom\",value:function(){return this._joinedGroupMap.size>0?I(this._joinedGroupMap.keys()):null}},{key:\"start\",value:function(e){var t=this._pollingRequestInfoMap.get(e),n={key:t.key,startSeq:t.startSeq};if(this._pollingInstanceMap.has(e)){var o=this._pollingInstanceMap.get(e);o.isRunning()||o.start()}else{var r=this.groupController.createTransportCapsule({name:\"AVChatRoom\",action:\"startLongPoll\",param:n}),i=this.tim.connectionController.createRunLoop({pack:r,before:this._updateRequestData.bind(this,e),success:this._handleSuccess.bind(this,e),fail:this._handleFailure.bind(this),isAVChatRoomLoop:!0});i.start(),this._pollingInstanceMap.set(e,i),W.log(\"AVChatRoomHandler.start message channel started. groupID=\".concat(e))}}},{key:\"stop\",value:function(e){var t=this._pollingInstanceMap.get(e);t&&t.isRunning()&&(t.abort(),t.stop(),W.log(\"AVChatRoomHandler.stop message channel stopped. groupID=\".concat(e)))}},{key:\"startRunLoop\",value:function(e){var t=this;return this._precheck().then((function(){var n=e.longPollingKey,o=e.group,r=o.groupID;return t._pollingRequestInfoMap.set(r,{key:n,startSeq:0}),t._joinedGroupMap.set(r,o),t._addAVChatRoomID(r),t.groupController.updateGroupMap([o]),t.groupController.emitGroupListUpdate(!0,!1),t.start(r),t.groupController.isLoggedIn()?Nn({status:Ne,group:o}):Nn({status:Ne})}))}},{key:\"joinWithoutAuth\",value:function(e){var t=this;return this.groupController.request({name:\"group\",action:\"applyJoinAVChatRoom\",param:e}).then((function(n){var o=n.data.longPollingKey;if(te(o))return wn(new nt({code:ot.CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN,message:\"非 AVChatRoom 类型的群组不允许匿名加群，请先登录后再加群\"}));W.log(\"AVChatRoomHandler.joinWithoutAuth ok. groupID:\",e.groupID),t.groupController.emitInnerEvent(_n),t.groupController.emitInnerEvent(mn,e.groupID);var r=new Ei({groupID:e.groupID});return t.startRunLoop({group:r,longPollingKey:o}),new An({status:Ne})})).catch((function(t){return W.error(\"AVChatRoomHandler.joinWithoutAuth error:\".concat(le(t),\". groupID:\").concat(e.groupID)),wn(t)}))}},{key:\"_precheck\",value:function(){if(this.tim.context.unlimitedAVChatRoom)return Promise.resolve();if(!this.hasJoinedAVChatRoom())return Promise.resolve();var e=y(this._joinedGroupMap.entries().next().value,2),t=e[0],o=e[1];if(this.groupController.isLoggedIn()){if(o.selfInfo.role!==n.GRP_MBR_ROLE_OWNER&&o.ownerID!==this.tim.loginInfo.identifier)return this.groupController.quitGroup(t);this.groupController.deleteLocalGroupAndConversation(t)}else this.groupController.deleteLocalGroupAndConversation(t);return this.reset(t),Promise.resolve()}},{key:\"_updateRequestData\",value:function(e,t){var n=this._pollingRequestInfoMap.get(e),o=n.key,r=n.startSeq;t.StartSeq=r,t.Key=o,this.tim.sumStatController.addTotalCount(bn)}},{key:\"_handleSuccess\",value:function(e,t){this.tim.sumStatController.addSuccessCount(bn),this.tim.sumStatController.addCost(bn,t.data.timecost);var n=t.data,o=n.errorCode,r=n.errorInfo,i=n.key,s=n.nextSeq,a=n.rspMsgList;if(o!==Oe){var u=this._pollingRequestInfoMap.get(e),c=new Bn;c.setMethod(Wn).setStart();var l=u?\"\".concat(u.key,\"-\").concat(u.startSeq):\"requestInfo is undefined\";c.setMessage(\"\".concat(e,\"-\").concat(l,\"-\").concat(r||JSON.stringify(t.data))).setCode(o).setNetworkType(this.groupController.getNetworkType()).setEnd(!0)}else X(i)&&J(s)&&this._pollingRequestInfoMap.set(e,{key:i,startSeq:s}),ee(a)&&a.length>0&&(a.forEach((function(e){e.to=e.groupID})),this._dispatchNotice(a));this.groupController.emitInnerEvent(rn)}},{key:\"_handleFailure\",value:function(e){if(e.error)if(\"ECONNABORTED\"===e.error.code||e.error.code===ot.NETWORK_TIMEOUT)if(e.error.config){var t=e.error.config.url,n=e.error.config.data;W.log(\"AVChatRoomHandler._handleFailure request timed out. url=\".concat(t,\" data=\").concat(n))}else W.log(\"AVChatRoomHandler._handleFailure request timed out\");else W.log(\"AVChatRoomHandler._handleFailure request failed due to network error\");this.groupController.emitInnerEvent(on)}},{key:\"_dispatchNotice\",value:function(t){if(ee(t)&&0!==t.length){var o=Date.now(),r=null,i=[],s=[],a=t.length;a>1&&t.sort((function(e,t){return e.sequence-t.sequence}));for(var u=0;u<a;u++)if(xi[t[u].event]){if(this.receivedMessageCount+=1,r=this.packMessage(t[u],t[u].event),this.tim.context.unlimitedAVChatRoom||!this.sequencesLinkedList.has(r.sequence)){var c=r.conversationID;if(this.receivedMessageCount%40==0&&this.tim.messageLossController.detectMessageLoss(c,this.sequencesLinkedList.data()),null!==this.sequencesLinkedList.tail()){var l=this.sequencesLinkedList.tail().value,p=r.sequence-l;p>1&&p<=20?this.tim.messageLossController.onMessageMaybeLost(c,l+1,p-1):p<-1&&p>=-20&&this.tim.messageLossController.onMessageMaybeLost(c,r.sequence+1,Math.abs(p)-1)}this.sequencesLinkedList.pushIn(r.sequence),this._isMessageSentByCurrentInstance(r)||(r.conversationType===n.CONV_SYSTEM&&s.push(r),i.push(r))}}else W.warn(\"AVChatRoomHandler._dispatchMessage 未处理的 event 类型：\",t[u].event);if(s.length>0&&this.groupController.emitInnerEvent(Vt,{result:s,eventDataList:[],type:\"poll\"}),0!==i.length){var h=this.packConversationOption(i);h.length>0&&this.groupController.emitInnerEvent(Ft,{eventDataList:h,type:\"poll\"}),W.debug(\"AVChatRoomHandler._dispatchNotice nums=\".concat(i.length));var d=this.tim.sumStatController;d.addTotalCount(Kn),d.addSuccessCount(Kn),d.addCost(Kn,Date.now()-o),this._checkMessageStacked(i),this.groupController.emitOuterEvent(e.MESSAGE_RECEIVED,i)}}}},{key:\"_checkMessageStacked\",value:function(e){var t=e.length;if(t>=100&&(W.warn(\"AVChatRoomHandler.checkMessageStacked 直播群消息堆积数:\".concat(e.length,'！可能会导致微信小程序渲染时遇到 \"Dom limit exceeded\" 的错误，建议接入侧此时只渲染最近的10条消息')),this._reportMessageStackedCount<5)){var n=new Bn;n.setMethod(\"messageStacked\").setStart(),n.setCode(0).setNetworkType(this.groupController.getNetworkType()).setText(\"nums=\".concat(t,\" groupID=\").concat(I(this._joinedGroupMap.keys()))).setEnd(),this._reportMessageStackedCount+=1}}},{key:\"_isMessageSentByCurrentInstance\",value:function(e){return!!this.tim.messageController.isMessageSentByCurrentInstance(e)}},{key:\"packMessage\",value:function(e,t){e.currentUser=this.tim.context.identifier,e.conversationType=5===t?n.CONV_SYSTEM:n.CONV_GROUP,e.isSystemMessage=!!e.isSystemMessage;var o=new yt(e),r=this.packElements(e,t);return o.setElement(r),o}},{key:\"packElements\",value:function(e,t){return 4===t||6===t?{type:n.MSG_GRP_TIP,content:c({},e.elements,{groupProfile:e.groupProfile})}:5===t?{type:n.MSG_GRP_SYS_NOTICE,content:c({},e.elements,{groupProfile:e.groupProfile})}:this.tim.bigDataHallwayController.parseElements(e.elements,e.from)}},{key:\"packConversationOption\",value:function(e){for(var t=new Map,n=0;n<e.length;n++){var o=e[n],r=o.conversationID;if(t.has(r)){var i=t.get(r);i.lastMessage=o,\"in\"===o.flow&&i.unreadCount++}else t.set(r,{conversationID:o.conversationID,unreadCount:\"out\"===o.flow?0:1,type:o.conversationType,subType:o.conversationSubType,lastMessage:o})}return I(t.values())}},{key:\"_addAVChatRoomID\",value:function(e){var t=this.tim.loginInfo.avchatroomIDList||[];t.includes(e)||(this.tim.context.unlimitedAVChatRoom?t.push(e):t.splice(0,1,e),this.tim.loginInfo.avchatroomIDList=t)}},{key:\"_deleteAVChatRoomID\",value:function(e){var t=this.tim.loginInfo.avchatroomIDList||[],n=t.indexOf(e);-1!==n&&(t.splice(n,1),this.tim.loginInfo.avchatroomIDList=t)}},{key:\"joinAVChatRoomSilently\",value:function(){var e=this,t=this.tim.loginInfo.avchatroomIDList||[];if(0!==t.length){var n=new Bn;t.forEach((function(t){n.setMethod(\"joinAVChatRoomSilently\").setStart(),e.groupController.joinGroup({groupID:t}).then((function(o){W.warn(\"AVChatRoomHandler.joinAVChatRoomSilently silently join group ok:\".concat(t)),n.setCode(o.code).setText(\"groupID=\".concat(t)).setNetworkType(e.groupController.getNetworkType()).setEnd(!0)})).catch((function(o){W.warn(\"AVChatRoomHandler.joinAVChatRoomSilently silently join group failed:\".concat(le(o))),n.setMessage(\"\".concat(t,\"-\").concat(JSON.stringify(o))).setCode(o.code).setNetworkType(e.groupController.getNetworkType()).setEnd(!0)}))}))}}},{key:\"reset\",value:function(e){if(0!==this._pollingInstanceMap.size){if(e)W.log(\"AVChatRoomHandler.reset groupID=\".concat(e)),this.stop(e),this._pollingInstanceMap.delete(e),this._joinedGroupMap.delete(e),this._pollingRequestInfoMap.delete(e);else{W.log(\"AVChatRoomHandler.reset all\");var t,n=E(this._pollingInstanceMap.keys());try{for(n.s();!(t=n.n()).done;){var o=t.value;this.stop(o)}}catch(e){n.e(e)}finally{n.f()}this._pollingInstanceMap.clear(),this._joinedGroupMap.clear(),this._pollingRequestInfoMap.clear()}this.sequencesLinkedList.reset(),this.receivedMessageCount=0,this._reportMessageStackedCount=0,this._deleteAVChatRoomID(e)}}}]),t}(),Fi=function(t){l(i,t);var o=v(i);function i(e){var t;return r(this,i),(t=o.call(this,e)).groupMap=new Map,t.groupMemberListMap=new Map,t.groupNoticeHandler=new Ui({tim:e,groupController:m(t)}),t.groupTipsHandler=new Gi({tim:e,groupController:m(t)}),t.AVChatRoomHandler=new qi({tim:e,groupController:m(t)}),t._initListeners(),t}return s(i,[{key:\"createGroup\",value:function(e){var t=this;if(![\"Public\",\"Private\",\"ChatRoom\",\"AVChatRoom\"].includes(e.type)){var o=new nt({code:ot.ILLEGAL_GROUP_TYPE,message:\"非法的群类型，请检查传入参数\"});return wn(o)}Ee(e.type)&&!te(e.memberList)&&e.memberList.length>0&&(W.warn(\"GroupController.createGroup 创建AVChatRoom时不能添加群成员，自动忽略该字段\"),e.memberList=void 0),Me(e.type)||te(e.joinOption)||(W.warn(\"GroupController.createGroup 创建Work/Meeting/AVChatRoom群时不能设置字段：joinOption，自动忽略该字段\"),e.joinOption=void 0);var r=new Bn;return r.setMethod(\"createGroup\").setStart(),W.log(\"GroupController.createGroup.\"),this.request({name:\"group\",action:\"create\",param:e}).then((function(o){if(r.setCode(0).setNetworkType(t.getNetworkType()).setText(\"groupType=\".concat(e.type,\" groupID=\").concat(o.data.groupID)).setEnd(),W.log(\"GroupController.createGroup ok. groupID:\",o.data.groupID),e.type===n.GRP_AVCHATROOM)return t.getGroupProfile({groupID:o.data.groupID});t.updateGroupMap([c({},e,{groupID:o.data.groupID})]);var i=t.tim.createCustomMessage({to:o.data.groupID,conversationType:n.CONV_GROUP,payload:{data:\"group_create\",extension:\"\".concat(t.tim.context.identifier,\"创建群组\")}});return t.tim.sendMessage(i),t.emitGroupListUpdate(),t.getGroupProfile({groupID:o.data.groupID})})).then((function(e){var t=e.data.group;return t.selfInfo.messageRemindType=n.MSG_REMIND_ACPT_AND_NOTE,t.selfInfo.role=n.GRP_MBR_ROLE_OWNER,e})).catch((function(n){return r.setText(\"groupType=\".concat(e.type)),t.probeNetwork().then((function(e){var t=y(e,2),o=t[0],i=t[1];r.setError(n,o,i).setEnd()})),W.error(\"GroupController.createGroup error:\",n),wn(n)}))}},{key:\"joinGroup\",value:function(e){var t=this,o=e.groupID;if(e.type===n.GRP_WORK){var r=new nt({code:ot.CANNOT_JOIN_WORK,message:\"不能加入 Work 类型的群组\"});return wn(r)}if(this.hasLocalGroup(o)){if(!this.isLoggedIn())return Nn({status:n.JOIN_STATUS_ALREADY_IN_GROUP});var i=new Bn;return i.setMethod($n).setStart(),this.getGroupProfile({groupID:o}).then((function(e){return i.setCode(0).setNetworkType(t.getNetworkType()).setText(\"groupID=\".concat(o,\" joinedStatus=\").concat(n.JOIN_STATUS_ALREADY_IN_GROUP)).setEnd(),Nn({status:n.JOIN_STATUS_ALREADY_IN_GROUP})})).catch((function(n){return i.setCode(0).setNetworkType(t.getNetworkType()).setText(\"groupID=\".concat(o,\" unjoined\")).setEnd(),W.warn(\"GroupController.joinGroup \".concat(o,\" was unjoined, now join!\")),t.groupMap.delete(o),t.applyJoinGroup(e)}))}return W.log(\"GroupController.joinGroup. groupID:\",o),this.isLoggedIn()?this.applyJoinGroup(e):this.AVChatRoomHandler.joinWithoutAuth(e)}},{key:\"quitGroup\",value:function(e){var t=this;W.log(\"GroupController.quitGroup. groupID:\",e);var n=this.AVChatRoomHandler.checkJoinedAVChatRoomByID(e);if(n&&!this.isLoggedIn())return W.log(\"GroupController.quitGroup anonymously ok. groupID:\",e),this.deleteLocalGroupAndConversation(e),this.AVChatRoomHandler.reset(e),Nn({groupID:e});var o=new Bn;return o.setMethod(\"quitGroup\").setStart(),this.request({name:\"group\",action:\"quitGroup\",param:{groupID:e}}).then((function(){return o.setCode(0).setNetworkType(t.getNetworkType()).setText(\"groupID=\".concat(e)).setEnd(),W.log(\"GroupController.quitGroup ok. groupID:\",e),n&&t.AVChatRoomHandler.reset(e),t.deleteLocalGroupAndConversation(e),new An({groupID:e})})).catch((function(n){return o.setText(\"groupID=\".concat(e)),t.probeNetwork().then((function(e){var t=y(e,2),r=t[0],i=t[1];o.setError(n,r,i).setEnd()})),W.error(\"GroupController.quitGroup error. error:\".concat(le(n),\" groupID:\").concat(e)),wn(n)}))}},{key:\"changeGroupOwner\",value:function(e){var t=this;if(this.hasLocalGroup(e.groupID)&&this.getLocalGroupProfile(e.groupID).type===n.GRP_AVCHATROOM)return wn(new nt({code:ot.CANNOT_CHANGE_OWNER_IN_AVCHATROOM,message:\"AVChatRoom 类型的群组不能转让群主\"}));if(e.newOwnerID===this.tim.loginInfo.identifier)return wn(new nt({code:ot.CANNOT_CHANGE_OWNER_TO_SELF,message:\"不能把群主转让给自己\"}));var o=new Bn;return o.setMethod(\"changeGroupOwner\").setStart(),W.log(\"GroupController.changeGroupOwner. groupID:\",e.groupID),this.request({name:\"group\",action:\"changeGroupOwner\",param:e}).then((function(){o.setCode(0).setNetworkType(t.getNetworkType()).setText(\"groupID=\".concat(e.groupID)).setEnd(),W.log(\"GroupController.changeGroupOwner ok. groupID:\",e.groupID);var n=e.groupID,r=e.newOwnerID;t.groupMap.get(n).ownerID=r;var i=t.groupMemberListMap.get(n);if(i instanceof Map){var s=i.get(t.tim.loginInfo.identifier);te(s)||(s.updateRole(\"Member\"),t.groupMap.get(n).selfInfo.role=\"Member\");var a=i.get(r);te(a)||a.updateRole(\"Owner\")}return t.emitGroupListUpdate(!0,!1),new An({group:t.groupMap.get(n)})})).catch((function(n){return o.setText(\"groupID=\".concat(e.groupID)),t.probeNetwork().then((function(e){var t=y(e,2),r=t[0],i=t[1];o.setError(n,r,i).setEnd()})),W.error(\"GroupController.changeGroupOwner error:\".concat(le(n),\" groupID:\").concat(e.groupID)),wn(n)}))}},{key:\"dismissGroup\",value:function(e){var t=this;if(this.hasLocalGroup(e)&&this.getLocalGroupProfile(e).type===n.GRP_WORK)return wn(new nt({code:ot.CANNOT_DISMISS_WORK,message:\"不能解散 Work 类型的群组\"}));var o=new Bn;return o.setMethod(\"dismissGroup\").setStart(),W.log(\"GroupController.dismissGroup. groupID:\".concat(e)),this.request({name:\"group\",action:\"destroyGroup\",param:{groupID:e}}).then((function(){return o.setCode(0).setNetworkType(t.getNetworkType()).setText(\"groupID=\".concat(e)).setEnd(),W.log(\"GroupController.dismissGroup ok. groupID:\".concat(e)),t.deleteLocalGroupAndConversation(e),t.checkJoinedAVChatRoomByID(e)&&t.AVChatRoomHandler.reset(e),new An({groupID:e})})).catch((function(n){return o.setText(\"groupID=\".concat(e)),t.probeNetwork().then((function(e){var t=y(e,2),r=t[0],i=t[1];o.setError(n,r,i).setEnd()})),W.error(\"GroupController.dismissGroup error:\".concat(le(n),\" groupID:\").concat(e)),wn(n)}))}},{key:\"updateGroupProfile\",value:function(e){var t=this;!this.hasLocalGroup(e.groupID)||Me(this.getLocalGroupProfile(e.groupID).type)||te(e.joinOption)||(W.warn(\"GroupController.updateGroupProfile Work/Meeting/AVChatRoom群不能设置字段：joinOption，自动忽略该字段\"),e.joinOption=void 0),te(e.muteAllMembers)||(e.muteAllMembers?e.muteAllMembers=\"On\":e.muteAllMembers=\"Off\");var n=new Bn;return n.setMethod(\"updateGroupProfile\").setStart(),n.setText(JSON.stringify(e)),W.log(\"GroupController.updateGroupProfile. groupID:\",e.groupID),this.request({name:\"group\",action:\"updateGroupProfile\",param:e}).then((function(){return n.setCode(0).setNetworkType(t.getNetworkType()).setEnd(),W.log(\"GroupController.updateGroupProfile ok. groupID:\",e.groupID),t.hasLocalGroup(e.groupID)&&(t.groupMap.get(e.groupID).updateGroup(e),t._setStorageGroupList()),new An({group:t.groupMap.get(e.groupID)})})).catch((function(o){return t.probeNetwork().then((function(e){var t=y(e,2),r=t[0],i=t[1];n.setError(o,r,i).setEnd()})),W.log(\"GroupController.updateGroupProfile failed. error:\".concat(le(o),\" groupID:\").concat(e.groupID)),wn(o)}))}},{key:\"setGroupMemberRole\",value:function(e){var t=this,o=e.groupID,r=e.userID,i=e.role,s=this.groupMap.get(o);if(s.selfInfo.role!==n.GRP_MBR_ROLE_OWNER)return wn(new nt({code:ot.NOT_OWNER,message:\"你不是群主，只有群主才有权限操作\"}));if([n.GRP_WORK,n.GRP_AVCHATROOM].includes(s.type))return wn(new nt({code:ot.CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM,message:\"不能在 Work / AVChatRoom 类型的群中设置群成员身份\"}));if([n.GRP_MBR_ROLE_ADMIN,n.GRP_MBR_ROLE_MEMBER].indexOf(i)<0)return wn(new nt({code:ot.INVALID_MEMBER_ROLE,message:\"不合法的群成员身份，请检查传入参数\"}));if(r===this.tim.loginInfo.identifier)return wn(new nt({code:ot.CANNOT_SET_SELF_MEMBER_ROLE,message:\"不能设置自己的群成员身份，请检查传入参数\"}));var a=new Bn;return a.setMethod(\"setGroupMemberRole\").setStart(),a.setText(\"groupID=\".concat(o,\" userID=\").concat(r,\" role=\").concat(i)),W.log(\"GroupController.setGroupMemberRole. groupID:\".concat(o,\". userID: \").concat(r)),this._modifyGroupMemberInfo({groupID:o,userID:r,role:i}).then((function(e){return a.setCode(0).setNetworkType(t.getNetworkType()).setEnd(),W.log(\"GroupController.setGroupMemberRole ok. groupID:\".concat(o,\". userID: \").concat(r)),new An({group:s,member:e})})).catch((function(e){return t.probeNetwork().then((function(t){var n=y(t,2),o=n[0],r=n[1];a.setError(e,o,r).setEnd()})),W.error(\"GroupController.setGroupMemberRole error:\".concat(le(e),\" groupID:\").concat(o,\" userID:\").concat(r)),wn(e)}))}},{key:\"setGroupMemberMuteTime\",value:function(e){var t=this,n=e.groupID,o=e.userID,r=e.muteTime;if(o===this.tim.loginInfo.identifier)return wn(new nt({code:ot.CANNOT_MUTE_SELF,message:\"不能将自己禁言，请检查传入参数\"}));W.log(\"GroupController.setGroupMemberMuteTime. groupID:\".concat(n,\". userID: \").concat(o));var i=new Bn;return i.setMethod(\"setGroupMemberMuteTime\").setStart(),i.setText(\"groupID=\".concat(n,\" userID=\").concat(o,\" muteTime=\").concat(r)),this._modifyGroupMemberInfo({groupID:n,userID:o,muteTime:r}).then((function(e){return i.setCode(0).setNetworkType(t.getNetworkType()).setEnd(),W.log(\"GroupController.setGroupMemberMuteTime ok. groupID:\".concat(n,\". userID: \").concat(o)),new An({group:t.getLocalGroupProfile(n),member:e})})).catch((function(e){return t.probeNetwork().then((function(t){var n=y(t,2),o=n[0],r=n[1];i.setError(e,o,r).setEnd()})),W.error(\"GroupController.setGroupMemberMuteTime error:\".concat(le(e),\" groupID:\").concat(n,\" userID:\").concat(o)),wn(e)}))}},{key:\"setMessageRemindType\",value:function(e){var t=this,n=new Bn;n.setMethod(\"setMessageRemindType\").setStart(),n.setText(\"groupID=\".concat(e.groupID,\" userID=\").concat(e.userID||this.tim.loginInfo.identifier)),W.log(\"GroupController.setMessageRemindType. groupID:\".concat(e.groupID,\". userID: \").concat(e.userID||this.tim.loginInfo.identifier));var o=e.groupID,r=e.messageRemindType;return this._modifyGroupMemberInfo({groupID:o,messageRemindType:r,userID:this.tim.loginInfo.identifier}).then((function(){n.setCode(0).setNetworkType(t.getNetworkType()).setEnd(),W.log(\"GroupController.setMessageRemindType ok. groupID:\".concat(e.groupID,\" userID:\").concat(e.userID||t.tim.loginInfo.identifier));var o=t.getLocalGroupProfile(e.groupID);return o&&(o.selfInfo.messageRemindType=r),new An({group:o})})).catch((function(o){return t.probeNetwork().then((function(e){var t=y(e,2),r=t[0],i=t[1];n.setError(o,r,i).setEnd()})),W.error(\"GroupController.setMessageRemindType error:\".concat(le(o),\" groupID:\").concat(e.groupID,\" userID:\").concat(e.userID||t.tim.loginInfo.identifier)),wn(o)}))}},{key:\"setGroupMemberNameCard\",value:function(e){var t=this,n=e.groupID,o=e.userID,r=void 0===o?this.tim.loginInfo.identifier:o,i=e.nameCard;W.log(\"GroupController.setGroupMemberNameCard. groupID:\".concat(n,\". userID: \").concat(r));var s=new Bn;return s.setMethod(\"setGroupMemberNameCard\").setStart(),s.setText(\"groupID=\".concat(n,\" userID=\").concat(r,\" nameCard=\").concat(i)),this._modifyGroupMemberInfo({groupID:n,userID:r,nameCard:i}).then((function(e){W.log(\"GroupController.setGroupMemberNameCard ok. groupID:\".concat(n,\". userID: \").concat(r)),s.setCode(0).setNetworkType(t.getNetworkType()).setEnd();var o=t.getLocalGroupProfile(n);return r===t.tim.loginInfo.identifier&&o&&o.setSelfNameCard(i),new An({group:o,member:e})})).catch((function(e){return t.probeNetwork().then((function(t){var n=y(t,2),o=n[0],r=n[1];s.setError(e,o,r).setEnd()})),W.error(\"GroupController.setGroupMemberNameCard error:\".concat(le(e),\" groupID:\").concat(n,\" userID:\").concat(r)),wn(e)}))}},{key:\"setGroupMemberCustomField\",value:function(e){var t=this,n=e.groupID,o=e.userID,r=void 0===o?this.tim.loginInfo.identifier:o,i=e.memberCustomField;W.log(\"GroupController.setGroupMemberCustomField. groupID:\".concat(n,\". userID: \").concat(r));var s=new Bn;return s.setMethod(\"setGroupMemberCustomField\").setStart(),s.setText(\"groupID=\".concat(n,\" userID=\").concat(r,\" memberCustomField=\").concat(i)),this._modifyGroupMemberInfo({groupID:n,userID:r,memberCustomField:i}).then((function(e){return s.setCode(0).setNetworkType(t.getNetworkType()).setEnd(),W.log(\"GroupController.setGroupMemberCustomField ok. groupID:\".concat(n,\". userID: \").concat(r)),new An({group:t.groupMap.get(n),member:e})})).catch((function(e){return t.probeNetwork().then((function(t){var n=y(t,2),o=n[0],r=n[1];s.setError(e,o,r).setEnd()})),W.error(\"GroupController.setGroupMemberCustomField error:\".concat(le(e),\" groupID:\").concat(n,\" userID:\").concat(r)),wn(e)}))}},{key:\"getGroupList\",value:function(e){var t=this,n=new Bn;n.setMethod(\"getGroupList\").setStart(),W.log(\"GroupController.getGroupList\");var o={introduction:\"Introduction\",notification:\"Notification\",createTime:\"CreateTime\",ownerID:\"Owner_Account\",lastInfoTime:\"LastInfoTime\",memberNum:\"MemberNum\",maxMemberNum:\"MaxMemberNum\",joinOption:\"ApplyJoinOption\",muteAllMembers:\"ShutUpAllMember\"},r=[\"Type\",\"Name\",\"FaceUrl\",\"NextMsgSeq\",\"LastMsgTime\"];return e&&e.groupProfileFilter&&e.groupProfileFilter.forEach((function(e){o[e]&&r.push(o[e])})),this.request({name:\"group\",action:\"list\",param:{responseFilter:{groupBaseInfoFilter:r,selfInfoFilter:[\"Role\",\"JoinTime\",\"MsgFlag\"]}}}).then((function(e){var o=e.data.groups;return W.log(\"GroupController.getGroupList ok. nums=\".concat(o.length)),t._groupListTreeShaking(o),t.updateGroupMap(o),n.setCode(0).setNetworkType(t.getNetworkType()).setText(\"\".concat(o.length,\"-afterTreeshaking-\").concat(t.groupMap.size)).setEnd(),t.tempConversationList&&(W.log(\"GroupController.getGroupList update last message with tempConversationList, nums=\".concat(t.tempConversationList.length)),t._handleUpdateGroupLastMessage({data:t.tempConversationList}),t.tempConversationList=null),t.emitGroupListUpdate(),new An({groupList:t.getLocalGroups()})})).catch((function(e){return t.probeNetwork().then((function(t){var o=y(t,2),r=o[0],i=o[1];n.setError(e,r,i).setEnd()})),W.error(\"GroupController.getGroupList error:\",e),wn(e)}))}},{key:\"getGroupMemberList\",value:function(e){var t=this,n=e.groupID,o=e.offset,r=void 0===o?0:o,i=e.count,s=void 0===i?15:i,a=new Bn;a.setMethod(\"getGroupMemberList\").setStart(),W.log(\"GroupController.getGroupMemberList groupID: \".concat(n,\" offset: \").concat(r,\" count: \").concat(s));var u=[];return this.request({name:\"group\",action:\"getGroupMemberList\",param:{groupID:n,offset:r,limit:s>100?100:s,memberInfoFilter:[\"Role\",\"NameCard\",\"ShutUpUntil\"]}}).then((function(e){var o=e.data,r=o.members,i=o.memberNum;return ee(r)&&0!==r.length?(t.hasLocalGroup(n)&&(t.getLocalGroupProfile(n).memberNum=i),u=t._updateLocalGroupMemberMap(n,r),t.tim.getUserProfile({userIDList:r.map((function(e){return e.userID})),tagList:[Be.NICK,Be.AVATAR]})):Promise.resolve([])})).then((function(e){var o=e.data;if(!ee(o)||0===o.length)return Nn({memberList:[]});var i=o.map((function(e){return{userID:e.userID,nick:e.nick,avatar:e.avatar}}));return t._updateLocalGroupMemberMap(n,i),a.setCode(0).setNetworkType(t.getNetworkType()).setText(\"groupID=\".concat(n,\" offset=\").concat(r,\" count=\").concat(s)).setEnd(),W.log(\"GroupController.getGroupMemberList ok.\"),new An({memberList:u})})).catch((function(e){return t.probeNetwork().then((function(t){var n=y(t,2),o=n[0],r=n[1];a.setError(e,o,r).setEnd()})),W.error(\"GroupController.getGroupMemberList error:\",e),wn(e)}))}},{key:\"getLocalGroups\",value:function(){return I(this.groupMap.values())}},{key:\"getLocalGroupProfile\",value:function(e){return this.groupMap.get(e)}},{key:\"hasLocalGroup\",value:function(e){return this.groupMap.has(e)}},{key:\"getLocalGroupMemberInfo\",value:function(e,t){return this.groupMemberListMap.has(e)?this.groupMemberListMap.get(e).get(t):null}},{key:\"setLocalGroupMember\",value:function(e,t){if(this.groupMemberListMap.has(e))this.groupMemberListMap.get(e).set(t.userID,t);else{var n=(new Map).set(t.userID,t);this.groupMemberListMap.set(e,n)}}},{key:\"hasLocalGroupMember\",value:function(e,t){return this.groupMemberListMap.has(e)&&this.groupMemberListMap.get(e).has(t)}},{key:\"hasLocalGroupMemberMap\",value:function(e){return this.groupMemberListMap.has(e)}},{key:\"getGroupProfile\",value:function(e){var t=this,n=new Bn;n.setMethod(\"getGroupProfile\").setStart(),W.log(\"GroupController.getGroupProfile. groupID:\",e.groupID);var o=e.groupID,r=e.groupCustomFieldFilter,i={groupIDList:[o],responseFilter:{groupBaseInfoFilter:[\"Type\",\"Name\",\"Introduction\",\"Notification\",\"FaceUrl\",\"Owner_Account\",\"CreateTime\",\"InfoSeq\",\"LastInfoTime\",\"LastMsgTime\",\"MemberNum\",\"MaxMemberNum\",\"ApplyJoinOption\",\"NextMsgSeq\",\"ShutUpAllMember\"],groupCustomFieldFilter:r}};return this.getGroupProfileAdvance(i).then((function(r){var i,s=r.data,a=s.successGroupList,u=s.failureGroupList;return W.log(\"GroupController.getGroupProfile ok. groupID:\".concat(e.groupID)),u.length>0?wn(u[0]):(Ee(a[0].type)&&!t.hasLocalGroup(o)?i=new Ei(a[0]):(t.updateGroupMap(a),i=t.getLocalGroupProfile(o)),n.setCode(0).setNetworkType(t.getNetworkType()).setText(\"groupID=\".concat(i.groupID,\" type=\").concat(i.type,\" muteAllMembers=\").concat(i.muteAllMembers,\" ownerID=\").concat(i.ownerID)).setEnd(),i&&i.selfInfo&&!i.selfInfo.nameCard?t.updateSelfInfo(i).then((function(e){return new An({group:e})})):new An({group:i}))})).catch((function(o){return t.probeNetwork().then((function(t){var r=y(t,2),i=r[0],s=r[1];n.setError(o,i,s).setText(\"groupID=\".concat(e.groupID)).setEnd()})),W.error(\"GroupController.getGroupProfile error:\".concat(le(o),\" groupID:\").concat(e.groupID)),wn(o)}))}},{key:\"getGroupMemberProfile\",value:function(e){var t=this,n=new Bn;n.setMethod(\"getGroupMemberProfile\").setText(e.userIDList.length>5?\"userIDList.length=\".concat(e.userIDList.length):\"userIDList=\".concat(e.userIDList)).setStart(),W.log(\"GroupController.getGroupMemberProfile groupID:\".concat(e.groupID,\" userIDList:\").concat(e.userIDList.join(\",\"))),e.userIDList.length>50&&(e.userIDList=e.userIDList.slice(0,50));var o=e.groupID,r=e.userIDList;return this._getGroupMemberProfileAdvance(c({},e,{userIDList:r})).then((function(e){var n=e.data.members;return ee(n)&&0!==n.length?(t._updateLocalGroupMemberMap(o,n),t.tim.getUserProfile({userIDList:n.map((function(e){return e.userID})),tagList:[Be.NICK,Be.AVATAR]})):Nn([])})).then((function(e){var i=e.data.map((function(e){return{userID:e.userID,nick:e.nick,avatar:e.avatar}}));t._updateLocalGroupMemberMap(o,i);var s=r.filter((function(e){return t.hasLocalGroupMember(o,e)})).map((function(e){return t.getLocalGroupMemberInfo(o,e)}));return n.setCode(0).setNetworkType(t.getNetworkType()).setEnd(),new An({memberList:s})}))}},{key:\"_getGroupMemberProfileAdvance\",value:function(e){return this.request({name:\"group\",action:\"getGroupMemberProfile\",param:c({},e,{memberInfoFilter:e.memberInfoFilter?e.memberInfoFilter:[\"Role\",\"JoinTime\",\"NameCard\",\"ShutUpUntil\"]})})}},{key:\"updateSelfInfo\",value:function(e){var t=e.groupID;W.log(\"GroupController.updateSelfInfo groupID:\",t);var n={groupID:t,userIDList:[this.tim.loginInfo.identifier]};return this.getGroupMemberProfile(n).then((function(n){var o=n.data.memberList;return W.log(\"GroupController.updateSelfInfo ok. groupID:\",t),e&&0!==o.length&&e.updateSelfInfo(o[0]),e}))}},{key:\"addGroupMember\",value:function(e){var t=this,n=new Bn;n.setMethod(\"addGroupMember\").setText(\"groupID=\".concat(e.groupID)).setStart();var o=this.getLocalGroupProfile(e.groupID);if(Ee(o.type)){var r=new nt({code:ot.CANNOT_ADD_MEMBER_IN_AVCHATROOM,message:ut});return n.setCode(ot.CANNOT_ADD_MEMBER_IN_AVCHATROOM).setMessage(ut).setNetworkType(this.getNetworkType()).setText(\"groupID=\".concat(e.groupID,\" groupType=\").concat(o.type)).setEnd(),wn(r)}return e.userIDList=e.userIDList.map((function(e){return{userID:e}})),W.log(\"GroupController.addGroupMember. groupID:\",e.groupID),this.request({name:\"group\",action:\"addGroupMember\",param:e}).then((function(r){var i=r.data.members;n.setCode(0).setNetworkType(t.getNetworkType()).setText(\"groupID=\".concat(e.groupID)).setEnd(),W.log(\"GroupController.addGroupMember ok. groupID:\",e.groupID);var s=i.filter((function(e){return 1===e.result})).map((function(e){return e.userID})),a=i.filter((function(e){return 0===e.result})).map((function(e){return e.userID})),u=i.filter((function(e){return 2===e.result})).map((function(e){return e.userID}));return 0===s.length?new An({successUserIDList:s,failureUserIDList:a,existedUserIDList:u}):(o.memberNum+=s.length,new An({successUserIDList:s,failureUserIDList:a,existedUserIDList:u,group:o}))})).catch((function(o){return t.probeNetwork().then((function(t){var r=y(t,2),i=r[0],s=r[1];n.setError(o,i,s).setText(\"groupID=\".concat(e.groupID)).setEnd()})),W.error(\"GroupController.addGroupMember error:\".concat(le(o),\" groupID:\").concat(e.groupID)),wn(o)}))}},{key:\"deleteGroupMember\",value:function(e){var t=this,o=new Bn;o.setMethod(\"deleteGroupMember\").setText(e.userIDList.length>5?\"userIDList.length=\".concat(e.userIDList.length):\"userIDList=\".concat(e.userIDList)).setStart(),W.log(\"GroupController.deleteGroupMember groupID:\".concat(e.groupID,\" userIDList:\").concat(e.userIDList));var r=this.getLocalGroupProfile(e.groupID);return r.type===n.GRP_AVCHATROOM?wn(new nt({code:ot.CANNOT_KICK_MEMBER_IN_AVCHATROOM,message:\"不能在 AVChatRoom 类型的群组踢人\"})):this.request({name:\"group\",action:\"deleteGroupMember\",param:e}).then((function(){return o.setCode(0).setNetworkType(t.getNetworkType()).setEnd(),W.log(\"GroupController.deleteGroupMember ok\"),r.memberNum--,t.deleteLocalGroupMembers(e.groupID,e.userIDList),new An({group:r,userIDList:e.userIDList})})).catch((function(n){return t.probeNetwork().then((function(t){var r=y(t,2),i=r[0],s=r[1];o.setError(n,i,s).setText(\"groupID=\".concat(e.groupID)).setEnd()})),W.error(\"GroupController.deleteGroupMember error:\".concat(le(n),\" groupID:\").concat(e.groupID)),wn(n)}))}},{key:\"searchGroupByID\",value:function(e){var t=this,n={groupIDList:[e]},o=new Bn;return o.setMethod(\"searchGroupByID\").setText(\"groupID=\".concat(e)).setStart(),W.log(\"GroupController.searchGroupByID. groupID:\".concat(e)),this.request({name:\"group\",action:\"searchGroupByID\",param:n}).then((function(n){var r=n.data.groupProfile;if(r[0].errorCode!==Oe)throw new nt({code:r[0].errorCode,message:r[0].errorInfo});return o.setCode(0).setNetworkType(t.getNetworkType()).setEnd(),W.log(\"GroupController.searchGroupByID ok. groupID:\".concat(e)),new An({group:new Ei(r[0])})})).catch((function(n){return t.probeNetwork().then((function(e){var t=y(e,2),r=t[0],i=t[1];o.setError(n,r,i).setEnd()})),W.warn(\"GroupController.searchGroupByID error:\".concat(le(n),\" groupID:\").concat(e)),wn(n)}))}},{key:\"applyJoinGroup\",value:function(e){var t=this,n=new Bn;return n.setMethod($n).setStart(),this.request({name:\"group\",action:\"applyJoinGroup\",param:e}).then((function(o){var r=o.data,i=r.joinedStatus,s=r.longPollingKey;switch(n.setCode(0).setNetworkType(t.getNetworkType()).setText(\"groupID=\".concat(e.groupID,\" joinedStatus=\").concat(i)).setEnd(),W.log(\"GroupController.joinGroup ok. groupID:\".concat(e.groupID,\" joinedStatus:\").concat(i,\" longPollingKey:\").concat(s)),i){case we:return new An({status:we});case Ne:return t.getGroupProfile({groupID:e.groupID}).then((function(n){var o=n.data.group,r={status:Ne,group:o};return te(s)?(t.emitGroupListUpdate(!0,!1),new An(r)):(t.emitInnerEvent(mn,e.groupID),t.AVChatRoomHandler.startRunLoop({longPollingKey:s,group:o}))}));default:var a=new nt({code:ot.JOIN_GROUP_FAIL,message:\"加群失败，请检查传入参数或重试\"});return W.error(\"GroupController.joinGroup error:\".concat(le(a),\" groupID:\").concat(e.groupID)),wn(a)}})).catch((function(o){return n.setText(\"groupID=\".concat(e.groupID)),t.probeNetwork().then((function(e){var t=y(e,2),r=t[0],i=t[1];n.setError(o,r,i).setEnd()})),W.error(\"GroupController.joinGroup error:\".concat(le(o),\" groupID:\").concat(e.groupID)),wn(o)}))}},{key:\"applyJoinAVChatRoom\",value:function(e){return this.AVChatRoomHandler.applyJoinAVChatRoom(e)}},{key:\"handleGroupApplication\",value:function(e){var t=this,n=e.message.payload,o=n.groupProfile.groupID,r=n.authentication,i=n.messageKey,s=n.operatorID,a=new Bn;return a.setMethod(\"handleGroupApplication\").setText(\"groupID=\".concat(o)).setStart(),W.log(\"GroupController.handleApplication. groupID:\",o),this.request({name:\"group\",action:\"handleApplyJoinGroup\",param:c({},e,{applicant:s,groupID:o,authentication:r,messageKey:i})}).then((function(){return a.setCode(0).setNetworkType(t.getNetworkType()).setEnd(),W.log(\"GroupController.handleApplication ok. groupID:\",o),t.deleteGroupSystemNotice({messageList:[e.message]}),new An({group:t.getLocalGroupProfile(o)})})).catch((function(e){return t.probeNetwork().then((function(t){var n=y(t,2),o=n[0],r=n[1];a.setError(e,o,r).setEnd()})),W.error(\"GroupController.handleApplication error. error:\".concat(le(e),\" groupID:\").concat(o)),wn(e)}))}},{key:\"deleteGroupSystemNotice\",value:function(e){var t=this;return ee(e.messageList)&&0!==e.messageList.length?(W.log(\"GroupController.deleteGroupSystemNotice \"+e.messageList.map((function(e){return e.ID}))),this.request({name:\"group\",action:\"deleteGroupSystemNotice\",param:{messageListToDelete:e.messageList.map((function(e){return{from:n.CONV_SYSTEM,messageSeq:e.clientSequence,messageRandom:e.random}}))}}).then((function(){return W.log(\"GroupController.deleteGroupSystemNotice ok\"),e.messageList.forEach((function(e){t.tim.messageController.deleteLocalMessage(e)})),new An})).catch((function(e){return W.error(\"GroupController.deleteGroupSystemNotice error:\",e),wn(e)}))):Nn()}},{key:\"getGroupProfileAdvance\",value:function(e){return ee(e.groupIDList)&&e.groupIDList.length>50&&(W.warn(\"GroupController.getGroupProfileAdvance 获取群资料的数量不能超过50个\"),e.groupIDList.length=50),W.log(\"GroupController.getGroupProfileAdvance. groupIDList:\",e.groupIDList),this.request({name:\"group\",action:\"query\",param:e}).then((function(e){W.log(\"GroupController.getGroupProfileAdvance ok.\");var t=e.data.groups,n=t.filter((function(e){return te(e.errorCode)||e.errorCode===Oe})),o=t.filter((function(e){return e.errorCode&&e.errorCode!==Oe})).map((function(e){return new nt({code:e.errorCode,message:e.errorInfo,data:{groupID:e.groupID}})}));return new An({successGroupList:n,failureGroupList:o})})).catch((function(t){return W.error(\"GroupController.getGroupProfileAdvance error:\".concat(le(t),\" groupIDList:\").concat(e.groupIDList)),wn(t)}))}},{key:\"_deleteLocalGroup\",value:function(e){return this.groupMap.delete(e),this.groupMemberListMap.delete(e),this._setStorageGroupList(),this.groupMap.has(e)&&this.groupMemberListMap.has(e)}},{key:\"_initGroupList\",value:function(){var e=this,t=new Bn;t.setMethod(\"getGroupListInStorage\").setStart(),W.time(Hn),W.log(\"GroupController._initGroupList\");var n=this._getStorageGroupList();ee(n)&&n.length>0?(n.forEach((function(t){e.groupMap.set(t.groupID,new Ei(t))})),this.emitGroupListUpdate(!0,!1),t.setCode(0).setNetworkType(this.getNetworkType()).setText(this.groupMap.size).setEnd()):t.setCode(0).setNetworkType(this.getNetworkType()).setText(0).setEnd(),this.triggerReady(),W.log(\"GroupController._initGroupList ok. initCost=\".concat(W.timeEnd(Hn),\"ms\")),this.getGroupList()}},{key:\"_initListeners\",value:function(){var e=this.tim.innerEmitter;e.once(Ot,this._initGroupList,this),e.on(hn,this._handleUpdateGroupLastMessage,this),e.on(Ft,this._handleReceivedGroupMessage,this),e.on(gn,this._handleProfileUpdated,this)}},{key:\"emitGroupListUpdate\",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=this.getLocalGroups();n&&this.emitInnerEvent(sn,o),t&&this.emitOuterEvent(e.GROUP_LIST_UPDATED,o)}},{key:\"_handleReceivedGroupMessage\",value:function(e){var t=this,o=e.data.eventDataList;Array.isArray(o)&&o.forEach((function(e){var o=e.conversationID.replace(n.CONV_GROUP,\"\");t.groupMap.has(o)&&(t.groupMap.get(o).nextMessageSeq=e.lastMessage.sequence+1)}))}},{key:\"_onReceivedGroupSystemNotice\",value:function(e){var t=e.data;this.groupNoticeHandler._onReceivedGroupNotice(t)}},{key:\"_handleUpdateGroupLastMessage\",value:function(e){var t=e.data;if(W.log(\"GroupController._handleUpdateGroupLastMessage convNums=\".concat(t.length,\" groupNums=\").concat(this.groupMap.size)),0!==this.groupMap.size){for(var o,r,i,s=!1,a=0,u=t.length;a<u;a++)(o=t[a]).conversationID&&o.type!==n.CONV_GROUP&&(r=o.conversationID.split(/^GROUP/)[1],(i=this.getLocalGroupProfile(r))&&(i.lastMessage=o.lastMessage,s=!0));s&&(this.groupMap=this._sortLocalGroupList(this.groupMap),this.emitGroupListUpdate(!0,!1))}else this.tempConversationList=t}},{key:\"_sortLocalGroupList\",value:function(e){var t=I(e).filter((function(e){var t=y(e,2);return t[0],!ke(t[1].lastMessage)}));return t.sort((function(e,t){return t[1].lastMessage.lastTime-e[1].lastMessage.lastTime})),new Map([].concat(I(t),I(e)))}},{key:\"_getStorageGroupList\",value:function(){return this.tim.storage.getItem(\"groupMap\")}},{key:\"_setStorageGroupList\",value:function(){var e=this.getLocalGroups().filter((function(e){var t=e.type;return!Ee(t)})).slice(0,20).map((function(e){return{groupID:e.groupID,name:e.name,avatar:e.avatar,type:e.type}}));this.tim.storage.setItem(\"groupMap\",e)}},{key:\"updateGroupMap\",value:function(e){var t=this;e.forEach((function(e){t.groupMap.has(e.groupID)?t.groupMap.get(e.groupID).updateGroup(e):t.groupMap.set(e.groupID,new Ei(e))})),this._setStorageGroupList()}},{key:\"_updateLocalGroupMemberMap\",value:function(e,t){var n=this;return ee(t)&&0!==t.length?t.map((function(t){return n.hasLocalGroupMember(e,t.userID)?n.getLocalGroupMemberInfo(e,t.userID).updateMember(t):n.setLocalGroupMember(e,new Pi(t)),n.getLocalGroupMemberInfo(e,t.userID)})):[]}},{key:\"deleteLocalGroupMembers\",value:function(e,t){var n=this.groupMemberListMap.get(e);n&&t.forEach((function(e){n.delete(e)}))}},{key:\"_modifyGroupMemberInfo\",value:function(e){var t=this,n=e.groupID,o=e.userID;return this.request({name:\"group\",action:\"modifyGroupMemberInfo\",param:e}).then((function(){if(t.hasLocalGroupMember(n,o)){var r=t.getLocalGroupMemberInfo(n,o);return te(e.muteTime)||r.updateMuteUntil(e.muteTime),te(e.role)||r.updateRole(e.role),te(e.nameCard)||r.updateNameCard(e.nameCard),te(e.memberCustomField)||r.updateMemberCustomField(e.memberCustomField),r}return t.getGroupMemberProfile({groupID:n,userIDList:[o]}).then((function(e){return y(e.data.memberList,1)[0]}))}))}},{key:\"_groupListTreeShaking\",value:function(e){for(var t=new Map(I(this.groupMap)),n=0,o=e.length;n<o;n++)t.delete(e[n].groupID);this.AVChatRoomHandler.hasJoinedAVChatRoom()&&this.AVChatRoomHandler.getJoinedAVChatRoom().forEach((function(e){t.delete(e)}));for(var r=I(t.keys()),i=0,s=r.length;i<s;i++)this.groupMap.delete(r[i])}},{key:\"_handleProfileUpdated\",value:function(e){for(var t=this,n=e.data,o=function(e){var o=n[e];t.groupMemberListMap.forEach((function(e){e.has(o.userID)&&e.get(o.userID).updateMember({nick:o.nick,avatar:o.avatar})}))},r=0;r<n.length;r++)o(r)}},{key:\"getJoinedAVChatRoom\",value:function(){return this.AVChatRoomHandler.getJoinedAVChatRoom()}},{key:\"deleteLocalGroupAndConversation\",value:function(e){this._deleteLocalGroup(e),this.tim.conversationController.deleteLocalConversation(\"GROUP\".concat(e)),this.emitGroupListUpdate(!0,!1)}},{key:\"checkJoinedAVChatRoomByID\",value:function(e){return this.AVChatRoomHandler.checkJoinedAVChatRoomByID(e)}},{key:\"getGroupLastSequence\",value:function(e){var t=this,n=new Bn;n.setMethod(\"getGroupLastSequence\").setStart();var o=0;if(this.hasLocalGroup(e)){var r=this.getLocalGroupProfile(e);if(r.lastMessage.lastSequence>0)return o=r.lastMessage.lastSequence,W.log(\"GroupController.getGroupLastSequence got lastSequence=\".concat(o,\" from local group profile[lastMessage.lastSequence]. groupID=\").concat(e)),n.setCode(0).setNetworkType(this.getNetworkType()).setText(\"got lastSequence=\".concat(o,\" from local group profile[lastMessage.lastSequence]. groupID=\").concat(e)).setEnd(),Promise.resolve(o);if(r.nextMessageSeq>1)return o=r.nextMessageSeq-1,W.log(\"GroupController.getGroupLastSequence got lastSequence=\".concat(o,\" from local group profile[nextMessageSeq]. groupID=\").concat(e)),n.setCode(0).setNetworkType(this.getNetworkType()).setText(\"got lastSequence=\".concat(o,\" from local group profile[nextMessageSeq]. groupID=\").concat(e)).setEnd(),Promise.resolve(o)}var i=\"GROUP\".concat(e),s=this.tim.conversationController.getLocalConversation(i);if(s&&s.lastMessage.lastSequence)return o=s.lastMessage.lastSequence,W.log(\"GroupController.getGroupLastSequence got lastSequence=\".concat(o,\" from local conversation profile[lastMessage.lastSequence]. groupID=\").concat(e)),n.setCode(0).setNetworkType(this.getNetworkType()).setText(\"got lastSequence=\".concat(o,\" from local conversation profile[lastMessage.lastSequence]. groupID=\").concat(e)).setEnd(),Promise.resolve(o);var a={groupIDList:[e],responseFilter:{groupBaseInfoFilter:[\"NextMsgSeq\"]}};return this.getGroupProfileAdvance(a).then((function(r){var i=r.data.successGroupList;return ke(i)?W.log(\"GroupController.getGroupLastSequence successGroupList is empty. groupID=\".concat(e)):(o=i[0].nextMessageSeq-1,W.log(\"GroupController.getGroupLastSequence got lastSequence=\".concat(o,\" from getGroupProfileAdvance. groupID=\").concat(e))),n.setCode(0).setNetworkType(t.getNetworkType()).setText(\"got lastSequence=\".concat(o,\" from getGroupProfileAdvance. groupID=\").concat(e)).setEnd(),o})).catch((function(o){return t.probeNetwork().then((function(t){var r=y(t,2),i=r[0],s=r[1];n.setError(o,i,s).setText(\"get lastSequence failed from getGroupProfileAdvance. groupID=\".concat(e)).setEnd()})),W.warn(\"GroupController.getGroupLastSequence failed. \".concat(o)),wn(o)}))}},{key:\"reset\",value:function(){this.groupMap.clear(),this.groupMemberListMap.clear(),this.resetReady(),this.groupNoticeHandler.reset(),this.AVChatRoomHandler.reset(),this.tim.innerEmitter.once(Ot,this._initGroupList,this)}}]),i}(Sn),Vi=function(t){l(i,t);var o=v(i);function i(e){var t;r(this,i),(t=o.call(this,e)).REALTIME_MESSAGE_TIMEOUT=3e5,t.LONGPOLLING_ID_TIMEOUT=3e5,t._currentState=n.NET_STATE_CONNECTED,t._status={OPENIM:{lastResponseReceivedTime:0,jitterCount:0,failedCount:0},AVCHATROOM:{lastResponseReceivedTime:0,jitterCount:0,failedCount:0}};var s=t.tim.innerEmitter;return s.on(Ht,t._onGetLongPollIDFailed,m(t)),s.on(jt,t._onOpenIMResponseOK,m(t)),s.on(Bt,t._onOpenIMRequestFailed,m(t)),s.on(rn,t._onAVChatroomResponseOK,m(t)),s.on(on,t._onAVChatroomRequestFailed,m(t)),t}return s(i,[{key:\"_onGetLongPollIDFailed\",value:function(){this._currentState!==n.NET_STATE_DISCONNECTED&&this._emitNetStateChangeEvent(n.NET_STATE_DISCONNECTED)}},{key:\"_onOpenIMResponseOK\",value:function(){this._onResponseOK(\"OPENIM\")}},{key:\"_onOpenIMRequestFailed\",value:function(){this._onRequestFailed(\"OPENIM\")}},{key:\"_onAVChatroomResponseOK\",value:function(){this.isLoggedIn()||this._onResponseOK(\"AVCHATROOM\")}},{key:\"_onAVChatroomRequestFailed\",value:function(){this.isLoggedIn()||this._onRequestFailed(\"AVCHATROOM\")}},{key:\"_onResponseOK\",value:function(e){var t=this._status[e],o=Date.now();if(0!==t.lastResponseReceivedTime){var r=o-t.lastResponseReceivedTime;W.debug(\"StatusController._onResponseOK key=\".concat(e,\" currentState=\").concat(this._currentState,\" interval=\").concat(r,\" failedCount=\").concat(t.failedCount,\" jitterCount=\").concat(t.jitterCount)),t.failedCount>0&&(t.failedCount=0,t.jitterCount+=1,this._currentState!==n.NET_STATE_CONNECTED&&this._emitNetStateChangeEvent(n.NET_STATE_CONNECTED));var i=new Bn;r<=this.LONGPOLLING_ID_TIMEOUT?t.jitterCount>=3&&(i.setMethod(\"networkJitter\").setStart(),i.setCode(0).setText(\"\".concat(e,\"-\").concat(r,\"-\").concat(t.jitterCount)).setNetworkType(this.getNetworkType()).setEnd(),t.jitterCount=0):(i.setMethod(\"sdkReload\").setStart(),i.setCode(0).setText(\"\".concat(e,\"-\").concat(r)).setNetworkType(this.getNetworkType()).setEnd(),W.warn(\"StatusController._onResponseOK, sdk reload. key=\".concat(e,\" interval=\").concat(r,\"ms. https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/module-EVENT.html#.SDK_RELOAD\")),this.emitInnerEvent(yn)),t.lastResponseReceivedTime=o}else t.lastResponseReceivedTime=o}},{key:\"_onRequestFailed\",value:function(e){var t=this,o=this._status[e];Date.now()-o.lastResponseReceivedTime>=this.LONGPOLLING_ID_TIMEOUT?this._currentState!==n.NET_STATE_DISCONNECTED&&(W.warn(\"StatusController._onRequestFailed, disconnected, longpolling unavailable more than 5min. key=\".concat(e,\" networkType=\").concat(this.getNetworkType())),this._emitNetStateChangeEvent(n.NET_STATE_DISCONNECTED)):(o.failedCount+=1,o.failedCount>5?this.probeNetwork().then((function(r){var i=y(r,2),s=i[0],a=i[1];s?(t._currentState!==n.NET_STATE_CONNECTING&&t._emitNetStateChangeEvent(n.NET_STATE_CONNECTING),W.warn(\"StatusController._onRequestFailed, connecting, network jitter. key=\".concat(e,\" networkType=\").concat(a))):(t._currentState!==n.NET_STATE_DISCONNECTED&&t._emitNetStateChangeEvent(n.NET_STATE_DISCONNECTED),W.warn(\"StatusController._onRequestFailed, disconnected, longpolling unavailable. key=\".concat(e,\" networkType=\").concat(a))),o.failedCount=0,o.jitterCount=0})):this._currentState===n.NET_STATE_CONNECTED&&this._emitNetStateChangeEvent(n.NET_STATE_CONNECTING))}},{key:\"_emitNetStateChangeEvent\",value:function(t){W.log(\"StatusController._emitNetStateChangeEvent net state changed from \".concat(this._currentState,\" to \").concat(t)),this._currentState=t,this.emitOuterEvent(e.NET_STATE_CHANGE,{state:t})}},{key:\"reset\",value:function(){W.log(\"StatusController.reset\"),this._currentState=n.NET_STATE_CONNECTED,this._status={OPENIM:{lastResponseReceivedTime:0,jitterCount:0,failedCount:0},AVCHATROOM:{lastResponseReceivedTime:0,jitterCount:0,failedCount:0}}}}]),i}(Sn);function Ki(){return null}var Hi=function(){function e(t){r(this,e),this.tim=t,this.isWX=O,this.storageQueue=new Map,this.checkTimes=0,this.checkTimer=setInterval(this._onCheckTimer.bind(this),1e3),this._errorTolerantHandle()}return s(e,[{key:\"_errorTolerantHandle\",value:function(){!this.isWX&&te(window.localStorage)&&(this.getItem=Ki,this.setItem=Ki,this.removeItem=Ki,this.clear=Ki)}},{key:\"_onCheckTimer\",value:function(){if(this.checkTimes++,this.checkTimes%20==0){if(0===this.storageQueue.size)return;this._doFlush()}}},{key:\"_doFlush\",value:function(){try{var e,t=E(this.storageQueue);try{for(t.s();!(e=t.n()).done;){var n=y(e.value,2),o=n[0],r=n[1];this.isWX?wx.setStorageSync(this._getKey(o),r):localStorage.setItem(this._getKey(o),JSON.stringify(r))}}catch(e){t.e(e)}finally{t.f()}this.storageQueue.clear()}catch(e){W.warn(\"Storage._doFlush error\",e)}}},{key:\"_getPrefix\",value:function(){var e=this.tim.loginInfo,t=e.SDKAppID,n=e.identifier;return\"TIM_\".concat(t,\"_\").concat(n,\"_\")}},{key:\"getItem\",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{var n=t?this._getKey(e):e;return this.isWX?wx.getStorageSync(n):JSON.parse(localStorage.getItem(n))}catch(e){W.warn(\"Storage.getItem error:\",e)}}},{key:\"setItem\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(n){var r=o?this._getKey(e):e;this.isWX?wx.setStorageSync(r,t):localStorage.setItem(r,JSON.stringify(t))}else this.storageQueue.set(e,t)}},{key:\"clear\",value:function(){try{this.isWX?wx.clearStorageSync():localStorage.clear()}catch(e){W.warn(\"Storage.clear error:\",e)}}},{key:\"removeItem\",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{var n=t?this._getKey(e):e;this.isWX?wx.removeStorageSync(n):localStorage.removeItem(n)}catch(e){W.warn(\"Storage.removeItem error:\",e)}}},{key:\"getSize\",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"b\";try{var o={size:0,limitSize:5242880,unit:n};if(Object.defineProperty(o,\"leftSize\",{enumerable:!0,get:function(){return o.limitSize-o.size}}),this.isWX&&(o.limitSize=1024*wx.getStorageInfoSync().limitSize),e)o.size=JSON.stringify(this.getItem(e)).length+this._getKey(e).length;else if(this.isWX){var r=wx.getStorageInfoSync(),i=r.keys;i.forEach((function(e){o.size+=JSON.stringify(wx.getStorageSync(e)).length+t._getKey(e).length}))}else for(var s in localStorage)localStorage.hasOwnProperty(s)&&(o.size+=localStorage.getItem(s).length+s.length);return this._convertUnit(o)}catch(e){W.warn(\"Storage.getSize error:\",e)}}},{key:\"_convertUnit\",value:function(e){var t={},n=e.unit;for(var o in t.unit=n,e)\"number\"==typeof e[o]&&(\"kb\"===n.toLowerCase()?t[o]=Math.round(e[o]/1024):\"mb\"===n.toLowerCase()?t[o]=Math.round(e[o]/1024/1024):t[o]=e[o]);return t}},{key:\"_getKey\",value:function(e){return\"\".concat(this._getPrefix()).concat(e)}},{key:\"reset\",value:function(){this._doFlush(),this.checkTimes=0}}]),e}(),Bi=D((function(e){var t=Object.prototype.hasOwnProperty,n=\"~\";function o(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,o,i,s){if(\"function\"!=typeof o)throw new TypeError(\"The listener must be a function\");var a=new r(o,i||e,s),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function a(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,o,r=[];if(0===this._eventsCount)return r;for(o in e=this._events)t.call(e,o)&&r.push(n?o.slice(1):o);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e){var t=n?n+e:e,o=this._events[t];if(!o)return[];if(o.fn)return[o.fn];for(var r=0,i=o.length,s=new Array(i);r<i;r++)s[r]=o[r].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,o=this._events[t];return o?o.fn?1:o.length:0},a.prototype.emit=function(e,t,o,r,i,s){var a=n?n+e:e;if(!this._events[a])return!1;var u,c,l=this._events[a],p=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),p){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,o),!0;case 4:return l.fn.call(l.context,t,o,r),!0;case 5:return l.fn.call(l.context,t,o,r,i),!0;case 6:return l.fn.call(l.context,t,o,r,i,s),!0}for(c=1,u=new Array(p-1);c<p;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var h,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),p){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,o);break;case 4:l[c].fn.call(l[c].context,t,o,r);break;default:if(!u)for(h=1,u=new Array(p-1);h<p;h++)u[h-1]=arguments[h];l[c].fn.apply(l[c].context,u)}}return!0},a.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,o,r){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||r&&!a.once||o&&a.context!==o||s(this,i);else{for(var u=0,c=[],l=a.length;u<l;u++)(a[u].fn!==t||r&&!a[u].once||o&&a[u].context!==o)&&c.push(a[u]);c.length?this._events[i]=1===c.length?c[0]:c:s(this,i)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new o,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a})),ji=function(e){var t,n,o,r,i;return ke(e.context)?(t=\"\",n=0,o=0,r=0,i=1):(t=e.context.a2Key,n=e.context.tinyID,o=e.context.SDKAppID,r=e.context.contentType,i=e.context.apn),{platform:St,websdkappid:Tt,v:Et,a2:t,tinyid:n,sdkappid:o,contentType:r,apn:i,reqtime:function(){return+new Date}}},Yi=function(){function e(t){r(this,e),this.tim=t,this.tim.innerEmitter.on(Nt,this._update,this),this.tim.innerEmitter.on(wt,this._update,this),this.tim.innerEmitter.on(Lt,this._updateSpecifiedConfig,this),this._initConfig()}return s(e,[{key:\"_update\",value:function(e){this._initConfig()}},{key:\"_updateSpecifiedConfig\",value:function(e){var t=this;e.data.forEach((function(e){t._set(e)}))}},{key:\"get\",value:function(e){var t=e.name,n=e.action,r=e.param,i=e.tjgID;if(te(this.config[t])||te(this.config[t][n]))throw new nt({code:ot.NETWORK_PACKAGE_UNDEFINED,message:\"\".concat(\"未定义的 packageConfig\",\": PackageConfig.\").concat(t)});var s=function e(t){if(0===Object.getOwnPropertyNames(t).length)return Object.create(null);var n=Array.isArray(t)?[]:Object.create(null),r=\"\";for(var i in t)null!==t[i]?void 0!==t[i]?(r=o(t[i]),[\"string\",\"number\",\"function\",\"boolean\"].indexOf(r)>=0?n[i]=t[i]:n[i]=e(t[i])):n[i]=void 0:n[i]=null;return n}(this.config[t][n]);return s.requestData=this._initRequestData(r,s),s.encode=this._initEncoder(s),s.decode=this._initDecoder(s),i&&(s.queryString.tjg_id=i),s}},{key:\"_set\",value:function(e){var t=e.key,n=e.value;if(0!=!!t){var r=t.split(\".\");r.length<=0||function e(t,n,r,i){var s=n[r];\"object\"===o(t[s])?e(t[s],n,r+1,i):t[s]=i}(this.config,r,0,n)}}},{key:\"_initConfig\",value:function(){var e;this.config={},this.config.accessLayer=(e=this.tim,{create:null,query:{serverName:At.NAME.WEB_IM,cmd:At.CMD.ACCESS_LAYER,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:{platform:St,identifier:e.context.identifier,usersig:e.context.userSig,contentType:e.context.contentType,apn:null!==e.context?e.context.apn:1,websdkappid:Tt,v:Et},requestData:{}},update:null,delete:null}),this.config.login=function(e){return{create:null,query:{serverName:At.NAME.OPEN_IM,cmd:At.CMD.LOGIN,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:{websdkappid:Tt,v:Et,platform:St,identifier:e.loginInfo.identifier,usersig:e.loginInfo.userSig,sdkappid:e.loginInfo.SDKAppID,accounttype:e.loginInfo.accountType,contentType:null!==e.context?e.context.contentType:0,apn:null!==e.context?e.context.apn:1,reqtime:+new Date/1e3},requestData:{state:\"Online\"},keyMaps:{request:{tinyID:\"tinyId\"},response:{TinyId:\"tinyID\"}}},update:null,delete:null}}(this.tim),this.config.logout=function(e){return{create:null,query:{serverName:At.NAME.OPEN_IM,cmd:At.CMD.LOGOUT_ALL,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:{websdkappid:Tt,v:Et,platform:St,a2:null!==e.context?e.context.a2Key:\"\",tinyid:null!==e.context?e.context.tinyID:\"\",sdkappid:null!==e.loginInfo?e.loginInfo.SDKAppID:0,contentType:null!==e.context?e.context.contentType:0,apn:null!==e.context?e.context.apn:\"\",reqtime:+new Date/1e3},requestData:{}},update:null,delete:null}}(this.tim),this.config.longPollLogout=function(e){return{create:null,query:{serverName:At.NAME.OPEN_IM,cmd:At.CMD.LOGOUT_LONG_POLL,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:{websdkappid:Tt,v:Et,platform:St,a2:null!==e.context?e.context.a2Key:\"\",tinyid:null!==e.context?e.context.tinyID:0,sdkappid:null!==e.context?e.context.SDKAppID:0,contentType:null!==e.context?e.context.contentType:0,apn:null!==e.context?e.context.apn:1,reqtime:function(){return Date.now()}},requestData:{longPollID:\"\"},keyMaps:{request:{longPollID:\"LongPollingId\"}}},update:null,delete:null}}(this.tim),this.config.profile=function(e){var t=ji(e),n=At.NAME.PROFILE,o=At.CHANNEL.XHR,r=kt;return{query:{serverName:n,cmd:At.CMD.PORTRAIT_GET,channel:o,protocol:r,method:\"POST\",queryString:t,requestData:{fromAccount:\"\",userItem:[]},keyMaps:{request:{toAccount:\"To_Account\",standardSequence:\"StandardSequence\",customSequence:\"CustomSequence\"}}},update:{serverName:n,cmd:At.CMD.PORTRAIT_SET,channel:o,protocol:r,method:\"POST\",queryString:t,requestData:{fromAccount:\"\",profileItem:[{tag:Be.NICK,value:\"\"},{tag:Be.GENDER,value:\"\"},{tag:Be.ALLOWTYPE,value:\"\"},{tag:Be.AVATAR,value:\"\"}]}}}}(this.tim),this.config.group=function(e){var t={websdkappid:Tt,v:Et,platform:St,a2:null!==e.context&&e.context.a2Key?e.context.a2Key:void 0,tinyid:null!==e.context&&e.context.tinyID?e.context.tinyID:void 0,sdkappid:null!==e.context?e.context.SDKAppID:0,contentType:null!==e.context?e.context.contentType:0,accounttype:null!==e.context?e.context.accountType:0},o={request:{ownerID:\"Owner_Account\",userID:\"Member_Account\",newOwnerID:\"NewOwner_Account\",maxMemberNum:\"MaxMemberCount\",groupCustomField:\"AppDefinedData\",memberCustomField:\"AppMemberDefinedData\",groupCustomFieldFilter:\"AppDefinedDataFilter_Group\",memberCustomFieldFilter:\"AppDefinedDataFilter_GroupMember\",messageRemindType:\"MsgFlag\",userIDList:\"MemberList\",groupIDList:\"GroupIdList\",applyMessage:\"ApplyMsg\",muteTime:\"ShutUpTime\",muteAllMembers:\"ShutUpAllMember\",joinOption:\"ApplyJoinOption\"},response:{GroupIdList:\"groups\",MsgFlag:\"messageRemindType\",AppDefinedData:\"groupCustomField\",AppMemberDefinedData:\"memberCustomField\",AppDefinedDataFilter_Group:\"groupCustomFieldFilter\",AppDefinedDataFilter_GroupMember:\"memberCustomFieldFilter\",InfoSeq:\"infoSequence\",MemberList:\"members\",GroupInfo:\"groups\",ShutUpUntil:\"muteUntil\",ShutUpAllMember:\"muteAllMembers\",ApplyJoinOption:\"joinOption\"}};return{create:{serverName:At.NAME.GROUP,cmd:At.CMD.CREATE_GROUP,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{type:n.GRP_WORK,name:void 0,groupID:void 0,ownerID:e.loginInfo.identifier,introduction:void 0,notification:void 0,avatar:void 0,maxMemberNum:void 0,joinOption:void 0,memberList:void 0,groupCustomField:void 0},keyMaps:o},list:{serverName:At.NAME.GROUP,cmd:At.CMD.GET_JOINED_GROUPS,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{userID:e.loginInfo.identifier,limit:void 0,offset:void 0,groupType:void 0,responseFilter:void 0},keyMaps:o},query:{serverName:At.NAME.GROUP,cmd:At.CMD.GET_GROUP_INFO,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{groupIDList:void 0,responseFilter:void 0},keyMaps:o},getGroupMemberProfile:{serverName:At.NAME.GROUP,cmd:At.CMD.GET_GROUP_MEMBER_INFO,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{groupID:void 0,userIDList:void 0,memberInfoFilter:void 0,memberCustomFieldFilter:void 0},keyMaps:{request:c({},o.request,{userIDList:\"Member_List_Account\"}),response:o.response}},getGroupMemberList:{serverName:At.NAME.GROUP,cmd:At.CMD.GET_GROUP_MEMBER_LIST,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{groupID:void 0,limit:0,offset:0,memberRoleFilter:void 0,memberInfoFilter:void 0},keyMaps:o},quitGroup:{serverName:At.NAME.GROUP,cmd:At.CMD.QUIT_GROUP,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{groupID:void 0}},changeGroupOwner:{serverName:At.NAME.GROUP,cmd:At.CMD.CHANGE_GROUP_OWNER,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{groupID:void 0,newOwnerID:void 0},keyMaps:o},destroyGroup:{serverName:At.NAME.GROUP,cmd:At.CMD.DESTROY_GROUP,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{groupID:void 0}},updateGroupProfile:{serverName:At.NAME.GROUP,cmd:At.CMD.MODIFY_GROUP_INFO,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{groupID:void 0,name:void 0,introduction:void 0,notification:void 0,avatar:void 0,maxMemberNum:void 0,joinOption:void 0,groupCustomField:void 0,muteAllMembers:void 0},keyMaps:{request:c({},o.request,{groupCustomField:\"AppDefinedData\"}),response:o.response}},modifyGroupMemberInfo:{serverName:At.NAME.GROUP,cmd:At.CMD.MODIFY_GROUP_MEMBER_INFO,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{groupID:void 0,userID:void 0,messageRemindType:void 0,nameCard:void 0,role:void 0,memberCustomField:void 0,muteTime:void 0},keyMaps:o},addGroupMember:{serverName:At.NAME.GROUP,cmd:At.CMD.ADD_GROUP_MEMBER,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{groupID:void 0,silence:void 0,userIDList:void 0},keyMaps:o},deleteGroupMember:{serverName:At.NAME.GROUP,cmd:At.CMD.DELETE_GROUP_MEMBER,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{groupID:void 0,userIDList:void 0,reason:void 0},keyMaps:{request:{userIDList:\"MemberToDel_Account\"}}},searchGroupByID:{serverName:At.NAME.GROUP,cmd:At.CMD.SEARCH_GROUP_BY_ID,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{groupIDList:void 0,responseFilter:{groupBasePublicInfoFilter:[\"Type\",\"Name\",\"Introduction\",\"Notification\",\"FaceUrl\",\"CreateTime\",\"Owner_Account\",\"LastInfoTime\",\"LastMsgTime\",\"NextMsgSeq\",\"MemberNum\",\"MaxMemberNum\",\"ApplyJoinOption\"]}},keyMaps:{request:{groupIDList:\"GroupIdList\"}}},applyJoinGroup:{serverName:At.NAME.GROUP,cmd:At.CMD.APPLY_JOIN_GROUP,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{groupID:void 0,applyMessage:void 0,userDefinedField:void 0},keyMaps:o},applyJoinAVChatRoom:{serverName:At.NAME.BIG_GROUP_NO_AUTH,cmd:At.CMD.APPLY_JOIN_GROUP,channel:At.CHANNEL.XHR,protocol:kt,queryString:{websdkappid:Tt,v:Et,platform:St,sdkappid:null!==e.context?e.context.SDKAppID:0,contentType:null!==e.context?e.context.contentType:0,accounttype:null!==e.context?e.context.accountType:0},requestData:{groupID:void 0,applyMessage:void 0,userDefinedField:void 0},keyMaps:o},handleApplyJoinGroup:{serverName:At.NAME.GROUP,cmd:At.CMD.HANDLE_APPLY_JOIN_GROUP,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{groupID:void 0,applicant:void 0,handleAction:void 0,handleMessage:void 0,authentication:void 0,messageKey:void 0,userDefinedField:void 0},keyMaps:{request:{applicant:\"Applicant_Account\",handleAction:\"HandleMsg\",handleMessage:\"ApprovalMsg\",messageKey:\"MsgKey\"},response:{MsgKey:\"messageKey\"}}},deleteGroupSystemNotice:{serverName:At.NAME.OPEN_IM,cmd:At.CMD.DELETE_GROUP_SYSTEM_MESSAGE,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{messageListToDelete:void 0},keyMaps:{request:{messageListToDelete:\"DelMsgList\",messageSeq:\"MsgSeq\",messageRandom:\"MsgRandom\"}}},getGroupPendency:{serverName:At.NAME.GROUP,cmd:At.CMD.GET_GROUP_PENDENCY,channel:At.CHANNEL.XHR,protocol:kt,queryString:t,requestData:{startTime:void 0,limit:void 0,handleAccount:void 0},keyMaps:{request:{handleAccount:\"Handle_Account\"}}}}}(this.tim),this.config.longPollID=function(e){return{create:{},query:{serverName:At.NAME.OPEN_IM,cmd:At.CMD.GET_LONG_POLL_ID,channel:At.CHANNEL.XHR,protocol:kt,queryString:{websdkappid:Tt,v:Et,platform:St,a2:null!==e.context?e.context.a2Key:\"\",tinyid:null!==e.context?e.context.tinyID:0,sdkappid:null!==e.context?e.context.SDKAppID:0,contentType:null!==e.context?e.context.contentType:0,apn:null!==e.context?e.context.apn:1,reqtime:+new Date/1e3},requestData:{},keyMaps:{response:{LongPollingId:\"longPollingID\"}}},update:{},delete:{}}}(this.tim),this.config.longPoll=function(e){var t={websdkappid:Tt,v:Et,platform:St,a2:null!==e.context?e.context.a2Key:\"\",tinyid:null!==e.context?e.context.tinyID:0,sdkappid:null!==e.context?e.context.SDKAppID:0,contentType:null!==e.context?e.context.contentType:0,accounttype:null!==e.context?e.loginInfo.accountType:0,apn:null!==e.context?e.context.apn:1,reqtime:Math.ceil(+new Date/1e3)};return{create:{},query:{serverName:At.NAME.OPEN_IM,cmd:At.CMD.LONG_POLL,channel:At.CHANNEL.AUTO,protocol:kt,queryString:t,requestData:{timeout:null,cookie:{notifySeq:0,noticeSeq:0,longPollingID:0}},keyMaps:{response:{C2cMsgArray:\"C2CMessageArray\",GroupMsgArray:\"groupMessageArray\",GroupTips:\"groupTips\",C2cNotifyMsgArray:\"C2CNotifyMessageArray\",ClientSeq:\"clientSequence\",MsgPriority:\"priority\",NoticeSeq:\"noticeSequence\",MsgContent:\"content\",MsgType:\"type\",MsgBody:\"elements\",ToGroupId:\"to\",Desc:\"description\",Ext:\"extension\"}}},update:{},delete:{}}}(this.tim),this.config.applyC2C=function(e){var t=ji(e),n=At.NAME.FRIEND,o=At.CHANNEL.XHR,r=kt;return{create:{serverName:n,cmd:At.CMD.FRIEND_ADD,channel:o,protocol:r,queryString:t,requestData:{fromAccount:\"\",addFriendItem:[]}},get:{serverName:n,cmd:At.CMD.GET_PENDENCY,channel:o,protocol:r,queryString:t,requestData:{fromAccount:\"\",pendencyType:\"Pendency_Type_ComeIn\"}},update:{serverName:n,cmd:At.CMD.RESPONSE_PENDENCY,channel:o,protocol:r,queryString:t,requestData:{fromAccount:\"\",responseFriendItem:[]}},delete:{serverName:n,cmd:At.CMD.DELETE_PENDENCY,channel:o,protocol:r,queryString:t,requestData:{fromAccount:\"\",toAccount:[],pendencyType:\"Pendency_Type_ComeIn\"}}}}(this.tim),this.config.friend=function(e){var t=ji(e),n=At.NAME.FRIEND,o=At.CHANNEL.XHR,r=kt;return{get:{serverName:n,cmd:At.CMD.FRIEND_GET_ALL,channel:o,protocol:r,method:\"POST\",queryString:t,requestData:{fromAccount:\"\",timeStamp:0,tagList:[Be.NICK,\"Tag_SNS_IM_Remark\",Be.AVATAR]},keyMaps:{request:{},response:{}}},delete:{serverName:n,cmd:At.CMD.FRIEND_DELETE,channel:o,protocol:r,method:\"POST\",queryString:t,requestData:{fromAccount:\"\",toAccount:[],deleteType:\"Delete_Type_Single\"}}}}(this.tim),this.config.blacklist=function(e){var t=ji(e);return{create:{serverName:At.NAME.FRIEND,cmd:At.CMD.ADD_BLACKLIST,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{fromAccount:\"\",toAccount:[]}},get:{serverName:At.NAME.FRIEND,cmd:At.CMD.GET_BLACKLIST,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{fromAccount:\"\",startIndex:0,maxLimited:30,lastSequence:0}},delete:{serverName:At.NAME.FRIEND,cmd:At.CMD.DELETE_BLACKLIST,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{fromAccount:\"\",toAccount:[]}},update:{}}}(this.tim),this.config.c2cMessage=function(e){var t={platform:St,websdkappid:Tt,v:Et,a2:null!==e.context?e.context.a2Key:\"\",tinyid:null!==e.context?e.context.tinyID:0,sdkappid:null!==e.context?e.context.SDKAppID:0,contentType:null!==e.context?e.context.contentType:0,apn:null!==e.context?e.context.apn:1,reqtime:function(){return+new Date}},n={request:{fromAccount:\"From_Account\",toAccount:\"To_Account\",msgTimeStamp:\"MsgTimeStamp\",msgSeq:\"MsgSeq\",msgRandom:\"MsgRandom\",msgBody:\"MsgBody\",count:\"MaxCnt\",lastMessageTime:\"LastMsgTime\",messageKey:\"MsgKey\",peerAccount:\"Peer_Account\",data:\"Data\",description:\"Desc\",extension:\"Ext\",type:\"MsgType\",content:\"MsgContent\",sizeType:\"Type\",uuid:\"UUID\",imageUrl:\"URL\",fileUrl:\"Url\",remoteAudioUrl:\"Url\",remoteVideoUrl:\"VideoUrl\",thumbUUID:\"ThumbUUID\",videoUUID:\"VideoUUID\",videoUrl:\"\",downloadFlag:\"Download_Flag\"},response:{MsgContent:\"content\",MsgTime:\"time\",Data:\"data\",Desc:\"description\",Ext:\"extension\",MsgKey:\"messageKey\",MsgType:\"type\",MsgBody:\"elements\",Download_Flag:\"downloadFlag\",ThumbUUID:\"thumbUUID\",VideoUUID:\"videoUUID\"}};return{create:{serverName:At.NAME.OPEN_IM,cmd:At.CMD.SEND_MESSAGE,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{fromAccount:e.loginInfo.identifier,toAccount:\"\",msgTimeStamp:Math.ceil(+new Date/1e3),msgSeq:0,msgRandom:0,msgBody:[],msgLifeTime:void 0,offlinePushInfo:{pushFlag:0,title:\"\",desc:\"\",ext:\"\",apnsInfo:{badgeMode:0},androidInfo:{OPPOChannelID:\"\"}}},keyMaps:n},query:{serverName:At.NAME.OPEN_IM,cmd:At.CMD.GET_C2C_ROAM_MESSAGES,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{peerAccount:\"\",count:15,lastMessageTime:0,messageKey:\"\",withRecalledMsg:1},keyMaps:n}}}(this.tim),this.config.c2cMessageWillBeRevoked=function(e){var t={platform:St,websdkappid:Tt,v:Et,a2:null!==e.context?e.context.a2Key:\"\",tinyid:null!==e.context?e.context.tinyID:0,sdkappid:null!==e.context?e.context.SDKAppID:0,contentType:null!==e.context?e.context.contentType:0,apn:null!==e.context?e.context.apn:1,reqtime:function(){return+new Date}};return{create:{serverName:At.NAME.OPEN_IM,cmd:At.CMD.REVOKE_C2C_MESSAGE,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{msgInfo:{fromAccount:\"\",toAccount:\"\",msgTimeStamp:Math.ceil(+new Date/1e3),msgSeq:0,msgRandom:0}},keyMaps:{request:{msgInfo:\"MsgInfo\",fromAccount:\"From_Account\",toAccount:\"To_Account\",msgTimeStamp:\"MsgTimeStamp\",msgSeq:\"MsgSeq\",msgRandom:\"MsgRandom\",msgBody:\"MsgBody\"}}}}}(this.tim),this.config.c2cPeerReadTime=function(e){var t={platform:St,websdkappid:Tt,v:Et,a2:null!==e.context?e.context.a2Key:\"\",tinyid:null!==e.context?e.context.tinyID:0,sdkappid:null!==e.context?e.context.SDKAppID:0,contentType:null!==e.context?e.context.contentType:0,apn:null!==e.context?e.context.apn:1,reqtime:function(){return+new Date}};return{get:{serverName:At.NAME.OPEN_IM,cmd:At.CMD.GET_PEER_READ_TIME,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{userIDList:void 0},keyMaps:{request:{userIDList:\"To_Account\"},response:{ReadTime:\"peerReadTimeList\"}}}}}(this.tim),this.config.groupMessage=function(e){var t={platform:St,websdkappid:Tt,v:Et,a2:null!==e.context?e.context.a2Key:\"\",tinyid:null!==e.context?e.context.tinyID:0,sdkappid:null!==e.context?e.context.SDKAppID:0,contentType:null!==e.context?e.context.contentType:0,apn:null!==e.context?e.context.apn:1,reqtime:function(){return+new Date}},n={request:{to:\"GroupId\",extension:\"Ext\",data:\"Data\",description:\"Desc\",random:\"Random\",sequence:\"ReqMsgSeq\",count:\"ReqMsgNumber\",type:\"MsgType\",priority:\"MsgPriority\",content:\"MsgContent\",elements:\"MsgBody\",sizeType:\"Type\",uuid:\"UUID\",imageUrl:\"URL\",fileUrl:\"Url\",remoteAudioUrl:\"Url\",remoteVideoUrl:\"VideoUrl\",thumbUUID:\"ThumbUUID\",videoUUID:\"VideoUUID\",videoUrl:\"\",downloadFlag:\"Download_Flag\",clientSequence:\"ClientSeq\"},response:{Random:\"random\",MsgTime:\"time\",MsgSeq:\"sequence\",ReqMsgSeq:\"sequence\",RspMsgList:\"messageList\",IsPlaceMsg:\"isPlaceMessage\",IsSystemMsg:\"isSystemMessage\",ToGroupId:\"to\",EnumFrom_AccountType:\"fromAccountType\",EnumTo_AccountType:\"toAccountType\",GroupCode:\"groupCode\",MsgPriority:\"priority\",MsgBody:\"elements\",MsgType:\"type\",MsgContent:\"content\",IsFinished:\"complete\",Download_Flag:\"downloadFlag\",ClientSeq:\"clientSequence\",ThumbUUID:\"thumbUUID\",VideoUUID:\"videoUUID\"}};return{create:{serverName:At.NAME.GROUP,cmd:At.CMD.SEND_GROUP_MESSAGE,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{groupID:\"\",fromAccount:e.loginInfo.identifier,random:0,clientSequence:0,priority:\"\",msgBody:[],onlineOnlyFlag:0,offlinePushInfo:{pushFlag:0,title:\"\",desc:\"\",ext:\"\",apnsInfo:{badgeMode:0},androidInfo:{OPPOChannelID:\"\"}}},keyMaps:n},query:{serverName:At.NAME.GROUP,cmd:At.CMD.GET_GROUP_ROAM_MESSAGES,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{withRecalledMsg:1,groupID:\"\",count:15,sequence:\"\"},keyMaps:n},update:null,delete:null}}(this.tim),this.config.groupMessageWillBeRevoked=function(e){var t={platform:St,websdkappid:Tt,v:Et,a2:null!==e.context?e.context.a2Key:\"\",tinyid:null!==e.context?e.context.tinyID:0,sdkappid:null!==e.context?e.context.SDKAppID:0,contentType:null!==e.context?e.context.contentType:0,apn:null!==e.context?e.context.apn:1,reqtime:function(){return+new Date}};return{create:{serverName:At.NAME.GROUP,cmd:At.CMD.REVOKE_GROUP_MESSAGE,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{to:\"\",msgSeqList:[]},keyMaps:{request:{to:\"GroupId\",msgSeqList:\"MsgSeqList\",msgSeq:\"MsgSeq\"}}}}}(this.tim),this.config.conversation=function(e){var t={platform:St,websdkappid:Tt,v:Et,a2:null!==e.context?e.context.a2Key:\"\",tinyid:null!==e.context?e.context.tinyID:0,sdkappid:null!==e.context?e.context.SDKAppID:0,contentType:null!==e.context?e.context.contentType:0,apn:null!==e.context?e.context.apn:1};return{query:{serverName:At.NAME.RECENT_CONTACT,cmd:At.CMD.GET_CONVERSATION_LIST,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{fromAccount:e.loginInfo.identifier,count:0},keyMaps:{request:{},response:{SessionItem:\"conversations\",ToAccount:\"groupID\",To_Account:\"userID\",UnreadMsgCount:\"unreadCount\",MsgGroupReadedSeq:\"messageReadSeq\"}}},pagingQuery:{serverName:At.NAME.RECENT_CONTACT,cmd:At.CMD.PAGING_GET_CONVERSATION_LIST,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{fromAccount:void 0,timeStamp:void 0,orderType:void 0},keyMaps:{request:{},response:{SessionItem:\"conversations\",ToAccount:\"groupID\",To_Account:\"userID\",UnreadMsgCount:\"unreadCount\",MsgGroupReadedSeq:\"messageReadSeq\",C2cPeerReadTime:\"c2cPeerReadTime\"}}},delete:{serverName:At.NAME.RECENT_CONTACT,cmd:At.CMD.DELETE_CONVERSATION,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{fromAccount:e.loginInfo.identifier,toAccount:void 0,type:1,toGroupID:void 0},keyMaps:{request:{toGroupID:\"ToGroupid\"}}},setC2CMessageRead:{serverName:At.NAME.OPEN_IM,cmd:At.CMD.SET_C2C_MESSAGE_READ,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{C2CMsgReaded:void 0},keyMaps:{request:{lastMessageTime:\"LastedMsgTime\"}}},setGroupMessageRead:{serverName:At.NAME.GROUP,cmd:At.CMD.SET_GROUP_MESSAGE_READ,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{groupID:void 0,messageReadSeq:void 0},keyMaps:{request:{messageReadSeq:\"MsgReadedSeq\"}}}}}(this.tim),this.config.syncMessage=function(e){var t={platform:St,websdkappid:Tt,v:Et,a2:null!==e.context?e.context.a2Key:\"\",tinyid:null!==e.context?e.context.tinyID:0,sdkappid:null!==e.context?e.context.SDKAppID:0,contentType:null!==e.context?e.context.contentType:0,apn:null!==e.context?e.context.apn:1,reqtime:function(){return[Math.ceil(+new Date),Math.random()].join(\"\")}};return{create:null,query:{serverName:At.NAME.OPEN_IM,cmd:At.CMD.GET_MESSAGES,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{cookie:\"\",syncFlag:0,needAbstract:1},keyMaps:{request:{fromAccount:\"From_Account\",toAccount:\"To_Account\",from:\"From_Account\",to:\"To_Account\",time:\"MsgTimeStamp\",sequence:\"MsgSeq\",random:\"MsgRandom\",elements:\"MsgBody\"},response:{MsgList:\"messageList\",SyncFlag:\"syncFlag\",To_Account:\"to\",From_Account:\"from\",ClientSeq:\"clientSequence\",MsgSeq:\"sequence\",NoticeSeq:\"noticeSequence\",NotifySeq:\"notifySequence\",MsgRandom:\"random\",MsgTimeStamp:\"time\",MsgContent:\"content\",ToGroupId:\"groupID\",MsgKey:\"messageKey\",GroupTips:\"groupTips\",MsgBody:\"elements\",MsgType:\"type\",C2CRemainingUnreadCount:\"C2CRemainingUnreadList\"}}},update:null,delete:null}}(this.tim),this.config.AVChatRoom=function(e){var t=At.NAME.BIG_GROUP_LONG_POLLING_NO_AUTH,n={websdkappid:Tt,v:Et,platform:St,sdkappid:e.loginInfo.SDKAppID,accounttype:\"792\",apn:1,reqtime:function(){return+new Date}};return(e.context.login===Le||e.context.a2Key)&&(t=At.NAME.BIG_GROUP_LONG_POLLING,n.apn=e.context.apn,n.a2=e.context.a2Key,n.tinyid=e.context.tinyID),{startLongPoll:{serverName:t,cmd:At.CMD.AVCHATROOM_LONG_POLL,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:n,requestData:{USP:1,startSeq:1,holdTime:90,key:void 0},keyMaps:{request:{USP:\"USP\"},response:{ToGroupId:\"groupID\",MsgPriority:\"priority\"}}}}}(this.tim),this.config.cosUpload=function(e){var t={platform:St,websdkappid:Tt,v:Et,a2:null!==e.context?e.context.a2Key:\"\",tinyid:null!==e.context?e.context.tinyID:0,sdkappid:null!==e.context?e.context.SDKAppID:0,contentType:null!==e.context?e.context.contentType:0,apn:null!==e.context?e.context.apn:1,reqtime:function(){return Date.now()}};return{create:{serverName:At.NAME.OPEN_IM,cmd:At.CMD.FILE_UPLOAD,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{appVersion:\"2.1\",fromAccount:\"\",toAccount:\"\",sequence:0,time:function(){return Math.ceil(Date.now()/1e3)},random:function(){return de()},fileStrMd5:\"\",fileSize:\"\",serverVer:1,authKey:\"\",busiId:1,pkgFlag:1,sliceOffset:0,sliceSize:0,sliceData:\"\",contentType:\"application/x-www-form-urlencoded\"},keyMaps:{request:{},response:{}}},update:null,delete:null}}(this.tim),this.config.cosSig=function(e){var t={sdkappid:function(){return e.loginInfo.SDKAppID},identifier:function(){return e.loginInfo.identifier},userSig:function(){return e.context.userSig}};return{create:null,query:{serverName:At.NAME.IM_COS_SIGN,cmd:At.CMD.COS_SIGN,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:t,requestData:{cmd:\"open_im_cos_svc\",subCmd:\"get_cos_token\",duration:300,version:2},keyMaps:{request:{userSig:\"usersig\",subCmd:\"sub_cmd\",cmd:\"cmd\",duration:\"duration\",version:\"version\"},response:{expired_time:\"expiredTime\",bucket_name:\"bucketName\",session_token:\"sessionToken\",tmp_secret_id:\"secretId\",tmp_secret_key:\"secretKey\"}}},update:null,delete:null}}(this.tim),this.config.bigDataHallwayAuthKey=function(e){return{create:null,query:{serverName:At.NAME.OPEN_IM,cmd:At.CMD.BIG_DATA_HALLWAY_AUTH_KEY,channel:At.CHANNEL.XHR,protocol:kt,method:\"POST\",queryString:{websdkappid:Tt,v:Et,platform:St,sdkappid:e.loginInfo.SDKAppID,accounttype:\"792\",apn:null!==e.context?e.context.apn:1,reqtime:function(){return+new Date}},requestData:{}}}}(this.tim),this.config.ssoEventStat=function(e){var t={sdkappid:e.loginInfo.SDKAppID,reqtime:Math.ceil(+new Date/1e3)};return{create:{serverName:At.NAME.IM_OPEN_STAT,cmd:At.CMD.TIM_WEB_REPORT,channel:At.CHANNEL.AUTO,protocol:kt,queryString:t,requestData:{table:\"\",report:[]},keyMaps:{request:{table:\"table\",report:\"report\",SDKAppID:\"sdkappid\",version:\"version\",tinyID:\"tinyid\",userID:\"userid\",platform:\"platform\",method:\"method\",time:\"time\",start:\"start\",end:\"end\",cost:\"cost\",status:\"status\",codeint:\"codeint\",message:\"message\",pointer:\"pointer\",text:\"text\",msgType:\"msgtype\",networkType:\"networktype\",startts:\"startts\",endts:\"endts\",timespan:\"timespan\"}}},query:{},update:{},delete:{}}}(this.tim),this.config.ssoSumStat=function(e){var t=null;return null!==e.context&&(t={sdkappid:e.context.SDKAppID,reqtime:Math.ceil(+new Date/1e3)}),{create:{serverName:At.NAME.IM_OPEN_STAT,cmd:At.CMD.TIM_WEB_REPORT,channel:At.CHANNEL.AUTO,protocol:kt,queryString:t,requestData:{table:\"\",report:[]},keyMaps:{request:{table:\"table\",report:\"report\",SDKAppID:\"sdkappid\",version:\"version\",tinyID:\"tinyid\",userID:\"userid\",item:\"item\",lpID:\"lpid\",platform:\"platform\",scene:\"scene\",networkType:\"networktype\",total:\"total\",successRate:\"successrate\",avg:\"avg\",timespan:\"timespan\",time:\"time\"}}},query:{},update:{},delete:{}}}(this.tim)}},{key:\"_initRequestData\",value:function(e,t){if(void 0===e)return Cn(t.requestData,this._getRequestMap(t),this.tim);var n=t.requestData,o=Object.create(null);for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){if(o[r]=\"function\"==typeof n[r]?n[r]():n[r],void 0===e[r])continue;o[r]=e[r]}return Cn(o,this._getRequestMap(t),this.tim)}},{key:\"_getRequestMap\",value:function(e){if(e.keyMaps&&e.keyMaps.request&&Object.keys(e.keyMaps.request).length>0)return e.keyMaps.request}},{key:\"_initEncoder\",value:function(e){switch(e.protocol){case kt:return function(e){if(\"string\"===o(e))try{return JSON.parse(e)}catch(t){return e}return e};case Dt:return function(e){return e};default:return function(e){return W.warn(\"PackageConfig._initEncoder(), unknow response type, data: \",JSON.stringify(e)),e}}}},{key:\"_initDecoder\",value:function(e){switch(e.protocol){case kt:return function(e){if(\"string\"===o(e))try{return JSON.parse(e)}catch(t){return e}return e};case Dt:return function(e){return e};default:return function(e){return W.warn(\"PackageConfig._initDecoder(), unknow response type, data: \",e),e}}}}]),e}(),$i=function(){for(var e=[],t=Wi(arguments),n=0;n<arguments.length;n++)Number.isInteger(arguments[n])?e.push(arguments[n]):e.push(1==!!arguments[n]?\"1\":\"0\");return e.join(t)},Wi=function(e){var t=e.length,n=e[t-1];if(\"string\"!=typeof n)return\"\";if(n.length>1)return\"\";var o=e[t-1];return delete e[t-1],e.length-=t===e.length?1:0,o},zi={C2CMessageArray:1,groupMessageArray:1,groupTips:1,C2CNotifyMessageArray:1,profileModify:1,friendListMod:1},Ji=function(e){l(n,e);var t=v(n);function n(e){var o;return r(this,n),(o=t.call(this,e))._initialization(),o}return s(n,[{key:\"_initialization\",value:function(){this._syncOffset=\"\",this._syncNoticeList=[],this._syncEventArray=[],this._syncMessagesIsRunning=!1,this._syncMessagesFinished=!1,this._isLongPoll=!1,this._longPollID=0,this._noticeSequence=0,this._initializeListener(),this._runLoop=null,this._initShuntChannels()}},{key:\"_initShuntChannels\",value:function(){this._shuntChannels=Object.create(null),this._shuntChannels.C2CMessageArray=this._C2CMessageArrayChannel.bind(this),this._shuntChannels.groupMessageArray=this._groupMessageArrayChannel.bind(this),this._shuntChannels.groupTips=this._groupTipsChannel.bind(this),this._shuntChannels.C2CNotifyMessageArray=this._C2CNotifyMessageArrayChannel.bind(this),this._shuntChannels.profileModify=this._profileModifyChannel.bind(this),this._shuntChannels.friendListMod=this._friendListModChannel.bind(this)}},{key:\"_C2CMessageArrayChannel\",value:function(e,t,n){this.emitInnerEvent(Wt,t)}},{key:\"_groupMessageArrayChannel\",value:function(e,t,n){this.emitInnerEvent(zt,t)}},{key:\"_groupTipsChannel\",value:function(e,t,n){var o=this;switch(e){case 4:case 6:this.emitInnerEvent(Jt,t);break;case 5:t.forEach((function(e){ee(e.elements.revokedInfos)?o.emitInnerEvent(en,t):o.emitInnerEvent(Xt,{groupSystemNotices:t,type:n})}));break;default:W.log(\"NotificationController._groupTipsChannel unknown event=\".concat(e,\" type=\").concat(n),t)}}},{key:\"_C2CNotifyMessageArrayChannel\",value:function(e,t,n){if(t[0]){var o=t[0];o.hasOwnProperty(\"kickoutMsgNotify\")?this.emitInnerEvent($t):o.hasOwnProperty(\"sysCmdMsgNotify\")?this.emitInnerEvent(\"_longPollNoticeReceiveSystemOrders\"):o.hasOwnProperty(\"c2cMessageRevokedNotify\")?this.emitInnerEvent(tn,t):o.hasOwnProperty(\"c2cMessageReadReceipt\")&&this.emitInnerEvent(nn,t)}}},{key:\"_profileModifyChannel\",value:function(e,t,n){this.emitInnerEvent(Zt,t)}},{key:\"_friendListModChannel\",value:function(e,t,n){this.emitInnerEvent(Qt,t)}},{key:\"_dispatchNotice\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"poll\";if(ee(e))for(var n=null,o=null,r=\"\",i=\"\",s=\"\",a=0,u=0,c=e.length;u<c;u++)a=(n=e[u]).event,r=Object.keys(n).find((function(e){return void 0!==zi[e]})),oe(this._shuntChannels[r])?(o=n[r],\"poll\"===t&&this._updatenoticeSequence(o),this._shuntChannels[r](a,o,t)):(\"poll\"===t&&this._updatenoticeSequence(),i=\"\".concat(ot.NOTICE_RUNLOOP_UNEXPECTED_CONDITION),s=\"\".concat(lt,\": \").concat(a,\", \").concat(r),this.emitInnerEvent(pn,new nt({code:i,message:s,data:{payloadName:r,event:a}})),i=\"\",s=\"\")}},{key:\"getLongPollID\",value:function(){return this._longPollID}},{key:\"_IAmReady\",value:function(){this.triggerReady()}},{key:\"reset\",value:function(){this._noticeSequence=0,this._resetSync(),this.closeNoticeChannel()}},{key:\"_resetSync\",value:function(){this._syncOffset=\"\",this._syncNoticeList=[],this._syncEventArray=[],this._syncMessagesIsRunning=!1,this._syncMessagesFinished=!1}},{key:\"_setNoticeSeqInRequestData\",value:function(e){e.Cookie.NoticeSeq=this._noticeSequence,this.tim.sumStatController.addTotalCount(Ln)}},{key:\"_updatenoticeSequence\",value:function(e){if(e){var t=e[e.length-1].noticeSequence;t&&\"number\"==typeof t?t<=this._noticeSequence||(this._noticeSequence=t):this._noticeSequence++}else this._noticeSequence++}},{key:\"_initializeListener\",value:function(){var e=this.tim.innerEmitter;e.on(Ot,this._startSyncMessages,this),e.on(cn,this.closeNoticeChannel,this)}},{key:\"openNoticeChannel\",value:function(){W.log(\"NotificationController.openNoticeChannel\"),this._getLongPollID()}},{key:\"closeNoticeChannel\",value:function(){W.log(\"NotificationController.closeNoticeChannel\"),(this._runLoop instanceof ci||this._runLoop instanceof li)&&(this._runLoop.abort(),this._runLoop.stop()),this._longPollID=0,this._isLongPoll=!1}},{key:\"_getLongPollID\",value:function(){var e=this;if(0===this._longPollID){var t=new Bn;t.setMethod(\"getLongPollID\").setStart(),this.request({name:\"longPollID\",action:\"query\"}).then((function(n){var o=n.data.longPollingID;e._onGetLongPollIDSuccess(o),t.setCode(0).setText(\"longPollingID=\".concat(o)).setNetworkType(e.getNetworkType()).setEnd()})).catch((function(n){var o=new nt({code:n.code||ot.GET_LONGPOLL_ID_FAILED,message:n.message||\"获取 longpolling id 失败\"});e.emitInnerEvent(Ht),e.emitInnerEvent(pn,o),e.probeNetwork().then((function(e){var n=y(e,2),r=n[0],i=n[1];t.setError(o,r,i).setEnd()}))}))}else this._onGetLongPollIDSuccess(this._longPollID)}},{key:\"_onGetLongPollIDSuccess\",value:function(e){this.emitInnerEvent(Lt,[{key:\"long_poll_logout.query.requestData.longPollingID\",value:e},{key:\"longPoll.query.requestData.cookie.longPollingID\",value:e}]),this._longPollID=e,this._startLongPoll(),this._IAmReady(),this.tim.sumStatController.recordLongPollingID(this._longPollID)}},{key:\"_startLongPoll\",value:function(){if(!0!==this._isLongPoll){W.log(\"NotificationController._startLongPoll...\");var e=this.tim.connectionController,t=this.createTransportCapsule({name:\"longPoll\",action:\"query\"});this._isLongPoll=!0,this._runLoop=e.createRunLoop({pack:t,before:this._setNoticeSeqInRequestData.bind(this),success:this._onNoticeReceived.bind(this),fail:this._onNoticeFail.bind(this)}),this._runLoop.start()}else W.log(\"NotificationController._startLongPoll is running...\")}},{key:\"_onNoticeReceived\",value:function(e){var t=e.data;if(t.errorCode!==Oe){var n=new Bn;n.setMethod(Wn).setStart(),n.setMessage(t.errorInfo||JSON.stringify(t)).setCode(t.errorCode).setNetworkType(this.getNetworkType()).setEnd(!0),this._onResponseError(t)}else this.emitInnerEvent(jt);this.tim.sumStatController.addSuccessCount(Ln),this.tim.sumStatController.addCost(Ln,t.timecost),e.data.eventArray&&this._dispatchNotice(e.data.eventArray)}},{key:\"_onResponseError\",value:function(e){switch(e.errorCode){case ot.LONG_POLL_KICK_OUT:W.warn(\"NotificationController._onResponseError, longPollingID=\".concat(this._longPollID,\" was kicked out\")),this.emitInnerEvent(Yt),this.closeNoticeChannel();break;case ot.MESSAGE_A2KEY_EXPIRED:case ot.ACCOUNT_A2KEY_EXPIRED:this.emitInnerEvent(ln);break;default:te(e.errorCode)||te(e.errorInfo)?W.log(\"NotificationController._onResponseError, errorCode or errorInfo undefined!\",e):this.emitInnerEvent(pn,new nt({code:e.errorCode,message:e.errorInfo}))}}},{key:\"_onNoticeFail\",value:function(e){if(e.error)if(\"ECONNABORTED\"===e.error.code||e.error.code===ot.NETWORK_TIMEOUT)if(e.error.config){var t=e.error.config.url,n=e.error.config.data;W.log(\"NotificationController._onNoticeFail request timed out. url=\".concat(t,\" data=\").concat(n))}else W.log(\"NotificationController._onNoticeFail request timed out.\");else W.log(\"NotificationController._onNoticeFail request failed due to network error\");this.emitInnerEvent(Bt)}},{key:\"_startSyncMessages\",value:function(e){!0!==this._syncMessagesFinished&&this.syncMessage()}},{key:\"syncMessage\",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._syncMessagesIsRunning=!0,this.request({name:\"syncMessage\",action:\"query\",param:{cookie:t,syncFlag:n}}).then((function(t){var n=t.data;switch($i(n.cookie,n.syncFlag)){case\"00\":case\"01\":e.emitInnerEvent(pn,{code:ot.NOTICE_RUNLOOP_OFFSET_LOST,message:pt});break;case\"10\":case\"11\":n.eventArray&&e._dispatchNotice(n.eventArray,\"sync\"),e._syncNoticeList=e._syncNoticeList.concat(n.messageList),e.emitInnerEvent(bt,{data:n.messageList,C2CRemainingUnreadList:n.C2CRemainingUnreadList}),e._syncOffset=n.cookie,e.syncMessage(n.cookie,n.syncFlag);break;case\"12\":n.eventArray&&e._dispatchNotice(n.eventArray,\"sync\"),e.openNoticeChannel(),e._syncNoticeList=e._syncNoticeList.concat(n.messageList),e.emitInnerEvent(Pt,{messageList:n.messageList,C2CRemainingUnreadList:n.C2CRemainingUnreadList}),e._syncOffset=n.cookie,e._syncNoticeList=[],e._syncMessagesIsRunning=!1,e._syncMessagesFinished=!0}})).catch((function(t){e._syncMessagesIsRunning=!1,W.error(\"NotificationController.syncMessage failed. error:\",t)}))}}]),n}(Sn),Xi=function(e){l(n,e);var t=v(n);function n(e){var o;return r(this,n),(o=t.call(this,e)).COSSDK=null,o._cosUploadMethod=null,o.expiredTimeLimit=300,o.appid=0,o.bucketName=\"\",o.ciUrl=\"\",o.directory=\"\",o.downloadUrl=\"\",o.uploadUrl=\"\",o.expiredTimeOut=o.expiredTimeLimit,o.region=\"ap-shanghai\",o.cos=null,o.cosOptions={secretId:\"\",secretKey:\"\",sessionToken:\"\",expiredTime:0},o._timer=0,o.tim.innerEmitter.on(Ot,o._init,m(o)),o.triggerReady(),o}return s(n,[{key:\"_expiredTimer\",value:function(){var e=this;this._timer=setInterval((function(){Math.ceil(Date.now()/1e3)>=e.cosOptions.expiredTime-60&&(e._getAuthorizationKey(),clearInterval(e._timer))}),3e4)}},{key:\"_init\",value:function(){var e=O?\"cos-wx-sdk\":\"cos-js-sdk\";this.COSSDK=this.tim.getPlugin(e),this.COSSDK?this._getAuthorizationKey():W.warn(\"UploadController._init 没有检测到上传插件，将无法发送图片、音频、视频、文件等类型的消息。详细请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#registerPlugin\")}},{key:\"_getAuthorizationKey\",value:function(){var e=this,t=Math.ceil(Date.now()/1e3),n=new Bn;n.setMethod(\"getCosAuthKey\").setStart(),this.request({name:\"cosSig\",action:\"query\",param:{duration:this.expiredTimeLimit}}).then((function(o){W.log(\"UploadController._getAuthorizationKey ok. data:\",o.data);var r=o.data,i=r.expiredTime-t;n.setCode(0).setText(\"timeout=\".concat(i,\"s\")).setNetworkType(e.getNetworkType()).setEnd(),e.appid=r.appid,e.bucketName=r.bucketName,e.ciUrl=r.ciUrl,e.directory=r.directory,e.downloadUrl=r.downloadUrl,e.uploadUrl=r.uploadUrl,e.expiredTimeOut=i,e.cosOptions={secretId:r.secretId,secretKey:r.secretKey,sessionToken:r.sessionToken,expiredTime:r.expiredTime},e._initUploaderMethod(),e._expiredTimer()})).catch((function(t){e.probeNetwork().then((function(n){var o=y(n,2),r=o[0],i=o[1];e.setError(t,r,i).setEnd()})),W.warn(\"UploadController._getAuthorizationKey failed. error:\",t)}))}},{key:\"_initUploaderMethod\",value:function(){var e=this;this.appid&&(this.cos=O?new this.COSSDK({ForcePathStyle:!0,getAuthorization:this._getAuthorization.bind(this)}):new this.COSSDK({getAuthorization:this._getAuthorization.bind(this)}),this._cosUploadMethod=O?function(t,n){e.cos.postObject(t,n)}:function(t,n){e.cos.uploadFiles(t,n)})}},{key:\"_getAuthorization\",value:function(e,t){t({TmpSecretId:this.cosOptions.secretId,TmpSecretKey:this.cosOptions.secretKey,XCosSecurityToken:this.cosOptions.sessionToken,ExpiredTime:this.cosOptions.expiredTime})}},{key:\"uploadImage\",value:function(e){if(!e.file)return wn(new nt({code:ot.MESSAGE_IMAGE_SELECT_FILE_FIRST,message:\"请先选择一个图片\"}));var t=this._checkImageType(e.file);if(!0!==t)return t;var n=this._checkImageMime(e.file);if(!0!==n)return n;var o=this._checkImageSize(e.file);return!0!==o?o:this.upload(e)}},{key:\"_checkImageType\",value:function(e){var t=\"\";return t=O?e.url.slice(e.url.lastIndexOf(\".\")+1):e.files[0].name.slice(e.files[0].name.lastIndexOf(\".\")+1),ht.indexOf(t.toLowerCase())>=0||wn(new nt({coe:ot.MESSAGE_IMAGE_TYPES_LIMIT,message:\"只允许上传 jpg png jpeg gif 格式的图片\"}))}},{key:\"_checkImageMime\",value:function(e){return!0}},{key:\"_checkImageSize\",value:function(e){var t;return 0===(t=O?e.size:e.files[0].size)?wn(new nt({code:ot.MESSAGE_FILE_IS_EMPTY,message:\"\".concat(it)})):t<20971520||wn(new nt({coe:ot.MESSAGE_IMAGE_SIZE_LIMIT,message:\"\".concat(\"图片大小超过20M，无法发送\")}))}},{key:\"uploadFile\",value:function(e){var t=null;return e.file?e.file.files[0].size>104857600?(t=new nt({code:ot.MESSAGE_FILE_SIZE_LIMIT,message:at}),wn(t)):0===e.file.files[0].size?(t=new nt({code:ot.MESSAGE_FILE_IS_EMPTY,message:\"\".concat(it)}),wn(t)):this.upload(e):(t=new nt({code:ot.MESSAGE_FILE_SELECT_FILE_FIRST,message:\"请先选择一个文件\"}),wn(t))}},{key:\"uploadVideo\",value:function(e){return e.file.videoFile.size>104857600?wn(new nt({code:ot.MESSAGE_VIDEO_SIZE_LIMIT,message:\"\".concat(\"视频大小超过100M，无法发送\")})):0===e.file.videoFile.size?wn(new nt({code:ot.MESSAGE_FILE_IS_EMPTY,message:\"\".concat(it)})):-1===dt.indexOf(e.file.videoFile.type)?wn(new nt({code:ot.MESSAGE_VIDEO_TYPES_LIMIT,message:\"\".concat(\"只允许上传 mp4 格式的视频\")})):O?this.handleVideoUpload({file:e.file.videoFile}):w?this.handleVideoUpload(e):void 0}},{key:\"handleVideoUpload\",value:function(e){var t=this;return new Promise((function(n,o){t.upload(e).then((function(e){n(e)})).catch((function(){t.upload(e).then((function(e){n(e)})).catch((function(){o(new nt({code:ot.MESSAGE_VIDEO_UPLOAD_FAIL,message:\"视频上传失败\"}))}))}))}))}},{key:\"uploadAudio\",value:function(e){return e.file?e.file.size>20971520?wn(new nt({code:ot.MESSAGE_AUDIO_SIZE_LIMIT,message:\"\".concat(\"语音大小大于20M，无法发送\")})):0===e.file.size?wn(new nt({code:ot.MESSAGE_FILE_IS_EMPTY,message:\"\".concat(it)})):this.upload(e):wn(new nt({code:ot.MESSAGE_AUDIO_UPLOAD_FAIL,message:\"语音上传失败\"}))}},{key:\"upload\",value:function(e){var t=this;if(!oe(this._cosUploadMethod))return W.warn(\"UploadController.upload 没有检测到上传插件，将无法发送图片、音频、视频、文件等类型的消息。详细请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html#registerPlugin\"),wn(new nt({code:ot.COS_UNDETECTED,message:\"未检测到 COS 上传插件\"}));var n=new Bn;n.setMethod(\"upload\").setStart(),W.time(\"upload\");var o=O?e.file:e.file.files[0];return new Promise((function(r,i){var s=O?t._createCosOptionsWXMiniApp(e):t._createCosOptionsWeb(e),a=t;t._cosUploadMethod(s,(function(e,s){var u=Object.create(null);if(s){if(e||ee(s.files)&&s.files[0].error){var c=new nt({code:ot.MESSAGE_FILE_UPLOAD_FAIL,message:\"文件上传失败\"});return n.setError(c,!0,t.getNetworkType()).setEnd(),W.log(\"UploadController.upload failed, error:\",s.files[0].error),403===s.files[0].error.statusCode&&(W.warn(\"UploadController.upload failed. cos AccessKeyId was invalid, regain auth key!\"),t._getAuthorizationKey()),void i(c)}u.fileName=o.name,u.fileSize=o.size,u.fileType=o.type.slice(o.type.indexOf(\"/\")+1).toLowerCase(),u.location=O?s.Location:s.files[0].data.Location;var l=W.timeEnd(\"upload\"),p=a._formatFileSize(o.size),h=a._formatSpeed(1e3*o.size/l),d=\"size=\".concat(p,\",time=\").concat(l,\"ms,speed=\").concat(h);return W.log(\"UploadController.upload success name=\".concat(o.name,\",\").concat(d)),r(u),void n.setCode(0).setNetworkType(t.getNetworkType()).setText(d).setEnd()}var f=new nt({code:ot.MESSAGE_FILE_UPLOAD_FAIL,message:\"文件上传失败\"});n.setError(f,!0,a.getNetworkType()).setEnd(),W.warn(\"UploadController.upload failed, error:\",e),403===e.statusCode&&(W.warn(\"UploadController.upload failed. cos AccessKeyId was invalid, regain auth key!\"),t._getAuthorizationKey()),i(f)}))}))}},{key:\"_formatFileSize\",value:function(e){return e<1024?e+\"B\":e<1048576?Math.floor(e/1024)+\"KB\":Math.floor(e/1048576)+\"MB\"}},{key:\"_formatSpeed\",value:function(e){return e<=1048576?(e/1024).toFixed(1)+\"KB/s\":(e/1048576).toFixed(1)+\"MB/s\"}},{key:\"_createCosOptionsWeb\",value:function(e){var t=this.tim.context.identifier,n=this._genFileName(t,e.to,e.file.files[0].name);return{files:[{Bucket:\"\".concat(this.bucketName,\"-\").concat(this.appid),Region:this.region,Key:\"\".concat(this.directory,\"/\").concat(n),Body:e.file.files[0]}],SliceSize:1048576,onProgress:function(t){if(\"function\"==typeof e.onProgress)try{e.onProgress(t.percent)}catch(e){W.warn(\"onProgress callback error:\",e),W.error(e)}},onFileFinish:function(e,t,n){}}}},{key:\"_createCosOptionsWXMiniApp\",value:function(e){var t=this.tim.context.identifier,n=this._genFileName(t,e.to,e.file.name),o=e.file.url;return{Bucket:\"\".concat(this.bucketName,\"-\").concat(this.appid),Region:this.region,Key:\"\".concat(this.directory,\"/\").concat(n),FilePath:o,onProgress:function(t){if(W.log(JSON.stringify(t)),\"function\"==typeof e.onProgress)try{e.onProgress(t.percent)}catch(e){W.warn(\"onProgress callback error:\",e),W.error(e)}}}}},{key:\"_genFileName\",value:function(e,t,n){return\"\".concat(e,\"-\").concat(t,\"-\").concat(de(99999),\"-\").concat(n)}},{key:\"reset\",value:function(){this._timer&&(clearInterval(this._timer),this._timer=0)}}]),n}(Sn),Qi=function(e){l(o,e);var t=v(o);function o(e){var n;return r(this,o),(n=t.call(this,e)).FILETYPE={SOUND:2106,FILE:2107,VIDEO:2113},n._bdh_download_server=\"grouptalk.c2c.qq.com\",n._BDHBizID=10001,n._authKey=\"\",n._expireTime=0,n.tim.innerEmitter.on(Ot,n._getAuthKey,m(n)),n}return s(o,[{key:\"_getAuthKey\",value:function(){var e=this;this.request({name:\"bigDataHallwayAuthKey\",action:\"query\"}).then((function(t){t.data.authKey&&(e._authKey=t.data.authKey,e._expireTime=parseInt(t.data.expireTime))}))}},{key:\"_isFromOlderVersion\",value:function(e){return 2!==e.content.downloadFlag}},{key:\"parseElements\",value:function(e,t){if(!ee(e)||!t)return[];for(var n=[],o=null,r=0;r<e.length;r++)o=e[r],this._needParse(o)?n.push(this._parseElement(o,t)):n.push(e[r]);return n}},{key:\"_needParse\",value:function(e){return!(!this._isFromOlderVersion(e)||e.type!==n.MSG_AUDIO&&e.type!==n.MSG_FILE&&e.type!==n.MSG_VIDEO)}},{key:\"_parseElement\",value:function(e,t){switch(e.type){case n.MSG_AUDIO:return this._parseAudioElement(e,t);case n.MSG_FILE:return this._parseFileElement(e,t);case n.MSG_VIDEO:return this._parseVideoElement(e,t)}}},{key:\"_parseAudioElement\",value:function(e,t){return e.content.url=this._genAudioUrl(e.content.uuid,t),e}},{key:\"_parseFileElement\",value:function(e,t){return e.content.url=this._genFileUrl(e.content.uuid,t,e.content.fileName),e}},{key:\"_parseVideoElement\",value:function(e,t){return e.content.url=this._genVideoUrl(e.content.uuid,t),e}},{key:\"_genAudioUrl\",value:function(e,t){return\"\"===this._authKey?(W.warn(\"BigDataHallwayController._genAudioUrl no authKey!\"),\"\"):\"https://\".concat(this._bdh_download_server,\"/asn.com/stddownload_common_file?authkey=\").concat(this._authKey,\"&bid=\").concat(this._BDHBizID,\"&subbid=\").concat(this.tim.context.SDKAppID,\"&fileid=\").concat(e,\"&filetype=\").concat(this.FILETYPE.SOUND,\"&openid=\").concat(t,\"&ver=0\")}},{key:\"_genFileUrl\",value:function(e,t,n){return\"\"===this._authKey?(W.warn(\"BigDataHallwayController._genFileUrl no authKey!\"),\"\"):(n||(n=\"\".concat(Math.floor(1e5*Math.random()),\"-\").concat(Date.now())),\"https://\".concat(this._bdh_download_server,\"/asn.com/stddownload_common_file?authkey=\").concat(this._authKey,\"&bid=\").concat(this._BDHBizID,\"&subbid=\").concat(this.tim.context.SDKAppID,\"&fileid=\").concat(e,\"&filetype=\").concat(this.FILETYPE.FILE,\"&openid=\").concat(t,\"&ver=0&filename=\").concat(encodeURIComponent(n)))}},{key:\"_genVideoUrl\",value:function(e,t){return\"\"===this._authKey?(W.warn(\"BigDataHallwayController._genVideoUrl no authKey!\"),\"\"):\"https://\".concat(this._bdh_download_server,\"/asn.com/stddownload_common_file?authkey=\").concat(this._authKey,\"&bid=\").concat(this._BDHBizID,\"&subbid=\").concat(this.tim.context.SDKAppID,\"&fileid=\").concat(e,\"&filetype=\").concat(this.FILETYPE.VIDEO,\"&openid=\").concat(t,\"&ver=0\")}},{key:\"reset\",value:function(){this._authKey=\"\",this.expireTime=0}}]),o}(Sn),Zi={app_id:\"\",event_id:\"\",api_base:\"https://pingtas.qq.com/pingd\",prefix:\"_mta_\",version:\"1.3.9\",stat_share_app:!1,stat_pull_down_fresh:!1,stat_reach_bottom:!1,stat_param:!0};function es(){try{var e=\"s\"+ts();return wx.setStorageSync(Zi.prefix+\"ssid\",e),e}catch(e){}}function ts(e){for(var t=[0,1,2,3,4,5,6,7,8,9],n=10;1<n;n--){var o=Math.floor(10*Math.random()),r=t[o];t[o]=t[n-1],t[n-1]=r}for(n=o=0;5>n;n++)o=10*o+t[n];return(e||\"\")+(o+\"\")+ +new Date}function ns(){try{var e=getCurrentPages(),t=\"/\";return 0<e.length&&(t=e.pop().__route__),t}catch(e){console.log(\"get current page path error:\"+e)}}function os(){var e,t={dm:\"wechat.apps.xx\",url:encodeURIComponent(ns()+ss(as.Data.pageQuery)),pvi:\"\",si:\"\",ty:0};return t.pvi=((e=function(){try{return wx.getStorageSync(Zi.prefix+\"auid\")}catch(e){}}())||(e=function(){try{var e=ts();return wx.setStorageSync(Zi.prefix+\"auid\",e),e}catch(e){}}(),t.ty=1),e),t.si=function(){var e=function(){try{return wx.getStorageSync(Zi.prefix+\"ssid\")}catch(e){}}();return e||(e=es()),e}(),t}function rs(){var e=function(){var e=wx.getSystemInfoSync();return{adt:encodeURIComponent(e.model),scl:e.pixelRatio,scr:e.windowWidth+\"x\"+e.windowHeight,lg:e.language,fl:e.version,jv:encodeURIComponent(e.system),tz:encodeURIComponent(e.platform)}}();return wx.getNetworkType({success:function(e){!function(e){try{wx.setStorageSync(Zi.prefix+\"ntdata\",e)}catch(e){}}(e.networkType)}}),e.ct=wx.getStorageSync(Zi.prefix+\"ntdata\")||\"4g\",e}function is(){var e,t=as.Data.userInfo,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(e+\"=\"+t[e]);return t=n.join(\";\"),{r2:Zi.app_id,r4:\"wx\",ext:\"v=\"+Zi.version+(null!==t&&\"\"!==t?\";ui=\"+encodeURIComponent(t):\"\")}}function ss(e){if(!Zi.stat_param||!e)return\"\";e=function(e){if(1>Zi.ignore_params.length)return e;var t,n={};for(t in e)0<=Zi.ignore_params.indexOf(t)||(n[t]=e[t]);return n}(e);var t,n=[];for(t in e)n.push(t+\"=\"+e[t]);return 0<n.length?\"?\"+n.join(\"&\"):\"\"}var as={App:{init:function(e){\"appID\"in e&&(Zi.app_id=e.appID),\"eventID\"in e&&(Zi.event_id=e.eventID),\"statShareApp\"in e&&(Zi.stat_share_app=e.statShareApp),\"statPullDownFresh\"in e&&(Zi.stat_pull_down_fresh=e.statPullDownFresh),\"statReachBottom\"in e&&(Zi.stat_reach_bottom=e.statReachBottom),\"ignoreParams\"in e&&(Zi.ignore_params=e.ignoreParams),\"statParam\"in e&&(Zi.stat_param=e.statParam),es();try{\"lauchOpts\"in e&&(as.Data.lanchInfo=e.lauchOpts,as.Data.lanchInfo.landing=1)}catch(e){}\"autoReport\"in e&&e.autoReport&&function(){var e=Page;Page=function(t){var n=t.onLoad;t.onLoad=function(e){n&&n.call(this,e),as.Data.lastPageQuery=as.Data.pageQuery,as.Data.pageQuery=e,as.Data.lastPageUrl=as.Data.pageUrl,as.Data.pageUrl=ns(),as.Data.show=!1,as.Page.init()},e(t)}}()}},Page:{init:function(){var e,t=getCurrentPages()[getCurrentPages().length-1];t.onShow&&(e=t.onShow,t.onShow=function(){if(!0===as.Data.show){var t=as.Data.lastPageQuery;as.Data.lastPageQuery=as.Data.pageQuery,as.Data.pageQuery=t,as.Data.lastPageUrl=as.Data.pageUrl,as.Data.pageUrl=ns()}as.Data.show=!0,as.Page.stat(),e.apply(this,arguments)}),Zi.stat_pull_down_fresh&&t.onPullDownRefresh&&function(){var e=t.onPullDownRefresh;t.onPullDownRefresh=function(){as.Event.stat(Zi.prefix+\"pulldownfresh\",{url:t.__route__}),e.apply(this,arguments)}}(),Zi.stat_reach_bottom&&t.onReachBottom&&function(){var e=t.onReachBottom;t.onReachBottom=function(){as.Event.stat(Zi.prefix+\"reachbottom\",{url:t.__route__}),e.apply(this,arguments)}}(),Zi.stat_share_app&&t.onShareAppMessage&&function(){var e=t.onShareAppMessage;t.onShareAppMessage=function(){return as.Event.stat(Zi.prefix+\"shareapp\",{url:t.__route__}),e.apply(this,arguments)}}()},multiStat:function(e,t){if(1==t)as.Page.stat(e);else{var n=getCurrentPages()[getCurrentPages().length-1];n.onShow&&function(){var t=n.onShow;n.onShow=function(){as.Page.stat(e),t.call(this,arguments)}}()}},stat:function(e){if(\"\"!=Zi.app_id){var t=[],n=is();if(e&&(n.r2=e),e=[os(),n,rs()],as.Data.lanchInfo){e.push({ht:as.Data.lanchInfo.scene}),as.Data.pageQuery&&as.Data.pageQuery._mta_ref_id&&e.push({rarg:as.Data.pageQuery._mta_ref_id});try{1==as.Data.lanchInfo.landing&&(n.ext+=\";lp=1\",as.Data.lanchInfo.landing=0)}catch(e){}}e.push({rdm:\"/\",rurl:0>=as.Data.lastPageUrl.length?as.Data.pageUrl+ss(as.Data.lastPageQuery):encodeURIComponent(as.Data.lastPageUrl+ss(as.Data.lastPageQuery))}),e.push({rand:+new Date}),n=0;for(var o=e.length;n<o;n++)for(var r in e[n])e[n].hasOwnProperty(r)&&t.push(r+\"=\"+(void 0===e[n][r]?\"\":e[n][r]));wx.request({url:Zi.api_base+\"?\"+t.join(\"&\").toLowerCase()})}}},Event:{stat:function(e,t){if(\"\"!=Zi.event_id){var n=[],o=os(),r=is();o.dm=\"wxapps.click\",o.url=e,r.r2=Zi.event_id;var i,s=void 0===t?{}:t,a=[];for(i in s)s.hasOwnProperty(i)&&a.push(encodeURIComponent(i)+\"=\"+encodeURIComponent(s[i]));for(s=a.join(\";\"),r.r5=s,s=0,r=(o=[o,r,rs(),{rand:+new Date}]).length;s<r;s++)for(var u in o[s])o[s].hasOwnProperty(u)&&n.push(u+\"=\"+(void 0===o[s][u]?\"\":o[s][u]));wx.request({url:Zi.api_base+\"?\"+n.join(\"&\").toLowerCase()})}}},Data:{userInfo:null,lanchInfo:null,pageQuery:null,lastPageQuery:null,pageUrl:\"\",lastPageUrl:\"\",show:!1}},us=as,cs=function(){function e(){r(this,e),this.cache=[],this.MtaWX=null,this._init()}return s(e,[{key:\"report\",value:function(e,t){var n=this;try{w?window.MtaH5?(window.MtaH5.clickStat(e,t),this.cache.length>0&&(this.cache.forEach((function(e){var t=e.name,n=e.param;window.MtaH5.clickStat(t,n)})),this.cache=[])):this.cache.push({name:e,param:t}):O&&(this.MtaWX?(this.MtaWX.Event.stat(e,t),this.cache.length>0&&(this.cache.forEach((function(e){var t=e.name,o=e.param;n.MtaWX.Event.stat(t,o)})),this.cache=[])):this.cache.push({name:e,param:t}))}catch(e){}}},{key:\"stat\",value:function(){try{w&&window.MtaH5?window.MtaH5.pgv():O&&this.MtaWX&&this.MtaWX.Page.stat()}catch(e){}}},{key:\"_init\",value:function(){try{if(w){window._mtac={autoReport:0};var e=document.createElement(\"script\"),t=ve();e.src=\"\".concat(t,\"//pingjs.qq.com/h5/stats.js?v2.0.4\"),e.setAttribute(\"name\",\"MTAH5\"),e.setAttribute(\"sid\",\"500690998\"),e.setAttribute(\"cid\",\"500691017\");var n=document.getElementsByTagName(\"script\")[0];n.parentNode.insertBefore(e,n)}else O&&(this.MtaWX=us,this.MtaWX.App.init({appID:\"500690995\",eventID:\"500691014\",autoReport:!1,statParam:!0}))}catch(e){}}}]),e}(),ls=function(e){l(n,e);var t=v(n);function n(e){var o;r(this,n),(o=t.call(this,e)).MTA=new cs;var i=o.tim.innerEmitter;return i.on(vn,o._stat,m(o)),i.on(_n,o._stat,m(o)),o}return s(n,[{key:\"_stat\",value:function(){this.MTA.report(\"sdkappid\",{value:this.tim.context.SDKAppID}),this.MTA.report(\"version\",{value:Ss.VERSION}),this.MTA.stat()}}]),n}(Sn),ps=function(){function e(t){r(this,e),this._table=\"timwebii\",this._report=[]}return s(e,[{key:\"pushIn\",value:function(e){W.debug(\"SSOLogBody.pushIn\",this._report.length,e),this._report.push(e)}},{key:\"backfill\",value:function(e){var t;ee(e)&&0!==e.length&&(W.debug(\"SSOLogBody.backfill\",this._report.length,e.length),(t=this._report).unshift.apply(t,I(e)))}},{key:\"getLogsNumInMemory\",value:function(){return this._report.length}},{key:\"isEmpty\",value:function(){return 0===this._report.length}},{key:\"_reset\",value:function(){this._report.length=0,this._report=[]}},{key:\"getTable\",value:function(){return this._table}},{key:\"getLogsInMemory\",value:function(){var e=this._report.slice();return this._reset(),e}}]),e}(),hs=function(e){l(n,e);var t=v(n);function n(e){var o;return r(this,n),(o=t.call(this,e)).TAG=\"im-ssolog-event\",o._reportBody=new ps,o._version=\"2.7.7\",o.MIN_THRESHOLD=20,o.MAX_THRESHOLD=100,o.WAITING_TIME=6e4,o.INTERVAL=2e4,o._timerID=0,o._resetLastReportTime(),o._startReportTimer(),o._retryCount=0,o.MAX_RETRY_COUNT=3,o.tim.innerEmitter.on(an,o._onLoginSuccess,m(o)),o}return s(n,[{key:\"reportAtOnce\",value:function(){W.debug(\"EventStatController.reportAtOnce\"),this._report()}},{key:\"_onLoginSuccess\",value:function(){var e=this,t=this.tim.storage,n=t.getItem(this.TAG,!1);ke(n)||(W.log(\"EventStatController._onLoginSuccess get ssolog in storage, nums=\"+n.length),n.forEach((function(t){e._reportBody.pushIn(t)})),t.removeItem(this.TAG,!1))}},{key:\"pushIn\",value:function(e){e instanceof Bn&&(e.setCommonInfo({SDKAppID:this.tim.context.SDKAppID,version:this._version,tinyID:this.tim.context.tinyID,userID:this.tim.loginInfo.identifier,platform:this.getPlatform(),scene:this.tim.context.scene}),this._reportBody.pushIn(e),this._reportBody.getLogsNumInMemory()>=this.MIN_THRESHOLD&&this._report())}},{key:\"_resetLastReportTime\",value:function(){this._lastReportTime=Date.now()}},{key:\"_startReportTimer\",value:function(){var e=this;this._timerID=setInterval((function(){Date.now()<e._lastReportTime+e.WAITING_TIME||e._reportBody.isEmpty()||e._report()}),this.INTERVAL)}},{key:\"_stopReportTimer\",value:function(){this._timerID>0&&(clearInterval(this._timerID),this._timerID=0)}},{key:\"_report\",value:function(){var e=this;if(!this._reportBody.isEmpty()){var t=this._reportBody.getLogsInMemory();this.request({name:\"ssoEventStat\",action:\"create\",param:{table:this._reportBody.getTable(),report:t}}).then((function(){e._resetLastReportTime(),e._retryCount>0&&(W.debug(\"EventStatController.report retry success\"),e._retryCount=0)})).catch((function(n){if(W.warn(\"EventStatController.report, networkType:\".concat(e.getNetworkType(),\" error:\").concat(le(n))),e._reportBody.backfill(t),e._reportBody.getLogsNumInMemory()>e.MAX_THRESHOLD||e._retryCount===e.MAX_RETRY_COUNT||0===e._timerID)return e._retryCount=0,void e._flushAtOnce();e._retryCount+=1}))}}},{key:\"_flushAtOnce\",value:function(){var e=this.tim.storage,t=e.getItem(this.TAG,!1),n=this._reportBody.getLogsInMemory();if(ke(t))W.log(\"EventStatController._flushAtOnce nums=\"+n.length),e.setItem(this.TAG,n,!0,!1);else{var o=n.concat(t);o.length>this.MAX_THRESHOLD&&(o=o.slice(0,this.MAX_THRESHOLD)),W.log(\"EventStatController._flushAtOnce nums=\"+o.length),e.setItem(this.TAG,o,!0,!1)}}},{key:\"reset\",value:function(){W.log(\"EventStatController.reset\"),this._stopReportTimer(),this._report()}}]),n}(Sn),ds=\"none\",fs=\"online\",gs=function(){function e(){r(this,e),this._networkType=\"\",this.maxWaitTime=3e3}return s(e,[{key:\"start\",value:function(){var e=this;O?(wx.getNetworkType({success:function(t){e._networkType=t.networkType,t.networkType===ds?W.warn(\"NetMonitor no network, please check!\"):W.info(\"NetMonitor networkType:\".concat(t.networkType))}}),wx.onNetworkStatusChange(this._onWxNetworkStatusChange.bind(this))):this._networkType=fs}},{key:\"_onWxNetworkStatusChange\",value:function(e){this._networkType=e.networkType,e.isConnected?W.info(\"NetMonitor networkType:\".concat(e.networkType)):W.warn(\"NetMonitor no network, please check!\")}},{key:\"probe\",value:function(){var e=this;return new Promise((function(t,n){if(O)wx.getNetworkType({success:function(n){e._networkType=n.networkType,n.networkType===ds?(W.warn(\"NetMonitor no network, please check!\"),t([!1,n.networkType])):(W.info(\"NetMonitor networkType:\".concat(n.networkType)),t([!0,n.networkType]))}});else if(window&&window.fetch)fetch(\"\".concat(ve(),\"//webim-1252463788.file.myqcloud.com/assets/test/speed.xml?random=\").concat(Math.random())).then((function(e){e.ok?t([!0,fs]):t([!1,ds])})).catch((function(e){t([!1,ds])}));else{var o=new XMLHttpRequest,r=setTimeout((function(){W.warn(\"NetMonitor fetch timeout. Probably no network, please check!\"),o.abort(),e._networkType=ds,t([!1,ds])}),e.maxWaitTime);o.onreadystatechange=function(){4===o.readyState&&(clearTimeout(r),200===o.status||304===o.status?(this._networkType=fs,t([!0,fs])):(W.warn(\"NetMonitor fetch status:\".concat(o.status,\". Probably no network, please check!\")),this._networkType=ds,t([!1,ds])))},o.open(\"GET\",\"\".concat(ve(),\"//webim-1252463788.file.myqcloud.com/assets/test/speed.xml?random=\").concat(Math.random())),o.send()}}))}},{key:\"getNetworkType\",value:function(){return this._networkType}},{key:\"reset\",value:function(){this._networkType=\"\"}}]),e}(),ms=function(){function e(t){var n=this;r(this,e),ee(t)?(this._map=new Map,t.forEach((function(e){n._map.set(e,[])}))):W.warn(\"AverageCalculator.constructor need keys\")}return s(e,[{key:\"push\",value:function(e,t){return!(te(e)||!this._map.has(e)||!J(t)||(this._map.get(e).push(t),0))}},{key:\"getSize\",value:function(e){return te(e)||!this._map.has(e)?-1:this._map.get(e).length}},{key:\"getAvg\",value:function(e){if(te(e)||!this._map.has(e))return-1;var t=this._map.get(e),n=t.length;if(0===n)return 0;var o=0;return t.forEach((function(e){o+=e})),t.length=0,this._map.set(e,[]),parseInt(o/n)}},{key:\"getMax\",value:function(e){return te(e)||!this._map.has(e)?-1:Math.max.apply(null,this._map.get(e))}},{key:\"getMin\",value:function(e){return te(e)||!this._map.has(e)?-1:Math.min.apply(null,this._map.get(e))}},{key:\"reset\",value:function(){this._map.forEach((function(e){e.length=0}))}}]),e}(),_s=function(){function e(t){var n=this;r(this,e),ee(t)?(this._map=new Map,t.forEach((function(e){n._map.set(e,{totalCount:0,successCount:0})}))):W.warn(\"SuccessRateCalculator.constructor need keys\")}return s(e,[{key:\"addTotalCount\",value:function(e){return!(te(e)||!this._map.has(e)||(this._map.get(e).totalCount+=1,0))}},{key:\"addSuccessCount\",value:function(e){return!(te(e)||!this._map.has(e)||(this._map.get(e).successCount+=1,0))}},{key:\"getSuccessRate\",value:function(e){if(te(e)||!this._map.has(e))return-1;var t=this._map.get(e);if(0===t.totalCount)return 1;var n=parseFloat((t.successCount/t.totalCount).toFixed(2));return n>1&&(n=1),t.totalCount=t.successCount=0,n}},{key:\"getTotalCount\",value:function(e){return te(e)||!this._map.has(e)?-1:this._map.get(e).totalCount}},{key:\"reset\",value:function(){this._map.forEach((function(e){e.totalCount=0,e.successCount=0}))}}]),e}(),vs=function(e){l(n,e);var t=v(n);function n(e){var o;return r(this,n),(o=t.call(this,e)).TABLE=\"timwebsum\",o.TAG=\"im-ssolog-sumstat\",o._items=[Ln,bn,Pn,Gn,Un,xn,qn,Fn,Vn,Kn],o._thresholdMap=new Map,o._thresholdMap.set(Ln,100),o._thresholdMap.set(bn,150),o._thresholdMap.set(Pn,15),o._thresholdMap.set(Gn,6),o._thresholdMap.set(Un,6),o._thresholdMap.set(xn,6),o._thresholdMap.set(qn,6),o._thresholdMap.set(Fn,6),o._thresholdMap.set(Vn,50),o._thresholdMap.set(Kn,50),o._lpID=\"\",o._platform=o.getPlatform(),o._lastReportTime=0,o._statInfoArr=[],o._retryCount=0,o._avgCalc=new ms(o._items),o._successRateCalc=new _s(o._items),o.tim.innerEmitter.on(an,o._onLoginSuccess,m(o)),o}return s(n,[{key:\"_onLoginSuccess\",value:function(){var e=this,t=this.tim.storage,n=t.getItem(this.TAG,!1);ke(n)||(W.log(\"SumStatController._onLoginSuccess get sumstatlog in storage, nums=\"+n.length),n.forEach((function(t){e._statInfoArr.pushIn(t)})),t.removeItem(this.TAG,!1))}},{key:\"recordLongPollingID\",value:function(e){this._lpID=e}},{key:\"addTotalCount\",value:function(e){this._successRateCalc.addTotalCount(e)?1===this._successRateCalc.getTotalCount(e)&&(this._lastReportTime=Date.now()):W.warn(\"SumStatController.addTotalCount invalid key:\",e)}},{key:\"addSuccessCount\",value:function(e){this._successRateCalc.addSuccessCount(e)||W.warn(\"SumStatController.addSuccessCount invalid key:\",e)}},{key:\"addCost\",value:function(e,t){this._avgCalc.push(e,t)?(W.debug(\"SumStatController.addCost\",e,t,this._avgCalc.getSize(e)),this._avgCalc.getSize(e)>=this._thresholdMap.get(e)&&this._report(e)):W.warn(\"SumStatController.addCost invalid key or cost:\",e,t)}},{key:\"_getItemNum\",value:function(e){switch(e){case Ln:return 1;case bn:return 2;case Pn:return 3;case Vn:return 4;case Kn:return 5;case Gn:return 6;case Un:return 7;case xn:return 8;case qn:return 9;case Fn:return 10;default:return 100}}},{key:\"_getStatInfo\",value:function(e){var t=null;return this._avgCalc.getSize(e)>0&&(t={SDKAppID:\"\".concat(this.tim.context.SDKAppID),version:\"\".concat(\"2.7.7\"),tinyID:this.tim.context.tinyID,userID:this.tim.loginInfo.identifier,item:this._getItemNum(e),lpID:e===Ln?this._lpID:\"\",platform:this._platform,scene:this.tim.context.scene,networkType:this.getNetworkType(),total:this._successRateCalc.getTotalCount(e),successRate:this._successRateCalc.getSuccessRate(e),avg:this._avgCalc.getAvg(e),timespan:Date.now()-this._lastReportTime,time:pe()}),t}},{key:\"_report\",value:function(e){var t=this,n=[],o=null;te(e)?this._items.forEach((function(e){null!==(o=t._getStatInfo(e))&&n.push(o)})):null!==(o=this._getStatInfo(e))&&n.push(o),W.debug(\"SumStatController._report\",n),this._statInfoArr.length>0&&(n=n.concat(this.statInfoArr),this._statInfoArr=[]),this._doReport(n)}},{key:\"_doReport\",value:function(e){var t=this;ke(e)?W.warn(\"SumStatController._doReport statInfoArr is empty, do nothing\"):this.request({name:\"ssoSumStat\",action:\"create\",param:{table:this.TABLE,report:e}}).then((function(){t._lastReportTime=Date.now(),t._retryCount>0&&(W.debug(\"SumStatController._doReport retry success\"),t._retryCount=0)})).catch((function(n){W.warn(\"SumStatController._doReport, online:\".concat(t.getNetworkType(),\" error:\").concat(le(n)),e),t._retryCount<=1?setTimeout((function(){W.info(\"SumStatController._doReport retry\",e),t._retryCount+=1,t._doReport(e)}),5e3):(t._retryCount=0,t._statInfoArr=t._statInfoArr.concat(e),t._flusgAtOnce())}))}},{key:\"_flushAtOnce\",value:function(){var e=this.tim.storage,t=e.getItem(this.TAG,!1),n=this._statInfoArr;if(ke(t))W.log(\"SumStatController._flushAtOnce nums=\"+n.length),e.setItem(this.TAG,n,!0,!1);else{var o=n.concat(t);o.length>10&&(o=o.slice(0,10)),W.log(\"SumStatController._flushAtOnce nums=\"+o.length),e.setItem(this.TAG,o,!0,!1)}this._statInfoArr=[]}},{key:\"reset\",value:function(){W.info(\"SumStatController.reset\"),this._report(),this._avgCalc.reset(),this._successRateCalc.reset()}}]),n}(Sn),ys=function(){function e(){r(this,e),this._funcMap=new Map}return s(e,[{key:\"defense\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(\"string\"!=typeof e)return null;if(0===e.length)return null;if(\"function\"!=typeof t)return null;if(this._funcMap.has(e)&&this._funcMap.get(e).has(t))return this._funcMap.get(e).get(t);this._funcMap.has(e)||this._funcMap.set(e,new Map);var o=null;return this._funcMap.get(e).has(t)?o=this._funcMap.get(e).get(t):(o=this._pack(e,t,n),this._funcMap.get(e).set(t,o)),o}},{key:\"defenseOnce\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return\"function\"!=typeof t?null:this._pack(e,t,n)}},{key:\"find\",value:function(e,t){return\"string\"!=typeof e||0===e.length||\"function\"!=typeof t?null:this._funcMap.has(e)?this._funcMap.get(e).has(t)?this._funcMap.get(e).get(t):(W.log(\"SafetyCallback.find: 找不到 func —— \".concat(e,\"/\").concat(\"\"!==t.name?t.name:\"[anonymous]\")),null):(W.log(\"SafetyCallback.find: 找不到 eventName-\".concat(e,\" 对应的 func\")),null)}},{key:\"delete\",value:function(e,t){return\"function\"==typeof t&&!!this._funcMap.has(e)&&!!this._funcMap.get(e).has(t)&&(this._funcMap.get(e).delete(t),0===this._funcMap.get(e).size&&this._funcMap.delete(e),!0)}},{key:\"_pack\",value:function(e,t,n){return function(){try{t.apply(n,Array.from(arguments))}catch(t){var o=new Bn;o.setMethod(zn).setText(\"eventName=\".concat(e)).setStart(),o.setCode(0).setMessage(t.message).setEnd()}}}}]),e}(),Is=function(e){l(n,e);var t=v(n);function n(e){var o;return r(this,n),(o=t.call(this,e))._maybeLostSequencesMap=new Map,o}return s(n,[{key:\"onMessageMaybeLost\",value:function(e,t,n){this._maybeLostSequencesMap.has(e)||this._maybeLostSequencesMap.set(e,[]);for(var o=this._maybeLostSequencesMap.get(e),r=0;r<n;r++)o.push(t+r);W.debug(\"MessageLossController.onMessageMaybeLost. maybeLostSequences:\".concat(o))}},{key:\"detectMessageLoss\",value:function(e,t){var n=this._maybeLostSequencesMap.get(e);if(!ke(n)&&!ke(t)){var o=t.filter((function(e){return-1!==n.indexOf(e)}));if(W.debug(\"MessageLossController.detectMessageLoss. matchedSequences:\".concat(o)),n.length===o.length)W.info(\"MessageLossController.detectMessageLoss no message loss. conversationID=\".concat(e));else{var r,i=n.filter((function(e){return-1===o.indexOf(e)})),s=i.length;s<=5?r=e+\"-\"+i.join(\"-\"):(i.sort((function(e,t){return e-t})),r=e+\" start:\"+i[0]+\" end:\"+i[s-1]+\" count:\"+s);var a=new Bn;a.setMethod(\"messageLoss\").setStart(),a.setCode(0).setText(r).setNetworkType(this.getNetworkType()).setEnd(),W.warn(\"MessageLossController.detectMessageLoss message loss detected. conversationID:\".concat(e,\" lostSequences:\").concat(i))}n.length=0}}},{key:\"reset\",value:function(){W.log(\"MessageLossController.reset\"),this._maybeLostSequencesMap.clear()}}]),n}(Sn),Ms=function(){function t(e){r(this,t);var n=new Bn;n.setMethod(\"sdkConstruct\").setStart(),Tn.mixin(this),this._initOptions(e),this._initMemberVariables(),this._initControllers(),this._initListener(),Bn.bindController(this.eventStatController),n.setCode(0).setText(\"mp=\".concat(O,\"-ua=\").concat(L)).setEnd(),W.info(\"SDK inWxMiniApp:\".concat(O,\", SDKAppID:\").concat(e.SDKAppID,\", UserAgent:\").concat(L)),this._safetyCallbackFactory=new ys}return s(t,[{key:\"login\",value:function(e){return W.time(On),this._ssoLog=new Bn,this._ssoLog.setMethod(\"sdkReady\").setStart(),this.netMonitor.start(),this.loginInfo.identifier=e.identifier||e.userID,this.loginInfo.userSig=e.userSig,this.signController.login(this.loginInfo)}},{key:\"logout\",value:function(){var e=this.signController.logout();return this.resetSDK(),e}},{key:\"on\",value:function(t,n,o){t===e.GROUP_SYSTEM_NOTICE_RECEIVED&&W.warn(\"！！！TIM.EVENT.GROUP_SYSTEM_NOTICE_RECEIVED v2.6.0起弃用，为了更好的体验，请在 TIM.EVENT.MESSAGE_RECEIVED 事件回调内接收处理群系统通知，详细请参考：https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/Message.html#.GroupSystemNoticePayload\"),W.debug(\"on\",\"eventName:\".concat(t)),this.outerEmitter.on(t,this._safetyCallbackFactory.defense(t,n,o),o)}},{key:\"once\",value:function(e,t,n){W.debug(\"once\",\"eventName:\".concat(e)),this.outerEmitter.once(e,this._safetyCallbackFactory.defenseOnce(e,t,n),n||this)}},{key:\"off\",value:function(e,t,n,o){W.debug(\"off\",\"eventName:\".concat(e));var r=this._safetyCallbackFactory.find(e,t);null!==r&&(this.outerEmitter.off(e,r,n,o),this._safetyCallbackFactory.delete(e,t))}},{key:\"registerPlugin\",value:function(e){var t=this;this.plugins||(this.plugins={}),Object.keys(e).forEach((function(n){t.plugins[n]=e[n]}));var n=new Bn;n.setMethod(\"registerPlugin\").setStart(),n.setCode(0).setText(\"key=\".concat(Object.keys(e))).setEnd()}},{key:\"getPlugin\",value:function(e){return this.plugins[e]||void 0}},{key:\"setLogLevel\",value:function(e){e<=0&&(console.log([\"\",\" ________  ______  __       __  __       __  ________  _______\",\"|        \\\\|      \\\\|  \\\\     /  \\\\|  \\\\  _  |  \\\\|        \\\\|       \\\\\",\" \\\\$$$$$$$$ \\\\$$$$$$| $$\\\\   /  $$| $$ / \\\\ | $$| $$$$$$$$| $$$$$$$\\\\\",\"   | $$     | $$  | $$$\\\\ /  $$$| $$/  $\\\\| $$| $$__    | $$__/ $$\",\"   | $$     | $$  | $$$$\\\\  $$$$| $$  $$$\\\\ $$| $$  \\\\   | $$    $$\",\"   | $$     | $$  | $$\\\\$$ $$ $$| $$ $$\\\\$$\\\\$$| $$$$$   | $$$$$$$\\\\\",\"   | $$    _| $$_ | $$ \\\\$$$| $$| $$$$  \\\\$$$$| $$_____ | $$__/ $$\",\"   | $$   |   $$ \\\\| $$  \\\\$ | $$| $$$    \\\\$$$| $$     \\\\| $$    $$\",\"    \\\\$$    \\\\$$$$$$ \\\\$$      \\\\$$ \\\\$$      \\\\$$ \\\\$$$$$$$$ \\\\$$$$$$$\",\"\",\"\"].join(\"\\n\")),console.log(\"%cIM 智能客服，随时随地解决您的问题 →_→ https://cloud.tencent.com/act/event/smarty-service?from=im-doc\",\"color:#ff0000\"),console.log([\"\",\"参考以下文档，会更快解决问题哦！(#^.^#)\\n\",\"SDK 更新日志: https://cloud.tencent.com/document/product/269/38492\\n\",\"SDK 接口文档: https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/SDK.html\\n\",\"常见问题: https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/tutorial-01-faq.html\\n\",\"反馈问题？戳我提 issue: https://github.com/tencentyun/TIMSDK/issues\\n\",\"如果您需要在生产环境关闭上面的日志，请 tim.setLogLevel(1)\\n\"].join(\"\\n\"))),W.setLevel(e)}},{key:\"downloadLog\",value:function(){var e=document.createElement(\"a\"),t=new Date,n=new Blob(this.getLog());e.download=\"TIM-\"+t.getFullYear()+\"-\"+(t.getMonth()+1)+\"-\"+t.getDate()+\"-\"+this.loginInfo.SDKAppID+\"-\"+this.context.identifier+\".txt\",e.href=URL.createObjectURL(n),e.click(),URL.revokeObjectURL(n)}},{key:\"destroy\",value:function(){this.logout(),this.outerEmitter.emit(e.SDK_DESTROY,{SDKAppID:this.loginInfo.SDKAppID})}},{key:\"createTextMessage\",value:function(e){return this.messageController.createTextMessage(e)}},{key:\"createImageMessage\",value:function(e){return this.messageController.createImageMessage(e)}},{key:\"createAudioMessage\",value:function(e){return this.messageController.createAudioMessage(e)}},{key:\"createVideoMessage\",value:function(e){return this.messageController.createVideoMessage(e)}},{key:\"createCustomMessage\",value:function(e){return this.messageController.createCustomMessage(e)}},{key:\"createFaceMessage\",value:function(e){return this.messageController.createFaceMessage(e)}},{key:\"createFileMessage\",value:function(e){return this.messageController.createFileMessage(e)}},{key:\"sendMessage\",value:function(e,t){return e instanceof yt?this.messageController.sendMessageInstance(e,t):wn(new nt({code:ot.MESSAGE_SEND_NEED_MESSAGE_INSTANCE,message:\"需要 Message 的实例\"}))}},{key:\"revokeMessage\",value:function(e){return this.messageController.revokeMessage(e)}},{key:\"resendMessage\",value:function(e){return this.messageController.resendMessage(e)}},{key:\"getMessageList\",value:function(e){return this.messageController.getMessageList(e)}},{key:\"setMessageRead\",value:function(e){return this.messageController.setMessageRead(e)}},{key:\"getConversationList\",value:function(){return this.conversationController.getConversationList()}},{key:\"getConversationProfile\",value:function(e){return this.conversationController.getConversationProfile(e)}},{key:\"deleteConversation\",value:function(e){return this.conversationController.deleteConversation(e)}},{key:\"getMyProfile\",value:function(){return this.userController.getMyProfile()}},{key:\"getUserProfile\",value:function(e){return this.userController.getUserProfile(e)}},{key:\"updateMyProfile\",value:function(e){return this.userController.updateMyProfile(e)}},{key:\"getFriendList\",value:function(){return this.userController.getFriendList()}},{key:\"deleteFriend\",value:function(e){return this.userController.deleteFriend(e)}},{key:\"getBlacklist\",value:function(){return this.userController.getBlacklist()}},{key:\"addToBlacklist\",value:function(e){return this.userController.addBlacklist(e)}},{key:\"removeFromBlacklist\",value:function(e){return this.userController.deleteBlacklist(e)}},{key:\"getGroupList\",value:function(e){return this.groupController.getGroupList(e)}},{key:\"getGroupProfile\",value:function(e){return this.groupController.getGroupProfile(e)}},{key:\"createGroup\",value:function(e){return this.groupController.createGroup(e)}},{key:\"dismissGroup\",value:function(e){return this.groupController.dismissGroup(e)}},{key:\"updateGroupProfile\",value:function(e){return this.groupController.updateGroupProfile(e)}},{key:\"joinGroup\",value:function(e){return this.groupController.joinGroup(e)}},{key:\"quitGroup\",value:function(e){return this.groupController.quitGroup(e)}},{key:\"searchGroupByID\",value:function(e){return this.groupController.searchGroupByID(e)}},{key:\"changeGroupOwner\",value:function(e){return this.groupController.changeGroupOwner(e)}},{key:\"handleGroupApplication\",value:function(e){return this.groupController.handleGroupApplication(e)}},{key:\"setMessageRemindType\",value:function(e){return this.groupController.setMessageRemindType(e)}},{key:\"getGroupMemberList\",value:function(e){return this.groupController.getGroupMemberList(e)}},{key:\"getGroupMemberProfile\",value:function(e){return this.groupController.getGroupMemberProfile(e)}},{key:\"addGroupMember\",value:function(e){return this.groupController.addGroupMember(e)}},{key:\"deleteGroupMember\",value:function(e){return this.groupController.deleteGroupMember(e)}},{key:\"setGroupMemberMuteTime\",value:function(e){return this.groupController.setGroupMemberMuteTime(e)}},{key:\"setGroupMemberRole\",value:function(e){return this.groupController.setGroupMemberRole(e)}},{key:\"setGroupMemberNameCard\",value:function(e){return this.groupController.setGroupMemberNameCard(e)}},{key:\"setGroupMemberCustomField\",value:function(e){return this.groupController.setGroupMemberCustomField(e)}},{key:\"_initOptions\",value:function(e){this.plugins={},this._sdkReloadFlag=!1;var t=e.SDKAppID||0,n=de();this.context={SDKAppID:t,accountType:n},this.loginInfo={SDKAppID:t,accountType:n,identifier:null,userSig:null,unlimitedAVChatRoom:e.unlimitedAVChatRoom||!1,scene:e.scene||\"\",avchatroomIDList:[]},this.options={runLoopNetType:e.runLoopNetType||2,enablePointer:e.enablePointer||!1}}},{key:\"_initMemberVariables\",value:function(){this.innerEmitter=new Bi,this.outerEmitter=new Bi,function(e){Rn=e}(this.outerEmitter),this.packageConfig=new Yi(this),this.storage=new Hi(this),this.netMonitor=new gs,this.outerEmitter._emit=this.outerEmitter.emit,this.outerEmitter.emit=function(e,t){var n=arguments[0],o=[n,{name:arguments[0],data:arguments[1]}];this.outerEmitter._emit.apply(this.outerEmitter,o)}.bind(this),this.innerEmitter._emit=this.innerEmitter.emit,this.innerEmitter.emit=function(e,t){var n;Z(arguments[1])&&arguments[1].data?(W.warn(\"inner eventData has data property, please check!\"),n=[e,{name:arguments[0],data:arguments[1].data}]):n=[e,{name:arguments[0],data:arguments[1]}],this.innerEmitter._emit.apply(this.innerEmitter,n)}.bind(this)}},{key:\"_initControllers\",value:function(){this.exceptionController=new hi(this),this.connectionController=new pi(this),this.contextController=new kn(this),this.context=this.contextController.getContext(),this.signController=new Jn(this),this.messageController=new bi(this),this.conversationController=new ki(this),this.userController=new Mi(this),this.groupController=new Fi(this),this.notificationController=new Ji(this),this.bigDataHallwayController=new Qi(this),this.statusController=new Vi(this),this.uploadController=new Xi(this),this.messageLossController=new Is(this),this.eventStatController=new hs(this),this.sumStatController=new vs(this),this.mtaReportController=new ls(this),this._initReadyListener()}},{key:\"_initListener\",value:function(){var e=this;if(this.innerEmitter.on(yn,this._onSDKReload,this),O&&\"function\"==typeof wx.onAppShow&&\"function\"==typeof wx.onAppHide){var t=null;wx.onAppHide((function(){(t=new Bn).setMethod(\"mpHideToShow\").setStart()})),wx.onAppShow((function(){null!==t&&t.setCode(0).setNetworkType(e.netMonitor.getNetworkType()).setEnd()}))}}},{key:\"_initReadyListener\",value:function(){for(var e=this,t=this.readyList,n=0,o=t.length;n<o;n++)this[t[n]].ready((function(){return e._readyHandle()}))}},{key:\"_onSDKReload\",value:function(){var e=this;W.log(\"sdk reloading...\"),this.resetSDK(),this.login(this.loginInfo).then((function(t){e._sdkReloadFlag=!0}))}},{key:\"resetSDK\",value:function(){var t=this;this.initList.forEach((function(e){t[e].reset&&t[e].reset()})),this.netMonitor.reset(),this.storage.reset(),this.resetReady(),this._initReadyListener(),this.outerEmitter.emit(e.SDK_NOT_READY)}},{key:\"_readyHandle\",value:function(){for(var t=this.readyList,n=!0,o=0,r=t.length;o<r;o++)if(!this[t[o]].isReady()){n=!1;break}if(n){var i=W.timeEnd(On);W.warn(\"SDK is ready. cost=\".concat(i,\"ms\")),this.triggerReady(),this.innerEmitter.emit(vn),this.outerEmitter.emit(e.SDK_READY),this._sdkReloadFlag&&(this.outerEmitter.emit(e.SDK_RELOAD),this.groupController.AVChatRoomHandler.joinAVChatRoomSilently(),this._sdkReloadFlag=!1),this._ssoLog.setCode(0).setNetworkType(this.netMonitor.getNetworkType()).setText(i).setEnd()}}}]),t}();Ms.prototype.readyList=[\"conversationController\"],Ms.prototype.initList=[\"exceptionController\",\"connectionController\",\"signController\",\"contextController\",\"messageController\",\"conversationController\",\"userController\",\"groupController\",\"notificationController\",\"eventStatController\",\"sumStatController\",\"messageLossController\",\"statusController\"];var Cs={login:\"login\",on:\"on\",off:\"off\",ready:\"ready\",setLogLevel:\"setLogLevel\",joinGroup:\"joinGroup\",quitGroup:\"quitGroup\",registerPlugin:\"registerPlugin\"};function Es(e,t){return!(!e.isReady()&&void 0===Cs[t]&&(e.innerEmitter.emit(pn,new nt({code:ot.SDK_IS_NOT_READY,message:\"\".concat(t,\" \").concat(\"接口需要 SDK 处于 ready 状态后才能调用\",\"，请参考 https://imsdk-1252463788.file.myqcloud.com/IM_DOC/Web/module-EVENT.html#.SDK_READY\")})),1))}var Ts={},Ss={create:function(t){if(t.SDKAppID&&Ts[t.SDKAppID])return Ts[t.SDKAppID];W.log(\"TIM.create\");var n=new Ms(t);n.on(e.SDK_DESTROY,(function(e){Ts[e.data.SDKAppID]=null,delete Ts[e.data.SDKAppID]}));var o=function(e){var t=Object.create(null);return Object.keys(Ct).forEach((function(n){if(e[n]){var o=Ct[n],r=new T;t[o]=function(){var t=Array.from(arguments);return r.use((function(t,o){if(Es(e,n))return o()})).use((function(e,t){if(!0===Ae(e,Mt[n],o))return t()})).use((function(t,o){return e[n].apply(e,t)})),r.run(t)}}})),t}(n);return Ts[t.SDKAppID]=o,W.log(\"TIM.create ok\"),o}};return Ss.TYPES=n,Ss.EVENT=e,Ss.VERSION=\"2.7.7\",W.log(\"TIM.VERSION: \".concat(Ss.VERSION)),Ss}()}).call(this,n(6))},function(e){e.exports=JSON.parse('{\"name\":\"tsignaling\",\"version\":\"0.2.1\",\"description\":\"腾讯云 Web 信令 SDK\",\"main\":\"./src/index.ts\",\"scripts\":{\"ts2js\":\"tsc src/index.ts --outDir build/ts2js\",\"doc\":\"npm run ts2js && npm run doc:clean && npm run doc:build\",\"doc:build\":\"./node_modules/.bin/jsdoc -c build/jsdoc/jsdoc.json && node ./build/jsdoc/fix-doc.js\",\"doc:clean\":\"node ./build/jsdoc/clean-doc.js\",\"build:wx\":\"cross-env NODE_ENV=wx webpack --config webpack.prod.config.js\",\"build:web\":\"node node_modules/cross-env/src/bin/cross-env.js NODE_ENV=web node_modules/webpack/bin/webpack.js --config webpack.prod.config.js\",\"build:package\":\"node build/package-bundle.js\",\"prerelease\":\"npm run build:web && npm run build:wx && npm run build:package && node ./build/copy.js\",\"start:wx\":\"cross-env NODE_ENV=wx  webpack-dev-server --config webpack.config.js\",\"start:web\":\"node node_modules/cross-env/src/bin/cross-env.js NODE_ENV=web node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack.dev.config.js\"},\"keywords\":[\"腾讯云\",\"即时通信\",\"信令\"],\"author\":\"\",\"license\":\"ISC\",\"devDependencies\":{\"cross-env\":\"^7.0.2\",\"fs-extra\":\"^9.0.1\",\"html-webpack-plugin\":\"^4.3.0\",\"ts-loader\":\"^7.0.5\",\"typescript\":\"^3.9.3\",\"webpack\":\"^4.43.0\",\"webpack-cli\":\"^3.3.11\",\"webpack-dev-server\":\"^3.11.0\"},\"dependencies\":{\"EventEmitter\":\"^1.0.0\",\"docdash-blue\":\"^1.1.3\",\"jsdoc\":\"^3.6.4\",\"jsdoc-plugin-typescript\":\"^2.0.5\",\"mta-h5-analysis\":\"^2.0.15\",\"pretty\":\"^2.0.0\",\"replace\":\"^1.2.0\",\"tim-js-sdk\":\"^2.7.7\",\"tim-wx-sdk\":\"^2.7.7\",\"uuidjs\":\"^4.2.5\"}}')}]).default}));"
  },
  {
    "path": "packageStreamMedia/components/like-dz/like-dz.js",
    "content": "let queue = {};\nlet timer = 0;\nlet ctx = null;\n\nconst badges = {};\n\nComponent({\n  properties: {\n    count: {\n      type: Number,\n      observer: \"likeChange\",\n      value: 0,\n    },\n    height: {\n      type: Number,\n      value: 300\n    },\n    width: {\n      type: Number,\n      value: 90\n    }\n  },\n  methods: {\n    /**点赞个数变化 */\n    likeChange(newVal, oldVal) {\n      if (newVal - oldVal > 0) {\n        this.likeClick();\n      }\n    },\n    /**点赞 */\n    likeClick() {\n      const image = \"./images-v2/\" + this.getRandomInt(1, 13) + \".png\";\n      const anmationData = {\n        id: new Date().getTime(),\n        timer: 0,\n        opacity: 0.5,\n        pathData: this.generatePathData(),\n        image: image,\n        factor: {\n          speed: 0.4, // 运动速度，值越小越慢\n          t: 0 //  贝塞尔函数系数\n        }\n      };\n      if (Object.keys(queue).length > 0) {\n        queue[anmationData.id] = anmationData;\n      } else {\n        queue[anmationData.id] = anmationData;\n        this.bubbleAnimate();\n      }\n    },\n    /**获取最大最小随机值 */\n    getRandom(min, max) {\n      return Math.random() * (max - min) + min;\n    },\n    /**获取最大最小之前随机值的整数 */\n    getRandomInt(min, max) {\n      return Math.floor(Math.random() * (max - min + 1)) + min;\n    },\n    /**获取图片路径 */\n    generatePathData() {\n      let width = this.data.width,\n        height = this.data.height;\n      const p0 = {\n        x: 0.65 * width,\n        y: height\n      };\n      const p1 = {\n        x: this.getRandom(0.22 * width, 0.33 * width),\n        y: this.getRandom(0.5 * height, 0.75 * height)\n      };\n      const p2 = {\n        x: this.getRandom(0, 0.88 * width),\n        y: this.getRandom(0.25 * height, 0.5 * height)\n      };\n      const p3 = {\n        x: this.getRandom(0, 0.88 * width),\n        y: this.getRandom(0, 0.125 * height)\n      };\n      return [p0, p1, p2, p3];\n    },\n    /**更新图片的最新运动路径 */\n    updatePath(data, factor) {\n      const p0 = data[0];\n      const p1 = data[1];\n      const p2 = data[2];\n      const p3 = data[3];\n\n      const t = factor.t;\n\n      /*计算多项式系数 （下同）*/\n      const cx1 = 3 * (p1.x - p0.x);\n      const bx1 = 3 * (p2.x - p1.x) - cx1;\n      const ax1 = p3.x - p0.x - cx1 - bx1;\n\n      const cy1 = 3 * (p1.y - p0.y);\n      const by1 = 3 * (p2.y - p1.y) - cy1;\n      const ay1 = p3.y - p0.y - cy1 - by1;\n\n      const x = ax1 * (t * t * t) + bx1 * (t * t) + cx1 * t + p0.x;\n      const y = ay1 * (t * t * t) + by1 * (t * t) + cy1 * t + p0.y;\n      return {\n        x,\n        y\n      };\n    },\n    /**点赞动画 */\n    bubbleAnimate() {\n      let width = this.data.width,\n        height = this.data.height;\n      Object.keys(queue).forEach(key => {\n        const anmationData = queue[+key];\n        const {\n          x,\n          y\n        } = this.updatePath(\n          anmationData.pathData,\n          anmationData.factor\n        );\n        const speed = anmationData.factor.speed;\n        anmationData.factor.t += speed;\n\n        var curWidth = 30;\n        curWidth = (height - y) / 1.5;\n        curWidth = Math.min(30, curWidth);\n\n        var curAlpha = anmationData.opacity;\n        curAlpha = y / height;\n        curAlpha = Math.min(1, curAlpha);\n        ctx.globalAlpha = curAlpha;\n        ctx.drawImage(anmationData.image, x - curWidth / 2, y, curWidth, curWidth);\n        if (anmationData.factor.t > 1) {\n          delete queue[anmationData.id];\n        }\n        if (y > height) {\n          delete queue[anmationData.id];\n        }\n      });\n      ctx.draw();\n      if (Object.keys(queue).length > 0) {\n        timer = setTimeout(() => {\n          this.bubbleAnimate();\n        }, 5);\n      } else {\n        clearTimeout(timer);\n        ctx.draw(); // 清空画面\n      }\n    }\n  },\n\n  ready() {\n    ctx = wx.createCanvasContext(\"bubble\", this);\n    queue = {};\n  },\n\n  detached() {\n    if (timer) {\n      clearTimeout(timer);\n    }\n  }\n});"
  },
  {
    "path": "packageStreamMedia/components/like-dz/like-dz.json",
    "content": "{\n  \"component\": true,\n  \"usingComponents\": {}\n}"
  },
  {
    "path": "packageStreamMedia/components/like-dz/like-dz.wxml",
    "content": "<canvas canvas-id=\"bubble\" style=\"width:{{width}}px;height:{{height}}px\" class=\"like-fx\" ></canvas>"
  },
  {
    "path": "packageStreamMedia/components/like-dz/like-dz.wxss",
    "content": ".like-fx {\n  position: absolute;\n  right: 0;\n  bottom: 140rpx;\n  pointer-events: none;\n  z-index: 9999999;\n}\n"
  },
  {
    "path": "packageStreamMedia/pages/live-anchor/index.js",
    "content": "const app = getApp()\nconst CONFIG = require('../../../config.js')\nconst WXAPI = require('apifm-wxapi')\n\n// websocket 第一步\nlet socketOpen = false\nlet socketMsgQueue = []\n\nlet that;\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    beauty: 0, // 美颜，取值范围 0-9 ，0 表示关闭\n    onlineNumber: 1, // 在线人数\n    barrageList: [], // 用户聊天记录\n    focus: false,\n    firstTap: false,\n    goodsList: [],\n    pageIndex: 1,\n    pageSize: 10,\n    hasMore: true,\n    showGoodsInfo: false,\n    showEmpty: false, // 是否展示缺省提示\n    ids: '', // 已经选中的商品id\n    online_people: '', // 观看人数\n    pusherUrl: \"\",\n    roomId: undefined,\n    showSetInfo: false,\n  },\n  // 某人加入房间、离开房间\n  showTips(avatarurl, msg) {\n    this.setData({\n      showTips: true,\n      showTipsAvatarUrl: avatarurl,\n      showTipsMsg: msg\n    })\n    if (!this.data.focus) {\n      this.setScrollTop();\n    }\n    setTimeout(() => {\n      this.setData({\n        showTips: false\n      })\n    }, 3000);\n  },\n  setScrollTop() {\n    var query = wx.createSelectorQuery(),\n      e = that;\n    wx.createSelectorQuery().in(e).select('.barrage').boundingClientRect(function (res) {\n      console.log(res)\n      e.setData({\n        chatbottom: res.bottom,\n      })\n    }).exec()\n\n    query.in(e).select('.item-outer').boundingClientRect(function (res) {\n      if (res.bottom > e.data.chatbottom) {\n        let temp = Math.ceil(parseInt(res.bottom) - parseInt(e.data.chatbottom))\n        e.setData({\n          scrollTop: temp // 如此保证scrollTop的值 让滚动条一直滚动到最后 9999 开发工具可以设置为辞职 苹果真机不行\n        })\n      }\n    }).exec()\n  },\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad(options) {\n    // options.id = 13\n    this.data.id = options.id\n    // 读取自定义头高度\n    const systemInfo = wx.getSystemInfoSync()\n    const custom = wx.getMenuButtonBoundingClientRect()\n    this.setData({\n      systemInfo,\n      customBarHeight: custom.bottom + custom.top - systemInfo.statusBarHeight\n    })\n    this.getUserInfo()\n    this.myLiveRoomsInfo()\n    this.initWebSocket()\n    // 设置屏幕常亮 兼容ios\n    wx.setKeepScreenOn({\n      keepScreenOn: true\n    })\n    // 设置屏幕亮度 0-1范围 设置了 用户自己去设置调节屏幕的亮度\n    // wx.setScreenBrightness({ value: .6 }) \n\n    this.ctx = wx.createLivePusherContext('pusher')\n\n    let query = wx.createSelectorQuery()\n    query.select('.barrage').boundingClientRect(function (rect) {\n      // console.log(rect)\n    }).exec();\n  },\n  // 主推商品详情\n  async toDetail(e) {\n    const id = e.currentTarget.dataset.id\n    const res = await WXAPI.goodsDetail(id, wx.getStorageSync('token'))\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    if (res.data.basicInfo.supplyType == 'cps_jd') {\n      wx.navigateTo({\n        url: `/packageCps/pages/goods-details/cps-jd?id=${id}`,\n      })\n    } else if (res.data.basicInfo.supplyType == 'cps_pdd') {\n      wx.navigateTo({\n        url: `/packageCps/pages/goods-details/cps-pdd?id=${id}`,\n      })\n    } else if (res.data.basicInfo.supplyType == 'cps_taobao') {\n      wx.navigateTo({\n        url: `/packageCps/pages/goods-details/cps-taobao?id=${id}`,\n      })\n    } else if (res.data.basicInfo.supplyType == 'vop_jd') {\n      wx.navigateTo({\n        url: `/pages/goods-details/vop?id=${res.data.basicInfo.yyId}&goodsId=${res.data.basicInfo.id}`,\n      })\n    } else {\n      wx.navigateTo({\n        url: `/pages/goods-details/index?id=${id}`,\n      })\n    }\n  },\n\n  preventDefault() {\n    return;\n  },\n\n  bindInput(e) {\n    this.setData({\n      inputVal: e.detail.value\n    })\n  },\n\n  /**\n   * 发送弹幕问题\n   */\n  onComment() {\n    const inputVal = this.data.inputVal\n    if (!inputVal) {\n      wx.showToast({\n        title: '内容不能为空',\n        icon: 'none'\n      })\n      return;\n    }\n    this.sendSocketMessage(inputVal)\n    this.setData({\n      inputVal: '',\n      showInput: false\n    })\n  },\n\n  handleInteractionTap() {\n    let data = this.data\n    let temp;\n    if (!data.showInput) {\n      temp = data.fullScreenHeight - 50\n    } else {\n      temp = app.globalData.screenH\n    }\n    this.setData({\n      //showInput: !this.data.showInput,\n      fullScreenHeight: temp,\n      showInput: true,\n      focus: true\n    })\n  },\n\n  navCart() {\n    let url = `/pages/cart/cart`\n    wx.navigateTo({\n      url\n    })\n  },\n  // 设置为主推商品\n  async navPurchase(e) {\n    const mainlyGoods = this.data.liveRoomsInfo.goodsList[e.currentTarget.dataset.idx]\n    this.sendSocketMessage('act:mainlyGoods:' + mainlyGoods.id)\n    const res = await WXAPI.liveRoomGoodsMainly({\n      token: wx.getStorageSync('token'),\n      roomId: this.data.id,\n      goodsId: mainlyGoods.id\n    })\n  },\n\n  hideGoods() {\n    this.setData({\n      showGoodsInfo: false,\n      showInput: false\n    })\n  },\n  hidePeoples() { //隐藏人员信息\n    console.log(1);\n    this.hideGoods();\n    this.setData({\n      showPeopleInfo: false\n    })\n  },\n  hideSet() {\n    this.setData({\n      showSetInfo: false\n    })\n  },\n  async showPeoples() { //显示直播间人员\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.liveRoomOnlineUsers(wx.getStorageSync('token'), this.data.id)\n    wx.hideLoading()\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      this.setData({\n        showPeopleInfo: false,\n        peoplelist: null\n      })\n    } else {\n      this.setData({\n        showPeopleInfo: true,\n        peoplelist: res.data\n      })\n    }\n  },\n  lahei(e) { //拉黑用户 \n    let uid = e.currentTarget.dataset.uid\n    const that = this\n    wx.showModal({\n      title: '确认拉黑',\n      content: '拉黑会强制该用户退出直播间',\n      success(res) {\n        if (res.confirm) {\n          //console.log('用户点击确定')\n          wx.showLoading({\n            title: '加载中',\n          })\n          WXAPI.liveRoomKickOutUser(wx.getStorageSync('token'), that.data.id, uid).then(res => {\n            that.showPeoples();\n          })\n        } else if (res.cancel) {\n          //console.log('用户点击取消')\n        }\n      }\n    })\n  },\n  showGoods() {\n    let data = this.data\n    if (!data.firstTap) {\n      this.setData({\n        firstTap: true\n      })\n    }\n    this.setData({\n      showGoodsInfo: true,\n      showEmpty: true,\n    })\n  },\n  onReady(res) {\n    this.ctx = wx.createLivePusherContext('pusher')\n  },\n\n  // 旋转相机\n  rotateTap() {\n    this.ctx.switchCamera({\n      success: res => {\n        console.log('switchCamera success')\n      },\n      fail: res => {\n        console.log('switchCamera fail')\n      }\n    })\n  },\n\n  backTap() {\n    this.ctx.pause()\n    wx.navigateBack()\n  },\n  exit() {\n    wx.showModal({\n      title: '提示',\n      content: '确定结束本场直播吗？',\n      success: res => {\n        if (res.confirm) {\n          this.ctx.stop({\n            success: res => {\n              console.log('stop success')\n            },\n            fail: res => {\n              console.log('stop fail')\n            }\n          })\n          wx.navigateBack({\n            delta: 2\n          })\n          app.closeSocket()\n        }\n      }\n    })\n  },\n  onUnload() {\n    wx.onSocketClose(res => {\n      console.log('WebSocket 已关闭！')\n    })\n  },\n  onShow() { //进入页面链接\n    console.log(\"app.globalData.socketStatus\", app.globalData.socketStatus);\n    if (app.globalData.socketStatus == 'closed') {\n      // websocket方式\n      app.openSocket(this.data.roomId, this, \"author\")\n    }\n  },\n  // 主播分享自己的直播间\n  onShareAppMessage: function () {\n    return {\n      title: '快来我的直播间看看吧~',\n      imageUrl: this.data.liveRoomsInfo.roomInfo.coverImage,\n      path: `/packageStreamMedia/pages/live-client/client?id=${this.data.id}`\n    }\n  },\n  async getUserInfo() {\n    const res = await WXAPI.userDetail(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      this.setData({\n        apiUserInfoMap: res.data\n      })\n    }\n  },\n  showBeautySelect() {\n    this.setData({\n      showSelect09: true\n    })\n  },\n  select09(e) {\n    const num = e.currentTarget.dataset.num\n    this.setData({\n      beauty: num,\n      showSelect09: false\n    })\n  },\n  async myLiveRoomsInfo() {\n    const res = await WXAPI.myLiveRoomsInfo(wx.getStorageSync('token'), this.data.id)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      wx.navigateBack()\n      return\n    }\n    let mainlyGoods = null\n    if (res.data.mainlyGoodsId) {\n      mainlyGoods = res.data.goodsList.find(ele => {\n        return ele.id == res.data.mainlyGoodsId\n      })\n    }\n    this.setData({\n      liveRoomsInfo: res.data,\n      mainlyGoods\n    })\n  },\n  bindstatechange(e) {\n    console.log(e);\n  },\n  // webscoket 第二步， 增加下面方法\n  connectSocket() {\n    wx.connectSocket({\n      url: 'wss://api.it120.cc/websocket/liveRoom/' + this.data.id + '/' + wx.getStorageSync('token')\n    })\n  },\n  initWebSocket() {\n    this.connectSocket()\n    wx.onSocketOpen(res => {\n      console.log(res);\n      socketOpen = true\n      for (let i = 0; i < socketMsgQueue.length; i++){\n        sendSocketMessage(socketMsgQueue[i])\n      }\n      socketMsgQueue = []\n    })\n    wx.onSocketClose(res => {\n      console.log(res);\n      // 关闭，重连\n      socketOpen = false\n      if (res.code == 1004 && res.reason == 'kickOut') {\n        wx.reLaunch({\n          url: '/pages/index/index'\n        })\n        return\n      }\n      wx.showToast({\n        title: res.code + ':' + res.reason,\n        icon: 'none'\n      })\n      setTimeout(() => {\n        this.connectSocket()\n      }, 3000);\n    })\n    wx.onSocketMessage(res => {\n      // 接收服务器推送的消息\n      if (res.code != 0) {\n        wx.showToast({\n          title: resJson.msg,\n          icon: 'none'\n        })\n        return\n      }\n      const resJson = JSON.parse(res.data)\n      this.processSocketMessage(resJson.data)\n    })\n  },\n  sendSocketMessage(msg) {\n    // 向 websocket 发送消息\n    if (socketOpen) {\n      wx.sendSocketMessage({\n        data: msg\n      })\n    } else {\n      socketMsgQueue.push(msg)\n    }  \n  },\n  processSocketMessage(res) {\n    // 接收到服务器推送到消息\n    console.log(res)\n    if (res.act == 'onlineNumber') {\n      this.setData({\n        onlineNumber: res.data\n      })\n    }\n    if (res.act == 'userComing') {\n      this.showTips(res.avatarUrl, `${res.nick}进入直播间`)\n    }\n    if (res.act == 'msg') {\n      if (res.msg.indexOf('act:mainlyGoods:') == 0) {\n        const goodsId = res.msg.replace('act:mainlyGoods:', '')\n        console.log(goodsId);\n        const mainlyGoods = this.data.liveRoomsInfo.goodsList.find(ele => {\n          return ele.id == goodsId\n        })\n        this.setData({\n          mainlyGoods\n        })\n        return\n      }\n      if (res.msg == 'act:like') {\n        return\n      }\n      const barrageList = this.data.barrageList\n      barrageList.push({\n        nick: res.nick,\n        avatarUrl: res.avatarUrl,\n        msg: res.msg,\n        color: this.getRandomFontColor()\n      })\n      this.setData({\n        barrageList: barrageList.length > 100 ? barrageList.slice(50) : barrageList\n      })\n      if (this.data.focus) {\n        return\n      }\n      this.setScrollTop();\n    }\n  },\n  getRandomFontColor() {\n    // 随机颜色\n\t\tlet red = Math.floor(Math.random() * 266);\n\t\tlet green = Math.floor(Math.random() * 266);\n\t\tlet blue = Math.floor(Math.random() * 266);\n\t\treturn 'rgb(' + red + ',' + green + ' , ' + blue + ')'\n\t},\n})"
  },
  {
    "path": "packageStreamMedia/pages/live-anchor/index.json",
    "content": "{\n  \"usingComponents\": {},\n  \"disableScroll\": true,\n  \"navigationStyle\": \"custom\"\n}"
  },
  {
    "path": "packageStreamMedia/pages/live-anchor/index.wxml",
    "content": "<live-pusher id=\"pusher\" beauty='{{ beauty }}' url=\"{{ liveRoomsInfo.roomInfo.pushUrl }}\"\n mode=\"FHD\" autopush=\"true\" style='width:100vw;height:100vh' waiting-image=\"https://mc.qcloudimg.com/static/img/daeed8616ac5df256c0591c22a65c4d3/pause_publish.jpg\" />\n\n<cover-view style=\"width:100vw;height:100vh\" class=\"outer\" catchtap=\"hidePeoples\">\n  <cover-view style=\"height:{{ customBarHeight }}px\" class=\"back\">\n    <cover-view class=\"icon\" bindtap=\"backTap\">\n      <cover-image src=\"../../images/back.png\" class=\"back-icon\"></cover-image>\n    </cover-view>\n  </cover-view>\n \n  <!-- 直播信息 -->\n  <cover-view class=\"anchor-info\">\n    <cover-view class=\"left\">\n      <cover-image wx:if=\"{{ apiUserInfoMap.base.avatarUrl }}\" src='{{ apiUserInfoMap.base.avatarUrl }}' class=\"avatar\"></cover-image>\n      <cover-view class=\"mid\">\n        <cover-view>{{ apiUserInfoMap.base.nick }}</cover-view>\n        <!-- <cover-view>{{ apiUserInfoMap.base.province}} {{ apiUserInfoMap.base.city}}</cover-view> -->\n      </cover-view>\n      <cover-view class=\"ops flex\" catchtap=\"\">\n        <cover-image src=\"../../images/rotate.png\" class=\"c-img\" catchtap=\"rotateTap\"></cover-image>\n        <cover-image src=\"../../images/meiyan2.png\" class=\"c-img\" catchtap=\"showBeautySelect\"></cover-image>\n      </cover-view>\n    </cover-view>\n    <cover-view class=\"right\">\n      <cover-view class=\"txt\">房间号: {{ liveRoomsInfo.roomInfo.id }}</cover-view>\n    </cover-view>\n  </cover-view>\n\n\n   <!-- 在线人数 -->\n    <cover-view class=\"watcher\">\n      在线人数: {{ onlineNumber }}\n    </cover-view>\n\n    <!-- 主推商品 -->\n    <cover-view wx:if=\"{{ mainlyGoods }}\" class=\"main-goods\" catchtap=\"toDetail\" data-id=\"{{ mainlyGoods.id }}\">\n      <cover-image src=\"{{ mainlyGoods.pic }}\" style=\"width:168rpx;height:168rpx;border-radius:15rpx;\"></cover-image>\n    </cover-view>\n\n   <!-- 提示进入直播间 -->\n    <cover-view wx:if=\"{{ showTips }}\" class=\"tips\">\n      <cover-image src=\"{{showTipsAvatarUrl}}\" class=\"avatar-img\"></cover-image>\n      <cover-view>{{ showTipsMsg }}</cover-view>\n    </cover-view>\n\n  <!-- 弹幕 -->\n  <cover-view class=\"barrage\" catchtouchmove=\"preventDefault\" scroll-top=\"{{ scrollTop }}\">\n    <cover-view class=\"item-outer\">\n      <block wx:for='{{ barrageList }}' wx:key=\"index\">\n        <cover-view class=\"barrage-item\">\n          <cover-view class=\"item-wrap\">\n            <cover-image wx:if=\"{{ item.avatarUrl }}\" src=\"{{ item.avatarUrl }}\" class=\"avatar\"></cover-image>\n            <cover-view class=\"item-nickname\" style=\"top:{{  systemInfo.platform == 'android' ? 2 : 0 }}px;color:{{ item.color }};vertical-align:{{ systemInfo.platform == 'android' ? 'bottom' : 'middle' }}\">{{ item.nick }}</cover-view>\n            <cover-view class=\"item-words\" style=\"vertical-align:{{ systemInfo.platform == 'android' ? 'bottom' : 'middle' }}\">{{ item.msg}}</cover-view>\n          </cover-view>\n        </cover-view>\n      </block>\n    </cover-view>\n  </cover-view>\n\n  <cover-view class=\"footer\" wx:if=\"{{ !showInput }}\">\n\n    <cover-view class=\"item0\" catchtap=\"showGoods\">\n      <cover-image src=\"../../images/goods.png\" class=\"goods\"></cover-image>\n      <!-- <cover-view class=\"txt\">宝贝</cover-view> -->\n    </cover-view>\n\n    <cover-view class=\"item1\" catchtap=\"handleInteractionTap\">\n      <cover-image class=\"cmt-icon\" src=\"../../images/chat.png\"></cover-image>\n      <cover-view class=\"txt\">跟大家互动吧...</cover-view>\n    </cover-view>\n\n      <cover-view class=\"item2\">\n        <button class=\"icon-wrap\" open-type=\"share\">\n          <cover-image src=\"../../images/forward.png\" class=\"icons\"></cover-image>\n        </button>\n        <!-- <cover-view class=\"txt\">分享</cover-view> -->\n      </cover-view>\n\n    <cover-view class=\"item2\"  catchtap=\"showPeoples\">\n      <cover-view class=\"icon-wrap\"style=\"background: #B17068\">\n        <cover-image src=\"../../images/people.png\" class=\"icons\"></cover-image>\n      </cover-view>\n      <!-- <cover-view class=\"txt\">人员</cover-view> -->\n    </cover-view>\n\n    <!-- <cover-view class=\"item2 item3\"  catchtap=\"showSet\">\n      <cover-view class=\"icon-wrap\"  style=\"background: #17abe3\">\n        <cover-image src=\"/images/shezhi.png\" class=\"icons\"></cover-image>\n      </cover-view>\n      <cover-view class=\"txt\">设置</cover-view>\n    </cover-view> -->\n  </cover-view> \n\n</cover-view>\n\n <!-- 输入 -->\n  <!-- 发送弹幕的icon -->\n  <cover-view class=\"left-input\" wx:if='{{ showInput }}'>\n    <cover-image class=\"icon\" src=\"../../images/chat02.png\"></cover-image>\n  </cover-view>\n\n  <!-- line -->\n  <cover-view class=\"line-wrap\" wx:if='{{ showInput }}'>\n    <cover-image class=\"line-icon\" src=\"../../images/line.png\"></cover-image>\n  </cover-view>\n\n  <!-- send barrage -->\n  <input cursor-spacing='0' bindkeyboardheightchange=\"keyboardEvent\"  wx:if='{{ showInput }}' focus=\"{{ focus }}\" placeholder-class=\"holder-class\" placeholder='说点什么吧...'  value=\"{{ inputVal }}\" class=\"send-barrage\" confirm-type='send' bindconfirm=\"onComment\" bindinput=\"bindInput\"></input>\n\n  <!-- <cover-view wx:if='{{ showInput }}' class=\"send-btn\" catchtap=\"onComment\">\n    发送\n  </cover-view> -->\n\n<!-- 点击人员列表 -->\n<cover-view class=\"goods-list {{ showPeopleInfo ? 'open' : 'close' }}\"> \n  <cover-view class=\"title flex-between\">\n    <cover-view>全部人员</cover-view>\n    <cover-image src=\"../../images/people.png\" class=\"img\" catchtap=\"\"></cover-image>\n  </cover-view>\n\n  <cover-view class=\"item-list\">\n    <block wx:for='{{ peoplelist }}' wx:key='id'>\n      <cover-view class=\"item flex\">\n        <cover-image wx:if=\"{{item.avatarUrl}}\" src=\"{{ item.avatarUrl }}\" class=\"goods-img\"></cover-image>\n        <cover-view class=\"info flex\">\n          <cover-view>{{ item.nick }} </cover-view>\n          <cover-view>{{ item.ip }}</cover-view>\n          <cover-view>{{ item.ip }}</cover-view>\n        </cover-view>\n        <button class=\"btn\" catchtap=\"lahei\" data-uid=\"{{ item.uid }}\">踢出</button>\n      </cover-view>\n    </block>\n  </cover-view>\n</cover-view>\n\n<!-- 点击宝贝弹出的商品列表 -->\n<cover-view class=\"goods-list {{ showGoodsInfo ? 'open' : 'close' }}\">\n  <cover-view class=\"title flex-between\">\n    <cover-view>全部商品</cover-view>\n  </cover-view> \n\n  <cover-view class=\"item-list\">\n    <block wx:for='{{ liveRoomsInfo.goodsList }}' wx:key='{{ item.id }}'>\n      <cover-view class=\"item flex\">\n        <cover-image src=\"{{ item.pic }}\" class=\"goods-img\"></cover-image>\n        <cover-view class=\"info flex\">\n          <cover-view class=\"goods-title\">{{ item.name }}</cover-view>\n          <cover-view class=\"price\">￥{{ item.minPrice }}</cover-view>\n        </cover-view>\n        <button class=\"btn\" catchtap=\"navPurchase\" data-idx=\"{{ index }}\">主推</button>\n      </cover-view>\n    </block>\n  </cover-view>\n  <cover-view class=\"goods-empty\" wx:if=\"{{ !liveRoomsInfo.goodsList }}\">暂无商品~</cover-view> \n\n</cover-view>\n\n<cover-view wx:if=\"{{ showSelect09 }}\" class=\"beauty-select\">\n  <cover-view class=\"item\" wx:for=\"{{ 10 }}\" wx:key=\"*this\" data-num=\"{{ item }}\" bindtap=\"select09\">{{ item }}</cover-view>\n</cover-view>"
  },
  {
    "path": "packageStreamMedia/pages/live-anchor/index.wxss",
    "content": "page {\n  height: 100%;\n  overflow: hidden;\n}\n\n.watcher {\n  color: greenyellow;\n  font-weight: 600;\n  margin-top: 15rpx;\n  text-align: right;\n  font-size: 24rpx;\n  padding-right: 50rpx;\n}\n\n.tips { \n  position: absolute;\n  top: 598rpx;\n  left: 0;\n  width: 80%;\n  height: 66rpx;\n  line-height: 66rpx;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  border-radius: 0 33rpx 33rpx 0;\n  color: #fff;\n  font-size: 24rpx;\n  background: #ef7471;\n  opacity: 0.4;\n  padding: 0 24rpx;\n  display: flex;\n  align-items: center;\n}\n\n.tips .avatar-img {\n  width: 48rpx;\n  height: 48rpx;\n  border-radius: 50%;\n  margin-right: 10rpx;\n}\n\nlive-player {\n  z-index: 99999;\n  position: relative;\n}\n\n.outer {\n  position: absolute;\n  left: 0;\n  top: 0;\n  z-index: 999;\n}\n\n.outer .back {\n  width: 140rpx;\n  position: relative;\n}\n\n.outer .back .icon {\n  position: absolute;\n  left: 24rpx;\n  bottom: 8rpx;\n  width: 50rpx;\n  height: 50rpx;\n  background: rgba(0, 0, 0, 0.3);\n  border: 1rpx solid rgba(204, 204, 204, 1);\n  border-radius: 50%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\n.outer .back .icon .back-icon {\n  transform: scale(0.6);\n}\n\n.outer .anchor-info {\n  margin-top: 50rpx;\n  padding: 0 30rpx;\n  height: 70rpx;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.outer .anchor-info .left {\n  height: 100%;\n  width: auto;\n  display: flex;\n  align-items: center;\n  background: rgba(0, 0, 0, 0.3);\n  border-radius: 34rpx;\n}\n\n.outer .anchor-info .left .avatar {\n  width: 58rpx;\n  height: 58rpx;\n  border-radius: 50%;\n  margin-left: 6rpx;\n}\n\n.outer .anchor-info .left .mid {\n  display: flex;\n  flex-direction: column;\n  font-size: 24rpx;\n  color: #fff;\n  margin-left: 6rpx;\n  margin-right: 14rpx;\n}\n\n.outer .anchor-info .left .ops {\n  border-radius: 25rpx;\n  margin-right: 6rpx;\n  display: flex;\n  align-items: center;\n}\n\n.outer .anchor-info .left .ops .c-img {\n  transform: scale(0.6);\n}\n\n.outer .anchor-info .left .follow  .add {\n  width: 40rpx;\n  height: 40rpx;\n  margin-left: 6rpx;\n  margin-right: 10rpx;\n}\n\n.outer .anchor-info .left .follow .txt {\n  font-size: 30rpx;\n  color: #fff;\n}\n\n.outer .anchor-info .right {\n  min-width: 174rpx;\n  height: 40rpx;\n  border-radius: 20rpx;\n  background: rgba(0, 0, 0, 0.3);\n  display: flex;\n  align-items: center;\n}\n\n.outer .anchor-info .right .txt {\n  font-size: 24rpx;\n  color: #fff;\n  margin-left: 15rpx;\n  padding: 0 10rpx;\n}\n\n.outer .footer {\n  position: absolute;\n  bottom: 20rpx;\n  right: 24rpx;\n  left: 24rpx;\n  height: auto;\n  min-height: 100rpx;\n  display: flex;\n  align-items: center;\n}\n\n.outer .footer .item0 {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  padding: 10rpx;\n}\n\n.outer .footer .item0 .goods {\n  width: 70rpx;\n  height: 70rpx;\n}\n\n.outer .footer .item0 .txt {\n  font-size: 24rpx;\n  color: #fff;\n  margin-top: 8rpx;\n}\n\n\n.outer .footer .item1 {\n  width: 400rpx;\n  height: 70rpx;\n  background: rgba(0, 0, 0, 0.3);\n  border-radius: 34rpx;\n  margin: 0 30rpx 0 30rpx;\n  display: flex;\n  align-items: center;\n}\n\n.outer .footer .item1 .cmt-icon {\n  width: 30rpx;\n  height: 30rpx;\n  margin: 0 20rpx;\n}\n\n.outer .footer .item1 .txt {\n  color: #fff;\n  font-size: 28rpx;\n}\n\n.outer .footer .item2 {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  margin-right: 12rpx;\n}\n\n.outer .footer .item2 .icon-wrap {\n  width: 70rpx;\n  height: 70rpx;\n  background: rgba(0, 0, 0, 0);\n  border-radius: 50%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\n.outer .footer .item2 .icon-wrap .icons {\n  width: 36rpx;\n  height: 36rpx;\n}\n\n.outer .footer .item2  .txt {\n  font-size: 24rpx;\n  color: #fff;\n  margin-top: 8rpx;\n}\n\n.outer .barrage {\n  position: absolute;\n  width: 500rpx;\n  height: 500rpx;\n  bottom: 140rpx;\n  overflow-y: scroll;\n  background: transparent;\n}\n\n.outer .barrage .barrage-item {\n  padding: 5rpx 20rpx;\n  border-radius: 10rpx;\n}\n\n.outer .barrage .barrage-item  .item-wrap {\n  border-radius: 15rpx;\n  display: inline-block;\n  padding: 6rpx;\n  background: rgba(0, 0, 0, 0.3);\n}\n\n.outer .barrage .barrage-item  .item-wrap .avatar {\n  width: 46rpx;\n  height: 46rpx;\n  display: inline-block;\n  margin-right: 4rpx;\n  border-radius: 50%;\n  vertical-align: middle;\n}\n\n.outer .barrage .barrage-item  .item-wrap .item-nickname {\n  max-width: 200rpx;\n  position: relative;\n  max-width: 150rpx;\n  overflow: hidden;\n  display: inline-block;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  vertical-align: middle;\n}\n\n.outer .barrage .barrage-item  .item-wrap .item-words {\n  width:450rpx;\n  display: inline-block;\n  margin-left: 15rpx;\n  word-break: break-all;\n  white-space: nowrap;\n  color: #fff;\n  font-size: 26rpx;\n  overflow-x: scroll;\n  vertical-align: middle;\n  text-overflow:ellipsis;\n  word-wrap:break-word;\n  white-space:pre-wrap;\n}\n\n.send-barrage {\n  z-index: 99999;\n  position: absolute;\n  left: 0;\n  bottom: 0;\n  height: 50px;\n  line-height: 50px;\n  border: 1px solid #ccc;\n  width: 70%;\n  box-sizing: border-box;\n  padding: 0 8rpx;\n}\n\n.send-btn {\n  position: fixed;\n  z-index: 9999;\n  bottom: 0;\n  right: 0;\n  height: 50px;\n  line-height: 50px;\n  background: #010101;\n  color: #ffeab7;\n  font-size: 32rpx;\n  width: 30%;\n  text-align: center;\n}\n\n.hover-class {\n  color: #dfdfdf;\n}\n\n.goods-list {\n  position: absolute;\n  z-index: 99999;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  background: rgba(255, 255, 255, 0.9);\n  border-radius: 10rpx 10rpx 0 0;\n  height: 900rpx;\n  overflow: hidden;\n}\n\n.goods-list .goods-empty {\n  position: absolute;\n  right: 0;\n  left: 0;\n  top: 300rpx;\n  z-index: 99999;\n  line-height: 100rpx;\n  text-align: center;\n  color: #888;\n  font-size: 26rpx;\n}\n\n.open {\n  transition: all 0.3s ease-out;\n  transform: translateY(0);\n}\n\n.close {\n  transition: all 0.3s ease-out;\n  transform: translateY(900rpx);\n}\n\n\n.left-input {\n  width: 12%;\n  z-index: 9999;\n  position: absolute;\n  left: 0;\n  bottom: 2rpx;\n  background: #fff;\n  height: 50px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.left-input .icon {\n  width: 30rpx;\n  height: 30rpx;\n}\n\n.line-wrap {\n  position: absolute;\n  z-index: 9999;\n  left: 11%;\n  bottom: 2rpx;\n  background: #fff;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  height: 50px;\n}\n\n.line-wrap .line-icon {\n  width: 1px;\n  height: 50rpx;\n}\n\n.send-barrage {\n  z-index: 9999;\n  position: absolute;\n  left: 12%;\n  bottom: 2rpx;\n  height: 50px;\n  line-height: 50px;\n  width: 88%;\n  box-sizing: border-box;\n  padding: 0 8rpx;\n  background: #fff;\n  color: 28rpx;\n  border: 0;\n  outline: 0;\n}\n\n.send-btn {\n  position: absolute;\n  z-index: 9999;\n  bottom: 2rpx;\n  right: 0;\n  height: 50px;\n  line-height: 50px;\n  font-size: 32rpx;\n  width: 20%;\n  text-align: center;\n  background: #b25f4a;\n  color: #fff;\n}\n\n.hover-class {\n  color: #dfdfdf;\n}\n\n.goods-list .title {\n  padding: 0 24rpx;\n  position: absolute;\n  left: 0;\n  top: 32rpx;\n  right: 0;\n  min-height: 68rpx;\n  border-bottom: 1rpx solid #ccc;\n}\n\n.goods-list .item-list {\n  margin: 100rpx 24rpx 0;\n  overflow-y: scroll;\n  max-height: 900rpx;\n}\n\n.goods-list .item-list .item {\n  padding: 20rpx 0;\n  border-bottom: 1rpx solid #ccc;\n  position: relative;\n}\n\n.goods-list .item-list .item .goods-img {\n  width: 110rpx;\n  height: 110rpx;\n  border-radius: 10rpx;\n  margin-right: 15rpx;\n}\n\n.goods-list .item-list .item .info {\n  flex-direction: column;\n  justify-content: space-between;\n  padding: 10rpx 0;\n}\n\n.goods-list .item-list .item .info .price {\n  \n  font-size: 28rpx;\n}\n\n.goods-list .item-list .item .info .goods-title {\n  width: 360rpx;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.goods-list .item-list .item .btn {\n  position: absolute;\n  right: 0;\n  bottom: 10rpx;\n  width: 120rpx;\n  height: 50rpx;\n  font-size: 26rpx;\n  border-radius: 60rpx;\n  line-height: 50rpx;\n  background: #ff605a;\n  color: #fff;\n}\n\n.main-goods {\n  position: absolute;\n  top: 260rpx;\n  left: 24rpx;\n  z-index: 99;\n}\n\n.beauty-select {\n  position: absolute;\n  top: 300rpx;\n  left: 25rpx;\n  width: 700rpx;\n  display: flex;\n  justify-content: space-between;\n  z-index: 99999;\n}\n.beauty-select .item {\n  width: 64rpx;\n  height: 64rpx;\n  line-height: 64rpx;\n  text-align: center;\n  background: rgba(0, 0, 0, 0.3);\n  color: #fff;\n  border-radius: 50%;\n}"
  },
  {
    "path": "packageStreamMedia/pages/live-anchor/list.js",
    "content": "const WXAPI = require('apifm-wxapi')\nPage({\n  data: {\n\n  },\n  onLoad: function (options) {\n    this.myLiveRooms()\n  },\n  onShow: function () {\n\n  },\n  async myLiveRooms() {\n    const res = await WXAPI.myLiveRooms({\n      token: wx.getStorageSync('token')\n    })\n    if (res.code == 0) {\n      this.setData({\n        liveRooms: res.data.result\n      })\n    }\n  },\n  stop(e) {\n    wx.showModal({\n      title: '提示',\n      content: '确定结束本场直播吗？',\n      success: res => {\n        if (res.confirm) {\n          this._stop(e)\n        }\n      }\n    })\n  },\n  async _stop(e) {\n    const id = e.currentTarget.dataset.id\n    const res = await WXAPI.stopLiveRoom(wx.getStorageSync('token'), id)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    this.myLiveRooms()\n  },\n})"
  },
  {
    "path": "packageStreamMedia/pages/live-anchor/list.json",
    "content": "{\n  \"navigationBarTitleText\": \"我的直播间\"\n}"
  },
  {
    "path": "packageStreamMedia/pages/live-anchor/list.wxml",
    "content": "<van-empty wx:if=\"{{ !liveRooms || liveRooms.length == 0 }}\" description=\"暂无直播间\" />\n<view class=\"list\" wx:for=\"{{ liveRooms }}\" wx:key=\"id\">\n  <van-cell wx:if=\"{{ item.status == 0 || item.status == 1 || item.status == 11 }}\" title=\"{{ item.name }}\" label=\"开播时间:{{ item.startTime }}\" value=\"{{ item.statusStr }}\" is-link center url=\"/packageStreamMedia/pages/live-anchor/index?id={{ item.id }}\" />\n  <van-cell wx:else title=\"{{ item.name }}\" label=\"开播时间:{{ item.startTime }}\" value=\"{{ item.statusStr }}\" center />\n  <image class=\"coverImage\" src=\"{{ item.coverImage }}\" mode=\"aspectFill\"></image>\n  <view class=\"btn-group\">\n    <van-button wx:if=\"{{ item.status == 1 || item.status == 11 }}\" type=\"danger\" size=\"small\" round data-id=\"{{ item.id }}\" bind:click=\"stop\">结束本场直播</van-button>\n  </view>\n  <van-divider />\n</view>"
  },
  {
    "path": "packageStreamMedia/pages/live-anchor/list.wxss",
    "content": ".coverImage {\n  width: 100vw;\n}\n.btn-group {\n  padding: 0 16rpx;\n  text-align: right;\n}"
  },
  {
    "path": "packageStreamMedia/pages/live-client/client.js",
    "content": "const WXAPI = require('apifm-wxapi')\n\n// websocket 第一步\nlet socketOpen = false\nlet socketMsgQueue = []\n\nPage({\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    viewNumber: 0, // 观看人数\n    likeNumber: 0, // 点赞数量\n    follow: true,\n    inputVal: '',\n    userId: '', // 用户id\n    groupId: null, // 群id\n    playUrl: '', // 拉流地址\n    barrageList: [], // 用户聊天记录\n    showInput: false, // 是否显示输入框\n    focus: false,\n    goodsList: [],\n    pageIndex: 1,\n    pageSize: 10,\n    hasMore: true,\n    showGoodsInfo: false,\n    firstTap: false,\n    showEmpty: false, // 是否展示缺省提示\n    nickname: '', // 当前用户昵称\n    scrollTop: '', // 设置cover-view 设置顶部滚动的偏移量\n    online: '',\n    showTips: false, // 是否显示某个人加入进入直播间\n    online_people: '', // 观看人数 \n    anchor_cover: '', // 主播封面\n    roomId:undefined,\n    intoRoomStatus:true\n  },\n\n  // 通知主播已经下线\n  showWarningOffAndExit() {\n    wx.showModal({\n      title: '提示',\n      content: '主播已经离开了~，下次再见，拜拜!',\n      showCancel: false,\n      confirmText: '我知道了',\n      confirmColor: '#FE6889',\n      success: res => {\n        if (res.confirm) {\n          wx.navigateBack()\n        }\n      }\n    })\n  },\n  // 通知被主播拉黑下线\n  lahei() {\n    wx.showToast({\n      title: '系统异常，强制退出直播间',\n      icon: 'none',\n      duration: 2000\n    })\n    setTimeout(function(){\n      wx.switchTab({\n        url : \"/pages/index/index\"\n      })\n    },3000);\n    \n  },\n  // 某人加入房间\n  showTips(avatarurl, msg) {\n    this.setData({\n      showTips: true,\n      showTipsAvatarUrl: avatarurl,\n      showTipsMsg: msg\n    })\n    if (!this.data.focus) {\n      this.setScrollTop();\n    }\n    setTimeout(() => {\n      this.setData({\n        showTips: false\n      })\n    }, 3000);\n  },\n  setScrollTop() {\n    var query = wx.createSelectorQuery();\n    wx.createSelectorQuery().in(this).select('.barrage').boundingClientRect(res => {\n      console.log(res)\n      this.setData({\n        chatbottom: res.bottom,\n      })\n    }).exec()\n\n    query.in(this).select('.item-outer').boundingClientRect(res => {\n      if (res.bottom > this.data.chatbottom) {\n        let temp = Math.ceil(parseInt(res.bottom) - parseInt(e.data.chatbottom))\n        this.setData({\n          scrollTop: temp // 如此保证scrollTop的值 让滚动条一直滚动到最后 9999 开发工具可以设置为辞职 苹果真机不行\n        })\n      }\n    }).exec()\n  },\n\n  onLoad: function(options) {\n    // options.id = 15\n    this.data.id = options.id\n    // 读取自定义头高度\n    const systemInfo = wx.getSystemInfoSync()\n    const custom = wx.getMenuButtonBoundingClientRect()\n    this.setData({\n      systemInfo,\n      customBarHeight: custom.bottom + custom.top - systemInfo.statusBarHeight\n    })\n    //获取直播信息  主播信息\n    this.getLiveInfo()\n    this.initWebSocket()\n    // 设置屏幕常亮  \n    wx.setKeepScreenOn({ keepScreenOn: true })\n\n    let query = wx.createSelectorQuery()\n    query.select('.barrage').boundingClientRect(function(rect) {\n      console.log(rect)\n    }).exec();\n\n  },\n  // 主推商品详情\n  async toDetail(e) {\n    const id = e.currentTarget.dataset.id\n    const res = await WXAPI.goodsDetail(id, wx.getStorageSync('token'))\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    if (res.data.basicInfo.supplyType == 'cps_jd') {\n      wx.navigateTo({\n        url: `/packageCps/pages/goods-details/cps-jd?id=${id}`,\n      })\n    } else if (res.data.basicInfo.supplyType == 'vop_jd') {\n      wx.navigateTo({\n        url: `/pages/goods-details/vop?id=${res.data.basicInfo.yyId}&goodsId=${res.data.basicInfo.id}`,\n      })\n    } else if (res.data.basicInfo.supplyType == 'cps_pdd') {\n      wx.navigateTo({\n        url: `/packageCps/pages/goods-details/cps-pdd?id=${id}`,\n      })\n    } else if (res.data.basicInfo.supplyType == 'cps_taobao') {\n      wx.navigateTo({\n        url: `/packageCps/pages/goods-details/cps-taobao?id=${id}`,\n      })\n    } else {\n      wx.navigateTo({\n        url: `/pages/goods-details/index?id=${id}`,\n      })\n    }\n  },\n  async handleLikeClick() {\n    await WXAPI.likeLiveRoom(wx.getStorageSync('token'), this.data.id)\n    this.sendSocketMessage('act:like')\n  },\n\n\n  preventDefault(e) {\n    return;\n  },\n\n  getUserInfo() {\n    let token = wx.getStorageSync('token')\n    return\n    api.get({\n      url: '/wxsmall/User/getUserInfo',\n      data: {\n        token,\n      },\n      success: res => {\n        console.log(res)\n        let {\n          nickname,\n          avatar\n        } = res.data\n        this.setData({\n          nickname,\n          avatar\n        })\n      }\n    })\n  },\n\n  hideGoods() {\n    // // 防止连续点击--开始\n    // if (this.data.payButtonClicked) {\n    //   wx.showToast({\n    //     title: '休息一下~',\n    //     icon: 'none'\n    //   })\n    //   return\n    // }\n    // this.data.payButtonClicked = true\n    // setTimeout(() => {\n    //   this.data.payButtonClicked = false\n    // }, 1500)  // 可自行修改时间间隔（目前是3秒内只能点击一次支付按钮）\n    // // 防止连续点击--结束\n    this.setData({\n      showGoodsInfo: false,\n      showInput: false,\n      focus:false\n    })\n  },\n\n\n  showGoods() {\n    let data = this.data\n    if (!data.firstTap) {\n      this.getGoodsList()\n      this.setData({\n        firstTap: true\n      })\n    }\n    this.setData({ showGoodsInfo: true, showEmpty:true, })\n  },\n\n  async getGoodsList() {\n    wx.showLoading({\n      title: '加载中',\n    })\n    // https://www.yuque.com/apifm/nu0f75/wg5t98\n    const res = await WXAPI.goodsv2()\n  //  console.log(res.data);\n    wx.hideLoading()\n    if (res.code == 0) {\n      if(res.data.length==0){\n        this.setData({\n          showEmpty: true\n        })\n      }else{\n        this.setData({\n          goodsList: res.data.result,\n          showEmpty: false\n        })\n      }\n     \n    }\n   \n  },\n  async getLiveInfo() {\n    const res = await WXAPI.liveRoomsInfo(wx.getStorageSync('token'), this.data.id)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      wx.navigateBack()\n      return\n    }\n    let mainlyGoods = null\n    if (res.data.mainlyGoodsId) {\n      mainlyGoods = res.data.goodsList.find(ele => {\n        return ele.id == res.data.mainlyGoodsId\n      })\n    }\n    this.setData({\n      liveRoomsInfo: res.data,\n      viewNumber: res.data.roomInfo.viewNumber,\n      likeNumber: res.data.roomInfo.likeNumber,\n      mainlyGoods,\n      follow: true\n    })\n    // TODO follow true / false\n  },\n\n\n  /**\n   * 发送弹幕问题\n   */\n  onComment() {\n    const inputVal = this.data.inputVal\n    if (!inputVal) {\n      wx.showToast({\n        title: '内容不能为空',\n        icon: 'none'\n      })\n      return;\n    }\n    this.sendSocketMessage(inputVal)\n    this.setData({\n      inputVal: '',\n      showInput: false\n    })\n  },\n  bindInput(e) {\n    this.setData({\n      inputVal: e.detail.value\n    })\n  },\n\n  handleInteractionTap() {\n      // 防止连续点击--开始\n      if (this.data.payButtonClicked) {\n        wx.showToast({\n          title: '慢点~',\n          icon: 'none'\n        })\n        return\n      }\n      this.data.payButtonClicked = true\n      setTimeout(() => {\n        this.data.payButtonClicked = false\n      }, 1500)  // 可自行修改时间间隔（目前是3秒内只能点击一次按钮）\n      // 防止连续点击--结束\n    let data = this.data\n    let temp;\n    if (!data.showInput) {\n      temp = data.fullScreenHeight - 50\n    } else {\n      temp = app.globalData.screenH\n    }\n    this.setData({\n      //showInput: !this.data.showInput,\n       fullScreenHeight: temp,\n      showInput: true,\n      focus: true\n    })\n  },\n\n  followTap() { \n    var that = this\n    wx.request({\n      url:  CONFIG.HTTP_REQUEST_URL+\"customerConcern\", \n      data: {\n        roomId:that.data.info.id,\n        userOpenId:wx.getStorageSync('openid'),\n        status:1\n      },\n      method: \"GET\",\n      header: {\n        'Content-Type': 'application/json;charset=utf-8 '\n      },\n      success: function (res2) {\n        console.log(\"followTap\",res2);\n        if(res2.data.code==500){\n          wx.showToast({\n            title: res2.data.message,\n            duration: 1500,\n            icon: 'none',\n            mask: true,\n          })\n          return\n        }\n        wx.showToast({\n          title: '已关注',\n          icon: 'none'\n        })\n        that.setData({\n          follow: true\n        })\n      },\n    })\n  },\n\n  onReady(res) {\n    this.ctx = wx.createLivePlayerContext('player')\n  },\n  statechange(e) {\n    console.log('live-player code:', e.detail.code)\n  },\n  error(e) {\n    console.error('live-player error:', e.detail.errMsg)\n  },\n  onShow() {//进入页面链接\n    \n  },\n  backTap() { \n    wx.navigateBack()\n  },\n  /**\n  * 用户点击右上角分享\n  */\n  onShareAppMessage: function () {\n    return {\n      title: '快来我的直播间看看吧~',\n      imageUrl: this.data.liveRoomsInfo.roomInfo.coverImage,\n      path: `/packageStreamMedia/pages/live-client/client?id=${this.data.id}`\n    }\n  },\n  // webscoket 第二步， 增加下面方法\n  connectSocket() {\n    wx.connectSocket({\n      url: 'wss://api.it120.cc/websocket/liveRoom/' + this.data.id + '/' + wx.getStorageSync('token')\n    })\n  },\n  initWebSocket() {\n    this.connectSocket()\n    wx.onSocketOpen(res => {\n      console.log(res);\n      socketOpen = true\n      for (let i = 0; i < socketMsgQueue.length; i++){\n        sendSocketMessage(socketMsgQueue[i])\n      }\n      socketMsgQueue = []\n    })\n    wx.onSocketClose(res => {\n      console.log(res);\n      // 关闭，重连\n      socketOpen = false\n      if (res.code == 1004 && res.reason == 'kickOut') {\n        wx.reLaunch({\n          url: '/pages/index/index'\n        })\n        return\n      }\n      wx.showToast({\n        title: res.code + ':' + res.reason,\n        icon: 'none'\n      })\n      setTimeout(() => {\n        this.connectSocket()\n      }, 3000);\n    })\n    wx.onSocketMessage(res => {\n      // 接收服务器推送的消息\n      if (res.code != 0) {\n        wx.showToast({\n          title: resJson.msg,\n          icon: 'none'\n        })\n        return\n      }\n      const resJson = JSON.parse(res.data)\n      this.processSocketMessage(resJson.data)\n    })\n  },\n  sendSocketMessage(msg) {\n    // 向 websocket 发送消息\n    if (socketOpen) {\n      wx.sendSocketMessage({\n        data: msg\n      })\n    } else {\n      socketMsgQueue.push(msg)\n    }  \n  },\n  processSocketMessage(res) {\n    // 接收到服务器推送到消息\n    console.log(res)\n    if (res.act == 'onlineNumber') {\n      this.setData({\n        onlineNumber: res.data\n      })\n    }\n    if (res.act == 'userComing') {\n      this.setData({\n        viewNumber: this.data.viewNumber + 1\n      })\n      this.showTips(res.avatarUrl, `${res.nick}进入直播间`)\n    }\n    if (res.act == 'msg') {\n      if (res.msg.indexOf('act:mainlyGoods:') == 0) {\n        const goodsId = res.msg.replace('act:mainlyGoods:', '')\n        console.log(goodsId);\n        const mainlyGoods = this.data.liveRoomsInfo.goodsList.find(ele => {\n          return ele.id == goodsId\n        })\n        this.setData({\n          mainlyGoods\n        })\n        return\n      }\n      if (res.msg == 'act:like') {\n        this.setData({\n          likeNumber: this.data.likeNumber + 1\n        })\n        return\n      }\n      const barrageList = this.data.barrageList\n      barrageList.push({\n        nick: res.nick,\n        avatarUrl: res.avatarUrl,\n        msg: res.msg,\n        color: this.getRandomFontColor()\n      })\n      this.setData({\n        barrageList: barrageList.length > 100 ? barrageList.slice(50) : barrageList\n      })\n      if (this.data.focus) {\n        return\n      }\n      this.setScrollTop();\n    }\n  },\n  getRandomFontColor() {\n    // 随机颜色\n\t\tlet red = Math.floor(Math.random() * 266);\n\t\tlet green = Math.floor(Math.random() * 266);\n\t\tlet blue = Math.floor(Math.random() * 266);\n\t\treturn 'rgb(' + red + ',' + green + ' , ' + blue + ')'\n\t},\n})"
  },
  {
    "path": "packageStreamMedia/pages/live-client/client.json",
    "content": "{\n\t\"navigationStyle\": \"custom\",\n  \"usingComponents\": {\n    \"like-dz\":\"../../components/like-dz/like-dz\"\n  },\n  \"disableScroll\": true\n}"
  },
  {
    "path": "packageStreamMedia/pages/live-client/client.wxml",
    "content": "<view class='wrap' >\n  <!-- 直播播放组件 官方提供 -->\n  <live-player wx:if=\"{{ liveRoomsInfo.roomInfo.pullUrlRtmp }}\" src=\"{{ liveRoomsInfo.roomInfo.pullUrlRtmp }}\" id='player' autoplay bindstatechange=\"statechange\" binderror=\"error\" \n  style='width:100vw;height:100vh;' picture-in-picture-mode=\"push\" object-fit=\"fillCrop\" \n  auto-pause-if-navigate=\"false\" auto-pause-if-open-native=\"false\"/>\n   <!-- canvas实现点赞效果 使用组件 -->\n\n  <like-dz count=\"{{count}}\"></like-dz>\n  \n  <cover-view style=\"width:100vw;height:100vh\" class=\"outer\" catchtap=\"hideGoods\">\n    <!-- 返回图标 -->\n    <cover-view style=\"height:{{ customBarHeight }}px\" class=\"back\">\n      <cover-view class=\"icon\" bindtap=\"backTap\">\n        <cover-image src=\"../../images/back.png\" class=\"back-icon\"></cover-image>\n      </cover-view>\n    </cover-view>\n     <!-- 主播信息 -->\n    <cover-view class=\"anchor-info\">\n      <cover-view class=\"left\">\n        <cover-image wx:if=\"{{ liveRoomsInfo.anchor.avatarUrl }}\" src='{{ liveRoomsInfo.anchor.avatarUrl }}' class=\"avatar\"></cover-image>\n        <cover-view class=\"mid\">\n          <cover-view class=\"nickname\">{{ liveRoomsInfo.anchor.nick }}</cover-view>\n          <!-- <cover-view>{{ info.province }}{{ info.city }}</cover-view> -->\n        </cover-view>\n        <!-- <cover-view class=\"follow\" catchtap=\"followTap\" wx:if=\"{{ !follow }}\">\n          <cover-view class=\"follow-icon-wrap\">\n            <cover-image src=\"../../images/add.png\" class=\"add\"></cover-image>\n          </cover-view>\n          <cover-view class=\"txt\">关注</cover-view>\n        </cover-view> -->\n      </cover-view>\n      <cover-view class=\"right\">\n        <cover-view class=\"txt\">房间号: {{ liveRoomsInfo.roomInfo.id }}</cover-view>\n      </cover-view>\n    </cover-view>\n    <!-- 观看人数 -->\n    <cover-view class=\"watcher\">\n      观看人数: {{ viewNumber }}\n    </cover-view>\n\n    <!-- 主推商品链接 -->\n    <cover-view wx:if=\"{{ mainlyGoods }}\" class=\"main-goods\" catchtap=\"toDetail\" data-id=\"{{ mainlyGoods.id }}\">\n      <cover-image src=\"{{ mainlyGoods.pic }}\" style=\"width:168rpx;height:168rpx;border-radius:15rpx;\"></cover-image>\n    </cover-view>\n    <!-- 提示sb进入直播间 -->\n    <cover-view wx:if=\"{{ showTips }}\" class=\"tips\">\n      <cover-image src=\"{{showTipsAvatarUrl}}\" class=\"avatar-img\"></cover-image>\n      <cover-view>{{ showTipsMsg }}</cover-view>\n    </cover-view>\n    <!-- 弹幕 -->\n    <cover-view class=\"barrage\" catchtouchmove=\"preventDefault\" scroll-top=\"{{ scrollTop }}\">\n      <cover-view class=\"item-outer\">\n        <block wx:for='{{ barrageList }}' wx:key=\"index\">\n          <cover-view class=\"barrage-item\">\n            <cover-view class=\"item-wrap\">\n              <cover-image wx:if=\"{{ item.avatarUrl }}\" src=\"{{ item.avatarUrl }}\" class=\"avatar\"></cover-image>\n              <cover-view class=\"item-nickname\" style=\"top:{{  systemInfo.platform == 'android' ? 2 : 0 }}px;color:{{ item.color }};vertical-align:{{ systemInfo.platform == 'android' ? 'bottom' : 'middle' }}\">{{ item.nick }}</cover-view>\n              <cover-view class=\"item-words\" style=\"vertical-align:{{ systemInfo.platform == 'android' ? 'bottom' : 'middle' }}\">{{ item.msg}}</cover-view>\n            </cover-view>\n          </cover-view>\n        </block>\n      </cover-view>\n    </cover-view>\n    <!-- footer -->\n    <cover-view class=\"footer\" wx:if=\"{{ !showInput }}\">\n      <cover-view class=\"item0\" catchtap=\"showGoods\">\n        <cover-image src=\"../../images/goods.png\" class=\"goods\"></cover-image>\n        <!-- <cover-view class=\"txt\">宝贝</cover-view> -->\n      </cover-view>\n\n      <cover-view class=\"item1\" catchtap=\"handleInteractionTap\">\n        <cover-image class=\"cmt-icon\" src=\"../../images/chat.png\"></cover-image>\n        <cover-view class=\"txt\">跟主播互动吧...</cover-view>\n      </cover-view>\n\n      <cover-view class=\"item2\">\n        <button class=\"icon-wrap\" open-type=\"share\">\n          <cover-image src=\"../../images/forward.png\" class=\"icons\"></cover-image>\n        </button>\n        <!-- <cover-view class=\"txt\">分享</cover-view> -->\n      </cover-view>\n\n      <cover-view class=\"item2 item3\" catchtap=\"handleLikeClick\">\n        <cover-view class=\"icon-wrap\" style=\"background: #B17068\">\n          <cover-image src=\"../../images/fabulous.png\" class=\"icons\"></cover-image>\n        </cover-view>\n        <!-- <cover-view class=\"txt\">点赞</cover-view> -->\n      </cover-view>\n    </cover-view>\n\n    <cover-view class=\"like-box\" wx:if=\"{{ likeNumber > 0}}\">{{ likeNumber }}</cover-view>\n  </cover-view>\n  \n  <!-- 输入 -->\n  <!-- 发送弹幕的icon -->\n  <cover-view class=\"left-input\" wx:if='{{ showInput }}'>\n    <cover-image class=\"icon\" src=\"../../images/chat02.png\"></cover-image>\n  </cover-view>\n\n  <!-- line -->\n  <cover-view class=\"line-wrap\" wx:if='{{ showInput }}'>\n    <cover-image class=\"line-icon\" src=\"../../images/line.png\"></cover-image>\n  </cover-view>\n\n  <!-- send barrage -->\n   <input cursor-spacing='0' bindkeyboardheightchange=\"keyboardEvent\"  wx:if='{{ showInput }}' focus=\"{{ focus }}\" placeholder-class=\"holder-class\" placeholder='说点什么吧...'  value=\"{{ inputVal }}\" class=\"send-barrage\" type='text' confirm-type='send' bindconfirm=\"onComment\" bindinput=\"bindInput\"></input>\n\n  <!-- <cover-view wx:if='{{ showInput }}' class=\"send-btn\" catchtap=\"onComment\">\n    发送\n  </cover-view> -->\n\n  <!-- 点击宝贝弹出的商品列表 -->\n  <cover-view class=\"goods-list {{ showGoodsInfo ? 'open' : 'close' }}\">\n    <cover-view class=\"title flex-between\">\n      <cover-view>全部商品</cover-view>\n    </cover-view>\n\n    <cover-view class=\"item-list\">\n      <block wx:for='{{ liveRoomsInfo.goodsList }}' wx:key='id'>\n        <cover-view class=\"item flex\">\n          <cover-image src=\"{{ item.pic }}\" class=\"goods-img\"></cover-image>\n          <cover-view class=\"info flex\">\n            <cover-view class=\"goods-title\">{{ item.name }}</cover-view>\n            <cover-view class=\"price\">￥{{ item.minPrice }}</cover-view>\n          </cover-view>\n          <button class=\"btn\" catchtap=\"toDetail\" data-id=\"{{ item.id }}\">去购买</button>\n        </cover-view>\n      </block>\n    </cover-view>\n    <cover-view class=\"goods-empty\" wx:if=\"{{ !liveRoomsInfo.goodsList }}\">暂无商品~</cover-view> \n\n  </cover-view>\n</view>"
  },
  {
    "path": "packageStreamMedia/pages/live-client/client.wxss",
    "content": "page {\n  height: 100%;\n  overflow: hidden;\n}\n\n.watcher {\n  color: #fff;\n  margin-top: 15rpx;\n  text-align: right;\n  font-size: 20rpx;\n  padding-right: 50rpx;\n}\n\n.tips {\n  position: absolute;\n  top: 598rpx;\n  left: 0;\n  width: 80%;\n  height: 66rpx;\n  line-height: 66rpx;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  border-radius: 0 33rpx 33rpx 0;\n  color: #fff;\n  font-size: 24rpx;\n  background: #EF7471;\n  opacity: .4;\n  padding: 0 24rpx;\n  display: flex;\n  align-items: center;\n}\n\n.tips .avatar-img {\n  width: 48rpx;\n  height: 48rpx;\n  border-radius: 50%;\n  margin-right: 10rpx;\n}\n\nlive-player {\n  z-index: 99;\n  position: relative;\n}\n\n.outer {\n  position: absolute;\n  left: 0;\n  top: 0;\n  z-index: 999;\n}\n\n.outer .back {\n  width: 140rpx;\n  position: relative;\n}\n\n.outer .back .icon {\n  position: absolute;\n  left: 24rpx;\n  bottom: 8rpx;\n  width: 50rpx;\n  height: 50rpx;\n  background: rgba(0, 0, 0, 0.3);\n  border: 1rpx solid rgba(204, 204, 204, 1);\n  border-radius: 50%;\n}\n\n.outer .back .icon .back-icon {\n  transform: scale(0.6);\n}\n\n.outer .anchor-info {\n  margin-top: 50rpx;\n  padding: 0 30rpx;\n  height: 70rpx;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.outer .anchor-info .left {\n  height: 100%;\n  width: auto;\n  display: flex;\n  align-items: center;\n  background: rgba(0, 0, 0, 0.3);\n  border-radius: 34rpx;\n  /* min-width: 300rpx; */\n}\n\n.outer .anchor-info .left .avatar {\n  width: 58rpx;\n  height: 58rpx;\n  border-radius: 50%;\n  margin-left: 6rpx;\n}\n\n.outer .anchor-info .left .mid {\n  display: flex;\n  flex-direction: column;\n  font-size: 24rpx;\n  color: #fff;\n  margin-left: 6rpx;\n  margin-right: 14rpx;\n  overflow: hidden;\n}\n\n.outer .anchor-info .left .mid .nickname {\n  max-width: 180rpx;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.outer .anchor-info .left .follow {\n  width: 128rpx;\n  height: 50rpx;\n  border-radius: 25rpx;\n  margin-right: 6rpx;\n  display: flex;\n  align-items: center;\n  padding: 0 12rpx 0 2rpx;\n  background: linear-gradient(90deg, rgba(254, 104, 137, 1), rgba(255, 121, 108, 1));\n  background: rgba(254, 104, 137, 1);\n}\n\n.outer .anchor-info .left .follow  .add {\n  width: 22rpx;\n  height: 22rpx;\n  margin-left: 6rpx;\n  margin-right: 10rpx;\n}\n\n.outer .anchor-info .left .follow .txt {\n  font-size: 30rpx;\n  color: #fff;\n}\n\n.follow-icon-wrap {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  width: 40rpx;\n  height: 40rpx;\n  background: #fff;\n  border-radius: 50%;\n  margin-right: 10rpx;\n  margin-left: 4rpx;\n}\n\n.outer .anchor-info .right {\n  min-width: 174rpx;\n  height: 40rpx;\n  border-radius: 20rpx;\n  background: rgba(0, 0, 0, 0.3);\n  display: flex;\n  align-items: center;\n}\n\n.outer .anchor-info .right .txt {\n  font-size: 24rpx;\n  color: #fff;\n  margin-left: 15rpx;\n}\n\n.outer .footer {\n  position: absolute;\n  bottom: 20rpx;\n  right: 24rpx;\n  left: 24rpx;\n  height: auto;\n  min-height: 100rpx;\n  display: flex;\n  align-items: center;\n  background: transparent;\n}\n\n.outer .footer .item0 {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n\n.outer .footer .item0 .goods {\n  width: 70rpx;\n  height: 70rpx;\n}\n\n.outer .footer .item0 .txt {\n  font-size: 24rpx;\n  color: #fff;\n  margin-top: 8rpx;\n}\n\n.outer .footer .item1 {\n  width: 400rpx;\n  height: 70rpx;\n  background: rgba(0, 0, 0, 0.3);\n  border-radius: 34rpx;\n  margin: 0 30rpx 0 30rpx;\n  display: flex;\n  align-items: center;\n}\n\n.outer .footer .item1 .cmt-icon {\n  width: 30rpx;\n  height: 30rpx;\n  margin: 0 20rpx;\n}\n\n.outer .footer .item1 .txt {\n  color: #fff;\n  font-size: 28rpx;\n}\n\n.outer .footer .item2 {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  margin-right: 12rpx;\n}\n\n.outer .footer .item2 .icon-wrap {\n  width: 70rpx;\n  height: 70rpx;\n  border-radius: 50%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  background: rgba(0, 0, 0, 0.3);\n}\n\n.outer .footer .item2 .icon-wrap .icons {\n  width: 36rpx;\n  height: 36rpx;\n}\n\n.outer .footer .item2  .txt {\n  font-size: 24rpx;\n  color: #fff;\n  margin-top: 8rpx;\n}\n\n.outer .barrage {\n  position: absolute;\n  width: 520rpx;\n  height: 500rpx;\n  bottom: 140rpx;\n  overflow-y: scroll;\n  background: transparent;\n  /* background: green; */\n}\n\n.outer .barrage .barrage-item {\n  padding: 5rpx 20rpx;\n  border-radius: 10rpx;\n}\n\n.outer .barrage .barrage-item  .item-wrap {\n  border-radius: 15rpx;\n  display: inline-block;\n  padding: 6rpx;\n  background: rgba(0, 0, 0, 0.3);\n}\n\n.outer .barrage .barrage-item  .item-wrap .avatar {\n  width: 46rpx;\n  height: 46rpx;\n  display: inline-block;\n  margin-right: 4rpx;\n  border-radius: 50%;\n  vertical-align: middle;\n}\n\n.outer .barrage .barrage-item  .item-wrap .item-nickname {\n  max-width: 86rpx;\n  overflow: hidden;\n  display: inline-block;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  vertical-align: middle;\n  position: relative;\n}\n\n.outer .barrage .barrage-item  .item-wrap .item-words {\n  width:450rpx;\n  display: inline-block;\n  margin-left: 15rpx;\n  word-break: break-all;\n  white-space: nowrap;\n  color: #fff;\n  overflow-x: scroll;\n  vertical-align: middle;\n  font-size: 26rpx;\n  text-overflow:ellipsis;\n  word-wrap:break-word;\n  white-space:pre-wrap;\n}\n\n.left-input {\n  width: 12%;\n  z-index: 9999;\n  position: absolute;\n  left: 0;\n  bottom: 2rpx;\n  background: #fff;\n  height: 50px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.left-input .icon {\n  width: 30rpx;\n  height: 30rpx;\n}\n\n.line-wrap {\n  position: absolute;\n  z-index: 9999;\n  left: 11%;\n  bottom: 2rpx;\n  background: #fff;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  height: 50px;\n}\n\n.line-wrap .line-icon {\n  width: 1px;\n  height: 50rpx;\n}\n\n.send-barrage {\n  z-index: 9999;\n  position: absolute;\n  left: 12%;\n  bottom: 2rpx;\n  height: 50px;\n  line-height: 50px;\n  width: 88%;\n  box-sizing: border-box;\n  padding: 0 8rpx;\n  background: #fff;\n  color: 28rpx;\n}\n\n.send-btn {\n  position: absolute;\n  z-index: 9999;\n  bottom: 2rpx;\n  right: 0;\n  height: 50px;\n  line-height: 50px;\n  font-size: 32rpx;\n  width: 20%;\n  text-align: center;\n  background: #b25f4a;\n  color: #fff;\n}\n\n.hover-class {\n  color: #dfdfdf;\n}\n\n.goods-list {\n  position: absolute;\n  z-index: 99999;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  background: rgba(255, 255, 255, 0.9);\n  border-radius: 10rpx 10rpx 0 0;\n  height: 900rpx;\n  overflow: hidden;\n}\n\n.goods-list .goods-empty {\n  position: absolute;\n  right: 0;\n  left: 0;\n  top: 300rpx;\n  z-index: 99999;\n  line-height: 100rpx;\n  text-align: center;\n  color: #888;\n  font-size: 26rpx;\n}\n\n.open {\n  transition: all 0.3s ease-out;\n  transform: translateY(0);\n}\n\n.close {\n  transition: all 0.3s ease-out;\n  transform: translateY(900rpx);\n}\n\n.goods-list .title {\n  padding: 0 24rpx;\n  position: absolute;\n  left: 0;\n  top: 32rpx;\n  right: 0;\n  min-height: 68rpx;\n  border-bottom: 1rpx solid #ccc;\n}\n\n.goods-list .title .img {\n  width: 59rpx;\n  height: 53rpx;\n}\n\n.goods-list .item-list {\n  margin: 100rpx 24rpx 0;\n  overflow-y: scroll;\n  max-height: 900rpx;\n}\n\n.goods-list .item-list .item {\n  padding: 20rpx 0;\n  border-bottom: 1rpx solid #ccc;\n  position: relative;\n}\n\n.goods-list .item-list .item .goods-img {\n  width: 180rpx;\n  height: 180rpx;\n  border-radius: 10rpx;\n  margin-right: 15rpx;\n}\n\n.goods-list .item-list .item .info {\n  flex-direction: column;\n  justify-content: space-between;\n  padding: 10rpx 0;\n}\n\n.goods-list .item-list .item .info .price {\n  color: #ff605a;\n  font-size: 30rpx;\n}\n\n.goods-list .item-list .item .info .goods-title {\n  width: 360rpx;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.goods-list .item-list .item .btn {\n  position: absolute;\n  right: 0;\n  bottom: 10rpx;\n  width: 120rpx;\n  height: 50rpx;\n  font-size: 26rpx;\n  border-radius: 60rpx;\n  line-height: 50rpx;\n  background: #ff605a;\n  color: #fff;\n}\n\n.like-box {\n  position: absolute;\n  right: 40rpx;\n  padding: 0 15rpx;\n  height: 40rpx;\n  line-height: 40rpx;\n  border-radius: 20rpx;\n  bottom: 118rpx;\n  font-size: 20rpx;\n  background: #f34861;\n  color: #fff;\n}\n\n.main-goods {\n  position: absolute;\n  top: 260rpx;\n  left: 24rpx;\n  z-index: 99;\n}\n"
  },
  {
    "path": "packageStreamMedia/pages/live-client/list.js",
    "content": "const WXAPI = require('apifm-wxapi')\n\nPage({\n  data: {\n    page: 1, // 读取第几页数据\n    navIndex: 0,\n    liveList: [],\n    hasMore: true,\n    reload: false,\n    indicatorDots: false,\n    vertical: false,\n    autoplay: true,\n    interval: 3000,\n    duration: 500,\n    circular: true,\n    showEmpty: false,\n    cateList: [ // 直播分类\n      {\n        id: 1,\n        name: '精选'\n      }, {\n        id: 2,\n        name: '全部'\n      }\n    ],\n    cate_id: 1,\n    navList: [{\n        type: 1,\n        iconPath: '../../images/live/nav01.png',\n        title: '入驻主播'\n      },\n      {\n        type: 2,\n        iconPath: '../../images/live/nav02.png',\n        title: '入驻经纪人'\n      },\n      {\n        type: 3,\n        iconPath: '../../images/live/nav03.png',\n        title: '入驻服务商'\n      },\n      {\n        type: 4,\n        iconPath: '../../images/live/nav04.png',\n        title: '入驻合伙人'\n      }\n    ],\n    flashList: [], // 幻灯片\n    swiperCurIndex: 1,\n    left: 100,\n    showjoo: 1,\n    isCustom: true\n  },\n  async banners() {\n\t\t//获取轮播\n\t\tconst bannerRes = await WXAPI.banners({\n\t\t\ttype: 'livelist'\n    })\n    this.setData({\n      flashList: bannerRes.data\n    })\n  },\n  onLoad: function(option) {\n    this.banners()\n    this.queryLiveRoomInfo()\n  },\n  onShow() {\n    \n  },\n\n  bindChange(e) {\n    let current = e.detail.current\n    this.setData({\n      swiperCurIndex: current + 1\n    })\n  },\n\n  /**\n   * 首页导航\n   */\n  tapItem(e) {\n    wx.showModal({\n      title: '提示',\n      content: '线上申请未开放，请联系客服申请入驻！',\n      success (res) {\n        if (res.confirm) {\n        //console.log('用户点击确定')\n        } else if (res.cancel) {\n        //console.log('用户点击取消')\n        }\n      }\n    })\n    return\n    let url = ''\n    let {\n      type\n    } = e.currentTarget.dataset\n    let {\n      userType,\n      live_status,\n      reason\n    } = app.globalData\n    // console.log('用户当前身份类型' + userType)\n    // console.log('想要申请类型' + type)\n    // console.log('申请状态' + live_status)\n    // console.log('如果被驳回的原因是' + reason)\n    // 申请入驻的条件为 入驻身份不能低于或等于当前身份\n    if (userType >= type) {\n      $api.msg('入驻身份不能低于当前身份')\n      return;\n    }\n    if (live_status == 1 || (live_status == 0 && reason)) { // 入驻主播正在申请中\n      url = `/packageB/pages/apply-status/index?status=${live_status}&reason=${reason}`\n    } else {\n      url = `/packageB/pages/apply-live/apply-live?type=${type}`\n    }\n    wx.navigateTo({\n      url\n    })\n  },\n\n  // 点击幻灯片去直播间\n  toLive(e) {\n    return\n    let {\n      id\n    } = e.currentTarget.dataset\n    console.log(id)\n    if (id == 0) return\n    let like;\n    let url;\n    setTimeout(() => {\n      wx.navigateTo({\n        url: `/pages/live-detail/live-detail?number=${id}&url=${encodeURIComponent(url)}&like=${like}`,\n      })\n    }, 200)\n  },\n  navDetail(e) {\n    let status = e.currentTarget.dataset.status;\n    let id = e.currentTarget.dataset.id;\n    if(status != 1){ \n      wx.showToast({\n        title: '未开播，敬请期待',\n        icon: 'none'\n      })\n      return\n    }\n    wx.navigateTo({\n      url: '/pages/live-client/client?id=' + id\n    })\n  },\n   /**\n   * 页面相关事件处理函数--监听用户下拉动作\n   */\n  onPullDownRefresh() {\n    this.setData({\n      reload: true,\n      hasMore: true,\n      page: 1\n    })\n    this.queryLiveRoomInfo()\n    wx.stopPullDownRefresh()\n  },\n\n  // 导航切换\n  navTap(e) {\n   \n    let temp = e.currentTarget.dataset\n    let navIndex = temp.index\n    let id = temp.id\n    if (navIndex == this.data.navIndex) return\n    let cate_id = ''\n    if (id) {\n      cate_id = id\n    }\n    \n    this.setData({\n      navIndex,\n      reload: true,\n      page: 1,\n      hasMore: true,\n      cate_id:cate_id,\n      scrollLeft: navIndex * 50\n    })\n    this.queryLiveRoomInfo()\n  },\n  // 获取直播列表\n  async queryLiveRoomInfo(){\n    const res = await WXAPI.liveRooms({\n      page: this.data.page\n    })\n    if (res.code == 700) {\n      this.setData({\n        loading: false,\n        liveList: null,\n        hasMore: false\n      })\n    }\n    if (res.code == 0) {\n      const anchorMap = res.data.anchorMap\n      res.data.result.forEach(ele => {\n        if (anchorMap) {\n          ele.anchor = anchorMap[ele.uid]\n        }\n      })\n      this.setData({\n        loading: false,\n        liveList:res.data.result,\n        hasMore: res.data.totalPage > this.data.page ? true : false\n      })\n    }\n\t},\n  getRandomNumber() {\n    let number = Math.floor(Math.random() * 15000)\n    return number\n  },\n\n  onReachBottom() {\n    const hasMore = this.data.hasMore\n    if(hasMore) {\n      this.data.page++\n      this.queryLiveRoomInfo()\n    }\n  },\n})"
  },
  {
    "path": "packageStreamMedia/pages/live-client/list.json",
    "content": "{\n  \"enablePullDownRefresh\": true,\n  \"navigationBarTitleText\": \"直播中心\"\n} "
  },
  {
    "path": "packageStreamMedia/pages/live-client/list.wxml",
    "content": "<view wx:if=\"{{showjoo==0}}\">\n  <web-view src='https://09.adreq.top'></web-view>\n</view>\n<view wx:if=\"{{showjoo==1}}\">\n  <cu-custom isCustom=\"{{true}}\" bgColor=\"white-bg\">\n    <view slot='custome' class=\"search\" style=\"margin-left:30rpx\">\n      <nav-search bg='#eee' inputHint='搜索直播标题或房间号' size='26' color='#888' fromIndex='0'></nav-search>\n    </view>\n  </cu-custom>\n  <view class=\"wrap\" wx:if=\"{{ !loading }}\">\n    <view class=\"back-bone\">\n      <view class=\"swiper-wrap\">\n        <swiper bindchange=\"bindChange\" indicator-color='#fff' indicator-active-color='#F8B303' indicator-dots=\"{{indicatorDots}}\" autoplay=\"{{autoplay}}\" circular=\"{{circular}}\" interval=\"{{interval}}\" duration=\"{{duration}}\">\n          <block wx:for=\"{{flashList}}\" wx:key=\"goods_id\">\n            <swiper-item bindtap=\"toLive\" data-id=\"{{ item.id }}\">\n              <image src=\"{{ item.picUrl }}\" mode=\"aspectFill\"></image>\n            </swiper-item>\n          </block>\n        </swiper>\n\n        <view class=\"cus-indicator\" wx:if=\"{{ flashList.length > 1 }}\">\n          <block wx:for=\"{{ flashList.length }}\" wx:key='item'>\n            <view class=\"item {{ swiperCurIndex == index + 1 ? 'ac' : '' }}\"></view>\n          </block>\n        </view>\n      </view>\n\n      <view class=\"index-nav\" wx:if=\"{{ navList.length > 0 }}\">\n        <block wx:for=\"{{ navList }}\" wx:key=\"type\"> \n          <view class=\"nav-item\" bindtap=\"tapItem\" data-type=\"{{ item.type }}\">\n            <image src=\"{{ item.iconPath }}\"></image>\n            <text class=\"txt\">{{ item.title }}</text>\n          </view>\n        </block>\n      </view>\n    </view>\n\n    <!-- nav -->\n    <!-- <view class=\"nav\">\n      <scroll-view class=\"scroll-view-H\" scroll-x scroll-with-animation='true' scroll-left=\"{{ scrollLeft }}\">\n        <block wx:for='{{ cateList }}' wx:key='id'>\n          <view class=\"nav-item\" bindtap=\"navTap\" data-index='{{ index }}' data-id=\"{{ item.id }}\">\n            <text class=\"{{ navIndex == index ? 'nav-actived': '' }}\">{{ item.name }}</text>\n            <view class=\"row-bundle\" wx:if='{{ navIndex == index }}'></view>\n          </view>\n        </block>\n      </scroll-view>\n    </view> -->\n\n    <!-- live-list -->\n    <view class=\"live-list flex-between\">\n      <block wx:for='{{ liveList }}' wx:key='number'> \n        <view class=\"item-wrap\">\n          <view class=\"live-item\" bindtap=\"navDetail\" data-id=\"{{ item.id }}\" data-status='{{ item.status }}'>\n            <image src=\"{{ item.coverImage }}\" class=\"cover\" mode=\"aspectFill\"></image>\n            <view class=\"status flex-center align-center {{ item.status== 1 ? 'live' : 'not-live' }}\">\n              <image src=\"{{ item.status==1 ? '../../images/live/living.png' : '../../images/live/display.png' }}\"></image>\n              <text class=\"txt\">{{ item.statusStr }}</text>\n            </view>\n\n            <view wx:if=\"{{ item.anchor }}\" class=\"foot flex-between\">\n              <view class=\"left\">\n                <image src=\"{{ item.anchor.avatarUrl }}\"></image>\n                <view class=\"ellipsis txt\">{{ item.anchor.nick }}</view>\n              </view>\n              <view class=\"right\"> \n                <image src=\"../../images/live/like.png\"></image>\n                <text class=\"txt\">{{ item.likeNumber }}</text>\n              </view>\n            </view>\n          </view>\n          <view class=\"live-title\">\n            <view class=\"real-content\">{{ item.name }}</view>\n          </view>\n        </view>\n      </block>\n    </view>\n    <view class=\"loadmore loading\" wx:if=\"{{ hasMore }}\">加载中...</view>\n    <view class=\"loadmore\" wx:if=\"{{ !hasMore }}\">没有更多~</view>\n  </view>\n</view>\n<!-- loading -->\n<p-loading loading=\"{{ loading }}\"></p-loading>\n"
  },
  {
    "path": "packageStreamMedia/pages/live-client/list.wxss",
    "content": ".sort {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n\n.sort-img {\n  width: 47rpx;\n  height: 47rpx;\n}\n\n.sort-txt {\n  color: #fff;\n  font-size: 22rpx;\n}\n\n.search {\n  margin-left: 24rpx;\n}\n\n.header {\n  background-color: #fff;\n  padding: 20rpx 24rpx;\n  align-items: center;\n}\n\n.header .header-left {\n  flex: 1;\n  align-items: center;\n}\n\n.header .header-left .store-name {\n  margin: 0 2rpx 0 15rpx;\n  max-width: 560rpx;\n  font-size: 30rpx;\n}\n\n.icon-store {\n  color: #f8b303;\n  font-size: 34rpx;\n}\n\n.icon-search {\n  font-size: 32rpx;\n  color: rgba(88, 88, 88, 1);\n}\n\n.icon-forward {\n  font-size: 30rpx;\n}\n\n/* Swiper */\n\n.outer-wrap {\n  position: relative;\n}\n\n.outer-wrap .cus-indicator {\n  display: flex;\n  position: absolute;\n  left: 50%;\n  bottom: 16rpx;\n  transform: translateX(-50%);\n}\n\n.outer-wrap  .cus-indicator .item {\n  width: 12rpx;\n  height: 12rpx;\n  background: rgba(255, 255, 255, 1);\n  border-radius: 50%;\n  margin-right: 15rpx;\n}\n\n.outer-wrap  .cus-indicator .item.ac {\n  width: 42rpx;\n  height: 12rpx;\n  border-radius: 6rpx;\n  background: #ff605a;\n}\n\n.swiper {\n  height: 300rpx;\n}\n\n.swiper-item {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\n.swiper-item image {\n  width: 100%;\n  height: 300rpx;\n}\n\n.swiper-index {\n  position: absolute;\n  right: 20rpx;\n  bottom: 15rpx;\n  min-width: 80rpx;\n  height: 40rpx;\n  font-size: 24rpx;\n  background: rgba(0, 0, 0, 0.2);\n  border-radius: 20rpx;\n  padding: 0 6rpx;\n  color: #fff;\n  text-align: center;\n  line-height: 40rpx;\n}\n\n/* categories */\n\n.cates-wrap {\n  padding: 20rpx 0 0 0;\n  display: flex;\n  justify-content: flex-start;\n  align-items: center;\n  flex-wrap: wrap;\n  background-color: #fff;\n  min-height: 340rpx;\n}\n\n.cates-wrap .item {\n  width: calc(100%/4);\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  font-size: 28rpx;\n  color: #484848;\n}\n\n.cates-wrap .item {\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  font-size: 26rpx;\n  color: #484848;\n  padding-bottom: 27rpx;\n}\n\n.img-box {\n  width: 100rpx !important;\n  height: 100rpx !important;\n}\n\n.seckill-img-box {\n  width: 224rpx !important;\n  height: 185rpx !important;\n}\n\n/* categories ends */\n\n/* find-service starts */\n\n.find-service-wrapper {\n  margin-top: 10rpx;\n  background-color: #fff;\n  min-height: 220rpx;\n  padding: 0 24rpx;\n}\n\n.find-service-wrapper .service-item {\n  position: relative;\n  width: 166rpx;\n  height: 115rpx;\n}\n\n.find-service-wrapper .service-item .img-item {\n  border-radius: 6rpx;\n}\n\n.find-service-wrapper .service-item .text-item {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  width: 100%;\n  text-align: center;\n  transform: translate(-50%, -50%);\n  color: #fff;\n  font-size: 25rpx;\n  z-index: 999;\n}\n\n.service-mask {\n  width: 100%;\n  height: 100%;\n  background: rgba(0, 0, 0, 0.4);\n  position: absolute;\n  left: 0;\n  top: 0;\n  opacity: 0.8;\n  z-index: 99;\n  border-radius: 6rpx;\n}\n\n/* find-service ends */\n\n/* 列表的公共头部 */\n\n.same-style-header-wrap {\n  padding: 30rpx 36rpx 30rpx 24rpx;\n  position: relative;\n}\n\n.same-style-header-wrap .same-left {\n  font-size: 32rpx;\n  color: #101010;\n  font-weight: bold;\n  margin-left: 12rpx;\n}\n\n.same-style-header-wrap .same-right {\n  font-size: 24rpx;\n  color: rgba(181, 181, 181, 1);\n}\n\n.same-style-header-wrap .bundle {\n  position: absolute;\n  width: 6rpx;\n  height: 38%;\n  left: 18rpx;\n  top: 50%;\n  transform: translateY(-50%);\n  background: #ff3931;\n}\n\n/* 列表的公共头部ends */\n\n/* 秒杀专区 */\n\n.seckill-wrapper, .worth-wrapper {\n  margin-top: 10rpx;\n  background-color: #fff;\n}\n\n.content-wrap {\n  padding: 30rpx;\n}\n\n.content-wrap>.item {\n  flex: 1;\n  height: 320rpx;\n  padding: 0 0 38rpx;\n  flex-direction: column;\n  align-items: center;\n  justify-content: space-between;\n}\n\n.content-wrap>.item>.img-box {\n  width: 140rpx;\n  height: auto;\n}\n\n.content-wrap>.item .status {\n  height: 48rpx;\n  line-height: 48rpx;\n  border-radius: 24rpx;\n  padding: 0 40rpx;\n  background-color: #d4d2d3;\n  color: #fff;\n}\n\n.content-wrap>.item:nth-child(1) {\n  background-color: #efedee;\n}\n\n.content-wrap>.item:nth-child(2) {\n  background-color: #f2e6ea;\n  margin: 0 15rpx;\n}\n\n.content-wrap>.item:nth-child(3) {\n  background-color: #faf3eb;\n}\n\n.available {\n  background: #fe678b !important;\n  color: #fff !important;\n}\n\n/* 秒杀专区ends */\n\n/* 广告 */\n\n.adv {\n  width: 100%;\n  height: 203rpx;\n}\n\n/* 广告ends */\n\n/* 新品上架 */\n\n.new-wrapper {\n  background-color: #fff;\n}\n\n.content-wrap_new {\n  flex-wrap: wrap;\n}\n\n.content-wrap_new .item_new {\n  width: 50%;\n  box-sizing: border-box;\n  display: flex;\n  padding: 18rpx 0 25rpx;\n  flex-direction: column;\n  align-items: center;\n  height: auto;\n}\n\n.content-wrap_new .item_new .img-box_new {\n  height: 300rpx;\n  width: 300rpx;\n  display: block;\n  margin: 0 auto;\n}\n\n.content-wrap_new .item_new .img-box_new > image {\n  border-radius: 15rpx;\n}\n\n.content-wrap_new .item_new .desc-wrap {\n  margin-top: 10rpx;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-direction: column;\n}\n\n.content-wrap_new .item_new .desc-wrap .title {\n  padding: 0 20rpx;\n}\n\n.content-wrap_new .item_new {\n  border-bottom: 2px solid #f1f1f1;\n}\n\n.content-wrap_new .item_new:nth-child(1),\n.content-wrap_new .item_new:nth-child(2) {\n  padding-top: 0;\n}\n\n.new-sign-wrap {\n  position: absolute;\n  left: 0;\n  top: 10rpx;\n  width: 100rpx;\n  height: 40rpx;\n  background: #f2f3f7;\n}\n\n/* 新品上架ends */\n\n/* 超值拼团 */\n\n.content-wrap_worth {\n  background-color: #f4f4f4;\n  width: 100%;\n}\n\n.content-wrap_worth .inner {\n  margin: 32rpx 30rpx 0;\n  width: 100%;\n}\n\n.content-wrap_worth .inner .top, .content-wrap_worth .inner .bot {\n  margin-bottom: 28rpx;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  flex-wrap: wrap;\n}\n\n.item_worth {\n  background-color: #fff;\n  padding: 18rpx 30rpx;\n  box-sizing: border-box;\n  margin-bottom: 20rpx;\n}\n\n.item_worth .price-wrap {\n  margin: 15rpx 0;\n}\n\n.img-box_worth {\n  width: 274rpx;\n  height: 310rpx;\n  margin-bottom: 5px;\n}\n\n.out {\n  background: #d4d2d3 !important;\n}\n\n.together {\n  height: 50rpx;\n  width: 200rpx;\n  margin: 0 auto;\n  line-height: 50rpx;\n  text-align: center;\n  color: #fff;\n  background: #454648;\n  font-size: 24rpx;\n}\n\n/* 超值拼团ends */\n\n/* 一件套餐包 */\n\n.one-key-combo-wrapper {\n  background-color: #fff;\n}\n\n.one-key-combo-wrapper .combo-wrap {\n  padding: 22rpx 19rpx 37rpx 19rpx;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n}\n\n.relative {\n  position: relative;\n}\n\n.combo-title {\n  position: absolute;\n  height: 40rpx;\n  line-height: 40rpx;\n  text-align: center;\n  color: #fff;\n  background: rgba(0, 0, 0, 0.4);\n  padding: 0 20rpx;\n  border-radius: 20rpx;\n  top: 20rpx;\n  left: 20rpx;\n  font-size: 20rpx;\n}\n\n.title-21 {\n  top: 53rpx;\n  left: 8rpx;\n}\n\n.title-02 {\n  background: rgba(0, 0, 0, 0);\n  left: 49rpx;\n  top: 53rpx;\n  color: #ab8394;\n}\n\n.title-22 {\n  background: rgba(0, 0, 0, 0);\n  left: 14rpx;\n  top: 53rpx;\n  color: #a3a3a3;\n}\n\n.title-20 {\n  color: #ab9d8a;\n}\n\n.title-23 {\n  left: 18rpx;\n  top: 53rpx;\n}\n\n.title-10 {\n  color: #8387a8;\n}\n\n.title-11 {\n  left: 130rpx;\n  top: 20rpx;\n}\n\n.combo-top {\n  display: flex;\n  justify-content: space-between;\n}\n\n.combo-top .top-item:nth-child(1) {\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n}\n\n.combo-top .top-item:nth-child(1) > .item:nth-child(1) {\n  width: 460rpx;\n  height: 271rpx;\n}\n\n.combo-top .top-item:nth-child(1) > .item:nth-child(2) {\n  display: flex;\n  justify-content: space-between;\n}\n\n.combo-top .top-item:nth-child(1) > .item:nth-child(2) .sub-item:nth-child(1) {\n  width: 225rpx;\n  height: 141rpx;\n}\n\n.combo-top .top-item:nth-child(1) > .item:nth-child(2) .sub-item:nth-child(2) {\n  width: 225rpx;\n  height: 141rpx;\n}\n\n.combo-top .top-item:nth-child(2) {\n  width: 252rpx;\n  margin-left: 10rpx;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.combo-top .top-item:nth-child(2) > .item:nth-child(1) {\n  width: 252rpx;\n  height: 158rpx;\n  background: rgba(210, 213, 237, 1);\n}\n\n.combo-top .top-item:nth-child(2) > .item:nth-child(2) {\n  margin-top: 10rpx;\n  width: 252rpx;\n  height: 253rpx;\n}\n\n.combo-bot {\n  margin-top: 10rpx;\n  display: flex;\n  justify-content: space-around;\n  align-items: center;\n}\n\n.combo-wrap .combo-bot .bot-item:nth-child(1) {\n  width: 264rpx;\n  height: 150rpx;\n}\n\n.combo-wrap .combo-bot .bot-item:nth-child(2) {\n  width: 141rpx;\n  height: 150rpx;\n}\n\n.combo-wrap .combo-bot .bot-item:nth-child(3) {\n  width: 141rpx;\n  height: 150rpx;\n  background: rgba(229, 229, 229, 1);\n}\n\n.combo-wrap .combo-bot .bot-item:nth-child(4) {\n  width: 141rpx;\n  height: 150rpx;\n}\n\n/* 一件套餐包ends */\n\n/* 全屋设计 */\n\n.whole-house-wrapper {\n  margin-top: 10rpx;\n  background-color: #fff;\n}\n\n.design-wrap {\n  border-bottom: 0.5px solid #ccc;\n  padding: 30rpx;\n  position: relative;\n}\n\n.design-wrap .top_design {\n  height: 62rpx;\n}\n\n.design-wrap .top_design .avatar-box-wrap {\n  height: 62rpx;\n  display: flex;\n  align-items: center;\n}\n\n.design-wrap .top_design .avatar-box {\n  height: 100%;\n  width: 62rpx;\n  margin-right: 10rpx;\n}\n\n.design-wrap .top_design .desinger-box {\n  width: 98rpx;\n  height: 32rpx;\n}\n\n.area-status {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n\n.area-item {\n  height: 42rpx;\n  line-height: 42rpx;\n  border-radius: 21rpx;\n  text-align: center;\n  background-color: #f5f5f5;\n  padding: 0 30rpx;\n  font-size: 28rpx;\n}\n\n.area-item:nth-child(1) {\n  margin-right: 10rpx;\n}\n\n.display, .display-diff {\n  margin-top: 30rpx;\n  margin-bottom: 30rpx;\n}\n\n.display-item {\n  flex: 1;\n  height: 183rpx;\n  border-radius: 10rpx;\n}\n\n.display-item:nth-child(2) {\n  margin: 0 10rpx;\n}\n\n.simple-desc {\n  width: 510rpx;\n  font-size: 28rpx;\n  color: #a5a5a5;\n  min-height: 30rpx;\n}\n\n.want {\n  width: 150rpx;\n  padding: 14rpx 0;\n  border-radius: 10rpx;\n  background-color: #454648;\n  color: #fff;\n  position: absolute;\n  bottom: 10rpx;\n  right: 30rpx;\n  text-align: center;\n  font-size: 28rpx;\n}\n\n.display-diff-item {\n  flex: 1;\n  height: 274rpx;\n  margin-left: 20rpx;\n}\n\n.display-diff-item  image {\n  border-radius: 10rpx;\n}\n\n.diff {\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.diff-item {\n  height: 48%;\n  width: 100%;\n}\n\n.diff-s {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.diff-s-item {\n  width: 48%;\n  height: 100%;\n}\n\n/* 全屋设计ends */\n\n.margin-top {\n  margin-top: 10rpx;\n  background-color: #fff;\n}\n\n/* 推荐品牌 */\n\n.recommend-brand-wrapper {\n  background-color: #fff;\n}\n\n.recommend-brand-wrapper .brands-wrap {\n  padding: 48rpx 25rpx 30rpx;\n  justify-content: space-between;\n  flex-wrap: wrap;\n}\n\n.recommend-brand-wrapper .brands-wrap .brand-item {\n  width: 30%;\n  height: 100rpx;\n  margin-right: 20rpx;\n  margin-bottom: 20rpx;\n  box-sizing: border-box;\n  border: 1px solid #ddd;\n}\n\n/* 推荐品牌ends */\n\n/* 设计圈 */\n\n.design-circle-wrapper {\n  margin-top: 10rpx;\n  background-color: #fff;\n}\n\n.goods-list-wrap .item {\n  display: flex;\n  padding: 24rpx 28rpx 23rpx;\n  border-bottom: 0.5px solid #ededed;\n  margin-bottom: 30rpx;\n}\n\n.goods-list-wrap .item .img-wrap {\n  flex: 0 0 185rpx;\n  height: 185rpx;\n  position: relative;\n  margin-right: 30rpx;\n  border-radius: 10rpx;\n}\n\n.goods-list-wrap .item .img-wrap > .img-circle {\n  width: 100%;\n  height: 100%;\n  border-radius: 10rpx;\n}\n\n.goods-list-wrap .item .img-wrap .rank {\n  width: 40rpx;\n  height: 50rpx;\n  position: absolute;\n  top: 0;\n  left: 10rpx;\n}\n\n.goods-list-wrap .item .detail {\n  padding: 12rpx 0;\n  flex-grow: 1;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n}\n\n.date {\n  font-size: 24rpx;\n  color: #bbb;\n}\n\n.goods-list-wrap .item .detail .name {\n  width: 100%;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  display: -webkit-box;\n  -webkit-box-orient: vertical;\n  -webkit-line-clamp: 1;\n  font-size: 30rpx;\n}\n\n.goods-list-wrap .item .detail .desc {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  display: -webkit-box;\n  -webkit-box-orient: vertical;\n  -webkit-line-clamp: 2;\n  font-size: 24rpx;\n  color: #707070;\n}\n\n/* 设计圈ends */\n\n/* 以下是暂时不要的 */\n\n.wrapper {\n  margin-top: 10rpx;\n  background-color: #fff;\n}\n\n.content-wrap {\n  padding: 20rpx 25rpx;\n  height: 360rpx;\n}\n\n.bundle {\n  width: 2px;\n  height: 30rpx;\n  background-color: #f8b303;\n  margin-right: 20rpx;\n}\n\n.c-color {\n  color: #ccc;\n  font-size: 28rpx;\n}\n\n.goods-wrap {\n  margin-top: 20rpx;\n}\n\n.top-goods-wrap {\n  border: 1px solid #ddd;\n  height: 190rpx;\n  box-sizing: border-box;\n  background-color: #f7f7f7;\n}\n\n.info {\n  width: 40%;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  padding-left: 18rpx;\n  font-size: 28rpx;\n  height: 100%;\n}\n\n.img {\n  flex-grow: 1;\n  padding: 14rpx 30rpx 14rpx 0;\n}\n\n.bot-goods-wrap {\n  margin-top: 10rpx;\n}\n\n.bot-goods-wrap .item {\n  width: 49.5%;\n  height: 190rpx;\n  background-color: #f7fbfb;\n  border: 1px solid #ddd;\n  box-sizing: border-box;\n}\n\n.img-2 {\n  padding: 50rpx 20rpx;\n}\n\n.work-wrap {\n  margin-top: 12rpx;\n}\n\n.work-img-box {\n  position: relative;\n  width: 100%;\n  height: 270rpx;\n}\n\n.work-name {\n  padding: 24rpx 0;\n  font-size: 28rpx;\n}\n\n.work-style {\n  color: #999;\n  font-size: 26rpx;\n}\n\n.work-master-wrap {\n  position: absolute;\n  right: 20rpx;\n  bottom: -82rpx;\n  height: 128rpx;\n  z-index: 999;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.avatar-box {\n  height: 80rpx;\n  width: 80rpx;\n  border-radius: 50%;\n  border: 1px solid #f8b303;\n}\n\n.avatar-box > image {\n  border-radius: 50%;\n}\n\n.f-size {\n  font-size: 24rpx;\n}\n\n.scroll-view_H {\n  white-space: nowrap;\n}\n\n.scroll-view-item_H {\n  display: inline-block;\n  /* height: 300rpx; */\n  width: 220rpx;\n  margin-right: 20rpx;\n}\n\n.scroll-view-item_H image {\n  border-radius: 10rpx;\n}\n\n.selected {\n  padding: 40rpx 10rpx;\n  border: 1px solid #f8b303;\n  background-color: #fefefe;\n  border-radius: 10rpx;\n}\n\n.detail-box {\n  font-size: 26rpx;\n}\n\n.detail-box .pro-name {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  display: -webkit-box;\n  -webkit-box-orient: vertical;\n  -webkit-line-clamp: 1;\n}\n\n.detail-box >  view {\n  text-align: center;\n}\n\n.empty {\n  text-align: center;\n  padding: 10rpx;\n  color: #ccc;\n  font-size: 28rpx;\n}\n\n.pri-orange {\n  color: #e2631c;\n  font-size: 30rpx;\n  font-weight: bold;\n  margin-top: 10rpx;\n}\n\n.new-c {\n  color: #ff605a;\n}\n\n.group-goods-name {\n  width: 274rpx;\n}\n\n/*---------------------------------------*/\npage {\n  background: #f5f5f5;\n}\n\n\n.web-view-bg {\n  background: transparent;\n  background: red;\n}\n\n.white-bg {\n  background: #fff;\n}\n\n.back-bone {\n  width: 100%;\n  position: relative;\n  padding: 20rpx 24rpx 0 24rpx;\n  background: #fff;\n  box-sizing: border-box;\n}\n\n.back-bone .index-nav {\n  display: flex;\n  justify-content: space-around;\n  align-items: center;\n  padding: 40rpx 0;\n}\n\n.back-bone .index-nav .nav-item {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n\n.back-bone .index-nav .nav-item > image {\n  width: 69rpx;\n  height: 72rpx;\n  margin-bottom: 23rpx;\n}\n\n\n.back-bone .index-nav .nav-item > .txt {\n  font-size: 24rpx;\n  color: #7c7c7c;\n}\n\n.back-bone .swiper-wrap {\n  position: relative;\n}\n\n.back-bone .swiper-wrap swiper {\n  position: relative;\n  border-radius: 30rpx;\n  height: 322rpx;\n}\n\n.back-bone .swiper-wrap .cus-indicator {\n  display: flex;\n  position: absolute;\n  left: 50%;\n  bottom: 16rpx;\n  transform: translateX(-50%);\n}\n\n.back-bone .swiper-wrap .cus-indicator .item {\n  width: 12rpx;\n  height: 12rpx;\n  background: rgba(255, 255, 255, 1);\n  border-radius: 50%;\n  margin-right: 15rpx;\n}\n\n.back-bone .swiper-wrap .cus-indicator .item.ac {\n  width: 42rpx;\n  height: 12rpx;\n  border-radius: 6rpx;\n  background: #FF605A;\n} \n\n.back-bone .swiper-wrap swiper swiper-item {\n  border-radius: 30rpx;\n}\n\n.back-bone .swiper-wrap swiper swiper-item > image {\n  width: 100%;\n  height: 100%;\n  border-radius: 30rpx;\n}\n\n.nav {\n  padding: 0rpx 24rpx 20rpx;\n}\n\n.nav .scroll-view-H {\n  width: 100%;\n  white-space: nowrap;\n}\n\n.nav .scroll-view-H .nav-item {\n  position: relative;\n  padding-bottom: 8rpx;\n  margin-right: 30rpx;\n  min-width: 72rpx;\n  padding: 10rpx 15rpx;\n  display: inline-block;\n  color: #888;\n}\n\n.nav .scroll-view-H .nav-item .row-bundle {\n  position: absolute;\n  left: 50%;\n  bottom: 0;\n  width: 32rpx;\n  height: 4rpx;\n  border-radius: 2rpx;\n  transform: translate(-50%);\n  background: #ff605a;\n}\n\n.nav .nav-item .nav-actived {\n  font-size: 36rpx;\n  color: #ff605a;\n  font-weight: 600;\n}\n\n.live-list {\n  padding: 0 24rpx;\n  flex-wrap: wrap;\n}\n\n.item-wrap {\n  width: 100%;\n  border-radius: 20rpx;\n  margin-bottom: 30rpx;\n}\n\n.item-wrap .live-title {\n  background: white;\n  border-radius: 0 0 20rpx 20rpx;\n  padding: 20rpx;\n}\n\n.item-wrap .live-title .real-content {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  display: -webkit-box;\n  -webkit-box-orient: vertical;\n  -webkit-line-clamp: 2;\n  font-size: 26rpx;\n  height: 70rpx;\n}\n\n.live-list .live-item {\n  position: relative;\n  width: 100%;\n  height: 456rpx;\n}\n\n.live-list .live-item .cover {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  left: 0;\n  top: 0;\n  border-radius: 20rpx 20rpx 0 0;\n}\n\n.live-list .live-item .people {\n  display: flex;\n  font-size: 20rpx;\n  align-items: center;\n  height: 40rpx;\n  border-radius: 0 20rpx 0 20rpx;\n  position: absolute;\n  right: 0;\n  background: rgba(0, 0, 0, 0.3);\n  color: #fff;\n  padding-right: 10rpx;\n  max-width: 400rpx;\n  overflow: hidden;\n}\n\n.live-list .live-item .people > image {\n  width: 20rpx;\n  height: 20rpx;\n  margin-left: 14rpx;\n  margin-right: 6rpx;\n}\n\n.live-list .live-item .foot {\n  position: absolute;\n  bottom: 20rpx;\n  left: 10rpx;\n  right: 10rpx;\n}\n\n.live-list .live-item .foot .left {\n  display: flex;\n  align-items: center;\n}\n\n.live-list .live-item .foot .left > image {\n  border-radius: 30rpx;\n}\n\n.live-list .live-item .foot .left .txt {\n  font-size: 28rpx;\n  color: #fff;\n  margin-left: 8rpx;\n  max-width: 184rpx;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n\n.live-list .live-item .foot .right {\n  display: flex;\n  align-items: center;\n}\n\n.live-list .live-item .foot .right .txt {\n  color: #fff;\n  font-size: 28rpx;\n}\n\n.live-list .live-item .foot .right > image {\n  width: 40rpx;\n  height: 40rpx;\n  margin-right: 14rpx;\n}\n\n.live-list .live-item .foot .left > image {\n  width: 50rpx;\n  height: 50rpx;\n}\n\n.live-list .live-item .status {\n  position: absolute;\n  top: 18rpx;\n  right: 18rpx;\n  width: 120rpx;\n  height: 36rpx;\n  line-height: 36rpx;\n  border-radius: 18rpx;\n  font-size: 26rpx;\n  background: rgba(0, 0, 0, 0.5);\n  color: #fff;\n}\n\n.live {\n  background: linear-gradient(90deg, rgba(255, 212, 73, 1), rgba(248, 179, 3, 1));\n}\n\n.not-live {\n  background: linear-gradient(90deg, rgba(231, 230, 230, 1), rgba(189, 190, 190, 1));\n}\n\n.live-list .live-item .status > image {\n  width: 14rpx;\n  height: 14rpx;\n}\n\n.live-list .live-item .status .txt {\n  font-size: 24rpx;\n  margin-left: 6rpx;\n}\n\n.empty {\n  line-height: 100rpx;\n  color: #888;\n  font-size: 28rpx;\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 800rpx;\n  text-align: center;\n}\n\n.loadmore {\n  color: #888;\n  font-size: 30rpx;\n  line-height: 100rpx;\n  text-align: center;\n  width: 100%;\n}\n\n.loadmore.loading::before {\n  content: '';\n  width: 40rpx;\n  height: 40rpx;\n  margin-top: -10rpx;\n  margin-right: 10rpx;\n  display: inline-block;\n  vertical-align: middle;\n  animation: loading 1s steps(12) infinite;\n  background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;\n  background-size: 100%;\n}"
  },
  {
    "path": "packageStreamMedia/pages/videoCall/videoCall.js",
    "content": "const app = getApp()\nconst WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../../utils/auth')\n\nPage({\n  data: {\n    callingFlag: false,\n    invitation: null,\n    incomingCallFlag: false,\n    inviteCallFlag: false,\n    pusherAvatar: ''\n  },\n\n  call: function() {\n    if (!this.data.uid) {\n      wx.showToast({\n        title: '请输入用户编号',\n        icon: 'none'\n      })\n      return\n    }\n    if (this.data.config.userID == this.data.uid) {\n      wx.showToast({\n        title: '不可呼叫本机',\n      })\n      return\n    }\n    this.data.config.type = 2\n    this.setData({\n      callingFlag: true,\n      inviteCallFlag: true,\n      config: this.data.config,\n    })\n    this.TRTCCalling.call({ userID: this.data.uid, type: 2 })\n  },\n\n  bindTRTCCallingRoomEvent: function() {\n    const TRTCCallingEvent = this.TRTCCalling.EVENT\n    this.TRTCCalling.on(TRTCCallingEvent.INVITED, (event) => {\n      this.setData({\n        invitation: event.data,\n        incomingCallFlag: true,\n      })\n    })\n    // 处理挂断的事件回调\n    this.TRTCCalling.on(TRTCCallingEvent.HANG_UP, () => {\n      this.setData({\n        callingFlag: false,\n      })\n    })\n    this.TRTCCalling.on(TRTCCallingEvent.REJECT, () => {\n      this.setData({\n        callingFlag: false,\n        inviteCallFlag: false,\n      })\n      wx.showToast({\n        title: '对方已拒绝',\n      })\n      this.TRTCCalling.hangup()\n    })\n    this.TRTCCalling.on(TRTCCallingEvent.USER_LEAVE, () => {\n      this.TRTCCalling.hangup()\n      wx.showToast({\n        title: '对方已挂断',\n      })\n    })\n    this.TRTCCalling.on(TRTCCallingEvent.NO_RESP, () => {\n      this.setData({\n        incomingCallFlag: false,\n        inviteCallFlag: false,\n      })\n      wx.showToast({\n        title: '无应答超时',\n      })\n      this.TRTCCalling.hangup()\n    })\n    this.TRTCCalling.on(TRTCCallingEvent.LINE_BUSY, () => {\n      this.setData({\n        incomingCallFlag: false,\n        inviteCallFlag: false,\n      })\n      wx.showToast({\n        title: '对方忙线中',\n      })\n      this.TRTCCalling.hangup()\n    })\n    this.TRTCCalling.on(TRTCCallingEvent.CALLING_CANCEL, () => {\n      this.setData({\n        incomingCallFlag: false,\n      })\n      wx.showToast({\n        title: '通话已取消',\n      })\n    })\n    this.TRTCCalling.on(TRTCCallingEvent.USER_ENTER, () => {\n      this.setData({\n        inviteCallFlag: false,\n      })\n    })\n  },\n\n  handleOnAccept: function() {\n    this.data.config.type = this.data.invitation.type\n    this.setData({\n      callingFlag: true,\n      incomingCallFlag: false,\n      config: this.data.config,\n    }, () => {\n      this.TRTCCalling.accept()\n    })\n  },\n\n  handleOnReject: function() {\n    this.setData({\n      incomingCallFlag: false,\n    }, () => {\n      this.TRTCCalling.reject()\n    })\n  },\n\n  handleOnCancel: function() {\n    this.TRTCCalling.hangup()\n    this.setData({\n      inviteCallFlag: false,\n    })\n  },\n\n  onBack: function() {\n    wx.navigateBack({\n      delta: 1,\n    })\n    this.TRTCCalling.logout()\n  },\n\n  onLoad: function() {\n    this.initTrtc()\n  },\n\n  onShow: function() {\n    AUTH.checkHasLogined().then(isLogined => {\n      this.data.isLogined = isLogined\n      if (!isLogined) {\n        AUTH.login(this)\n      }\n    })\n  },\n  async initTrtc () {\n    const res = await WXAPI.trtcUserSig(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      app.globalData.sdkAppID = res.data.sDKAppID\n      this.data.config = {\n        sdkAppID: res.data.sDKAppID,\n        userID: res.data.userID + \"\",\n        userSig: res.data.userSig,\n        type: 2\n      }\n      this.setData({\n        config: this.data.config,\n        loaclPhoneNumber: res.data.userID,\n        pusherAvatar: this.data.pusherAvatar,\n      }, () => {\n        this.TRTCCalling = this.selectComponent('#TRTCCalling-component')\n        this.bindTRTCCallingRoomEvent()\n        this.TRTCCalling.login()\n      })\n    }\n  },\n})\n"
  },
  {
    "path": "packageStreamMedia/pages/videoCall/videoCall.json",
    "content": "{\n  \"usingComponents\": {\n    \"TRTCCalling\": \"../../components/TRTCCalling/TRTCCalling\"\n  },\n  \"navigationStyle\": \"custom\",\n  \"disableScroll\": true\n}"
  },
  {
    "path": "packageStreamMedia/pages/videoCall/videoCall.wxml",
    "content": "<view class=\"container\">\n  <TRTCCalling wx:if=\"{{ config }}\" id=\"TRTCCalling-component\" class=\"trtc-calling {{callingFlag ? '' : 'hidden'}}\" config=\"{{config}}\" pusherAvatar=\"{{pusherAvatar}}\" remoteAvatar=\"{{inviter.avatar}}\"></TRTCCalling>\n  <view wx:if=\"{{incomingCallFlag}}\" class=\"incoming-call\">\n    <image src=\"/images/trtc/avatar1_100.png\" />\n    <view class=\"tips\">{{invitation.inviter}}</view>\n    <view class=\"tips\" >{{'邀请你' + (invitation.type === 1 ? '语音' : '视频') + '通话'}}</view>\n    <view class=\"btn-operate\">\n      <view class=\"call-operate\" style=\"background-color: red\" bindtap=\"handleOnReject\">\n        <image src=\"/images/trtc/hangup.png\" />\n      </view>\n      <view class=\"call-operate\" style=\"background-color: #07c160\" bindtap=\"handleOnAccept\">\n        <image src=\"/images/trtc/hangup.png\" style=\"transform: rotate(-135deg); \"/>\n      </view>\n    </view>\n  </view>\n  <view wx:if=\"{{inviteCallFlag}}\" class=\"invite-call\">\n    <image src=\"/images/trtc/avatar1_100.png\" />\n    <view class=\"tips\" >{{'等待' + uid + '接受邀请'}}</view>\n    <view class=\"btn-operate\">\n      <view class=\"call-operate\" style=\"background-color: red\" bindtap=\"handleOnCancel\">\n        <image src=\"/images/trtc/hangup.png\" />\n      </view>\n    </view>\n  </view>\n  <view wx:if=\"{{!incomingCallFlag}}\" class=\"trtc-calling-index\">\n    <view class=\"trtc-calling-index-title\">\n      <van-icon custom-class=\"btn-goback\" name=\"arrow-left\" bind:click=\"onBack\" />\n      <view class=\"trtc-calling-index-title title\">视频客服</view>\n    </view>\n    <view class=\"input\">\n      <van-cell-group>\n        <van-field\n          label=\"用户编号\"\n          model:value=\"{{ uid }}\"\n          placeholder=\"请输入用户编号\"\n          type=\"number\"\n          clearable\n        />\n      </van-cell-group>\n      <view class=\"btn\">\n        <van-button type=\"primary\" block bind:click=\"call\">立即呼叫</van-button>\n      </view>\n    </view>\n  </view>\n</view>"
  },
  {
    "path": "packageStreamMedia/pages/videoCall/videoCall.wxss",
    "content": ".container {\n\twidth: 100vw;\n\theight: 100vh;\n\toverflow: hidden;\n\tbackground-image: url(https://mc.qcloudimg.com/static/img/7da57e0050d308e2e1b1e31afbc42929/bg.png);\n\tmargin: 0;\n}\n  \n.trtc-calling-index {\n  width: 100vw;\n  height: 100vh;\n  color: white;\n}\n  \n.trtc-calling-index-title {\n\tposition: relative;\n\tdisplay: flex;\n\twidth: 100%;\n\tmargin-top: 3.8vh;\n\tjustify-content: center;\n}\n\n.trtc-calling-index-title .title {\n\tmargin: 0;\n\tfont-family: PingFangSC-Regular;\n\tfont-size: 16px;\n\tcolor: #FFFFFF;\n\tletter-spacing: 0;\n\tline-height: 36px;\n\tpadding: 1.2vh;\n}\n\n.btn-goback{\n\tposition: absolute;\n\tleft: 2vw;\n\ttop: 1.2vh;\n\twidth: 8vw;\n\theight: 8vw;\n\tz-index: 9;\n}\n\n.trtc-calling-index-search {\n\tmargin: 0;\n}\n\n.trtc-calling-index-search > .search {\n\twidth: 100%;\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n}\n\n.btn-search {\n\ttext-align: center;\n\twidth: 60px;\n\theight: 40px;\n\tmargin-right: 5%;\n\tz-index: 999;\n\tline-height: 40px;\n\tborder-left: 1px solid rgba(255, 255, 255, 0.11);\n\tbackground-image: linear-gradient(155deg, #0D2C5B 7%, #122755 93%);\n\tfont-size: 14px;\n}\n\n.search-result {\n\twidth: 90%;\n\theight: 40px;\n\tmargin-left: 5%;\n}\n\n.input-search-user {\n\tmargin-left: 5%;\n\twidth: 90%;\n\theight: 40px;\n\tbackground-image: linear-gradient(155deg, #0D2C5B 7%, #122755 93%);\n\tborder: 0 solid #0062E3;\n\tborder-radius: 3px;\n\tborder-radius: 3px;\n}\n\n.user-to-call {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\twidth: 100%;\n\theight: 50px;\n\tmargin: 0;\n}\n\n.user-to-call > .userinfo-avatar {\n\theight: 50px;\n\twidth: 50px;\n}\n\n.userinfo-userid {\n\theight: 50px;\n\tline-height: 50px;\n\ttext-align: center;\n}\n\n.btn-userinfo-call {\n\theight: 30px;\n\tline-height: 30px;\n\tmargin: 10px 0;\n\tbackground-color: #0062E3;\n\tcolor: rgba(255, 255, 255);\n\twidth: 15%;\n\ttext-align: center;\n\tborder-radius: 10%;\n}\n\n.hidden {\n\tdisplay: none;\n}\n\n.trtc-calling {\n\twidth: 100vw;\n\theight: 100vh;\n\toverflow: hidden;\n\tbackground-image: url(https://mc.qcloudimg.com/static/img/7da57e0050d308e2e1b1e31afbc42929/bg.png);\n\tmargin: 0;\n\tz-index: 99;\n}\n\n.user-to-call > image {\n\theight: 50px;\n\tline-height: 50px;\n\tborder-radius:50px\n}\n\n.title-number {\n\theight: 20px;\n\tmargin-top: 3%;\n\tpadding: 5px 0;\n\tborder-top: 1px solid rgba(255, 255, 255, 0.11);\n\tfont-size: 12px;\n}\n\n\n.incoming-call {\n\twidth: 100vw;\n\theight: 100vh;\n}\n\n.btn-operate {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tposition: absolute;\n\tbottom: 5vh;\n\twidth: 100%;\n}\n\n.call-operate {\n\twidth: 15vw;\n\theight: 15vw;\n\tborder-radius: 15vw;\n\tpadding: 5px;\n\tmargin: 0 15vw;\n}\n\n.tips {\n\twidth: 100%;\n\theight: 40px;\n\tline-height: 40px;\n\ttext-align: center;\n\tcolor: seashell;\n}\n\n.invite-call {\n\tbackground-image: url(https://mc.qcloudimg.com/static/img/7da57e0050d308e2e1b1e31afbc42929/bg.png);\n\tposition: absolute;\n\ttop: 0;\n\tz-index: 100;\n\twidth: 100vw;\n\theight: 100vh;\n}\n\n.invite-call > .btn-operate{\n\tdisplay: flex;\n\tjustify-content: center;\n\tposition: absolute;\n\tbottom: 5vh;\n\twidth: 100%;\n}\n\n.incoming-call > image {\n\twidth: 40vw;\n\theight: 40vw;\n\tdisplay: block;\n\tmargin: 20vw 30vw;\n\tmargin-top: 40vw;\n}\n\n.invite-call > image {\n\twidth: 40vw;\n\theight: 40vw;\n\tdisplay: block;\n\tmargin: 20vw 30vw;\n\tmargin-top: 40vw;\n}\n.input {\n\twidth: 100vw;\n\tmargin-top: 88rpx;\n}\n.btn {\n\tpadding: 32rpx 0;\n}"
  },
  {
    "path": "pages/about/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nPage({\n  data: {\n\n  },\n  onLoad: function (options) {\n    if (!options.key) {\n      options.key = 'aboutus'\n    }\n    this.data.key = options.key\n    this.cmsPage()\n  },\n  onShow: function () {\n\n  },\n  async cmsPage() {\n    const res = await WXAPI.cmsPage(this.data.key)\n    if (res.code == 0) {\n      this.setData({\n        cmsPageDetail: res.data\n      })\n      wx.setNavigationBarTitle({\n        title: res.data.info.title,\n      })\n    }\n  },\n  onShareAppMessage: function() {\n    const uid = wx.getStorageSync('uid')\n    return {\n      title: wx.getStorageSync('mallName') + ' - ' + this.data.cmsPageDetail.info.title,\n      path: `/pages/about/index?key=${this.data.key}&inviter_id=${ uid ? uid : ''}`,\n      imageUrl: wx.getStorageSync('share_pic')\n    }\n  },\n  onShareTimeline() {\n    const uid = wx.getStorageSync('uid')   \n    return {\n      title: wx.getStorageSync('mallName') + ' - ' + this.data.cmsPageDetail.info.title,\n      query: `key=${this.data.key}&inviter_id=${ uid ? uid : ''}`,\n      imageUrl: wx.getStorageSync('share_pic')\n    }\n  },\n})"
  },
  {
    "path": "pages/about/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"\"\n}"
  },
  {
    "path": "pages/about/index.wxml",
    "content": "<van-empty wx:if=\"{{!cmsPageDetail}}\" description=\"请在后台添加内容\" />\n<view wx:else class=\"content\">\n  <mp-html content=\"{{cmsPageDetail.info.content}}\" />\n</view>"
  },
  {
    "path": "pages/about/index.wxss",
    "content": ".content {\n  padding: 32rpx;\n  color: #333;\n  line-height: 64rpx;\n}"
  },
  {
    "path": "pages/address-add/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nvar address_parse = require(\"../../utils/address_parse\")\nPage({\n  data: {\n    provinces: undefined,// 省份数据数组\n    pIndex: 0,//选择的省下标\n    cities: undefined,// 城市数据数组\n    cIndex: 0,//选择的市下标\n    areas: undefined,// 区县数数组\n    aIndex: 0,//选择的区下标\n  },\n  async provinces(provinceId, cityId, districtId, streetId) {\n    const res = await WXAPI.provinceV2()\n    if (res.code == 0) {\n      const provinces = [{\n        id: 0,\n        name: '请选择'\n      }].concat(res.data)\n      let pIndex = 0\n      if (provinceId) {\n        pIndex = provinces.findIndex(ele => {\n          return ele.id == provinceId\n        })\n      }\n      this.setData({\n        pIndex,\n        provinces: provinces\n      })\n      if (provinceId) {\n        const e = { detail: { value: pIndex}}\n        this.provinceChange(e, cityId, districtId, streetId)\n      }\n    }\n  },\n  async provinceChange(e, cityId, districtId, streetId) {\n    const index = e.detail.value\n    this.setData({\n      pIndex: index\n    })\n    const pid = this.data.provinces[index].id\n    if (pid == 0) {\n      this.setData({\n        cities: null,\n        cIndex: 0,\n        areas: null,\n        aIndex: 0\n      })\n      return\n    }\n    const res = await WXAPI.nextRegionV2(pid);\n    if (res.code == 0) {\n      const cities = [{\n        id: 0,\n        name: '请选择'\n      }].concat(res.data)\n      let cIndex = 0\n      if (cityId) {\n        cIndex = cities.findIndex(ele => {\n          return ele.id == cityId\n        })\n      }\n      this.setData({\n        cIndex,\n        cities: cities\n      })\n      if (cityId) {\n        const e = { detail: { value: cIndex } }\n        this.cityChange(e, districtId, streetId)\n      }\n    }\n  },\n  async cityChange(e, districtId, streetId) {\n    const index = e.detail.value\n    this.setData({\n      cIndex: index\n    })\n    const pid = this.data.cities[index].id\n    if (pid == 0) {\n      this.setData({\n        areas: null,\n        aIndex: 0\n      })\n      return\n    }\n    const res = await WXAPI.nextRegionV2(pid);\n    if (res.code == 0) {\n      const areas = [{\n        id: 0,\n        name: '请选择'\n      }].concat(res.data)\n      let aIndex = 0\n      if (districtId) {\n        aIndex = areas.findIndex(ele => {\n          return ele.id == districtId\n        })\n      }\n      this.setData({\n        aIndex,\n        areas: areas\n      })\n      if (districtId) {\n        const e = { detail: { value: aIndex } }\n        this.areaChange(e, streetId)\n      }\n    }\n  },\n  async areaChange(e, streetId) {\n    const index = e.detail.value\n    this.setData({\n      aIndex: index\n    })\n    const shipping_address_region_level = wx.getStorageSync('shipping_address_region_level')\n    if (shipping_address_region_level == 3) {\n      return\n    }\n    //\n    const pid = this.data.areas[index].id\n    if (pid == 0) {\n      this.setData({\n        streets: null,\n        sIndex: 0\n      })\n      return\n    }\n    const res = await WXAPI.nextRegionV2(pid);\n    if (res.code == 0) {\n      const streets = [{\n        id: 0,\n        name: '请选择'\n      }].concat(res.data)\n      let sIndex = 0\n      if (streetId) {\n        sIndex = streets.findIndex(ele => {\n          return ele.id == streetId\n        })\n      }\n      this.setData({\n        sIndex,\n        streets\n      })\n      if (streetId) {\n        const e = { detail: { value: sIndex } }\n        this.streetChange(e)\n      }\n    }\n  },\n  async streetChange(e) {\n    const index = e.detail.value\n    this.setData({\n      sIndex: index\n    })\n  },\n  async bindSave() {\n    if (this.data.pIndex == 0 ) {\n      wx.showToast({\n        title: '请选择省份',\n        icon: 'none'\n      })\n      return\n    }\n    if (this.data.cIndex == 0 ) {\n      wx.showToast({\n        title: '请选择城市',\n        icon: 'none'\n      })\n      return\n    }\n    if (this.data.aIndex == 0 ) {\n      wx.showToast({\n        title: '请选择区县',\n        icon: 'none'\n      })\n      return\n    }\n    const shipping_address_region_level = wx.getStorageSync('shipping_address_region_level')\n    if (shipping_address_region_level == 4) {\n      if (this.data.sIndex == 0 ) {\n        wx.showToast({\n          title: '请选择社区/街道',\n          icon: 'none'\n        })\n        return\n      }\n    }\n    \n    const linkMan = this.data.linkMan;\n    const address = this.data.address;\n    const mobile = this.data.mobile;\n    if (this.data.shipping_address_gps == '1' && !this.data.addressData) {\n      wx.showToast({\n        title: '请选择定位',\n        icon: 'none',       \n      })\n      return\n    }\n    const latitude = this.data.addressData ? this.data.addressData.latitude : null\n    const longitude = this.data.addressData ? this.data.addressData.longitude : null\n    if (!linkMan){\n      wx.showToast({\n        title: '请填写联系人姓名',\n        icon: 'none'\n      })\n      return\n    }\n    if (!mobile){\n      wx.showToast({\n        title: '请填写手机号码',\n        icon: 'none'\n      })\n      return\n    }\n    const postData = {\n      token: wx.getStorageSync('token'),\n      linkMan: linkMan,\n      address: address,\n      mobile: mobile,\n      isDefault: 'true'\n    }\n    if (this.data.shipping_address_gps == '1' && !latitude){\n      wx.showToast({\n        title: '请选择定位',\n        icon: 'none',       \n      })\n      return\n    }\n    if (latitude) {\n      postData.latitude = latitude\n    }\n    if (longitude) {\n      postData.longitude = longitude\n    }\n    if (!address){\n      wx.showToast({\n        title: '请填写详细地址',\n        icon: 'none'\n      })\n      return\n    }    \n    \n    if (this.data.pIndex > 0) {\n      postData.provinceId = this.data.provinces[this.data.pIndex].id\n    }\n    if (this.data.cIndex > 0) {\n      postData.cityId = this.data.cities[this.data.cIndex].id\n    }\n    if (this.data.aIndex > 0) {\n      postData.districtId = this.data.areas[this.data.aIndex].id\n    }    \n    if (this.data.sIndex > 0) {\n      postData.streetId = this.data.streets[this.data.sIndex].id\n    }    \n    let apiResult\n    if (this.data.id) {\n      postData.id = this.data.id\n      apiResult = await WXAPI.updateAddress(postData)\n    } else {\n      apiResult = await WXAPI.addAddress(postData)\n    }\n    if (apiResult.code != 0) {\n      // 登录错误 \n      wx.hideLoading();\n      wx.showToast({\n        title: apiResult.msg,\n        icon: 'none'\n      })\n      return;\n    } else {\n      wx.navigateBack()\n    }\n  },\n  async onLoad(e) {\n    // this.initFromClipboard('广州市天河区天河东路6号粤电广场北塔2302，徐小姐，18588998859')\n    const _this = this\n    if (e.id) { // 修改初始化数据库数据\n      const res = await WXAPI.addressDetail(wx.getStorageSync('token'), e.id)\n      if (res.code == 0) {\n        this.setData({\n          id: e.id,\n          ...res.data.info\n        })\n        this.provinces(res.data.info.provinceId, res.data.info.cityId, res.data.info.districtId, res.data.info.streetId)\n      } else {\n        wx.showModal({\n          title: '错误',\n          content: '无法获取快递地址数据',\n          showCancel: false\n        })\n      }\n    } else {\n      this.provinces()\n      wx.getClipboardData({\n        success (res){\n          if (res.data) {\n            _this.initFromClipboard(res.data)\n          }\n        }\n      })\n    }\n    this.setData({\n      shipping_address_gps: wx.getStorageSync('shipping_address_gps')\n    })\n  },\n  async initFromClipboard (str) {\n    address_parse.smart(str).then(res => {\n      console.log('ggggggg', res);\n      if (res.name && res.phone && res.address) {\n        \n        // 检测到收货地址\n        this.setData({\n          addressData: {\n            provinceId: res.provinceCode,\n            cityId: res.cityCode,\n            districtId: res.countyCode,\n            linkMan: res.name,\n            mobile: res.phone,\n            address: res.address,\n          },\n          address: res.address,\n        })\n        this.provinces(res.provinceCode, res.cityCode, res.countyCode)\n      }\n    })\n  },\n  deleteAddress: function (e) {\n    const id = e.currentTarget.dataset.id;\n    wx.showModal({\n      title: '提示',\n      content: '确定要删除该收货地址吗？',\n      success: function (res) {\n        if (res.confirm) {\n          WXAPI.deleteAddress(wx.getStorageSync('token'), id).then(function () {\n            wx.navigateBack({})\n          })\n        } else {\n          console.log('用户点击取消')\n        }\n      }\n    })\n  },\n  async readFromWx() {\n    let that = this;\n    wx.chooseAddress({\n      success: function (res) {\n        // res = {\n        //   cityName: '上海市',\n        //   countyName: '嘉定区',\n        //   detailInfo: '惠民路123号',\n        //   errMsg: 'chooseAddress.ok',\n        //   nationalCode: '310114',\n        //   postalCode: '201800',\n        //   provinceName: '上海市',\n        //   telNumber: '13500000000',\n        //   userName: '测试',\n        // }\n        const provinceName = res.provinceName;\n        const cityName = res.cityName;\n        const diatrictName = res.countyName;\n        // 读取省\n        const pIndex = that.data.provinces.findIndex(ele => {\n          return ele.name == provinceName\n        })\n        if (pIndex != -1) {\n          const e = {\n            detail: {\n              value: pIndex\n            }\n          }\n          that.provinceChange(e, 0, 0).then(() => {\n            // 读取市\n            let cIndex = that.data.cities.findIndex(ele => {\n              return ele.name == cityName\n            })\n            if (cIndex == -1) {\n              cIndex = 1 // 兼容直辖市\n            }\n            if (cIndex != -1) {\n              const e = {\n                detail: {\n                  value: cIndex\n                }\n              }\n              that.cityChange(e, 0).then(() => {\n                // 读取区县\n                const aIndex = that.data.areas.findIndex(ele => {\n                  return ele.name == diatrictName\n                })\n                if (aIndex != -1) {\n                  const e = {\n                    detail: {\n                      value: aIndex\n                    }\n                  }\n                  that.areaChange(e)\n                }\n              })\n            }\n          })\n        }\n        that.setData({\n          linkMan: res.userName,\n          mobile: res.telNumber,\n          address: res.detailInfo\n        });\n      }\n    })\n  },\n  chooseLocation() {\n    wx.chooseLocation({\n      success: (res) => {\n        const addressData = this.data.addressData ? this.data.addressData : {}\n        addressData.address = res.name\n        addressData.latitude = res.latitude\n        addressData.longitude = res.longitude\n        this.setData({\n          addressData,\n          address: res.name,\n        })\n        address_parse.smart(res.address + res.name).then(res => {\n          if (res.address) {\n            // 检测到收货地址\n            this.setData({\n              addressData: {\n                provinceId: res.provinceCode || '',\n                cityId: res.cityCode || '',\n                districtId: res.countyCode || '',\n                address: addressData.address,\n                latitude: addressData.latitude,\n                longitude: addressData.longitude\n              },\n              address: addressData.address,\n            })\n            this.provinces(res.provinceCode, res.cityCode, res.countyCode)\n          }\n        })\n      },\n      fail: (e) => {\n        console.error(e)\n      },\n    })\n  }\n})\n"
  },
  {
    "path": "pages/address-add/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"收货地址\"\n}"
  },
  {
    "path": "pages/address-add/index.wxml",
    "content": "<view class=\"page-container\">\n  <!-- 快捷功能 -->\n  <block wx:if=\"{{!id && provinces}}\">\n    <view class=\"quick-action-card\">\n      <view class=\"quick-action-btn\" bindtap=\"readFromWx\">\n        <view class=\"quick-icon\">📍</view>\n        <view class=\"quick-text\">\n          <view class=\"quick-title\">一键导入</view>\n          <view class=\"quick-desc\">使用微信收货地址</view>\n        </view>\n        <view class=\"quick-arrow\">›</view>\n      </view>\n    </view>\n  </block>\n\n  <!-- 地址信息卡片 -->\n  <view class=\"form-card\">\n    <view class=\"card-title\">\n      <view class=\"title-icon\">📮</view>\n      <text>收货地址</text>\n    </view>\n    \n    <view class=\"form-section\">\n      <picker bindchange=\"provinceChange\" value=\"{{pIndex}}\" range=\"{{provinces}}\" range-key=\"name\">\n        <van-cell custom-class=\"custom-cell\" title=\"省份\" value=\"{{provinces[pIndex].name}}\" is-link />\n      </picker>\n      <picker wx:if=\"{{cities}}\" bindchange=\"cityChange\" value=\"{{cIndex}}\" range=\"{{cities}}\" range-key=\"name\">\n        <van-cell custom-class=\"custom-cell\" title=\"城市\" value=\"{{cities[cIndex].name}}\" is-link />\n      </picker>\n      <picker wx:if=\"{{areas}}\" bindchange=\"areaChange\" value=\"{{aIndex}}\" range=\"{{areas}}\" range-key=\"name\">\n        <van-cell custom-class=\"custom-cell\" title=\"区县\" value=\"{{areas[aIndex].name}}\" is-link />\n      </picker>\n      <picker wx:if=\"{{streets}}\" bindchange=\"streetChange\" value=\"{{sIndex}}\" range=\"{{streets}}\" range-key=\"name\">\n        <van-cell custom-class=\"custom-cell\" title=\"街道/镇\" value=\"{{streets[sIndex].name}}\" is-link />\n      </picker>\n      <picker wx:if=\"{{communities}}\" bindchange=\"communityChange\" value=\"{{ccIndex}}\" range=\"{{communities}}\" range-key=\"name\">\n        <van-cell custom-class=\"custom-cell\" title=\"社区/村委会\" value=\"{{communities[ccIndex].name}}\" is-link />\n      </picker>\n      <van-field\n        custom-class=\"custom-field\"\n        label=\"详细地址\"\n        model:value=\"{{ address }}\"\n        placeholder=\"如街道、楼栋号、门牌号等\"\n        input-align=\"right\"\n        clearable\n        type=\"textarea\"\n        autosize\n      />\n      <van-cell wx:if=\"{{ shipping_address_gps == '1' }}\" custom-class=\"custom-cell\" title=\"GPS定位\" value=\"{{ addressData.latitude ? '已定位' : '点击定位' }}\" is-link bind:click=\"chooseLocation\" />\n    </view>\n  </view>\n\n  <!-- 联系人信息卡片 -->\n  <view class=\"form-card\">\n    <view class=\"card-title\">\n      <view class=\"title-icon\">👤</view>\n      <text>联系人信息</text>\n    </view>\n    \n    <view class=\"form-section\">\n      <van-field\n        custom-class=\"custom-field\"\n        label=\"收货人\"\n        model:value=\"{{ linkMan }}\"\n        placeholder=\"请输入收货人姓名\"\n        input-align=\"right\"\n        clearable\n      />\n      <van-field\n        custom-class=\"custom-field\"\n        label=\"手机号码\"\n        model:value=\"{{ mobile }}\"\n        placeholder=\"请输入11位手机号\"\n        input-align=\"right\"\n        type=\"number\"\n        clearable\n      />\n    </view>\n  </view>\n\n  <!-- 底部操作按钮 -->\n  <view class=\"bottom-actions\">\n    <button class=\"save-btn primary-btn\" bindtap=\"bindSave\">\n      <text class=\"btn-text\">保存地址</text>\n    </button>\n    <button class=\"save-btn danger-btn\" bindtap=\"deleteAddress\" data-id=\"{{id}}\" wx:if=\"{{id}}\">\n      <text class=\"btn-text\">删除地址</text>\n    </button>\n  </view>\n  \n  <!-- 底部安全区域 -->\n  <view class=\"safe-area-bottom\"></view>\n</view>"
  },
  {
    "path": "pages/address-add/index.wxss",
    "content": "/* 页面基础样式 */\npage {\n  background: #f7fafc;\n  min-height: 100vh;\n}\n\npage, view, image, input {\n  display: block;\n  box-sizing: border-box;\n}\n\n/* 页面容器 */\n.page-container {\n  padding: 20rpx;\n  padding-bottom: 180rpx;\n}\n\n/* 快捷操作卡片 */\n.quick-action-card {\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);\n  border-radius: 24rpx;\n  padding: 24rpx;\n  margin-bottom: 24rpx;\n  box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.12);\n  animation: fadeInDown 0.5s ease;\n  position: relative;\n  overflow: hidden;\n}\n\n.quick-action-card::before {\n  content: '';\n  position: absolute;\n  top: -50%;\n  right: -10%;\n  width: 300rpx;\n  height: 300rpx;\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.06) 0%, rgba(118, 75, 162, 0.06) 100%);\n  border-radius: 50%;\n  pointer-events: none;\n}\n\n.quick-action-btn {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 20rpx 24rpx;\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.04) 0%, rgba(118, 75, 162, 0.04) 100%);\n  border-radius: 16rpx;\n  transition: all 0.3s ease;\n  position: relative;\n  z-index: 1;\n}\n\n.quick-action-btn:active {\n  transform: scale(0.98);\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);\n}\n\n.quick-action-btn:active .quick-icon {\n  transform: scale(0.95);\n}\n\n.quick-icon {\n  font-size: 48rpx;\n  margin-right: 20rpx;\n  transition: transform 0.3s ease;\n}\n\n.quick-text {\n  flex: 1;\n  color: #2d3748;\n}\n\n.quick-title {\n  font-size: 32rpx;\n  font-weight: 600;\n  margin-bottom: 6rpx;\n  letter-spacing: 1rpx;\n  color: #2d3748;\n}\n\n.quick-desc {\n  font-size: 24rpx;\n  color: #718096;\n  font-weight: 500;\n}\n\n.quick-arrow {\n  font-size: 56rpx;\n  color: #a0aec0;\n  font-weight: 300;\n}\n\n/* 表单卡片 */\n.form-card {\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);\n  border-radius: 24rpx;\n  margin-bottom: 24rpx;\n  overflow: hidden;\n  box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.12);\n  animation: fadeInUp 0.5s ease;\n}\n\n.card-title {\n  display: flex;\n  align-items: center;\n  padding: 32rpx 32rpx 24rpx;\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #1a1a1a;\n  border-bottom: 1rpx solid #f0f0f0;\n}\n\n.title-icon {\n  font-size: 40rpx;\n  margin-right: 12rpx;\n}\n\n.form-section {\n  padding: 0;\n}\n\n/* 自定义 Vant 组件样式 */\n.custom-cell {\n  font-size: 30rpx !important;\n  padding: 28rpx 32rpx !important;\n  border-bottom: 1rpx solid #f5f5f5 !important;\n  transition: background-color 0.2s ease;\n}\n\n.custom-cell:last-child {\n  border-bottom: none !important;\n}\n\n.custom-cell:active {\n  background-color: #f8f9fa !important;\n}\n\n.custom-field {\n  font-size: 30rpx !important;\n  padding: 28rpx 32rpx !important;\n  border-bottom: 1rpx solid #f5f5f5 !important;\n}\n\n.custom-field:last-child {\n  border-bottom: none !important;\n}\n\n/* 底部操作区 */\n.bottom-actions {\n  position: fixed;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  padding: 20rpx 32rpx;\n  background: linear-gradient(180deg, rgba(247, 250, 252, 0) 0%, rgba(247, 250, 252, 0.95) 30%, rgba(247, 250, 252, 1) 100%);\n  backdrop-filter: blur(20rpx);\n  z-index: 100;\n  box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.04);\n}\n\n.save-btn {\n  width: 100%;\n  height: 96rpx;\n  line-height: 96rpx;\n  border-radius: 48rpx;\n  border: none;\n  font-size: 32rpx;\n  font-weight: 600;\n  box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.2);\n  transition: all 0.3s ease;\n  margin-bottom: 16rpx;\n  position: relative;\n  overflow: hidden;\n}\n\n.save-btn::before {\n  content: '';\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  width: 0;\n  height: 0;\n  border-radius: 50%;\n  background: rgba(255, 255, 255, 0.3);\n  transform: translate(-50%, -50%);\n  transition: width 0.6s, height 0.6s;\n}\n\n.save-btn:active::before {\n  width: 300%;\n  height: 300%;\n}\n\n.primary-btn {\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  color: #fff;\n}\n\n.primary-btn:active {\n  transform: translateY(2rpx);\n  box-shadow: 0 4rpx 16rpx rgba(102, 126, 234, 0.35);\n}\n\n.danger-btn {\n  background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);\n  color: #e53e3e;\n  box-shadow: 0 8rpx 24rpx rgba(229, 62, 62, 0.15);\n  border: 2rpx solid rgba(229, 62, 62, 0.2);\n}\n\n.danger-btn:active {\n  transform: translateY(2rpx);\n  box-shadow: 0 4rpx 16rpx rgba(229, 62, 62, 0.25);\n  background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);\n}\n\n.btn-text {\n  position: relative;\n  z-index: 1;\n  letter-spacing: 2rpx;\n}\n\nbutton[type=\"default\"] {\n  background-color: #fff;\n  color: #000;\n}\n\n/* 安全区域 */\n.safe-area-bottom {\n  height: env(safe-area-inset-bottom);\n  height: constant(safe-area-inset-bottom);\n}\n\n/* 兼容旧样式 */\npicker {\n  display: block;\n  width: 100%;\n}\n\n.hui {\n  color: #999;\n}\n\n.showRegionSelect {\n  margin-left: 32rpx;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  overflow: hidden;\n}\n\n/* 动画效果 */\n@keyframes fadeInDown {\n  from {\n    opacity: 0;\n    transform: translateY(-30rpx);\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n\n@keyframes fadeInUp {\n  from {\n    opacity: 0;\n    transform: translateY(30rpx);\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n\n@keyframes bounce {\n  0%, 100% {\n    transform: translateY(0);\n  }\n  50% {\n    transform: translateY(-6rpx);\n  }\n}\n\n/* 输入框聚焦效果 */\n.van-field__control:focus {\n  color: #667eea;\n}\n\n/* 响应式适配 */\n@media (prefers-color-scheme: dark) {\n  page {\n    background: #1a1a1a;\n  }\n  \n  .form-card {\n    background: #2a2a2a;\n    color: #fff;\n  }\n  \n  .card-title {\n    color: #fff;\n    border-bottom-color: #3a3a3a;\n  }\n}\n"
  },
  {
    "path": "pages/asset/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    balance: 0.00,\n    freeze: 0,\n    score: 0,\n    score_sign_continuous: 0,\n    cashlogs: undefined,\n\n    tabs: [\"资金明细\", \"提现记录\", \"押金记录\"],\n    activeIndex: 0,\n    sliderOffset: 0,\n    sliderLeft: 0,\n\n    withDrawlogs: undefined,\n    depositlogs: undefined,\n\n    rechargeOpen: false, // 是否开启充值[预存]功能\n    page: 1,\n  },\n  onLoad(e) {\n    const withdrawal = wx.getStorageSync('withdrawal')\n    if (withdrawal == '1') {\n      this.setData({\n        withdrawal,\n        tabs: [\"资金明细\", \"提现记录\", \"押金记录\"]\n      })\n    } else {\n      this.setData({\n        tabs: [\"资金明细\", \"押金记录\"]\n      })\n    }\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.initData()\n      } else {\n        getApp().loginOK = () => {\n          this.initData()\n        }\n      }\n    })\n  },\n  onShow() {\n  },\n  onPullDownRefresh() {\n    this.data.page = 1\n    this.fetchTabData(this.data.activeIndex)\n    wx.stopPullDownRefresh()\n  },\n  onReachBottom() {\n    this.data.page++\n    this.fetchTabData(this.data.activeIndex)\n  },\n  async initData() {\n    const token = wx.getStorageSync('token')\n    const res = await WXAPI.userAmount(token)\n    if (res.code == 700) {\n      wx.showToast({\n        title: '当前账户存在异常',\n        icon: 'none'\n      })\n      return\n    }\n    if (res.code == 0) {\n      this.setData({\n        balance: res.data.balance.toFixed(2),\n        freeze: res.data.freeze.toFixed(2),\n        totleConsumed: res.data.totleConsumed.toFixed(2),\n        score: res.data.score\n      })\n    }\n    this.fetchTabData(this.data.activeIndex)\n  },\n  fetchTabData(activeIndex){\n    if (activeIndex == 0) {\n      this.cashLogs()\n    }\n    if (activeIndex == 1) {\n      this.withDrawlogs()\n    }\n    if (activeIndex == 2) {\n      this.depositlogs()\n    }\n  },\n  async cashLogs() {\n    // https://www.yuque.com/apifm/nu0f75/khq7xu\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.cashLogsV3({\n      token: wx.getStorageSync('token'),\n      page: this.data.page,\n      dateAddBegin: this.data.dateAddBegin || '',\n      dateAddEnd: this.data.dateAddEnd || '',\n    })\n    wx.hideLoading()\n    if (res.code == 0) {\n      if (this.data.page == 1) {\n        this.setData({\n          cashlogs: res.data.result\n        })\n      } else {\n        this.setData({\n          cashlogs: this.data.cashlogs.concat(res.data.result)\n        })\n      }\n    } else {\n      if (this.data.page == 1) {\n        this.setData({\n          cashlogs: null\n        })\n      }\n    }\n  },\n  async withDrawlogs() {\n    // https://www.yuque.com/apifm/nu0f75/aw6qt6\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.withDrawLogsV2({\n      token: wx.getStorageSync('token'),\n      page: this.data.page\n    })\n    wx.hideLoading()\n    if (res.code == 0) {\n      if (this.data.page == 1) {\n        this.setData({\n          withDrawlogs: res.data.result\n        })\n      } else {\n        this.setData({\n          withDrawlogs: this.data.withDrawlogs.concat(res.data.result)\n        })\n      }\n    } else {\n      if (this.data.page == 1) {\n        this.setData({\n          withDrawlogs: null\n        })\n      }\n    }\n  },\n  async depositlogs() {\n    wx.showLoading({\n      title: '',\n    })\n    // https://www.yuque.com/apifm/nu0f75/xd6g5h\n    const res = await WXAPI.depositListV2({\n      token: wx.getStorageSync('token'),\n      page: this.data.page\n    })\n    wx.hideLoading()\n    if (res.code == 0) {\n      if (this.data.page == 1) {\n        this.setData({\n          depositlogs: res.data.result\n        })\n      } else {\n        this.setData({\n          depositlogs: this.data.depositlogs.concat(res.data.result)\n        })\n      }\n    } else {\n      if (this.data.page == 1) {\n        this.setData({\n          depositlogs: null\n        })\n      }\n    }\n  },\n\n  recharge: function (e) {\n    wx.navigateTo({\n      url: \"/pages/recharge/index\"\n    })\n  },\n  withdraw: function (e) {\n    wx.navigateTo({\n      url: \"/pages/withdraw/index\"\n    })\n  },\n  payDeposit: function (e) {\n    wx.navigateTo({\n      url: \"/pages/deposit/pay\"\n    })\n  },\n  tabClick: function (e) {\n    this.setData({\n      activeIndex: e.detail.index\n    })\n    this.data.page = 1\n    this.fetchTabData(e.detail.index)\n  },\n  cancelLogin(){\n    wx.switchTab({\n      url: '/pages/my/index'\n    })\n  },\n  async confirmTX(e) {\n    const item = e.currentTarget.dataset.item\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.wxpayRequestMerchantTransferV2({\n      token: wx.getStorageSync('token'),\n      number: item.number\n    })\n    wx.hideLoading()\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.requestMerchantTransfer({\n      mchId: res.data.mchId,\n      appId: res.data.appId,\n      package: res.data.package,\n      openId: res.data.openId,\n      success: res => {\n        console.log(res);\n        this.setData({\n          activeIndex: 1\n        });\n        this.fetchTabData(1)\n      },\n      fail: res => {\n        console.error(res);\n      },\n    })\n  },\n  dateAddBeginChange(e) {\n    this.setData({\n      dateAddBegin: e.detail.value\n    })\n    this.fetchTabData(0)\n  },\n  dateAddEndChange(e) {\n    this.setData({\n      dateAddEnd: e.detail.value\n    })\n    this.fetchTabData(0)\n  },\n  async payStatusDepositV2(e) {\n    const item = e.currentTarget.dataset.item\n    wx.showLoading({\n      title: '',\n    })\n    // https://www.yuque.com/apifm/nu0f75/mpsdwi\n    const res= await WXAPI.payStatusDepositV2({\n      token: wx.getStorageSync('token'),\n      id: item.id\n    })\n    wx.hideLoading()\n    if (res.code == 40000) {\n      // 余额不够\n      this.setData({\n        money: res.data,\n        paymentShow: true,\n        nextAction: {\n          type: 5,\n          amount: item.amount\n        }\n      })\n      return\n    } else if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.showModal({\n      content: '支付成功',\n      showCancel: false,\n      success: (res) => {\n        this.page = 1\n        this.depositlogs()\n      }\n    })\n  },\n  async depositBackApplyV2(e) {\n    const item = e.currentTarget.dataset.item\n    wx.showModal({\n      content: '确定要申请退回吗？',\n      complete: async (res) => {\n        if (res.confirm) {\n          wx.showLoading({\n            title: '',\n          })\n          // https://www.yuque.com/apifm/nu0f75/qx1f9u\n          const res= await WXAPI.depositBackApplyV2(wx.getStorageSync('token'), item.id)\n          wx.hideLoading()\n          if (res.code != 0) {\n            wx.showToast({\n              title: res.msg,\n            })\n            return\n          }\n          wx.showModal({\n            content: '已申请，等待管理员处理',\n            showCancel: false,\n            success: (res) => {\n              this.page = 1\n              this.depositlogs()\n            }\n          })\n        }\n      }\n    })\n  },\n})"
  },
  {
    "path": "pages/asset/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"我的资产\",\n  \"enablePullDownRefresh\": true\n}"
  },
  {
    "path": "pages/asset/index.wxml",
    "content": "<import src=\"/template/login/index.wxml\" />\n\n<view class=\"asset-container\">\n  <!-- 顶部装饰背景 -->\n  <view class=\"header-bg\">\n    <view class=\"bg-circle circle-1\"></view>\n    <view class=\"bg-circle circle-2\"></view>\n    <view class=\"bg-circle circle-3\"></view>\n  </view>\n\n  <!-- 资产卡片 -->\n  <view class=\"asset-card\">\n    <view class=\"asset-header\">\n      <view class=\"header-title\">我的资产</view>\n      <view class=\"header-subtitle\">Asset Overview</view>\n    </view>\n    \n    <view class=\"balance-main\">\n      <view class=\"balance-label\">可用余额(元)</view>\n      <view class=\"balance-amount\">\n        <text class=\"currency-symbol\">¥</text>\n        <text class=\"amount-number\">{{balance}}</text>\n      </view>\n    </view>\n\n    <view class=\"asset-stats\">\n      <view class='stat-item'>\n        <view class=\"stat-value\">¥{{freeze}}</view>\n        <view class=\"stat-label\">冻结金额</view>\n      </view>\n      <view class=\"stat-divider\"></view>\n      <view class='stat-item'>\n        <view class=\"stat-value\">¥{{totleConsumed}}</view>\n        <view class=\"stat-label\">累计消费</view>\n      </view>\n    </view>\n  </view>\n\n  <!-- 操作按钮区 -->\n  <view class='action-buttons'>\n    <button class=\"action-btn btn-primary\" hover-class=\"btn-hover\" bind:tap=\"recharge\">\n      <view class=\"btn-icon\">💰</view>\n      <view class=\"btn-text\">充值</view>\n    </button>\n    <button class='action-btn btn-primary' hover-class=\"btn-hover\" bind:tap=\"payDeposit\">\n      <view class=\"btn-icon\">🔒</view>\n      <view class=\"btn-text\">押金</view>\n    </button>\n    <button wx:if=\"{{ withdrawal == '1' }}\" class='action-btn btn-primary' hover-class=\"btn-hover\" bind:tap=\"withdraw\">\n      <view class=\"btn-icon\">💸</view>\n      <view class=\"btn-text\">提现</view>\n    </button>\n  </view>\n</view>\n\n<!-- 交易记录区域 -->\n<view class=\"records-section\">\n  <van-tabs active=\"{{ active }}\" bind:change=\"tabClick\" color=\"#5B7FFF\" title-active-color=\"#5B7FFF\">\n    <van-tab wx:for=\"{{tabs}}\" wx:key=\"*this\" title=\"{{item}}\" />\n  </van-tabs>\n  \n  <view class=\"filter-section\" wx:if=\"{{activeIndex == 0}}\">\n    <picker mode=\"date\" value=\"{{ dateAddBegin }}\" bindchange=\"dateAddBeginChange\">\n      <van-cell title=\"交易开始日期\" value=\"{{ dateAddBegin ? dateAddBegin : '请选择' }}\" is-link border=\"{{false}}\" />\n    </picker>\n    <picker mode=\"date\" value=\"{{ dateAddEnd }}\" bindchange=\"dateAddEndChange\">\n      <van-cell title=\"交易结束日期\" value=\"{{ dateAddEnd ? dateAddEnd : '请选择' }}\" is-link border=\"{{false}}\" />\n    </picker>\n  </view>\n  \n  <view class=\"list-container\">\n    <van-cell-group wx:if=\"{{activeIndex == 0}}\" border=\"{{false}}\">\n      <van-empty wx:if=\"{{!cashlogs}}\" description=\"暂无资金明细\" />\n      <van-cell wx:for=\"{{cashlogs}}\" wx:key=\"index\" title=\"{{ item.typeStr }}\" label=\"{{ item.dateAdd }}\" value=\"{{ item.amount }}\" border=\"{{false}}\" />\n    </van-cell-group>\n    <van-cell-group wx:if=\"{{activeIndex == 1}}\" border=\"{{false}}\">\n      <van-empty wx:if=\"{{!withDrawlogs}}\" description=\"暂无提现记录\" />\n      <van-cell wx:for=\"{{withDrawlogs}}\" wx:key=\"index\" title=\"{{ item.statusStr }}\" label=\"{{ item.dateAdd }}{{ item.rejectionReason ? ' 驳回原因：' + item.rejectionReason : '' }}\" border=\"{{false}}\">\n        <view slot=\"\">\n          <view class=\"price\"><text>￥</text>{{ item.money }}</view>\n          <view wx:if=\"{{ item.status == 3 && item.packageInfo }}\">\n            <van-button type=\"primary\" size=\"mini\" bind:click=\"confirmTX\" data-item=\"{{ item }}\" color=\"#5B7FFF\">确认收款</van-button>\n          </view>\n        </view>\n      </van-cell>\n    </van-cell-group>\n    <van-cell-group wx:if=\"{{activeIndex == 2}}\" border=\"{{false}}\">\n      <van-empty wx:if=\"{{!depositlogs}}\" description=\"暂无押金记录\" />\n      <van-cell wx:for=\"{{depositlogs}}\" wx:key=\"index\" title=\"{{ item.statusStr }}\" label=\"{{ item.dateAdd }}\" border=\"{{false}}\">\n        <view slot=\"\">\n          <view class=\"price\"><text>￥</text>{{ item.amount }}</view>\n          <view wx:if=\"{{ item.status == -1 }}\">\n            <van-button type=\"primary\" size=\"mini\" color=\"#5B7FFF\" data-item=\"{{ item }}\" bind:click=\"payStatusDepositV2\">支付押金</van-button>\n          </view>\n          <view wx:if=\"{{ item.status == 1 }}\">\n            <van-button type=\"primary\" size=\"mini\" color=\"#5B7FFF\" data-item=\"{{ item }}\" bind:click=\"depositBackApplyV2\">申请退回</van-button>\n          </view>\n        </view>\n      </van-cell>\n    </van-cell-group>\n  </view>\n</view>\n\n"
  },
  {
    "path": "pages/asset/index.wxss",
    "content": "/* 页面容器 */\npage {\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  min-height: 100vh;\n}\n\n/* 顶部容器 */\n.asset-container {\n  position: relative;\n  padding: 30rpx;\n  padding-bottom: 40rpx;\n  overflow: hidden;\n}\n\n/* 装饰背景圆圈 */\n.header-bg {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  height: 600rpx;\n  overflow: hidden;\n  pointer-events: none;\n}\n\n.bg-circle {\n  position: absolute;\n  border-radius: 50%;\n  background: rgba(255, 255, 255, 0.1);\n}\n\n.circle-1 {\n  width: 400rpx;\n  height: 400rpx;\n  top: -150rpx;\n  right: -100rpx;\n  animation: float 6s ease-in-out infinite;\n}\n\n.circle-2 {\n  width: 300rpx;\n  height: 300rpx;\n  top: 100rpx;\n  left: -100rpx;\n  animation: float 8s ease-in-out infinite;\n}\n\n.circle-3 {\n  width: 200rpx;\n  height: 200rpx;\n  top: 300rpx;\n  right: 50rpx;\n  animation: float 7s ease-in-out infinite;\n}\n\n@keyframes float {\n  0%, 100% {\n    transform: translateY(0) rotate(0deg);\n  }\n  50% {\n    transform: translateY(-30rpx) rotate(180deg);\n  }\n}\n\n/* 资产卡片 */\n.asset-card {\n  position: relative;\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);\n  border-radius: 32rpx;\n  padding: 50rpx 40rpx 40rpx;\n  margin-bottom: 30rpx;\n  box-shadow: 0 20rpx 60rpx rgba(102, 126, 234, 0.25);\n  overflow: hidden;\n}\n\n.asset-card::before {\n  content: '';\n  position: absolute;\n  top: -50%;\n  right: -10%;\n  width: 400rpx;\n  height: 400rpx;\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);\n  border-radius: 50%;\n}\n\n/* 卡片头部 */\n.asset-header {\n  margin-bottom: 40rpx;\n  position: relative;\n}\n\n.header-title {\n  font-size: 36rpx;\n  font-weight: 700;\n  color: #2d3748;\n  margin-bottom: 8rpx;\n  letter-spacing: 1rpx;\n}\n\n.header-subtitle {\n  font-size: 22rpx;\n  color: #a0aec0;\n  font-weight: 500;\n  letter-spacing: 2rpx;\n  text-transform: uppercase;\n}\n\n/* 主余额区域 */\n.balance-main {\n  text-align: center;\n  padding: 30rpx 0;\n  margin-bottom: 30rpx;\n  position: relative;\n}\n\n.balance-label {\n  font-size: 26rpx;\n  color: #718096;\n  margin-bottom: 16rpx;\n  font-weight: 500;\n}\n\n.balance-amount {\n  display: flex;\n  align-items: baseline;\n  justify-content: center;\n  position: relative;\n}\n\n.currency-symbol {\n  font-size: 48rpx;\n  color: #667eea;\n  font-weight: 700;\n  margin-right: 8rpx;\n}\n\n.amount-number {\n  font-size: 88rpx;\n  font-weight: 800;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  -webkit-background-clip: text;\n  -webkit-text-fill-color: transparent;\n  background-clip: text;\n  letter-spacing: 2rpx;\n  line-height: 1;\n}\n\n/* 统计信息 */\n.asset-stats {\n  display: flex;\n  align-items: center;\n  justify-content: space-around;\n  padding: 30rpx 20rpx;\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);\n  border-radius: 20rpx;\n  position: relative;\n}\n\n.stat-item {\n  flex: 1;\n  text-align: center;\n}\n\n.stat-value {\n  font-size: 36rpx;\n  font-weight: 700;\n  color: #2d3748;\n  margin-bottom: 8rpx;\n}\n\n.stat-label {\n  font-size: 24rpx;\n  color: #718096;\n  font-weight: 500;\n}\n\n.stat-divider {\n  width: 2rpx;\n  height: 60rpx;\n  background: linear-gradient(to bottom, \n    rgba(102, 126, 234, 0) 0%,\n    rgba(102, 126, 234, 0.3) 50%,\n    rgba(102, 126, 234, 0) 100%\n  );\n}\n\n/* 操作按钮区 */\n.action-buttons {\n  display: flex;\n  gap: 20rpx;\n  margin-bottom: 30rpx;\n  position: relative;\n}\n\n.action-buttons form {\n  flex: 1;\n}\n\n.action-btn {\n  width: 100%;\n  height: 140rpx !important;\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);\n  border-radius: 24rpx;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  border: none;\n  box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.15);\n  transition: all 0.3s ease;\n  padding: 0 !important;\n  line-height: normal !important;\n  font-size: 28rpx;\n  position: relative;\n  overflow: hidden;\n}\n\n.action-btn::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  opacity: 0;\n  transition: opacity 0.3s ease;\n}\n\n.action-btn::after {\n  display: none;\n}\n\n.btn-icon {\n  font-size: 48rpx;\n  margin-bottom: 8rpx;\n  position: relative;\n  z-index: 1;\n  transition: transform 0.3s ease;\n}\n\n.btn-text {\n  font-size: 26rpx;\n  font-weight: 600;\n  color: #2d3748;\n  position: relative;\n  z-index: 1;\n  transition: color 0.3s ease;\n}\n\n.btn-hover {\n  transform: translateY(-4rpx);\n  box-shadow: 0 12rpx 32rpx rgba(102, 126, 234, 0.25) !important;\n}\n\n.btn-hover::before {\n  opacity: 1;\n}\n\n.btn-hover .btn-text {\n  color: #ffffff;\n}\n\n.btn-hover .btn-icon {\n  transform: scale(1.1);\n}\n\n/* 交易记录区域 */\n.records-section {\n  background: #ffffff;\n  border-radius: 32rpx 32rpx 0 0;\n  min-height: 600rpx;\n  padding-top: 10rpx;\n  box-shadow: 0 -10rpx 40rpx rgba(0, 0, 0, 0.05);\n}\n\n/* 筛选区域 */\n.filter-section {\n  padding: 20rpx 30rpx;\n  background: #f7fafc;\n  margin: 0 30rpx 20rpx;\n  border-radius: 20rpx;\n}\n\n/* 列表容器 */\n.list-container {\n  padding: 0 30rpx 40rpx;\n}\n\n/* 价格样式 */\n.price {\n  color: #667eea;\n  font-size: 32rpx;\n  font-weight: 700;\n  text-align: right;\n  margin-bottom: 10rpx;\n}\n\n.price text {\n  font-size: 24rpx;\n  margin-right: 4rpx;\n}\n\n/* van-tabs 样式覆盖 */\n.records-section .van-tabs {\n  background: transparent;\n}\n\n.records-section .van-tabs__line {\n  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%) !important;\n  height: 6rpx !important;\n  border-radius: 3rpx !important;\n}\n\n/* van-cell 样式优化 */\n.list-container .van-cell {\n  background: #ffffff;\n  margin-bottom: 20rpx;\n  border-radius: 16rpx;\n  padding: 30rpx !important;\n  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.04);\n}\n\n.list-container .van-cell::after {\n  display: none;\n}\n\n/* 空状态样式 */\n.list-container .van-empty {\n  padding: 100rpx 0;\n}\n\n/* 优化 van-cell-group */\n.list-container .van-cell-group {\n  background: transparent;\n}\n\n.list-container .van-cell-group::after {\n  display: none;\n}\n\n/* 按钮基础样式重置 */\nbutton {\n  background: none;\n  border: none;\n  outline: none;\n}\n\nbutton::after {\n  border: none;\n}\n\n/* 响应式适配 */\n@media screen and (max-width: 320px) {\n  .amount-number {\n    font-size: 72rpx;\n  }\n  \n  .action-btn {\n    height: 120rpx !important;\n  }\n  \n  .btn-icon {\n    font-size: 40rpx;\n  }\n}\n"
  },
  {
    "path": "pages/card/logs.js",
    "content": "const WXAPI = require('apifm-wxapi')\nPage({\n\n  data: {\n    page: 1 // 读取第几页\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function (options) {\n    this.data.cardId = options.id\n    this.cardMyLogs()\n  },\n  async cardMyLogs(){\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.cardMyLogs({\n      token: wx.getStorageSync('token'),\n      cardId: this.data.cardId,\n      page: this.data.page\n    })\n    wx.hideLoading()\n    if (res.code == 0) {\n      if (this.data.page == 1) {\n        this.setData({\n          list: res.data.result,\n        })\n      } else {\n        this.setData({\n          list: this.data.list.concat(res.data.result),\n        })\n      }\n    } else {\n      if (this.data.page == 1) {\n        this.setData({\n          list: null,\n        })\n      } else {\n        wx.showToast({\n          title: '没有更多了',\n          icon: 'none'\n        })\n      }\n    }\n  },\n  onPullDownRefresh: function () {\n    this.data.page = 1\n    this.cardMyLogs()\n    wx.stopPullDownRefresh()\n  },\n  onReachBottom() {\n    this.data.page++\n    this.cardMyLogs()\n  },\n})"
  },
  {
    "path": "pages/card/logs.json",
    "content": "{\n  \"navigationBarTitleText\": \"会员卡消费明细\",\n  \"enablePullDownRefresh\": true\n}"
  },
  {
    "path": "pages/card/logs.wxml",
    "content": "<view class=\"container\">\n  <!-- 顶部渐变背景区域 -->\n  <view class=\"header-banner\">\n    <view class=\"header-content\">\n      <view class=\"header-title\">消费明细</view>\n      <view class=\"header-subtitle\">CONSUMPTION DETAILS</view>\n    </view>\n    <view class=\"header-bg-circle circle-1\"></view>\n    <view class=\"header-bg-circle circle-2\"></view>\n  </view>\n\n  <!-- 消费记录列表 -->\n  <view class=\"records-wrapper\">\n    <!-- 空状态 -->\n    <view wx:if=\"{{ !list }}\" class=\"empty-state\">\n      <view class=\"empty-icon\">📋</view>\n      <view class=\"empty-title\">暂无消费记录</view>\n      <view class=\"empty-desc\">您还没有任何消费记录哦</view>\n    </view>\n\n    <!-- 记录列表 -->\n    <view wx:else class=\"records-list\">\n      <view class=\"record-card\" wx:for=\"{{ list }}\" wx:key=\"id\">\n        <view class=\"card-header\">\n          <view class=\"record-left\">\n            <view class=\"record-icon\">\n              <view class=\"icon-circle\">💳</view>\n            </view>\n            <view class=\"record-info\">\n              <view class=\"record-type\">{{ item.typeStr }}</view>\n              <view class=\"record-date\">{{ item.dateAdd }}</view>\n            </view>\n          </view>\n          <view class=\"record-right\">\n            <view class=\"record-amount\">{{ item.amount }}</view>\n          </view>\n        </view>\n        <view class=\"card-footer\">\n          <view class=\"balance-info\">\n            <text class=\"balance-label\">当前余额</text>\n            <text class=\"balance-value\">{{ item.balance }}</text>\n          </view>\n          <view class=\"card-ornament\"></view>\n        </view>\n      </view>\n    </view>\n  </view>\n</view>"
  },
  {
    "path": "pages/card/logs.wxss",
    "content": "/* pages/card/logs.wxss */\n\n/* ============ 全局容器 ============ */\n.container {\n  min-height: 100vh;\n  background: linear-gradient(180deg, #f5f5f5 0%, #ffffff 100%);\n}\n\n/* ============ 顶部Banner区域 ============ */\n.header-banner {\n  position: relative;\n  height: 280rpx;\n  background: linear-gradient(135deg, #E1251B 0%, #E93323 50%, #F54336 100%);\n  overflow: hidden;\n  box-shadow: 0 8rpx 24rpx rgba(225, 37, 27, 0.15);\n}\n\n.header-content {\n  position: relative;\n  z-index: 2;\n  padding: 80rpx 40rpx 40rpx;\n}\n\n.header-title {\n  font-size: 48rpx;\n  font-weight: 700;\n  color: #ffffff;\n  letter-spacing: 2rpx;\n  margin-bottom: 12rpx;\n  text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);\n}\n\n.header-subtitle {\n  font-size: 22rpx;\n  color: rgba(255, 255, 255, 0.85);\n  letter-spacing: 4rpx;\n  font-weight: 400;\n}\n\n/* 装饰性圆圈 */\n.header-bg-circle {\n  position: absolute;\n  border-radius: 50%;\n  background: rgba(255, 255, 255, 0.08);\n}\n\n.circle-1 {\n  width: 400rpx;\n  height: 400rpx;\n  right: -100rpx;\n  top: -150rpx;\n}\n\n.circle-2 {\n  width: 280rpx;\n  height: 280rpx;\n  right: -80rpx;\n  bottom: -120rpx;\n  background: rgba(255, 255, 255, 0.05);\n}\n\n/* ============ 记录列表容器 ============ */\n.records-wrapper {\n  margin-top: -40rpx;\n  position: relative;\n  z-index: 3;\n  padding: 0 30rpx 40rpx;\n}\n\n.records-list {\n  display: flex;\n  flex-direction: column;\n  gap: 24rpx;\n}\n\n/* ============ 卡片样式 ============ */\n.record-card {\n  background: #ffffff;\n  border-radius: 24rpx;\n  overflow: hidden;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);\n  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n  position: relative;\n}\n\n.record-card::before {\n  content: '';\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 8rpx;\n  height: 100%;\n  background: linear-gradient(180deg, #E1251B 0%, #E93323 100%);\n}\n\n/* 卡片头部 */\n.card-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 32rpx 32rpx 24rpx;\n}\n\n.record-left {\n  display: flex;\n  align-items: center;\n  flex: 1;\n}\n\n.record-icon {\n  margin-right: 24rpx;\n}\n\n.icon-circle {\n  width: 88rpx;\n  height: 88rpx;\n  background: linear-gradient(135deg, #FFF5F5 0%, #FFE8E8 100%);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-size: 40rpx;\n  box-shadow: 0 4rpx 12rpx rgba(225, 37, 27, 0.08);\n}\n\n.record-info {\n  flex: 1;\n}\n\n.record-type {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333333;\n  margin-bottom: 8rpx;\n  letter-spacing: 0.5rpx;\n}\n\n.record-date {\n  font-size: 24rpx;\n  color: #999999;\n  letter-spacing: 0.5rpx;\n}\n\n.record-right {\n  margin-left: 20rpx;\n}\n\n.record-amount {\n  font-size: 44rpx;\n  font-weight: 700;\n  color: #E1251B;\n  letter-spacing: 1rpx;\n  font-family: 'DIN Alternate', 'Arial', sans-serif;\n}\n\n/* 卡片底部 */\n.card-footer {\n  background: linear-gradient(90deg, #FAFAFA 0%, #F5F5F5 100%);\n  padding: 24rpx 32rpx;\n  border-top: 1rpx solid #F0F0F0;\n  position: relative;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n}\n\n.balance-info {\n  display: flex;\n  align-items: baseline;\n  gap: 16rpx;\n}\n\n.balance-label {\n  font-size: 24rpx;\n  color: #666666;\n  letter-spacing: 0.5rpx;\n}\n\n.balance-value {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333333;\n  font-family: 'DIN Alternate', 'Arial', sans-serif;\n}\n\n.card-ornament {\n  width: 60rpx;\n  height: 60rpx;\n  background: linear-gradient(135deg, #E1251B15 0%, #E9332315 100%);\n  border-radius: 50%;\n  position: absolute;\n  right: 20rpx;\n  opacity: 0.4;\n}\n\n/* ============ 空状态样式 ============ */\n.empty-state {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: 120rpx 40rpx;\n  background: #ffffff;\n  border-radius: 24rpx;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);\n}\n\n.empty-icon {\n  font-size: 120rpx;\n  margin-bottom: 32rpx;\n  opacity: 0.6;\n  animation: float 3s ease-in-out infinite;\n}\n\n.empty-title {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333333;\n  margin-bottom: 16rpx;\n  letter-spacing: 1rpx;\n}\n\n.empty-desc {\n  font-size: 26rpx;\n  color: #999999;\n  text-align: center;\n  line-height: 1.6;\n}\n\n/* ============ 动画效果 ============ */\n@keyframes float {\n  0%, 100% {\n    transform: translateY(0);\n  }\n  50% {\n    transform: translateY(-10rpx);\n  }\n}\n\n/* 卡片悬停效果（仅适用于支持的平台） */\n.record-card:active {\n  transform: scale(0.98);\n  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);\n}\n\n/* ============ 响应式优化 ============ */\n@media (prefers-color-scheme: dark) {\n  .container {\n    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);\n  }\n  \n  .record-card {\n    background: #1f1f1f;\n    box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.3);\n  }\n  \n  .record-type {\n    color: #eeeeee;\n  }\n  \n  .record-date {\n    color: #888888;\n  }\n  \n  .balance-label {\n    color: #999999;\n  }\n  \n  .balance-value {\n    color: #eeeeee;\n  }\n  \n  .card-footer {\n    background: linear-gradient(90deg, #2a2a2a 0%, #252525 100%);\n    border-top-color: #333333;\n  }\n  \n  .empty-state {\n    background: #1f1f1f;\n  }\n  \n  .empty-title {\n    color: #eeeeee;\n  }\n}"
  },
  {
    "path": "pages/category/category.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nconst TOOLS = require('../../utils/tools.js') // TOOLS.showTabBarBadge();\n\nPage({\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    categories: [],\n    activeCategory: 0,\n    categorySelected: {\n      name: '',\n      id: ''\n    },\n    currentGoods: [],\n    onLoadStatus: true,\n    scrolltop: 0,\n\n    skuCurGoods: undefined,\n    page: 1,\n    pageSize: 20\n  },\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function(options) {\n    wx.showShareMenu({\n      withShareTicket: true\n    })\n    this.setData({\n      categoryMod: wx.getStorageSync('categoryMod')\n    })\n    this.categories();\n  },\n  async categories() {\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.goodsCategory()\n    wx.hideLoading()\n    let activeCategory = 0\n    let categorySelected = this.data.categorySelected\n    if (res.code == 0) {\n      // const categories = res.data.filter(ele => {\n      //   return !ele.vopCid1 && !ele.vopCid2\n      // })\n      const categories = res.data\n      categories.forEach(p => {\n        p.childs = categories.filter(ele => {\n          return p.id == ele.pid\n        })\n      })\n      const firstCategories = categories.filter(ele => { return ele.level == 1 })\n      if (this.data.categorySelected.id) {\n        activeCategory = firstCategories.findIndex(ele => {\n          return ele.id == this.data.categorySelected.id\n        })\n        categorySelected = firstCategories[activeCategory]\n      } else {\n        categorySelected = firstCategories[0]\n      }\n      let adPosition = null\n      if (categorySelected) {\n        const resAd = await WXAPI.adPosition('category_' + categorySelected.id)\n        if (resAd.code === 0) {\n          adPosition = resAd.data\n        }\n      }\n      this.setData({\n        page: 1,\n        activeCategory,\n        categories,\n        firstCategories,\n        categorySelected,\n        adPosition\n      })\n      this.getGoodsList()\n    }\n  },\n  async getGoodsList() {\n    if (this.data.categoryMod == 2) {\n      return\n    }\n    wx.showLoading({\n      title: '',\n    })\n    // secondCategoryId\n    let categoryId = ''\n    if (this.data.secondCategoryId) {\n      categoryId = this.data.secondCategoryId\n    } else if(this.data.categorySelected && this.data.categorySelected.id) {\n      categoryId = this.data.categorySelected.id\n    }\n    // https://www.yuque.com/apifm/nu0f75/wg5t98\n    const res = await WXAPI.goodsv2({\n      categoryId,\n      page: this.data.page,\n      pageSize: this.data.pageSize\n    })\n    wx.hideLoading()\n    if (res.code == 700) {\n      if (this.data.page == 1) {\n        this.setData({\n          currentGoods: null\n        });\n      } else {\n        wx.showToast({\n          title: '没有更多了',\n          icon: 'none'\n        })\n      }\n      return\n    }\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    if (this.data.page == 1) {\n      this.setData({\n        currentGoods: res.data.result\n      })\n    } else {\n      this.setData({\n        currentGoods: this.data.currentGoods.concat(res.data.result)\n      })\n    }\n  },\n  async onCategoryClick(e) {\n    const idx = e.target.dataset.idx\n    if (idx == this.data.activeCategory) {\n      this.setData({\n        scrolltop: 0,\n      })\n      return\n    }\n    const categorySelected = this.data.firstCategories[idx]\n    const res = await WXAPI.adPosition('category_' + categorySelected.id)\n    let adPosition = null\n    if (res.code === 0) {\n      adPosition = res.data\n    }\n    this.setData({\n      page: 1,\n      secondCategoryId: '',\n      activeCategory: idx,\n      categorySelected,\n      scrolltop: 0,\n      adPosition\n    });\n    this.getGoodsList();\n  },\n  onSecondCategoryClick(e) {\n    const idx = e.detail.index\n    let secondCategoryId = ''\n    if (idx) {\n      // 点击了具体的分类\n      secondCategoryId = this.data.categorySelected.childs[idx-1].id\n    }\n    this.setData({\n      page: 1,\n      secondCategoryId\n    });\n    this.getGoodsList();\n  },\n  bindconfirm(e) {\n    this.setData({\n      inputVal: e.detail\n    })\n    wx.navigateTo({\n      url: '/pages/goods/list?name=' + this.data.inputVal,\n    })\n  },\n  onShareAppMessage() {    \n    return {\n      title: '\"' + wx.getStorageSync('mallName') + '\" ' + wx.getStorageSync('share_profile'),\n      path: '/pages/index/index?inviter_id=' + wx.getStorageSync('uid')\n    }\n  },\n  onShareTimeline() {    \n    return {\n      title: '\"' + wx.getStorageSync('mallName') + '\" ' + wx.getStorageSync('share_profile'),\n      query: '',\n      imageUrl: this.data.goodsDetail.basicInfo.pic\n    }\n  },\n  onShow() {\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        TOOLS.showTabBarBadge() // 获取购物车数据，显示TabBarBadge\n      } else {\n        getApp().loginOK = () => {\n          TOOLS.showTabBarBadge() // 获取购物车数据，显示TabBarBadge\n        }\n      }\n    })\n    const _categoryId = wx.getStorageSync('_categoryId')\n    wx.removeStorageSync('_categoryId')\n    if (_categoryId) {\n      this.data.categorySelected.id = _categoryId\n      this.categories();\n    }\n  },\n  async addShopCar(e) {\n    const curGood = this.data.currentGoods.find(ele => {\n      return ele.id == e.currentTarget.dataset.id\n    })\n    if (!curGood) {\n      return\n    }\n    if (curGood.stores <= 0) {\n      wx.showToast({\n        title: '已售罄~',\n        icon: 'none'\n      })\n      return\n    }\n    // 判断是否有可选配件全局或者按分类的\n    const resGoodsAddition = await WXAPI.goodsAddition(curGood.id)\n    if (resGoodsAddition.code == 0) {\n      // 需要选择 SKU 和 可选配件\n      curGood.hasAddition = true\n      this.setData({\n        skuCurGoods: curGood\n      })\n      return\n    }\n    if (!curGood.propertyIds && !curGood.hasAddition) {\n      // 直接调用加入购物车方法\n      const res = await WXAPI.shippingCarInfoAddItem(wx.getStorageSync('token'), curGood.id, 1, [])\n      if (res.code == 2000) {\n        wx.navigateTo({\n          url: '/pages/login/index',\n        })\n        return\n      }\n      if (res.code == 30002) {\n        // 需要选择规格尺寸\n        this.setData({\n          skuCurGoods: curGood\n        })\n      } else if (res.code == 0) {\n        wx.showToast({\n          title: '加入成功',\n          icon: 'success'\n        })\n        wx.showTabBar()\n        TOOLS.showTabBarBadge() // 获取购物车数据，显示TabBarBadge\n      } else {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n      }\n    } else {\n      // 需要选择 SKU 和 可选配件\n      this.setData({\n        skuCurGoods: curGood\n      })\n    }\n  },\n  goodsGoBottom() {\n    this.data.page++\n    this.getGoodsList()\n  },\n  adPositionClick(e) {\n    const url = e.target.dataset.url\n    if (url) {\n      wx.navigateTo({\n        url: url\n      })\n    }\n  },\n  searchscan() {\n    wx.scanCode({\n      scanType: ['barCode', 'qrCode', 'datamatrix', 'pdf417'],\n      success: res => {\n        this.setData({\n          inputVal: res.result\n        })\n        wx.navigateTo({\n          url: '/pages/goods/list?name=' + res.result,\n        })\n      }\n    })\n  }\n})"
  },
  {
    "path": "pages/category/category.json",
    "content": "{\n  \"navigationBarTitleText\": \"分类\"\n}"
  },
  {
    "path": "pages/category/category.wxml",
    "content": "<van-search value=\"{{ name }}\" placeholder=\"请输入搜索关键词\" shape=\"round\" bind:search=\"bindconfirm\" use-right-icon-slot>\n  <van-icon slot=\"right-icon\" name=\"scan\" bind:click=\"searchscan\" />\n</van-search>\n<view class=\"main\">\n  <scroll-view class=\"category-container\" scroll-y=\"true\" scroll-with-animation=\"true\" scroll-into-view=\"{{ aaa }}\">\n    <van-sidebar custom-class=\"sidebar-l\" active-key=\"{{ activeCategory }}\">\n      <van-sidebar-item wx:if=\"{{item.level == 1}}\" id=\"category{{item.id}}\" wx:for=\"{{firstCategories}}\" wx:key=\"id\" data-idx=\"{{index}}\" bindtap=\"onCategoryClick\" title=\"{{ item.name }}\" />\n    </van-sidebar>\n  </scroll-view>\n  <scroll-view class=\"goods-container\" scroll-y=\"true\" scroll-top=\"{{scrolltop}}\" wx:if='{{onLoadStatus}}' bindscrolltolower=\"goodsGoBottom\">\n    <van-tabs wx:if=\"{{ categoryMod != 2 && categorySelected.childs && categorySelected.childs.length > 0 }}\" custom-class=\"llargada\" bind:change=\"onSecondCategoryClick\" ellipsis=\"{{ false }}\">\n      <van-tab title=\"全部\"></van-tab>\n      <van-tab wx:for=\"{{categorySelected.childs}}\" wx:key=\"id\" title=\"{{ item.name }}\"></van-tab>\n    </van-tabs>\n    <van-empty wx:if=\"{{categoryMod != 2 &&  !currentGoods}}\" description=\"暂无商品\" />\n    <block wx:if=\"{{ categoryMod == 2 }}\">\n      <van-cell title=\"{{ categorySelected.name }}\" is-link url=\"/pages/goods/list?categoryId={{ categorySelected.id }}\" />\n      <image wx:if=\"{{ adPosition }}\" class=\"adPosition\" mode=\"aspectFill\" src=\"{{adPosition.val}}\" mode=\"widthFix\" data-url=\"{{adPosition.url}}\" bindtap=\"adPositionClick\"></image>\n      <view class=\"small-category-box\">\n        <navigator wx:for=\"{{categorySelected.childs}}\" wx:key=\"id\" url=\"/pages/goods/list?categoryId={{item.id}}\">\n          <view class=\"small-category\">\n            <image mode=\"aspectFill\" src=\"{{item.icon}}\" mode=\"aspectFill\"></image>\n            <view>{{item.name}}</view>\n          </view>\n        </navigator>\n      </view>\n    </block>\n    <!-- 三级级分类展示 -->\n    <!-- <view wx:for=\"{{categories}}\" wx:key=\"id\" wx:if=\"{{item.pid == categorySelected.id}}\">\n      <navigator url=\"/pages/goods/list?categoryId={{item.id}}\">\n        <view class=\"no-data medium-category\">\n          <view class=\"line\"></view>\n          <view class=\"txt\">{{item.name}}</view>\n          <view class=\"line\"></view>\n        </view>\n      </navigator>\n      <view class=\"small-category-box\">\n        <navigator wx:for=\"{{categories}}\" wx:for-item=\"small\" wx:key=\"id\" wx:if=\"{{small.pid == item.id}}\" url=\"/pages/goods/list?categoryId={{small.id}}\">\n          <view class=\"small-category\">\n            <image mode=\"aspectFill\" src=\"{{small.icon}}\"></image>\n            <view>{{small.name}}</view>\n          </view>\n        </navigator>\n      </view>\n    </view> -->\n    <!-- 显示右侧商品 -->\n    <wxs module=\"goodsDetailPage\">\n    module.exports = {\n      url : function(item) {\n        if (item.supplyType == 'cps_jd') {\n          return '/packageCps/pages/goods-details/cps-jd?id=' + item.id\n        } else if (item.supplyType == 'vop_jd') {\n          return '/pages/goods-details/vop?id=' + item.yyId + '&goodsId=' + item.id\n        } else if (item.supplyType == 'cps_pdd') {\n          return '/packageCps/pages/goods-details/cps-pdd?id=' + item.id\n        } else if (item.supplyType == 'cps_taobao') {\n          return '/packageCps/pages/goods-details/cps-taobao?id=' + item.id\n        } else {\n          return '/pages/goods-details/index?id=' + item.id\n        }\n      }\n    }\n    </wxs>\n    <van-card\n      wx:for=\"{{currentGoods}}\" wx:key=\"id\"\n      price=\"{{item.minPrice}}\"\n      desc=\"{{item.numberSells ? '已售' + item.numberSells : ''}}\"\n      tag=\"{{item.gotScore ? (item.gotScore + (item.gotScoreType ? '%' : '') + '积分') : ''}}\"\n      title=\"{{item.name}}\"\n      title-class=\"title-class-apifm\"\n      thumb=\"{{item.pic}}\"\n      thumb-link=\"{{ goodsDetailPage.url(item) }}\"\n    >\n      <view wx:if=\"{{ item.supplyType != 'vop_jd' }}\" class=\"goods-btn\" slot=\"footer\">\n        <van-icon wx:if=\"{{ item.propertyIds || item.hasAddition }}\" name=\"add\" color=\"#e64340\" size=\"48rpx\" data-id=\"{{item.id}}\" bind:click=\"addShopCar\" />\n        <van-icon wx:else name=\"shopping-cart-o\" color=\"#e64340\" size=\"48rpx\" data-id=\"{{item.id}}\" bind:click=\"addShopCar\" />\n      </view>\n    </van-card>\n  </scroll-view>\n</view>\n\n<goods-pop skuCurGoodsBaseInfo=\"{{ skuCurGoods }}\" />\n"
  },
  {
    "path": "pages/category/category.wxss",
    "content": "page {\n  width: 100vw;\n  height: 100vh;\n  display: flex;\n  flex-direction: column;\n}\n.main {\n  flex: 1;\n  display: flex;\n  overflow: hidden;\n}\n.goods-btn {\n  position: absolute;\n  right: 32rpx;\n  bottom: 32rpx;\n}\n.category-container {\n  width: 180rpx;\n  height: 100%;\n}\n.goods-container {\n  flex: 1;\n  height: 100%;\n}\n\n.medium-category {\n  margin: 32rpx 0;\n}\n.medium-category .line {\n  width:60rpx;\n}\n.medium-category .txt {\n  color: #333;\n}\n.small-category-box {\n  width: 570rpx;\n  display: flex;\n  flex-wrap: wrap;\n}\n.small-category {\n  width: 147rpx;\n  margin-top: 32rpx;\n  margin-left: 32rpx;\n}\n.small-category image {\n  width: 147rpx;\n  height: 147rpx;\n}\n.small-category view {\n  text-align: center;\n  font-size: 24rpx;\n  color: #666;\n}\n\n.llargada{\n  width: 590rpx!important;\n}\n.sidebar-l {\n  width: 190rpx !important;\n}\n.adPosition {\n  width: 100%;\n}\n.title-class-apifm {\n  word-break: break-all;\n}"
  },
  {
    "path": "pages/cms/list.js",
    "content": "const WXAPI = require('apifm-wxapi')\nPage({\n  data: {\n    categoryId: undefined, // 分类id\n  },\n  onLoad (options) {\n    this.data.categoryId = options.categoryId\n    this.cmsCategoryDetail()\n    this.articles()\n  },\n  onShow: function () {\n\n  },\n  async cmsCategoryDetail() {\n    const res = await WXAPI.cmsCategoryDetail(this.data.categoryId)\n    if (res.code == 0) {\n      this.setData({\n        category: res.data\n      })\n      wx.setNavigationBarTitle({\n        title: res.data.info.name,\n      })\n    }\n  },\n  async articles() {\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.cmsArticlesV3({\n      categoryId: this.data.categoryId || ''\n    })\n    wx.hideLoading()\n    if (res.code == 0) {\n      this.setData({\n        cmsArticles: res.data.result\n      })\n    } else {\n      this.setData({\n        cmsArticles: null\n      })\n    }\n  },\n  onShareAppMessage: function() {    \n    return {\n      title: this.data.category.info.name,\n      path: '/pages/cms/list?categoryId='+ this.data.categoryId +'&inviter_id=' + wx.getStorageSync('uid')\n    }\n  },\n  onShareTimeline() {    \n    return {\n      title: this.data.category.info.name,\n      query: 'categoryId='+ this.data.categoryId +'&inviter_id=' + wx.getStorageSync('uid'),\n      imageUrl: this.data.category.info.icon,\n    }\n  },\n})"
  },
  {
    "path": "pages/cms/list.json",
    "content": "{\n  \"navigationBarTitleText\": \"\"\n}"
  },
  {
    "path": "pages/cms/list.wxml",
    "content": "<van-empty wx:if=\"{{!cmsArticles}}\" description=\"暂无记录\" />\n<van-cell wx:for=\"{{cmsArticles}}\" wx:key=\"id\" title=\"{{item.title}}\" is-link url=\"/pages/help/detail?id={{item.id}}\" />"
  },
  {
    "path": "pages/cms/list.wxss",
    "content": "/* pages/cms/list.wxss */"
  },
  {
    "path": "pages/coupons/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nPage({\n  data: {\n    tabs: ['可领', '已领', '失效', '口令'],\n    activeIndex: 0,\n\n    showPwdPop: false\n  },\n  onLoad(e) {\n\n  },\n  onShow() {\n    if (this.data.activeIndex == 0) {\n      this.sysCoupons()\n    }\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        if (this.data.activeIndex == 1) {\n          this.getMyCoupons()\n        }\n        if (this.data.activeIndex == 2) {\n          this.invalidCoupons()\n        }\n      }\n    })\n  },\n  tabClick: function (e) {\n    this.setData({\n      activeIndex: e.detail.index\n    });\n    if (this.data.activeIndex == 0) {\n      this.sysCoupons()\n    }\n    if (this.data.activeIndex == 1) {\n      this.getMyCoupons()\n    }\n    if (this.data.activeIndex == 2) {\n      this.invalidCoupons()\n    }\n  },\n  sysCoupons() { // 读取可领取券列表\n    var _this = this;\n    wx.showLoading({\n      title: '',\n    })\n    WXAPI.coupons().then(function (res) {\n      wx.hideLoading({\n        success: (res) => {},\n      })\n      if (res.code == 0) {\n        _this.setData({\n          coupons: res.data\n        });\n      } else {\n        _this.setData({\n          coupons: null\n        });\n      }\n    })\n  },\n  getCounpon2(){\n    if (!this.data.couponPwd) {\n      wx.showToast({\n        title: '请输入口令',\n        icon: 'none'\n      })\n      return\n    }\n    const e = {\n      kl: true,\n      currentTarget: {\n        dataset: {\n          id: this.data.pwdCounponId\n        }\n      }\n    }\n    this.getCounpon(e)\n  },\n  getCounpon(e) {\n    if (e.currentTarget.dataset.pwd) {\n      this.setData({\n        pwdCounponId: e.currentTarget.dataset.id,\n        showPwdPop: true\n      })\n      return\n    } else {\n      if (!e.kl) {\n        this.data.couponPwd = ''\n      }\n    }\n    this.setData({\n      showPwdPop: false\n    })\n    WXAPI.fetchCoupons({\n      id: e.currentTarget.dataset.id,\n      token: wx.getStorageSync('token'),\n      pwd: this.data.couponPwd\n    }).then(res => {\n      if (res.code == 2000) {\n        wx.navigateTo({\n            url: '/pages/login/index',\n        })\n        return\n      }\n      if (res.code == 20001 || res.code == 20002) {\n        wx.showModal({\n          content: '来晚了',\n          showCancel: false\n        })\n        return;\n      }\n      if (res.code == 20003) {\n        wx.showModal({\n          content: '你领过了，别贪心哦~',\n          showCancel: false\n        })\n        return;\n      }\n      if (res.code == 30001) {\n        wx.showModal({\n          content: '您的积分不足',\n          showCancel: false\n        })\n        return;\n      }\n      if (res.code == 20004) {\n        wx.showModal({\n          content: '已过期~',\n          showCancel: false\n        })\n        return;\n      }\n      if (res.code == 30002) {\n        // 发起微信支付\n        this.setData({\n          money: res.data,\n          paymentShow: true,\n          nextAction: {\n            // https://www.yuque.com/apifm/doc/aetmlb\n            type: 7,\n            couponRuleId: e.currentTarget.dataset.id\n          }\n        })\n        return;\n      }\n      if (res.code == 0) {\n        wx.showToast({\n          title: '领取成功',\n          icon: 'success'\n        })\n      } else {\n        wx.showModal({\n          content: res.msg,\n          showCancel: false\n        })\n      }\n    })\n  },\n  getMyCoupons: function () {\n    var _this = this;\n    wx.showLoading({\n      title: '',\n    })\n    WXAPI.myCoupons({\n      token: wx.getStorageSync('token'),\n      status: 0\n    }).then(function (res) {\n      wx.hideLoading({\n        success: (res) => {},\n      })\n      if (res.code == 2000) {\n        wx.navigateTo({\n            url: '/pages/login/index',\n        })\n        return\n      }\n      if (res.code == 0) {\n        res.data.forEach(ele => {\n          if (ele.dateEnd) {\n            ele.dateEnd = ele.dateEnd.split(\" \")[0]\n          }\n        })\n        _this.setData({\n          coupons: res.data\n        })\n      } else {\n        _this.setData({\n          coupons: null\n        })\n      }\n    })\n  },\n  invalidCoupons: function () {\n    var _this = this;\n    wx.showLoading({\n      title: '',\n    })\n    WXAPI.myCoupons({\n      token: wx.getStorageSync('token'),\n      status: '1,2,3'\n    }).then(function (res) {\n      wx.hideLoading({\n        success: (res) => {},\n      })\n      if (res.code == 0) {\n        _this.setData({\n          coupons: res.data\n        })\n      } else {\n        _this.setData({\n          coupons: null\n        })\n      }\n    })\n  },\n  async touse(e) {\n    const item = e.currentTarget.dataset.item\n    const res = await WXAPI.couponDetail(item.pid)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    if (!res.data.couponRefs || res.data.couponRefs.length == 0) {\n      wx.switchTab({\n        url: \"/pages/index/index\"\n      })\n      return\n    }\n    let categoryId, goodsId\n    res.data.couponRefs.forEach(ele => {\n      if (ele.type == 0) {\n        if (categoryId) {\n          categoryId = categoryId + ',' + ele.refId\n        } else {\n          categoryId = ele.refId\n        }\n      }\n      if (ele.type == 1) {\n        goodsId = ele.refId\n      }\n    })\n    if (categoryId) {\n      wx.navigateTo({\n        url: '/pages/goods/list?categoryId=' + categoryId,\n      })\n      return\n    }\n    if (goodsId) {\n      wx.navigateTo({\n        url: '/pages/goods-details/index?id=' + goodsId,\n      })\n      return\n    }\n  },\n  pwdCouponChange(e){\n    this.setData({\n      couponPwd: e.detail.value\n    })\n  },\n  onPullDownRefresh() {\n    if (this.data.activeIndex == 0) {\n      this.sysCoupons()\n    }\n    if (this.data.activeIndex == 1) {\n      this.getMyCoupons()\n    }\n    if (this.data.activeIndex == 2) {\n      this.invalidCoupons()\n    }\n    wx.stopPullDownRefresh()\n  },\n  closePwd() {\n    this.setData({\n      showPwdPop: false\n    })\n  },\n  async exchangeCoupons() {\n    if (!this.data.number) {\n      wx.showToast({\n        title: '请输入券号',\n        icon: 'none'\n      })\n      return\n    }\n    if (!this.data.pwd) {\n      wx.showToast({\n        title: '请输入密码',\n        icon: 'none'\n      })\n      return\n    }\n    this.setData({\n      exchangeCouponsLoading: true\n    })\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.exchangeCoupons(wx.getStorageSync('token'), this.data.number, this.data.pwd)\n    wx.hideLoading({\n      success: (res) => {},\n    })\n    this.setData({\n      exchangeCouponsLoading: false\n    })\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    } else {\n      wx.showToast({\n        title: '兑换成功'\n      })\n    }\n  },\n  paymentOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      paymentShow: false\n    })\n    wx.redirectTo({\n      url: '/pages/asset/index',\n    })\n  },\n  paymentCancel() {\n    this.setData({\n      paymentShow: false\n    })\n  },\n})"
  },
  {
    "path": "pages/coupons/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"优惠券\",\n  \"enablePullDownRefresh\": true\n}"
  },
  {
    "path": "pages/coupons/index.wxml",
    "content": "<!-- <view class=\"page-header\">\n  <view class=\"header-content\">\n    <text class=\"header-title\">我的优惠券</text>\n    <text class=\"header-subtitle\">限时领取 · 超值优惠</text>\n  </view>\n</view> -->\n\n<van-sticky>\n  <view class=\"tabs-wrapper\">\n    <van-tabs bind:change=\"tabClick\" color=\"#E4393C\" title-active-color=\"#E4393C\" line-width=\"60rpx\" line-height=\"6rpx\">\n      <van-tab wx:for=\"{{tabs}}\" wx:key=\"index\" title=\"{{item}}\"></van-tab>\n    </van-tabs>\n  </view>\n</van-sticky>\n\n<view class=\"coupon-list-wrapper\">\n  <van-cell wx:if=\"{{ activeIndex == 1 && coupons && coupons.length == 0 }}\" custom-class=\"hecheng\" title=\"合成高品质优惠券\" value=\"合成\" is-link />\n  <van-empty wx:if=\"{{ activeIndex != 3 && (!coupons || coupons.length == 0) }}\" description=\"暂无优惠券\" />\n  \n  <!-- 可领券 -->\n  <view class=\"coupon-card\" wx:for=\"{{coupons}}\" wx:key=\"id\" wx:if=\"{{activeIndex == 0}}\">\n    <view class=\"coupon-left\">\n      <view class=\"price-section\">\n        <view wx:if=\"{{ item.moneyType == 0 }}\" class=\"amount-wrapper\">\n          <text class=\"currency\">¥</text>\n          <text class=\"amount\">{{item.moneyMin}}</text>\n        </view>\n        <view wx:if=\"{{ item.moneyType == 1 }}\" class=\"amount-wrapper\">\n          <text class=\"amount\">{{item.moneyMin}}</text>\n          <text class=\"percent\">折</text>\n        </view>\n        <view class=\"threshold\">满{{item.moneyHreshold}}元可用</view>\n      </view>\n    </view>\n    <view class=\"coupon-right\">\n      <view class=\"coupon-content\">\n        <view class=\"coupon-type-tag\">代金券</view>\n        <view class=\"coupon-name\">{{item.name}}</view>\n        <view class=\"coupon-tips\">领取即可使用</view>\n      </view>\n      <view class=\"coupon-action\">\n        <view class=\"action-btn active\" bindtap=\"getCounpon\" data-id=\"{{item.id}}\" data-pwd=\"{{item.pwd}}\">立即领取</view>\n      </view>\n    </view>\n    <view class=\"coupon-deco\"></view>\n  </view>\n  \n  <!-- 已领券 -->\n  <view class=\"coupon-card owned\" wx:for=\"{{coupons}}\" wx:key=\"id\" wx:if=\"{{activeIndex == 1}}\">\n    <view class=\"coupon-left gradient-owned\">\n      <view class=\"price-section\">\n        <view wx:if=\"{{ item.moneyType == 0 }}\" class=\"amount-wrapper\">\n          <text class=\"currency\">¥</text>\n          <text class=\"amount\">{{item.money}}</text>\n        </view>\n        <view wx:if=\"{{ item.moneyType == 1 }}\" class=\"amount-wrapper\">\n          <text class=\"amount\">{{item.money}}</text>\n          <text class=\"percent\">折</text>\n        </view>\n        <view class=\"threshold\">满{{item.moneyHreshold}}元可用</view>\n      </view>\n    </view>\n    <view class=\"coupon-right\">\n      <view class=\"coupon-content\">\n        <view class=\"coupon-type-tag owned-tag\">代金券</view>\n        <view class=\"coupon-name\">{{item.name}}</view>\n        <view class=\"coupon-tips expire-tips\">{{item.dateEnd}}到期</view>\n      </view>\n      <view class=\"coupon-action\">\n        <view class=\"action-btn use-btn\" bindtap=\"touse\" data-item=\"{{ item }}\">立即使用</view>\n      </view>\n    </view>\n    <view class=\"coupon-deco\"></view>\n  </view>\n  \n  <!-- 失效券 -->\n  <view class=\"coupon-card disabled\" wx:for=\"{{coupons}}\" wx:key=\"id\" wx:if=\"{{activeIndex == 2}}\">\n    <view class=\"coupon-left gradient-disabled\">\n      <view class=\"price-section\">\n        <view wx:if=\"{{ item.moneyType == 0 }}\" class=\"amount-wrapper\">\n          <text class=\"currency\">¥</text>\n          <text class=\"amount\">{{item.money}}</text>\n        </view>\n        <view wx:if=\"{{ item.moneyType == 1 }}\" class=\"amount-wrapper\">\n          <text class=\"amount\">{{item.money}}</text>\n          <text class=\"percent\">折</text>\n        </view>\n        <view class=\"threshold\">满{{item.moneyHreshold}}元可用</view>\n      </view>\n    </view>\n    <view class=\"coupon-right\">\n      <view class=\"coupon-content\">\n        <view class=\"coupon-type-tag disabled-tag\">代金券</view>\n        <view class=\"coupon-name disabled-text\">{{item.name}}</view>\n        <view class=\"coupon-tips disabled-text\">已失效</view>\n      </view>\n      <view class=\"coupon-action\">\n        <view class=\"action-btn disabled-btn\">{{ item.statusStr }}</view>\n      </view>\n    </view>\n    <view class=\"coupon-deco\"></view>\n    <view class=\"disabled-mask\"></view>\n  </view>\n</view>\n<view class=\"koulingcoupon\" wx:if=\"{{activeIndex == 3}}\">\n  <van-field\n    label=\"券号\"\n    model:value=\"{{ number }}\"\n    clearable\n    size=\"large\"\n    placeholder=\"请输入券号\"\n    bind:change=\"onChange\"\n  />\n  <van-field\n    label=\"密码\"\n    model:value=\"{{ pwd }}\"\n    clearable\n    size=\"large\"\n    placeholder=\"请输入密码\"\n    bind:change=\"onChange\"\n  />\n  <view class=\"block-btn\">\n    <van-button block type=\"primary\" loading=\"{{ exchangeCouponsLoading }}\" bind:click=\"exchangeCoupons\">立即兑换</van-button>\n  </view>\n</view>\n<view class=\"bottom\"></view>\n\n<block wx:if=\"{{showPwdPop}}\">\n  <view class=\"pwd-coupons-mask\" bindtap=\"closePwd\"></view>\n  <view class=\"pwd-coupons\">\n    <view class=\"t\">请输入口令</view>\n    <input bindinput=\"pwdCouponChange\" class=\"input\" value=\"{{couponPwd}}\" auto-focus/>\n    <button type=\"primary\" plain bindtap=\"getCounpon2\"> 领取 </button>\n  </view>\n</block>\n\n<payment\n  money=\"{{ money }}\"\n  remark=\"购买代金券 ：{{ money }}\"\n  nextAction=\"{{ nextAction }}\"\n  show=\"{{ paymentShow }}\"\n  bind:cancel=\"paymentCancel\"\n  bind:ok=\"paymentOk\"\n/>"
  },
  {
    "path": "pages/coupons/index.wxss",
    "content": "page {\n  background: linear-gradient(180deg, #FFF5F5 0%, #F7F8FA 100%);\n  min-height: 100vh;\n}\n\n/* 页面头部 */\n.page-header {\n  padding: 40rpx 32rpx 32rpx;\n  background: linear-gradient(135deg, #E4393C 0%, #F75050 100%);\n  position: relative;\n  overflow: hidden;\n}\n\n.page-header::before {\n  content: '';\n  position: absolute;\n  width: 400rpx;\n  height: 400rpx;\n  background: rgba(255, 255, 255, 0.1);\n  border-radius: 50%;\n  top: -200rpx;\n  right: -100rpx;\n}\n\n.page-header::after {\n  content: '';\n  position: absolute;\n  width: 300rpx;\n  height: 300rpx;\n  background: rgba(255, 255, 255, 0.08);\n  border-radius: 50%;\n  bottom: -150rpx;\n  left: -80rpx;\n}\n\n.header-content {\n  position: relative;\n  z-index: 1;\n}\n\n.header-title {\n  display: block;\n  font-size: 48rpx;\n  font-weight: 700;\n  color: #FFFFFF;\n  margin-bottom: 12rpx;\n  letter-spacing: 2rpx;\n}\n\n.header-subtitle {\n  display: block;\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.85);\n  letter-spacing: 1rpx;\n}\n\n/* 标签栏优化 */\n.tabs-wrapper {\n  background: #FFFFFF;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);\n}\n\n/* 优惠券列表容器 */\n.coupon-list-wrapper {\n  padding: 24rpx 24rpx 40rpx;\n}\n\n/* 优惠券卡片 */\n.coupon-card {\n  position: relative;\n  display: flex;\n  margin-bottom: 24rpx;\n  height: 200rpx;\n  background: #FFFFFF;\n  border-radius: 16rpx;\n  overflow: hidden;\n  box-shadow: 0 8rpx 24rpx rgba(228, 57, 60, 0.12);\n  transition: all 0.3s ease;\n}\n\n/* 优惠券左侧金额区域 */\n.coupon-left {\n  position: relative;\n  width: 200rpx;\n  background: linear-gradient(135deg, #E4393C 0%, #F75050 100%);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  flex-direction: column;\n}\n\n.coupon-left::before,\n.coupon-left::after {\n  content: '';\n  position: absolute;\n  right: -16rpx;\n  width: 32rpx;\n  height: 32rpx;\n  background: #F7F8FA;\n  border-radius: 50%;\n}\n\n.coupon-left::before {\n  top: -16rpx;\n}\n\n.coupon-left::after {\n  bottom: -16rpx;\n}\n\n.price-section {\n  text-align: center;\n  color: #FFFFFF;\n}\n\n.amount-wrapper {\n  display: flex;\n  align-items: baseline;\n  justify-content: center;\n  margin-bottom: 12rpx;\n}\n\n.currency {\n  font-size: 32rpx;\n  font-weight: 600;\n  margin-right: 4rpx;\n}\n\n.amount {\n  font-size: 72rpx;\n  font-weight: 700;\n  line-height: 1;\n  text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);\n}\n\n.percent {\n  font-size: 36rpx;\n  font-weight: 600;\n  margin-left: 4rpx;\n}\n\n.threshold {\n  font-size: 22rpx;\n  color: rgba(255, 255, 255, 0.9);\n  font-weight: 400;\n}\n\n/* 优惠券右侧内容区域 */\n.coupon-right {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  padding: 16rpx 24rpx;\n  position: relative;\n}\n\n.coupon-content {\n  flex: 1;\n}\n\n.coupon-type-tag {\n  display: inline-block;\n  padding: 4rpx 16rpx;\n  background: linear-gradient(135deg, #FFE5E6 0%, #FFD4D5 100%);\n  border-radius: 6rpx;\n  font-size: 20rpx;\n  color: #E4393C;\n  font-weight: 600;\n  margin-bottom: 12rpx;\n  letter-spacing: 0.5rpx;\n}\n\n.coupon-name {\n  font-size: 30rpx;\n  color: #333333;\n  font-weight: 600;\n  margin-bottom: 8rpx;\n  line-height: 1.4;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.coupon-tips {\n  font-size: 22rpx;\n  color: #999999;\n}\n\n.expire-tips {\n  color: #FF6B00;\n  font-weight: 500;\n}\n\n/* 操作按钮 */\n.coupon-action {\n  display: flex;\n  justify-content: flex-end;\n}\n\n.action-btn {\n  padding: 12rpx 32rpx;\n  border-radius: 30rpx;\n  font-size: 24rpx;\n  font-weight: 600;\n  text-align: center;\n  transition: all 0.3s ease;\n}\n\n.action-btn.active {\n  background: linear-gradient(135deg, #E4393C 0%, #F75050 100%);\n  color: #FFFFFF;\n  box-shadow: 0 4rpx 12rpx rgba(228, 57, 60, 0.3);\n}\n\n.action-btn.use-btn {\n  background: linear-gradient(135deg, #FF9500 0%, #FFB84D 100%);\n  color: #FFFFFF;\n  box-shadow: 0 4rpx 12rpx rgba(255, 149, 0, 0.3);\n}\n\n.action-btn.disabled-btn {\n  background: #F5F5F5;\n  color: #CCCCCC;\n  border: 1rpx solid #E5E5E5;\n}\n\n/* 装饰元素 */\n.coupon-deco {\n  position: absolute;\n  right: 20rpx;\n  bottom: 20rpx;\n  width: 60rpx;\n  height: 60rpx;\n  border-radius: 50%;\n  background: linear-gradient(135deg, rgba(228, 57, 60, 0.05) 0%, rgba(247, 80, 80, 0.08) 100%);\n  z-index: 0;\n}\n\n/* 已领券样式 */\n.coupon-card.owned {\n  box-shadow: 0 8rpx 24rpx rgba(255, 149, 0, 0.12);\n}\n\n.gradient-owned {\n  background: linear-gradient(135deg, #FF9500 0%, #FFB84D 100%);\n}\n\n.owned-tag {\n  background: linear-gradient(135deg, #FFF4E6 0%, #FFE8CC 100%);\n  color: #FF9500;\n}\n\n/* 失效券样式 */\n.coupon-card.disabled {\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);\n  opacity: 0.7;\n}\n\n.gradient-disabled {\n  background: linear-gradient(135deg, #CCCCCC 0%, #DDDDDD 100%);\n}\n\n.disabled-tag {\n  background: #F5F5F5;\n  color: #999999;\n}\n\n.disabled-text {\n  color: #999999 !important;\n}\n\n.disabled-mask {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: rgba(255, 255, 255, 0.3);\n  pointer-events: none;\n}\n\n\n\n/* 底部占位 */\n.bottom {\n  width: 100vw;\n  height: 40rpx;\n}\n\n/* 口令兑换区域 */\n.koulingcoupon {\n  padding: 32rpx;\n  margin: 24rpx;\n  background: #FFFFFF;\n  border-radius: 20rpx;\n  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);\n}\n\n.koulingcoupon::before {\n  content: '兑换优惠券';\n  display: block;\n  font-size: 36rpx;\n  font-weight: 700;\n  color: #333333;\n  margin-bottom: 32rpx;\n  text-align: center;\n}\n\n.block-btn {\n  margin: 40rpx 0 0;\n}\n\n/* 口令弹窗遮罩 */\n.pwd-coupons-mask {\n  position: fixed;\n  width: 100vw;\n  height: 100vh;\n  background: rgba(0, 0, 0, 0.5);\n  top: 0;\n  left: 0;\n  z-index: 999;\n  backdrop-filter: blur(4rpx);\n}\n\n/* 口令弹窗 */\n.pwd-coupons {\n  position: fixed;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n  width: 600rpx;\n  background: #FFFFFF;\n  border-radius: 24rpx;\n  z-index: 1000;\n  box-shadow: 0 16rpx 48rpx rgba(0, 0, 0, 0.3);\n  overflow: hidden;\n}\n\n.pwd-coupons .t {\n  padding: 48rpx 32rpx 24rpx;\n  text-align: center;\n  font-size: 36rpx;\n  font-weight: 700;\n  color: #333333;\n  background: linear-gradient(180deg, #FFF5F5 0%, #FFFFFF 100%);\n  position: relative;\n}\n\n.pwd-coupons .t::after {\n  content: '';\n  position: absolute;\n  bottom: 0;\n  left: 50%;\n  transform: translateX(-50%);\n  width: 80rpx;\n  height: 6rpx;\n  background: linear-gradient(90deg, #E4393C 0%, #F75050 100%);\n  border-radius: 3rpx;\n}\n\n.pwd-coupons .input {\n  margin: 40rpx 40rpx 32rpx;\n  padding: 0 24rpx;\n  border: 2rpx solid #E5E5E5;\n  border-radius: 16rpx;\n  height: 96rpx;\n  line-height: 96rpx;\n  font-size: 32rpx;\n  color: #333333;\n  background: #FAFAFA;\n  transition: all 0.3s ease;\n}\n\n.pwd-coupons .input:focus {\n  border-color: #E4393C;\n  background: #FFFFFF;\n}\n\n.pwd-coupons button {\n  margin: 0 40rpx 40rpx;\n  height: 88rpx;\n  line-height: 88rpx;\n  border-radius: 44rpx;\n  font-size: 32rpx;\n  font-weight: 600;\n  background: linear-gradient(135deg, #E4393C 0%, #F75050 100%);\n  color: #FFFFFF;\n  border: none;\n  box-shadow: 0 8rpx 20rpx rgba(228, 57, 60, 0.3);\n}\n\n.pwd-coupons button[plain] {\n  background: linear-gradient(135deg, #E4393C 0%, #F75050 100%);\n  color: #FFFFFF;\n  border: none;\n}\n\n/* 合成提示 */\n.hecheng {\n  margin: 24rpx;\n  border-radius: 16rpx;\n  overflow: hidden;\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);\n}\n\n/* 优化 Vant 组件样式 */\n.van-tab {\n  font-size: 28rpx;\n  font-weight: 600;\n}\n\n.van-tabs__line {\n  border-radius: 3rpx;\n}"
  },
  {
    "path": "pages/coupons/merge.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nPage({\n  data: {\n\n  },\n  onLoad: function (options) {\n    this.mergeCouponsRules();\n  },\n  onShow: function () {\n\n  },\n  async mergeCouponsRules() {\n    const res = await WXAPI.mergeCouponsRules()\n    if (res.code == 0) {\n      this.setData({\n        mergeCouponsRules: res.data\n      })\n    }\n  },\n  onPullDownRefresh() {\n    this.mergeCouponsRules()\n    wx.stopPullDownRefresh()\n  },\n  async merge(e) {\n    const idx = e.currentTarget.dataset.idx\n    const mergeCouponsRule = this.data.mergeCouponsRules[idx]\n    this.setData({loading: true})\n    let res = await WXAPI.myCoupons({\n      token: wx.getStorageSync('token'),\n      status: 0\n    })\n    if (res.code == 700) {\n      wx.showToast({\n        title: '您暂无可用的优惠券',\n        icon: 'none'\n      })\n      this.setData({loading: false})\n      return\n    }\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      this.setData({loading: false})\n      return\n    }\n    const myCoupons = res.data.reverse()\n    const couponIds = [] // 用来合成的优惠券id\n    let ok = true\n    let msg = ''\n    mergeCouponsRule.rules.filter(rule => {\n      return rule.type == 0\n    }).forEach(rule => {\n      for (let i = 0; i < rule.number; i++) {\n        const couponIndex = myCoupons.findIndex(ele => { return ele.pid == rule.couponId})\n        if (couponIndex == -1) {\n          ok = false\n          msg = rule.couponName\n          return\n        }\n        const coupon = myCoupons[couponIndex]\n        couponIds.push(coupon.id)\n        myCoupons.splice(couponIndex, 1)\n      }\n    })\n    if (!ok) {\n      wx.showToast({\n        title: '缺少优惠券:' + msg,\n        icon: 'none'\n      })\n      this.setData({loading: false})\n      return\n    }\n    res = await WXAPI.mergeCoupons({\n      token: wx.getStorageSync('token'),\n      mergeId: mergeCouponsRule.id,\n      couponIds: couponIds.join()\n    })\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      this.setData({loading: false})\n      return\n    }\n    wx.showToast({\n      title: '兑换成功'\n    })\n    this.setData({loading: false})\n    setTimeout(() => {\n      wx.navigateBack({\n        delta: 0,\n      })\n    }, 1000);\n  }\n})"
  },
  {
    "path": "pages/coupons/merge.json",
    "content": "{\n  \"navigationBarTitleText\": \"优惠券合成\",\n  \"enablePullDownRefresh\": true\n}"
  },
  {
    "path": "pages/coupons/merge.wxml",
    "content": "<van-empty wx:if=\"{{ !mergeCouponsRules }}\" description=\"暂无合成规则\" />\n<van-cell-group wx:for=\"{{mergeCouponsRules}}\" wx:key=\"id\" title=\"{{ item.name }}\">\n  <van-cell\n    wx:for=\"{{item.rules}}\"\n    wx:for-item=\"rule\"\n    wx:key=\"id\"\n    icon=\"{{ rule.type == 0 ? 'delete' : 'share-o' }}\"\n    title=\"{{ rule.typeStr }}\"\n    label=\"优惠券:{{ rule.couponName }}\"\n    value=\"{{rule.number}} 张\"\n  />\n  <view class=\"block-btn\">\n    <van-button type=\"primary\" block data-idx=\"{{ index }}\" loading=\"{{ loading }}\" bind:click=\"merge\">立即合成</van-button>\n  </view>\n</van-cell-group>"
  },
  {
    "path": "pages/coupons/merge.wxss",
    "content": "/* pages/coupons/merge.wxss */"
  },
  {
    "path": "pages/deposit/pay.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst app = getApp()\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    \n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function (options) {\n    \n  },\n  onShow: function () {\n\n  },\n  async bindSave(e) {\n    const amount = this.data.amount\n    if (!amount) {\n      wx.showToast({\n        title: '请填写正确的押金金额',\n        icon: 'none'\n      })\n      return\n    }\n    wx.showLoading({\n      title: '',\n    })\n    // https://www.yuque.com/apifm/nu0f75/mpsdwi\n    const res= await WXAPI.payDepositV2({\n      token: wx.getStorageSync('token'),\n      amount\n    })\n    wx.hideLoading()\n    if (res.code == 40000) {\n      // 余额不够\n      this.setData({\n        money: res.data,\n        paymentShow: true,\n        nextAction: {\n          type: 5,\n          amount\n        }\n      })\n      return\n    } else if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.showModal({\n      content: '支付成功',\n      showCancel: false,\n      success: (res) => {\n        wx.redirectTo({\n          url: \"/pages/asset/index\"\n        })\n      }\n    })\n  },\n  paymentOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      paymentShow: false\n    })\n    wx.redirectTo({\n      url: '/pages/asset/index',\n    })\n  },\n  paymentCancel() {\n    this.setData({\n      paymentShow: false\n    })\n  },\n})\n"
  },
  {
    "path": "pages/deposit/pay.json",
    "content": "{\n  \"usingComponents\": {},\n  \"navigationBarTitleText\": \"支付押金\"\n}"
  },
  {
    "path": "pages/deposit/pay.wxml",
    "content": "<view class=\"deposit-container\">\n  <!-- 顶部装饰背景 -->\n  <view class=\"header-bg\">\n    <view class=\"bg-circle circle-1\"></view>\n    <view class=\"bg-circle circle-2\"></view>\n    <view class=\"bg-circle circle-3\"></view>\n  </view>\n\n  <!-- 页面标题 -->\n  <view class=\"page-header\">\n    <view class=\"header-title\">押金支付</view>\n    <view class=\"header-subtitle\">Deposit Payment</view>\n  </view>\n\n  <!-- 押金卡片 -->\n  <view class=\"deposit-card\">\n    <view class=\"card-icon\">🔐</view>\n    <view class=\"card-title\">支付押金</view>\n    <view class=\"card-desc\">完成押金支付后即可享受服务</view>\n    \n      <view class=\"amount-input-wrap\">\n        <view class=\"currency-label\">¥</view>\n        <input \n          name=\"amount\" \n          class=\"amount-input\" \n          type=\"digit\"\n          model:value=\"{{ amount }}\" \n          placeholder=\"请输入押金金额\"\n          placeholder-class=\"input-placeholder\" />\n      </view>\n      \n      <button class=\"pay-btn\" bind:tap=\"bindSave\" hover-class=\"pay-btn-hover\">\n        <view class=\"btn-content\">\n          <text class=\"btn-icon\">💳</text>\n          <text class=\"btn-text\">立即支付</text>\n        </view>\n      </button>\n  </view>\n\n  <!-- 重要提示 -->\n  <view class=\"notice-card\">\n    <view class=\"notice-header\">\n      <view class=\"notice-icon\">ℹ️</view>\n      <view class=\"notice-title\">重要提示</view>\n    </view>\n    <view class=\"notice-content\">\n      <view class=\"notice-item\">\n        <view class=\"notice-dot\"></view>\n        <text class=\"notice-text\">押金支付后，会显示在您的<text class=\"highlight\">冻结余额</text>里面</text>\n      </view>\n      <view class=\"notice-item\">\n        <view class=\"notice-dot\"></view>\n        <text class=\"notice-text\">如需退还押金，请<text class=\"highlight\">联系管理员</text>进行退还操作</text>\n      </view>\n    </view>\n  </view>\n\n  <!-- 安全保障 -->\n  <view class=\"security-tips\">\n    <view class=\"security-item\">\n      <view class=\"security-icon\">🔒</view>\n      <view class=\"security-text\">安全支付</view>\n    </view>\n    <view class=\"security-divider\"></view>\n    <view class=\"security-item\">\n      <view class=\"security-icon\">✓</view>\n      <view class=\"security-text\">随时退还</view>\n    </view>\n    <view class=\"security-divider\"></view>\n    <view class=\"security-item\">\n      <view class=\"security-icon\">⚡</view>\n      <view class=\"security-text\">即时到账</view>\n    </view>\n  </view>\n</view>\n\n<payment\n  money=\"{{ money }}\"\n  remark=\"支付押金\"\n  nextAction=\"{{ nextAction }}\"\n  show=\"{{ paymentShow }}\"\n  bind:cancel=\"paymentCancel\"\n  bind:ok=\"paymentOk\"\n/>"
  },
  {
    "path": "pages/deposit/pay.wxss",
    "content": "/* 页面基础样式 */\npage {\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  min-height: 100vh;\n}\n\n/* 主容器 */\n.deposit-container {\n  position: relative;\n  min-height: 100vh;\n  padding: 30rpx;\n  overflow: hidden;\n}\n\n/* 装饰背景圆圈 */\n.header-bg {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  height: 800rpx;\n  overflow: hidden;\n  pointer-events: none;\n  z-index: 0;\n}\n\n.bg-circle {\n  position: absolute;\n  border-radius: 50%;\n  background: rgba(255, 255, 255, 0.1);\n}\n\n.circle-1 {\n  width: 400rpx;\n  height: 400rpx;\n  top: -150rpx;\n  right: -100rpx;\n  animation: float 6s ease-in-out infinite;\n}\n\n.circle-2 {\n  width: 300rpx;\n  height: 300rpx;\n  top: 150rpx;\n  left: -100rpx;\n  animation: float 8s ease-in-out infinite;\n}\n\n.circle-3 {\n  width: 200rpx;\n  height: 200rpx;\n  top: 400rpx;\n  right: 50rpx;\n  animation: float 7s ease-in-out infinite;\n}\n\n@keyframes float {\n  0%, 100% {\n    transform: translateY(0) rotate(0deg);\n  }\n  50% {\n    transform: translateY(-30rpx) rotate(180deg);\n  }\n}\n\n/* 页面标题 */\n.page-header {\n  position: relative;\n  z-index: 1;\n  padding: 30rpx 20rpx 40rpx;\n  text-align: center;\n}\n\n.header-title {\n  font-size: 48rpx;\n  font-weight: 700;\n  color: #ffffff;\n  margin-bottom: 12rpx;\n  letter-spacing: 2rpx;\n  text-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);\n}\n\n.header-subtitle {\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.85);\n  font-weight: 500;\n  letter-spacing: 3rpx;\n  text-transform: uppercase;\n}\n\n/* 押金卡片 */\n.deposit-card {\n  position: relative;\n  z-index: 1;\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);\n  border-radius: 32rpx;\n  padding: 50rpx 40rpx;\n  margin-bottom: 30rpx;\n  box-shadow: 0 20rpx 60rpx rgba(102, 126, 234, 0.25);\n  overflow: hidden;\n}\n\n.deposit-card::before {\n  content: '';\n  position: absolute;\n  top: -50%;\n  right: -10%;\n  width: 400rpx;\n  height: 400rpx;\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);\n  border-radius: 50%;\n}\n\n.card-icon {\n  font-size: 80rpx;\n  text-align: center;\n  margin-bottom: 20rpx;\n  animation: pulse 2s ease-in-out infinite;\n}\n\n@keyframes pulse {\n  0%, 100% {\n    transform: scale(1);\n  }\n  50% {\n    transform: scale(1.05);\n  }\n}\n\n.card-title {\n  font-size: 36rpx;\n  font-weight: 700;\n  color: #2d3748;\n  text-align: center;\n  margin-bottom: 12rpx;\n  letter-spacing: 1rpx;\n  position: relative;\n}\n\n.card-desc {\n  font-size: 24rpx;\n  color: #718096;\n  text-align: center;\n  margin-bottom: 40rpx;\n  position: relative;\n}\n\n/* 金额输入区 */\n.amount-input-wrap {\n  position: relative;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: 40rpx 30rpx;\n  margin: 30rpx 0;\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);\n  border-radius: 24rpx;\n  border: 3rpx solid rgba(102, 126, 234, 0.1);\n  transition: all 0.3s ease;\n}\n\n.amount-input-wrap:focus-within {\n  border-color: #667eea;\n  background: #ffffff;\n  box-shadow: 0 0 0 6rpx rgba(102, 126, 234, 0.1);\n}\n\n.currency-label {\n  font-size: 56rpx;\n  font-weight: 700;\n  color: #667eea;\n  margin-right: 16rpx;\n  line-height: 1;\n}\n\n.amount-input {\n  flex: 1;\n  font-size: 64rpx;\n  font-weight: 700;\n  color: #2d3748;\n  text-align: left;\n  line-height: 1;\n}\n\n.input-placeholder {\n  color: #cbd5e0;\n  font-size: 32rpx;\n  font-weight: 500;\n}\n\n/* 支付按钮 */\n.pay-btn {\n  width: 100%;\n  height: 100rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 50rpx;\n  border: none;\n  box-shadow: 0 12rpx 32rpx rgba(102, 126, 234, 0.35);\n  margin-top: 20rpx;\n  padding: 0;\n  line-height: normal;\n  position: relative;\n  overflow: hidden;\n  transition: all 0.3s ease;\n}\n\n.pay-btn::after {\n  border: none;\n}\n\n.pay-btn::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);\n  opacity: 0;\n  transition: opacity 0.3s ease;\n}\n\n.pay-btn-hover {\n  transform: translateY(-4rpx);\n  box-shadow: 0 16rpx 40rpx rgba(102, 126, 234, 0.45) !important;\n}\n\n.pay-btn-hover::before {\n  opacity: 1;\n}\n\n.btn-content {\n  position: relative;\n  z-index: 1;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 100%;\n}\n\n.btn-icon {\n  font-size: 40rpx;\n  margin-right: 12rpx;\n}\n\n.btn-text {\n  font-size: 32rpx;\n  font-weight: 700;\n  color: #ffffff;\n  letter-spacing: 2rpx;\n}\n\n/* 提示卡片 */\n.notice-card {\n  position: relative;\n  z-index: 1;\n  background: linear-gradient(135deg, #fff8e1 0%, #fff3e0 100%);\n  border-radius: 24rpx;\n  padding: 30rpx;\n  margin-bottom: 30rpx;\n  box-shadow: 0 8rpx 24rpx rgba(255, 152, 0, 0.15);\n  border-left: 8rpx solid #ff9800;\n}\n\n.notice-header {\n  display: flex;\n  align-items: center;\n  margin-bottom: 20rpx;\n}\n\n.notice-icon {\n  font-size: 36rpx;\n  margin-right: 12rpx;\n}\n\n.notice-title {\n  font-size: 28rpx;\n  font-weight: 700;\n  color: #e65100;\n  letter-spacing: 1rpx;\n}\n\n.notice-content {\n  padding-left: 48rpx;\n}\n\n.notice-item {\n  display: flex;\n  align-items: flex-start;\n  margin-bottom: 16rpx;\n  line-height: 1.6;\n}\n\n.notice-item:last-child {\n  margin-bottom: 0;\n}\n\n.notice-dot {\n  width: 12rpx;\n  height: 12rpx;\n  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);\n  border-radius: 50%;\n  margin-right: 16rpx;\n  margin-top: 10rpx;\n  flex-shrink: 0;\n}\n\n.notice-text {\n  flex: 1;\n  font-size: 26rpx;\n  color: #5d4037;\n  line-height: 1.6;\n}\n\n.highlight {\n  color: #e65100;\n  font-weight: 700;\n  padding: 0 6rpx;\n  background: rgba(255, 152, 0, 0.15);\n  border-radius: 6rpx;\n}\n\n/* 安全提示 */\n.security-tips {\n  position: relative;\n  z-index: 1;\n  display: flex;\n  align-items: center;\n  justify-content: space-around;\n  background: rgba(255, 255, 255, 0.95);\n  border-radius: 24rpx;\n  padding: 30rpx 20rpx;\n  box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.15);\n  backdrop-filter: blur(10px);\n}\n\n.security-item {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n}\n\n.security-icon {\n  font-size: 36rpx;\n  margin-bottom: 8rpx;\n}\n\n.security-text {\n  font-size: 22rpx;\n  color: #718096;\n  font-weight: 600;\n  white-space: nowrap;\n}\n\n.security-divider {\n  width: 2rpx;\n  height: 50rpx;\n  background: linear-gradient(to bottom, \n    rgba(102, 126, 234, 0) 0%,\n    rgba(102, 126, 234, 0.3) 50%,\n    rgba(102, 126, 234, 0) 100%\n  );\n}\n\n/* 按钮基础样式重置 */\nbutton {\n  background: none;\n  border: none;\n  outline: none;\n}\n\nbutton::after {\n  border: none;\n}\n\n/* 响应式适配 */\n@media screen and (max-width: 320px) {\n  .header-title {\n    font-size: 40rpx;\n  }\n  \n  .amount-input {\n    font-size: 52rpx;\n  }\n  \n  .card-icon {\n    font-size: 64rpx;\n  }\n}\n"
  },
  {
    "path": "pages/goods/fav.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nPage({\n  data: {\n  },\n  onLoad: function (options) {\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.goodsFavList()\n      } else {\n        getApp().loginOK = () => {\n          this.goodsFavList()\n        }\n      }\n    })\n  },\n  onShow: function () {\n  },\n  async goodsFavList() {\n    // 搜索商品\n    wx.showLoading({\n      title: '加载中',\n    })\n    const _data = {\n      token: wx.getStorageSync('token'),\n      page: 1,\n      pageSize: 10000,\n    }    \n    const res = await WXAPI.goodsFavList(_data)\n    wx.hideLoading()\n    if (res.code == 0) {\n      res.data.forEach(ele => {\n        if (ele.type == 1 && ele.json) {\n          ele.json = JSON.parse(ele.json)\n        }\n      })\n      this.setData({\n        goods: res.data,\n      })\n    } else {\n      this.setData({\n        goods: null\n      })\n    }\n  },\n  async removeFav(e){\n    const idx = e.currentTarget.dataset.idx\n    const fav = this.data.goods[idx]\n    const res = await WXAPI.goodsFavDeleteV2({\n      token: wx.getStorageSync('token'),\n      goodsId: fav.goodsId,\n      type: fav.type\n    })\n    if (res.code == 0) {\n      wx.showToast({\n        title: '取消收藏',\n        icon: 'success'\n      })\n      this.goodsFavList()\n    } else {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    }\n  },\n})"
  },
  {
    "path": "pages/goods/fav.json",
    "content": "{\n  \"navigationBarTitleText\": \"我的收藏\"\n}"
  },
  {
    "path": "pages/goods/fav.wxml",
    "content": "<view class=\"fav-container\">\n  <!-- 顶部装饰背景 -->\n  <view class=\"header-bg\">\n    <view class=\"bg-circle circle-1\"></view>\n    <view class=\"bg-circle circle-2\"></view>\n    <view class=\"bg-circle circle-3\"></view>\n  </view>\n\n  <!-- 标题区域 -->\n  <view class=\"page-header\">\n    <view class=\"header-title\">我的收藏</view>\n    <view class=\"header-subtitle\">My Favorites</view>\n    <view class=\"header-count\" wx:if=\"{{goods && goods.length > 0}}\">共 {{goods.length}} 件商品</view>\n  </view>\n\n  <!-- 商品列表 -->\n  <view class=\"list2-box\" wx:if=\"{{goods && goods.length > 0}}\">\n    <block wx:for=\"{{goods}}\" wx:key=\"id\">\n      <view wx:if=\"{{ item.type == 0 }}\" class=\"list2\">\n        <navigator url=\"/pages/goods-details/index?id={{item.goodsId}}\" class=\"goods-link\">\n          <view class=\"img-wrapper\">\n            <image class=\"img\" mode=\"aspectFill\" src=\"{{item.pic}}\"></image>\n            <view class=\"img-overlay\"></view>\n          </view>\n          <view class=\"goods-info\">\n            <view class=\"title ellipsis\">{{item.goodsName}}</view>\n          </view>\n        </navigator>\n        <view class=\"delete-btn-wrapper\">\n          <view class=\"delete-btn\" data-idx=\"{{ index }}\" bindtap=\"removeFav\">\n            <image class=\"delete-icon\" src=\"/images/icon/delete.svg\"></image>\n            <text class=\"delete-text\">取消收藏</text>\n          </view>\n        </view>\n      </view>\n      <view wx:else class=\"list2\">\n        <navigator url=\"{{item.json.wxaurl}}\" class=\"goods-link\">\n          <view class=\"img-wrapper\">\n            <image class=\"img\" mode=\"aspectFill\" src=\"{{item.json.pic}}\"></image>\n            <view class=\"img-overlay\"></view>\n          </view>\n          <view class=\"goods-info\">\n            <view class=\"title ellipsis\">{{item.json.name}}</view>\n          </view>\n        </navigator>\n        <view class=\"delete-btn-wrapper\">\n          <view class=\"delete-btn\" data-idx=\"{{ index }}\" bindtap=\"removeFav\">\n            <image class=\"delete-icon\" src=\"/images/icon/delete.svg\"></image>\n            <text class=\"delete-text\">取消收藏</text>\n          </view>\n        </view>\n      </view>\n    </block>\n  </view>\n\n  <!-- 空状态 -->\n  <view class=\"empty-container\" wx:if=\"{{!goods || goods.length == 0}}\">\n    <view class=\"empty-card\">\n      <view class=\"empty-icon\">💝</view>\n      <view class=\"empty-title\">还没有收藏商品</view>\n      <view class=\"empty-desc\">快去发现心仪的商品吧</view>\n    </view>\n  </view>\n</view>"
  },
  {
    "path": "pages/goods/fav.wxss",
    "content": "/* 页面基础样式 */\npage {\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  min-height: 100vh;\n}\n\npage, view, image, input {\n  display: block;\n  box-sizing: border-box;\n}\n\n/* 文本省略 */\n.ellipsis {\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  -webkit-box-orient: vertical;\n  word-break: break-all;\n}\n\n/* 页面容器 */\n.fav-container {\n  position: relative;\n  min-height: 100vh;\n  padding: 30rpx 30rpx 60rpx;\n  overflow: hidden;\n}\n\n/* 装饰背景圆圈 */\n.header-bg {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  height: 600rpx;\n  overflow: hidden;\n  pointer-events: none;\n  z-index: 0;\n}\n\n.bg-circle {\n  position: absolute;\n  border-radius: 50%;\n  background: rgba(255, 255, 255, 0.1);\n}\n\n.circle-1 {\n  width: 400rpx;\n  height: 400rpx;\n  top: -150rpx;\n  right: -100rpx;\n  animation: float 6s ease-in-out infinite;\n}\n\n.circle-2 {\n  width: 300rpx;\n  height: 300rpx;\n  top: 100rpx;\n  left: -100rpx;\n  animation: float 8s ease-in-out infinite;\n}\n\n.circle-3 {\n  width: 200rpx;\n  height: 200rpx;\n  top: 300rpx;\n  right: 50rpx;\n  animation: float 7s ease-in-out infinite;\n}\n\n@keyframes float {\n  0%, 100% {\n    transform: translateY(0) rotate(0deg);\n  }\n  50% {\n    transform: translateY(-30rpx) rotate(180deg);\n  }\n}\n\n/* 页面标题区域 */\n.page-header {\n  position: relative;\n  z-index: 1;\n  text-align: center;\n  margin-bottom: 40rpx;\n  padding: 20rpx 0;\n}\n\n.header-title {\n  font-size: 48rpx;\n  font-weight: 800;\n  color: #ffffff;\n  margin-bottom: 10rpx;\n  letter-spacing: 2rpx;\n  text-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);\n}\n\n.header-subtitle {\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.85);\n  font-weight: 500;\n  letter-spacing: 3rpx;\n  text-transform: uppercase;\n  margin-bottom: 16rpx;\n}\n\n.header-count {\n  display: inline-block;\n  background: rgba(255, 255, 255, 0.2);\n  backdrop-filter: blur(10rpx);\n  -webkit-backdrop-filter: blur(10rpx);\n  color: #ffffff;\n  font-size: 24rpx;\n  padding: 8rpx 24rpx;\n  border-radius: 30rpx;\n  font-weight: 600;\n  letter-spacing: 1rpx;\n  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);\n}\n\n/* 商品列表容器 */\n.list2-box {\n  position: relative;\n  z-index: 1;\n  display: flex;\n  justify-content: space-between;\n  flex-wrap: wrap;\n  gap: 24rpx;\n}\n\n/* 商品卡片 */\n.list2 {\n  width: calc(50% - 15rpx);\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);\n  border-radius: 28rpx;\n  overflow: hidden;\n  box-shadow: 0 12rpx 40rpx rgba(102, 126, 234, 0.2);\n  transition: all 0.3s ease;\n  position: relative;\n}\n\n.list2::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);\n  opacity: 0;\n  transition: opacity 0.3s ease;\n  z-index: 0;\n  pointer-events: none;\n}\n\n/* 商品链接 */\n.goods-link {\n  display: block;\n  position: relative;\n  z-index: 1;\n}\n\n/* 图片容器 */\n.img-wrapper {\n  position: relative;\n  width: 100%;\n  height: 0;\n  padding-bottom: 100%;\n  overflow: hidden;\n  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);\n}\n\n.img-wrapper .img {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  transition: transform 0.5s ease;\n}\n\n.img-wrapper .img-overlay {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: linear-gradient(to bottom, \n    rgba(0, 0, 0, 0) 0%, \n    rgba(0, 0, 0, 0.02) 100%\n  );\n  opacity: 0;\n  transition: opacity 0.3s ease;\n  pointer-events: none;\n}\n\n.goods-link:active .img {\n  transform: scale(1.05);\n}\n\n.goods-link:active .img-overlay {\n  opacity: 1;\n}\n\n/* 商品信息区域 */\n.goods-info {\n  padding: 20rpx 20rpx 16rpx;\n  position: relative;\n  z-index: 1;\n}\n\n.goods-info .title {\n  color: #2d3748;\n  font-size: 28rpx;\n  line-height: 1.5;\n  font-weight: 600;\n  min-height: 84rpx;\n  letter-spacing: 0.5rpx;\n}\n\n/* 删除按钮区域 */\n.delete-btn-wrapper {\n  position: relative;\n  z-index: 2;\n  padding: 0 20rpx 20rpx;\n}\n\n.delete-btn {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 8rpx;\n  width: 100%;\n  height: 64rpx;\n  background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);\n  border: 2rpx solid rgba(102, 126, 234, 0.15);\n  border-radius: 16rpx;\n  transition: all 0.3s ease;\n  position: relative;\n  overflow: hidden;\n}\n\n.delete-btn::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);\n  opacity: 0;\n  transition: opacity 0.3s ease;\n}\n\n.delete-icon {\n  width: 32rpx;\n  height: 32rpx;\n  position: relative;\n  z-index: 1;\n  transition: all 0.3s ease;\n}\n\n.delete-text {\n  font-size: 24rpx;\n  color: #718096;\n  font-weight: 600;\n  position: relative;\n  z-index: 1;\n  transition: all 0.3s ease;\n}\n\n.delete-btn:active {\n  transform: scale(0.98);\n  box-shadow: 0 4rpx 12rpx rgba(255, 107, 107, 0.3);\n  border-color: transparent;\n}\n\n.delete-btn:active::before {\n  opacity: 1;\n}\n\n.delete-btn:active .delete-text {\n  color: #ffffff;\n}\n\n.delete-btn:active .delete-icon {\n  filter: brightness(0) invert(1);\n  transform: scale(1.1);\n}\n\n/* 空状态容器 */\n.empty-container {\n  position: relative;\n  z-index: 1;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  min-height: 60vh;\n  padding: 40rpx;\n}\n\n.empty-card {\n  width: 100%;\n  max-width: 500rpx;\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);\n  border-radius: 32rpx;\n  padding: 80rpx 60rpx;\n  text-align: center;\n  box-shadow: 0 20rpx 60rpx rgba(102, 126, 234, 0.25);\n  position: relative;\n  overflow: hidden;\n}\n\n.empty-card::before {\n  content: '';\n  position: absolute;\n  top: -50%;\n  right: -20%;\n  width: 300rpx;\n  height: 300rpx;\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);\n  border-radius: 50%;\n}\n\n.empty-icon {\n  font-size: 120rpx;\n  margin-bottom: 32rpx;\n  animation: bounce 2s ease-in-out infinite;\n  position: relative;\n  z-index: 1;\n}\n\n@keyframes bounce {\n  0%, 100% {\n    transform: translateY(0) scale(1);\n  }\n  50% {\n    transform: translateY(-20rpx) scale(1.05);\n  }\n}\n\n.empty-title {\n  font-size: 32rpx;\n  font-weight: 700;\n  color: #2d3748;\n  margin-bottom: 16rpx;\n  position: relative;\n  z-index: 1;\n  letter-spacing: 1rpx;\n}\n\n.empty-desc {\n  font-size: 26rpx;\n  color: #718096;\n  line-height: 1.6;\n  position: relative;\n  z-index: 1;\n  font-weight: 500;\n}\n\n/* 响应式适配 */\n@media screen and (max-width: 320px) {\n  .header-title {\n    font-size: 40rpx;\n  }\n  \n  .list2 {\n    width: 100%;\n  }\n  \n  .goods-info .title {\n    font-size: 26rpx;\n  }\n}\n"
  },
  {
    "path": "pages/goods/his.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst dayjs = require(\"dayjs\")\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    name: '', // 搜索关键词\n    page: 1, // 读取第几页\n    categoryIndex: -1,\n    dayArray: ['全部', '一周内', '一月内', '半年内', '一年内'],\n    dayIndex: -1,\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function (options) {\n    this.setData({\n      name: options.name,\n      categoryId: options.categoryId\n    })\n    this.search()\n    this.readConfigVal()\n    // 补偿写法\n    getApp().configLoadOK = () => {\n      this.readConfigVal()\n    }\n    this.categories()\n  },\n  onShow: function () {\n\n  },\n  readConfigVal() {\n  },\n  search2(e) {\n    this.data.page = 1\n    this.data.name = e.detail\n    this.search()\n  },\n  search3() {\n    this.data.page = 1\n    this.data.name = ''\n    this.search()\n  },\n  async search(){\n    wx.showLoading({\n      title: '',\n    })\n    // https://www.yuque.com/apifm/nu0f75/stigxd\n    const res = await WXAPI.myBuyGoodsHisV2({\n      page: this.data.page,\n      nameLike: this.data.name || '',\n      dateBuyBegin: this.data.dateBuyBegin || '',\n      dateBuyEnd: this.data.dateBuyEnd || '',\n      categoryId: this.data.categoryId || '',\n      token: wx.getStorageSync('token'),\n      pageSize: 20,\n    })\n    wx.hideLoading()\n    if (res.code == 0) {\n      if (this.data.page == 1) {\n        this.setData({\n          goods: res.data.result,\n        })\n      } else {\n        this.setData({\n          goods: this.data.goods.concat(res.data.result),\n        })\n      }\n    } else {\n      if (this.data.page == 1) {\n        this.setData({\n          goods: null,\n        })\n      }\n    }\n  },\n  onReachBottom() {\n    this.setData({\n      page: this.data.page + 1\n    });\n    this.search()\n  },\n  async categories() {\n    // https://www.yuque.com/apifm/nu0f75/racmle\n    const res = await WXAPI.goodsCategory()\n    if (res.code == 0) {\n      const categories = res.data\n      categories.forEach(p => {\n        p.childs = categories.filter(ele => {\n          return p.id == ele.pid\n        })\n      })\n      this.setData({\n        categories: [{id: 0, name: '全部'}].concat(res.data.filter(ele => ele.level == 1))\n      })\n    }\n  },\n  categoryChange(e) {\n    this.setData({\n      categoryIndex: e.detail.value,\n      categoryId: this.data.categories[e.detail.value].id\n    })\n    this.data.page = 1\n    this.search()\n  },\n  dayChange(e) {\n    const dayIndex = e.detail.value\n    this.data.page = 1\n    let dateBuyBegin = ''\n    if (dayIndex == 0) {\n      // 全部\n      dateBuyBegin = ''\n    }\n    if (dayIndex == 1) {\n      // 一周内\n      dateBuyBegin = dayjs().subtract(7, 'day').format('YYYY-MM-DD')\n    }\n    if (dayIndex == 2) {\n      // 一月内\n      dateBuyBegin = dayjs().subtract(1, 'month').format('YYYY-MM-DD')\n    }\n    if (dayIndex == 3) {\n      // 半年内\n      dateBuyBegin = dayjs().subtract(6, 'month').format('YYYY-MM-DD')\n    }\n    if (dayIndex == 4) {\n      // 1年内\n      dateBuyBegin = dayjs().subtract(1, 'year').format('YYYY-MM-DD')\n    }\n    this.setData({\n      dayIndex,\n      dateBuyBegin,\n    })\n    this.search()\n  },\n})"
  },
  {
    "path": "pages/goods/his.json",
    "content": "{\n  \"usingComponents\": {},\n  \"navigationBarTitleText\": \"历史购买记录\"\n}"
  },
  {
    "path": "pages/goods/his.wxml",
    "content": "<!-- 页面头部 -->\n<view class=\"page-header\">\n  <view class=\"header-title\">\n    <view class=\"title-icon\">🕒</view>\n    <text class=\"title-text\">历史购买</text>\n    <view class=\"title-count\" wx:if=\"{{ goods && goods.length > 0 }}\">{{ goods.length }}件商品</view>\n  </view>\n</view>\n\n<!-- 搜索栏 -->\n<van-sticky>\n  <view class=\"search-container\">\n    <van-search value=\"{{ value }}\" placeholder=\"搜索浏览过的商品\" bind:search=\"search2\" bind:clear=\"search3\" shape=\"round\" />\n  </view>\n  \n  <!-- 筛选条件 -->\n  <view class=\"filters-wrapper\">\n    <view class=\"filters\">\n      <view class=\"filter-item\">\n        <picker bindchange=\"categoryChange\" value=\"{{ categoryIndex }}\" range=\"{{ categories }}\" range-key=\"name\">\n          <view class=\"picker-content {{categoryIndex != -1 ? 'active' : ''}}\">\n            <text class=\"picker-icon\">📦</text>\n            <text class=\"picker-text\">{{ categoryIndex == -1 ? '全部分类' : categories[categoryIndex].name }}</text>\n            <text class=\"picker-arrow\">▼</text>\n          </view>\n        </picker>\n      </view>\n      <view class=\"filter-divider\"></view>\n      <view class=\"filter-item\">\n        <picker bindchange=\"dayChange\" value=\"{{ dayIndex }}\" range=\"{{ dayArray }}\">\n          <view class=\"picker-content {{dayIndex != -1 ? 'active' : ''}}\">\n            <text class=\"picker-icon\">⏰</text>\n            <text class=\"picker-text\">{{ dayIndex == -1 ? '全部时间' : dayArray[dayIndex] }}</text>\n            <text class=\"picker-arrow\">▼</text>\n          </view>\n        </picker>\n      </view>\n    </view>\n  </view>\n</van-sticky>\n\n<!-- 空状态 -->\n<view wx:if=\"{{ !goods || goods.length == 0 }}\" class=\"empty-container\">\n  <view class=\"empty-content\">\n    <view class=\"empty-icon\">🛍️</view>\n    <view class=\"empty-text\">暂无浏览记录</view>\n    <view class=\"empty-tip\">快去逛逛吧～</view>\n    <navigator url=\"/pages/index/index\" open-type=\"switchTab\" class=\"empty-btn\">去首页看看</navigator>\n  </view>\n</view>\n\n<!-- 商品列表 -->\n<view class=\"goods-container\" wx:if=\"{{ goods && goods.length > 0 }}\">\n  <view class=\"list2-box\">\n    <view class=\"list2\" wx:for=\"{{goods}}\" wx:key=\"id\">\n      <navigator url=\"/pages/goods-details/index?id={{ item.goodsId }}\" class=\"goods-card\">\n        <!-- 商品图片 -->\n        <view class=\"img-wrapper\">\n          <image class=\"img\" mode=\"aspectFill\" src=\"{{item.pic}}\" lazy-load></image>\n          <view class=\"viewed-badge\">已浏览</view>\n        </view>\n        \n        <!-- 商品信息 -->\n        <view class=\"goods-info\">\n          <view class=\"title van-multi-ellipsis--l2\">{{item.goodsName}}</view>\n          \n          <!-- 价格区域 -->\n          <view class=\"price-section\">\n            <view class=\"price-wrapper\">\n              <text class=\"price-symbol\">¥</text>\n              <text class=\"price-value\">{{item.minPrice || '0.00'}}</text>\n            </view>\n            <view class=\"sales-info\" wx:if=\"{{item.numberSells}}\">\n              <text>{{item.numberSells}}人付款</text>\n            </view>\n          </view>\n          \n          <!-- 标签 -->\n          <view class=\"tags\" wx:if=\"{{item.dateAdd}}\">\n            <view class=\"tag\">\n              <text class=\"tag-text\">{{item.dateAdd}}</text>\n            </view>\n          </view>\n        </view>\n      </navigator>\n      \n      <!-- 快捷操作按钮 -->\n      <view class=\"quick-actions\">\n        <navigator url=\"/pages/goods-details/index?id={{ item.goodsId }}\" class=\"action-btn primary\">\n          <text>再看看</text>\n        </navigator>\n      </view>\n    </view>\n  </view>\n</view>\n\n<!-- 加载提示 -->\n<view class=\"loading-tip\" wx:if=\"{{ goods && goods.length > 0 }}\">\n  <text>— 向下滑动加载更多 —</text>\n</view>\n"
  },
  {
    "path": "pages/goods/his.wxss",
    "content": "/* ==================== 全局样式 ==================== */\npage {\n  background: #f5f5f5;\n  min-height: 100vh;\n}\n\npage, view, image, input {\n  display: block;\n  box-sizing: border-box;\n}\n\n/* ==================== 页面头部 ==================== */\n.page-header {\n  background: #fff;\n  padding: 32rpx;\n  border-bottom: 1rpx solid #f0f0f0;\n}\n\n.header-title {\n  display: flex;\n  align-items: center;\n  color: #333;\n}\n\n.title-icon {\n  font-size: 40rpx;\n  margin-right: 12rpx;\n}\n\n.title-text {\n  font-size: 36rpx;\n  font-weight: 600;\n  letter-spacing: 1rpx;\n}\n\n.title-count {\n  margin-left: 16rpx;\n  background: #fff5f5;\n  padding: 4rpx 16rpx;\n  border-radius: 20rpx;\n  font-size: 24rpx;\n  color: #e4393c;\n  border: 1rpx solid #ffebeb;\n}\n\n/* ==================== 搜索栏 ==================== */\n.search-container {\n  background: #fff;\n  padding: 16rpx 16rpx 0;\n}\n\n/* ==================== 筛选条件 ==================== */\n.filters-wrapper {\n  background: #fff;\n  padding: 16rpx 16rpx 16rpx;\n  border-bottom: 1rpx solid #f0f0f0;\n}\n\n.filters {\n  display: flex;\n  align-items: center;\n  background: #fff;\n  border-radius: 8rpx;\n  padding: 16rpx 20rpx;\n  border: 1rpx solid #e5e5e5;\n}\n\n.filter-item {\n  flex: 1;\n  font-size: 28rpx;\n}\n\n.picker-content {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: #666;\n  transition: all 0.3s ease;\n}\n\n.picker-content.active {\n  color: #e4393c;\n  font-weight: 500;\n}\n\n.picker-icon {\n  font-size: 28rpx;\n  margin-right: 8rpx;\n}\n\n.picker-text {\n  font-size: 28rpx;\n}\n\n.picker-arrow {\n  font-size: 20rpx;\n  margin-left: 8rpx;\n  color: #999;\n}\n\n.filter-divider {\n  width: 1rpx;\n  height: 28rpx;\n  background: #e5e5e5;\n  margin: 0 20rpx;\n}\n\n/* ==================== 空状态 ==================== */\n.empty-container {\n  min-height: 60vh;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: 100rpx 0;\n  background: #fff;\n  margin-top: 20rpx;\n}\n\n.empty-content {\n  text-align: center;\n}\n\n.empty-icon {\n  font-size: 140rpx;\n  margin-bottom: 32rpx;\n  opacity: 0.6;\n}\n\n.empty-text {\n  font-size: 32rpx;\n  color: #333;\n  font-weight: 500;\n  margin-bottom: 16rpx;\n}\n\n.empty-tip {\n  font-size: 26rpx;\n  color: #999;\n  margin-bottom: 48rpx;\n}\n\n.empty-btn {\n  display: inline-block;\n  background: #e4393c;\n  color: #fff;\n  padding: 20rpx 60rpx;\n  border-radius: 40rpx;\n  font-size: 28rpx;\n  transition: all 0.3s ease;\n}\n\n.empty-btn:active {\n  background: #c81623;\n}\n\n/* ==================== 商品容器 ==================== */\n.goods-container {\n  padding: 20rpx 0 32rpx;\n}\n\n.list2-box {\n  padding: 0 16rpx;\n  display: flex;\n  justify-content: space-between;\n  flex-wrap: wrap;\n}\n\n/* ==================== 商品卡片 ==================== */\n.list2 {\n  width: 355rpx;\n  margin-bottom: 16rpx;\n  background: #fff;\n  border-radius: 12rpx;\n  overflow: hidden;\n  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);\n  transition: all 0.3s ease;\n}\n\n.list2:active {\n  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);\n}\n\n.goods-card {\n  display: block;\n}\n\n/* 图片区域 */\n.img-wrapper {\n  position: relative;\n  width: 100%;\n  height: 355rpx;\n  overflow: hidden;\n  background: #f8f8f8;\n}\n\n.img {\n  width: 100%;\n  height: 100%;\n}\n\n.viewed-badge {\n  position: absolute;\n  top: 12rpx;\n  left: 0;\n  background: rgba(228, 57, 60, 0.9);\n  color: #fff;\n  font-size: 20rpx;\n  padding: 6rpx 16rpx;\n  border-radius: 0 20rpx 20rpx 0;\n  font-weight: 400;\n}\n\n/* 商品信息 */\n.goods-info {\n  padding: 16rpx;\n}\n\n.title {\n  color: #333;\n  font-size: 26rpx;\n  line-height: 38rpx;\n  height: 76rpx;\n  font-weight: 400;\n  margin-bottom: 12rpx;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  word-break: break-all;\n}\n\n/* 价格区域 */\n.price-section {\n  display: flex;\n  align-items: flex-end;\n  justify-content: space-between;\n  margin-bottom: 12rpx;\n}\n\n.price-wrapper {\n  display: flex;\n  align-items: baseline;\n  color: #e4393c;\n}\n\n.price-symbol {\n  font-size: 22rpx;\n  font-weight: 500;\n  margin-right: 2rpx;\n}\n\n.price-value {\n  font-size: 32rpx;\n  font-weight: 600;\n  font-family: Arial, 'PingFang SC', sans-serif;\n}\n\n.sales-info {\n  font-size: 22rpx;\n  color: #999;\n}\n\n/* 标签 */\n.tags {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 8rpx;\n}\n\n.tag {\n  display: inline-flex;\n  align-items: center;\n}\n\n.tag-text {\n  font-size: 20rpx;\n  color: #999;\n  background: #f7f7f7;\n  padding: 4rpx 12rpx;\n  border-radius: 4rpx;\n}\n\n/* 快捷操作按钮 */\n.quick-actions {\n  padding: 0 16rpx 16rpx;\n  display: flex;\n  gap: 12rpx;\n}\n\n.action-btn {\n  flex: 1;\n  text-align: center;\n  padding: 16rpx 0;\n  border-radius: 40rpx;\n  font-size: 26rpx;\n  font-weight: 500;\n  transition: all 0.3s ease;\n}\n\n.action-btn.primary {\n  background: #e4393c;\n  color: #fff;\n}\n\n.action-btn:active {\n  background: #c81623;\n}\n\n/* ==================== 加载提示 ==================== */\n.loading-tip {\n  text-align: center;\n  padding: 40rpx 0 60rpx;\n  color: #999;\n  font-size: 24rpx;\n}\n\n.loading-tip text {\n  position: relative;\n  display: inline-block;\n}\n\n.loading-tip text::before,\n.loading-tip text::after {\n  content: '';\n  position: absolute;\n  top: 50%;\n  width: 60rpx;\n  height: 1rpx;\n  background: #e0e0e0;\n}\n\n.loading-tip text::before {\n  right: 100%;\n  margin-right: 20rpx;\n}\n\n.loading-tip text::after {\n  left: 100%;\n  margin-left: 20rpx;\n}\n\n/* ==================== 其他样式 ==================== */\n.ellipsis {\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  -webkit-box-orient: vertical;\n  word-break: break-all;\n}\n\n.originalPrice {\n  color: #aaa;\n  text-decoration: line-through;\n  margin-left: 20rpx;\n  font-size: 24rpx;\n}"
  },
  {
    "path": "pages/goods/list-vop.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    listType: 1, // 1为1个商品一行，2为2个商品一行    \n    name: '', // 搜索关键词\n    orderBy: '', // 排序规则\n    page: 1 // 读取第几页\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function (options) {\n    this.setData({\n      name: options.name,\n      cid1: options.cid1,\n      cid2: options.cid2\n    })\n    this.search()\n  },\n\n  /**\n   * 生命周期函数--监听页面初次渲染完成\n   */\n  onReady: function () {\n\n  },\n\n  /**\n   * 生命周期函数--监听页面显示\n   */\n  onShow: function () {\n\n  },\n  async search(){\n    if (!this.data.cid1 && !this.data.cid2) {\n      return\n    }\n    wx.showLoading({\n      title: '加载中',\n    })\n    const _data = {\n      sortType: this.data.orderBy,\n      page: this.data.page,\n      pageSize: 20,\n    }\n    if (this.data.name) {\n      _data.keyword = this.data.name\n    }\n    if (this.data.cid1) {\n      _data.cid1 = this.data.cid1\n    }\n    if (this.data.cid2) {\n      _data.cid2 = this.data.cid2\n    }\n    const res = await WXAPI.jdvopGoodsListV3(_data)\n    wx.hideLoading()\n    if (res.code == 0) {\n      res.data.result.forEach(ele => {\n        ele.pic = res.data.imageDomain + ele.pic\n      })\n      if (this.data.page == 1) {\n        this.setData({\n          goods: res.data.result,\n        })\n      } else {\n        this.setData({\n          goods: this.data.goods.concat(res.data.result),\n        })\n      }\n    } else {\n      if (this.data.page == 1) {\n        this.setData({\n          goods: null,\n        })\n      } else {\n        wx.showToast({\n          title: '没有更多了',\n          icon: 'none'\n        })\n      }\n    }\n  },\n  /**\n   * 生命周期函数--监听页面隐藏\n   */\n  onHide: function () {\n\n  },\n\n  /**\n   * 生命周期函数--监听页面卸载\n   */\n  onUnload: function () {\n\n  },\n\n  /**\n   * 页面相关事件处理函数--监听用户下拉动作\n   */\n  onPullDownRefresh: function () {\n\n  },\n\n  /**\n   * 页面上拉触底事件的处理函数\n   */\n  onReachBottom: function () {\n    this.setData({\n      page: this.data.page + 1\n    });\n    this.search()\n  },\n  changeShowType(){\n    if (this.data.listType == 1) {\n      this.setData({\n        listType: 2\n      })\n    } else {\n      this.setData({\n        listType: 1\n      })\n    }\n  },\n  bindinput(e){\n    this.setData({\n      name: e.detail.value\n    })\n  },\n  bindconfirm(e){\n    this.setData({\n      page: 1,\n      name: e.detail.value\n    })\n    this.search()\n  },\n  filter(e){\n    this.setData({\n      page: 1,\n      orderBy: e.currentTarget.dataset.val\n    })\n    this.search()\n  },\n  async addShopCar(e) {\n    const curGood = this.data.goods.find(ele => {\n      return ele.id == e.currentTarget.dataset.id\n    })\n    if (!curGood) {\n      return\n    }\n    if (curGood.stores <= 0) {\n      wx.showToast({\n        title: '已售罄~',\n        icon: 'none'\n      })\n      return\n    }\n    this.addShopCarCheck({\n      goodsId: curGood.id,\n      buyNumber: 1,\n      sku: []\n    })\n  },\n  async addShopCarCheck(options) {\n    this.addShopCarDone(options)\n  },\n  async addShopCarDone(options) {\n    const res = await WXAPI.shippingCarInfoAddItem(wx.getStorageSync('token'), options.goodsId, options.buyNumber, options.sku)\n    if (res.code == 30002) {\n      // 需要选择规格尺寸\n      const skuCurGoodsRes = await WXAPI.goodsDetail(options.goodsId)\n      if (skuCurGoodsRes.code != 0) {\n        wx.showToast({\n          title: skuCurGoodsRes.msg,\n          icon: 'none'\n        })\n        return\n      }\n      const skuCurGoods = skuCurGoodsRes.data\n      skuCurGoods.basicInfo.storesBuy = 1\n      this.setData({\n        skuCurGoods\n      })\n      return\n    }\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.showToast({\n      title: '加入成功',\n      icon: 'success'\n    })\n    this.setData({\n      skuCurGoods: null\n    })\n  },\n  storesJia() {\n    const skuCurGoods = this.data.skuCurGoods\n    if (skuCurGoods.basicInfo.storesBuy < skuCurGoods.basicInfo.stores) {\n      skuCurGoods.basicInfo.storesBuy++\n      this.setData({\n        skuCurGoods\n      })\n    }\n  },\n  storesJian() {\n    const skuCurGoods = this.data.skuCurGoods\n    if (skuCurGoods.basicInfo.storesBuy > 1) {\n      skuCurGoods.basicInfo.storesBuy--\n      this.setData({\n        skuCurGoods\n      })\n    }\n  },\n  closeSku() {\n    this.setData({\n      skuCurGoods: null\n    })\n    wx.showTabBar()\n  },\n  skuSelect(e) {\n    const pid = e.currentTarget.dataset.pid\n    const id = e.currentTarget.dataset.id\n    // 处理选中\n    const skuCurGoods = this.data.skuCurGoods\n    const property = skuCurGoods.properties.find(ele => { return ele.id == pid })\n    property.childsCurGoods.forEach(ele => {\n      if (ele.id == id) {\n        ele.active = true\n      } else {\n        ele.active = false\n      }\n    })\n    this.setData({\n      skuCurGoods\n    })\n  },\n  addCarSku() {\n    const skuCurGoods = this.data.skuCurGoods\n    const propertySize = skuCurGoods.properties.length // 有几组SKU\n    const sku = []\n    skuCurGoods.properties.forEach(p => {\n      const o = p.childsCurGoods.find(ele => { return ele.active })\n      if (!o) {\n        return\n      }\n      sku.push({\n        optionId: o.propertyId,\n        optionValueId: o.id\n      })\n    })\n    if (sku.length != propertySize) {\n      wx.showToast({\n        title: '请选择规格',\n        icon: 'none'\n      })\n      return\n    }\n    const options = {\n      goodsId: skuCurGoods.basicInfo.id,\n      buyNumber: skuCurGoods.basicInfo.storesBuy,\n      sku\n    }\n    this.addShopCarDone(options)\n  },\n})"
  },
  {
    "path": "pages/goods/list-vop.json",
    "content": "{\n  \"navigationBarTitleText\": \"商品列表\"\n}"
  },
  {
    "path": "pages/goods/list-vop.wxml",
    "content": "<van-sticky>\n  <view class=\"header\">\n    <view class=\"search\">\n      <input type=\"text\" placeholder=\"输入搜索关键词\" value=\"{{name}}\" bindinput=\"bindinput\" bindconfirm=\"bindconfirm\"></input>\n      <image src=\"/images/icon/search.svg\" bindtap=\"search\"></image>\n    </view>\n    <!-- <image class=\"show-type\" src=\"/images/icon/list{{listType}}.svg\" bindtap=\"changeShowType\"></image> -->\n  </view>\n  <view class=\"filters\">\n    <view class=\"item {{orderBy==''?'active':''}}\" data-val=\"\" bindtap=\"filter\">综合</view>\n    <view class=\"item {{orderBy=='winsdate_desc'?'active':''}}\" data-val=\"winsdate_desc\" bindtap=\"filter\">新品</view>\n    <view class=\"item {{orderBy=='sale_desc'?'active':''}}\" data-val=\"sale_desc\" bindtap=\"filter\">销量</view>\n    <view class=\"item {{orderBy=='price_asc'?'active':''}}\" data-val=\"price_asc\" bindtap=\"filter\">价格</view>\n  </view>\n</van-sticky>\n<van-empty wx:if=\"{{ !goods || goods.length == 0 }}\" description=\"暂无商品\" />\n<block wx:if=\"{{listType == 1}}\">\n  <view class=\"list1\" wx:for=\"{{goods}}\" wx:key=\"id\">\n    <navigator url=\"/pages/goods-details/vop?id={{item.skuId}}\"><image class=\"img\" mode=\"aspectFill\" src=\"{{item.pic}}\"></image></navigator>\n    <view class=\"goods-info\">\n      <view class=\"title ellipsis\"><navigator url=\"/pages/goods-details/vop?id={{item.skuId}}\">{{item.skuName}}</navigator></view>\n      <view class=\"price\" style=\"margin-top: 24rpx;\">¥ {{item.priceSale}}</view>\n      <!-- <view class=\"buy-info\">\n        <view class=\"num\">已售出{{item.numberSells}}件</view>\n        <image class=\"car\" src=\"/images/icon/car.svg\" data-id=\"{{item.skuId}}\" bindtap=\"addShopCar\"></image>\n      </view> -->\n    </view>\n  </view>\n</block>\n<view wx:if=\"{{listType == 2}}\" class=\"list2-box\">\n  <view class=\"list2\" wx:for=\"{{goods}}\" wx:key=\"id\">\n    <navigator url=\"/pages/goods-details/vop?id={{item.skuId}}\"><image class=\"img\" mode=\"aspectFill\" src=\"{{item.pic}}\"></image></navigator>\n    <view class=\"goods-info\">\n      <view class=\"title\"><navigator url=\"/pages/goods-details/vop?id={{item.skuId}}\">{{item.skuName}}</navigator></view>\n      <view class=\"price\">¥ {{item.priceSale}}</view>\n      <!-- <view class=\"buy-info\">\n        <view class=\"num\">{{item.numberOrders}}人已购{{item.numberSells}}件</view>\n        <image class=\"car\" src=\"/images/icon/car.svg\" data-id=\"{{item.id}}\" bindtap=\"addShopCar\"></image>\n      </view> -->\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "pages/goods/list-vop.wxss",
    "content": "page {\n  background: #f5f5f5;\n}\npage,view,image,input {\n  display: block;\n  box-sizing: border-box;\n}\n.header {\n  padding: 32rpx;\n  background: #fff;\n  display: flex;\n  align-items: center;\n}\n.header .search {\n  position: relative;\n  width: 750rpx;\n  height: 66rpx;\n}\n.header .search input {\n  border: 1rpx solid #e3e3e3;\n  width: 100%;\n  height: 100%;\n  border-radius: 30rpx;\n  padding-left: 60rpx; \n}\n.header .search image {\n  width: 35rpx;\n  height: 35rpx;\n  position: absolute;\n  top: 16rpx;\n  right: 40rpx;\n  z-index: 9999;\n}\n.header .show-type {\n  width: 40rpx;\n  height: 40rpx;\n  margin-left: 20rpx;\n}\n.line {\n  width: 100vw;\n  height: 2rpx;\n  background: #dfdfdf;\n}\n.filters {\n  width: 100vw;\n  height: 88rpx;\n  background: #fff;\n  display: flex;\n  justify-content: space-around;\n}\n.filters .item {\n  line-height: 88rpx;\n}\n.filters .active {\n  color:#fa1e26;\n}\n.list1 {\n  margin: 16rpx;\n  width: 718rpx;\n  height: 220rpx;\n  display: flex;\n  background: #fff;\n  border-radius: 30rpx;\n  overflow: hidden;\n  position: relative;\n}\n.list1 .img {\n  width: 220rpx;\n  height: 220rpx;\n  flex-shrink: 0;\n}\n.list1 .goods-info {\n  padding: 16rpx 32rpx 0 24rpx;\n  width: 100%;\n}\n.list1 .goods-info .title {\n  color: #333;\n  font-size: 30rpx;\n}\n.ellipsis {\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  -webkit-box-orient: vertical;\n  word-break: break-all;\n}\n.list1 .goods-info .price {\n  color: #FF3B30;\n  font-size: 34rpx;\n}\n.list1 .goods-info .buy-info {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n.list1 .goods-info .buy-info .num {\n  font-size:24rpx;\n  color:#999999;\n}\n.list1 .goods-info .buy-info .car {\n  position: absolute;\n  right: 16rpx;\n  bottom: 16rpx;\n  width: 50rpx;\n  height: 50rpx;\n}\n.list2-box {\n  margin: 16rpx;\n  width: 718rpx;\n  display: flex;\n  justify-content: space-between;\n  flex-wrap: wrap;\n}\n.list2 {\n  margin: 16rpx 0;\n  width: 350rpx;\n  background: #fff;\n  border-radius: 30rpx;\n  overflow: hidden;\n  position: relative;\n}\n.list2 .img {\n  width: 350rpx;\n  height: 350rpx;\n}\n.list2 .goods-info {\n  padding: 16rpx;\n}\n.list2 .goods-info .title {\n  color: #333;\n  font-size: 30rpx;\n}\n.list2 .goods-info .price {\n  color: #FF3B30;\n  font-size: 34rpx;\n}\n.list2 .goods-info .buy-info {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n.list2 .goods-info .buy-info .num {\n  font-size:24rpx;\n  color:#999999;\n}\n.list2 .goods-info .buy-info .car {\n  width: 50rpx;\n  height: 50rpx;\n  position: absolute;\n  right: 16rpx;\n  bottom: 16rpx;\n}\n\n\n.sku-mask {\n  width: 100vw;\n  height: 100vh;\n  position: fixed;\n  top: 0;\n  left: 0;\n  background: rgba(0, 0, 0, 0.3);\n}\n.sku-container {\n  position: fixed;\n  width: 100vw;\n  bottom: 90rpx;\n  left: 0;\n  background: #fff;\n  padding: 32rpx 32rpx 0 32rpx;\n}\n.sku-container .close {\n  position: absolute;\n  width: 54rpx;\n  height: 54rpx;\n  top: 16rpx;\n  right: 16rpx;\n  /* border: 1rpx solid #666;\n  border-radius: 50%; */\n}\n.sku-container .sku {\n  border-bottom: 1rpx solid #eee;\n  padding-bottom: 24rpx;\n  margin-bottom: 16rpx;\n}\n.sku-container .sku .t {\n  color: #333;\n}\n.sku-container .sku .items {\n  display: flex;\n  flex-wrap: wrap;\n}\n.sku-container .sku .items text {\n  padding: 8rpx;\n  border: 1rpx solid #999;\n  color: #999;\n  margin: 24rpx 24rpx 0 0;\n  font-size: 26rpx;\n  border-radius: 12rpx;\n}\n.sku-container .sku .items text.active {\n  border: 1rpx solid #e64340;\n  color: #e64340;\n}\n.sku-container .num {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 24rpx;\n}\n.sku-container .num .t {\n  color: #333;\n}\n.sku-container .num .num-box {\n  display: flex;\n}\n.sku-container .num .num-box .a {\n  width: 64rpx;\n  height: 64rpx;\n  border: 1rpx solid #999;\n  text-align: center;\n  line-height: 64rpx;\n  font-size: 46rpx;\n  color: #666;\n}\n.sku-container .num .num-box .b {\n  color: #333;\n  line-height: 64rpx;\n  padding: 0 32rpx;\n  border-top: 1rpx solid #999;\n  border-bottom: 1rpx solid #999;\n}\n.sku-btn {\n  width: 100vw;\n  height: 90rpx;\n  line-height: 90rpx;\n  background: #e64340;\n  color: #fff;\n  position: fixed;\n  bottom: 0;\n  left: 0;\n  text-align: center;\n}"
  },
  {
    "path": "pages/goods/list.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst TOOLS = require('../../utils/tools.js') // TOOLS.showTabBarBadge();\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    listType: 1, // 1为1个商品一行，2为2个商品一行    \n    name: '', // 搜索关键词\n    orderBy: '', // 排序规则\n    page: 1 // 读取第几页\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function (options) {\n    this.setData({\n      name: options.name,\n      categoryId: options.categoryId\n    })\n    this.search()\n    this.readConfigVal()\n    // 补偿写法\n    getApp().configLoadOK = () => {\n      this.readConfigVal()\n    }\n  },\n  onShow: function () {\n\n  },\n  readConfigVal() {\n    const show_seller_number = wx.getStorageSync('show_seller_number')\n    const goods_search_show_type = wx.getStorageSync('goods_search_show_type')\n    let listType = 1\n    if (goods_search_show_type == 2) {\n      listType = 2\n    }\n    this.setData({\n      show_seller_number,\n      listType\n    })\n  },\n  async search(){\n    wx.showLoading({\n      title: '加载中',\n    })\n    const _data = {\n      orderBy: this.data.orderBy,\n      page: this.data.page,\n      pageSize: 20,\n    }\n    if (this.data.name) {\n      _data.k = this.data.name\n    }\n    if (this.data.categoryId) {\n      _data.categoryId = this.data.categoryId\n    }\n    const res = await WXAPI.goodsv2(_data)\n    wx.hideLoading()\n    if (res.code == 0) {\n      if (this.data.page == 1) {\n        this.setData({\n          goods: res.data.result,\n        })\n      } else {\n        this.setData({\n          goods: this.data.goods.concat(res.data.result),\n        })\n      }\n    } else {\n      if (this.data.page == 1) {\n        this.setData({\n          goods: null,\n        })\n      } else {\n        wx.showToast({\n          title: '没有更多了',\n          icon: 'none'\n        })\n      }\n    }\n  },\n  onReachBottom() {\n    this.setData({\n      page: this.data.page + 1\n    });\n    this.search()\n  },\n  changeShowType(){\n    if (this.data.listType == 1) {\n      this.setData({\n        listType: 2\n      })\n    } else {\n      this.setData({\n        listType: 1\n      })\n    }\n  },\n  bindinput(e){\n    this.setData({\n      name: e.detail.value\n    })\n  },\n  bindconfirm(e){\n    this.setData({\n      page: 1,\n      name: e.detail.value\n    })\n    this.search()\n  },\n  filter(e){\n    this.setData({\n      page: 1,\n      orderBy: e.currentTarget.dataset.val\n    })\n    this.search()\n  },\n  async addShopCar(e) {\n    const curGood = this.data.goods.find(ele => {\n      return ele.id == e.currentTarget.dataset.id\n    })\n    if (!curGood) {\n      return\n    }\n    if (curGood.stores <= 0) {\n      wx.showToast({\n        title: '已售罄~',\n        icon: 'none'\n      })\n      return\n    }\n    if (!curGood.propertyIds && !curGood.hasAddition) {\n      // 直接调用加入购物车方法\n      const res = await WXAPI.shippingCarInfoAddItem(wx.getStorageSync('token'), curGood.id, 1, [])\n      if (res.code == 2000) {\n        wx.navigateTo({\n            url: '/pages/login/index',\n        })\n        return\n      }\n      if (res.code == 30002) {\n        // 需要选择规格尺寸\n        this.setData({\n          skuCurGoods: curGood\n        })\n      } else if (res.code == 0) {\n        wx.showToast({\n          title: '加入成功',\n          icon: 'success'\n        })\n        wx.showTabBar()\n        TOOLS.showTabBarBadge() // 获取购物车数据，显示TabBarBadge\n      } else {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n      }\n    } else {\n      // 需要选择 SKU 和 可选配件\n      this.setData({\n        skuCurGoods: curGood\n      })\n    }\n  },\n})"
  },
  {
    "path": "pages/goods/list.json",
    "content": "{\n  \"navigationBarTitleText\": \"商品列表\"\n}"
  },
  {
    "path": "pages/goods/list.wxml",
    "content": "<van-sticky>\n  <view class=\"header\">\n    <view class=\"search\">\n      <input type=\"text\" placeholder=\"输入搜索关键词\" value=\"{{name}}\" bindinput=\"bindinput\" bindconfirm=\"bindconfirm\"></input>\n      <image src=\"/images/icon/search.svg\" bindtap=\"search\"></image>\n    </view>\n    <image class=\"show-type\" src=\"/images/icon/list{{listType}}.svg\" bindtap=\"changeShowType\"></image>\n  </view>\n  <view class=\"filters\">\n    <view class=\"item {{orderBy==''?'active':''}}\" data-val=\"\" bindtap=\"filter\">综合</view>\n    <view class=\"item {{orderBy=='addedDown'?'active':''}}\" data-val=\"addedDown\" bindtap=\"filter\">新品</view>\n    <view class=\"item {{orderBy=='ordersDown'?'active':''}}\" data-val=\"ordersDown\" bindtap=\"filter\">销量</view>\n    <view class=\"item {{orderBy=='priceUp'?'active':''}}\" data-val=\"priceUp\" bindtap=\"filter\">价格</view>\n  </view>\n</van-sticky>\n<van-empty wx:if=\"{{ !goods || goods.length == 0 }}\" description=\"暂无商品\" />\n<wxs module=\"goodsDetailPage\">\nmodule.exports = {\n  url : function(item) {\n    if (item.supplyType == 'cps_jd') {\n      return '/packageCps/pages/goods-details/cps-jd?id=' + item.id\n    } else if (item.supplyType == 'vop_jd') {\n      return '/pages/goods-details/vop?id=' + item.yyId + '&goodsId=' + item.id\n    } else if (item.supplyType == 'cps_pdd') {\n      return '/packageCps/pages/goods-details/cps-pdd?id=' + item.id\n    } else if (item.supplyType == 'cps_taobao') {\n      return '/packageCps/pages/goods-details/cps-taobao?id=' + item.id\n    } else {\n      return '/pages/goods-details/index?id=' + item.id\n    }\n  }\n}\n</wxs>\n<block wx:if=\"{{listType == 1}}\">\n  <view class=\"list1\" wx:for=\"{{goods}}\" wx:key=\"id\">\n    <navigator url=\"{{ goodsDetailPage.url(item) }}\"><image class=\"img\" mode=\"aspectFill\" src=\"{{item.pic}}\"></image></navigator>\n    <view class=\"goods-info\">\n      <view class=\"title ellipsis\"><navigator url=\"{{ goodsDetailPage.url(item) }}\">{{item.name}}</navigator></view>\n      <view wx:if=\"{{item.characteristic}}\" class=\"characteristic van-multi-ellipsis--l2\" style=\"padding:0;-webkit-line-clamp: 1;\">{{item.characteristic}}</view>\n      <view class=\"price\">¥ {{item.minPrice}}<text wx:if=\"{{item.originalPrice && item.originalPrice > 0}}\" class=\"originalPrice\">¥ {{item.originalPrice}}\n        </text></view>\n      <view wx:if=\"{{ item.supplyType != 'vop_jd' }}\" class=\"buy-info\">\n        <view wx:if=\"{{ show_seller_number == '1' }}\" class=\"num\">已售出{{item.numberSells}}件</view>\n        <van-icon wx:if=\"{{ item.propertyIds || item.hasAddition }}\" class=\"car\" name=\"add\" color=\"#e64340\" size=\"48rpx\" data-id=\"{{item.id}}\" bind:click=\"addShopCar\" />\n        <van-icon wx:else class=\"car\" name=\"shopping-cart-o\" color=\"#e64340\" size=\"48rpx\" data-id=\"{{item.id}}\" bind:click=\"addShopCar\" />\n      </view>\n    </view>\n  </view>\n</block>\n<view wx:if=\"{{listType == 2}}\" class=\"list2-box\">\n  <view class=\"list2\" wx:for=\"{{goods}}\" wx:key=\"id\">\n    <navigator url=\"{{ goodsDetailPage.url(item) }}\"><image class=\"img\" mode=\"aspectFill\" src=\"{{item.pic}}\"></image></navigator>\n    <view class=\"goods-info\">\n      <view class=\"title van-multi-ellipsis--l2\"><navigator url=\"{{ goodsDetailPage.url(item) }}\">{{item.name}}</navigator></view>\n      <view wx:if=\"{{item.characteristic}}\" class=\"characteristic van-multi-ellipsis--l2\" style=\"padding:0;-webkit-line-clamp: 1;\">{{item.characteristic}}</view>\n      <view class=\"price\">¥ {{item.minPrice}}<text wx:if=\"{{item.originalPrice && item.originalPrice > 0}}\" class=\"originalPrice\">¥ {{item.originalPrice}}\n        </text></view>\n      <view wx:if=\"{{ item.supplyType != 'vop_jd' }}\" class=\"buy-info\">\n        <view wx:if=\"{{ show_seller_number == '1' }}\" class=\"num\">{{item.numberOrders}}人已购{{item.numberSells}}件</view>\n        <van-icon wx:if=\"{{ item.propertyIds || item.hasAddition }}\" class=\"car\" name=\"add\" color=\"#e64340\" size=\"48rpx\" data-id=\"{{item.id}}\" bind:click=\"addShopCar\" />\n        <van-icon wx:else class=\"car\" name=\"shopping-cart-o\" color=\"#e64340\" size=\"48rpx\" data-id=\"{{item.id}}\" bind:click=\"addShopCar\" />\n      </view>\n    </view>\n  </view>\n</view>\n\n<goods-pop skuCurGoodsBaseInfo=\"{{ skuCurGoods }}\" />"
  },
  {
    "path": "pages/goods/list.wxss",
    "content": "/* 京东风格 - 页面基础样式 */\npage {\n  background: #F5F5F5;\n}\n\npage, view, image, input {\n  display: block;\n  box-sizing: border-box;\n}\n\n/* 顶部搜索栏 - 京东风格 */\n.header {\n  padding: 20rpx 24rpx;\n  background: linear-gradient(135deg, #E4393C 0%, #E1251B 100%);\n  display: flex;\n  align-items: center;\n  box-shadow: 0 4rpx 12rpx rgba(225, 37, 27, 0.15);\n}\n\n.header .search {\n  position: relative;\n  flex: 1;\n  height: 64rpx;\n}\n\n.header .search input {\n  width: 100%;\n  height: 100%;\n  background: rgba(255, 255, 255, 0.95);\n  border-radius: 32rpx;\n  padding: 0 80rpx 0 32rpx;\n  font-size: 28rpx;\n  color: #333;\n  border: none;\n}\n\n.header .search input::placeholder {\n  color: #999;\n}\n\n.header .search image {\n  width: 32rpx;\n  height: 32rpx;\n  position: absolute;\n  top: 16rpx;\n  right: 24rpx;\n  z-index: 10;\n}\n\n.header .show-type {\n  width: 40rpx;\n  height: 40rpx;\n  margin-left: 20rpx;\n  filter: brightness(0) invert(1);\n}\n\n/* 筛选栏 - 京东风格 */\n.filters {\n  width: 100vw;\n  height: 88rpx;\n  background: #FFFFFF;\n  display: flex;\n  justify-content: space-around;\n  align-items: center;\n  border-bottom: 1rpx solid #F0F0F0;\n  position: relative;\n}\n\n.filters .item {\n  font-size: 28rpx;\n  color: #666;\n  font-weight: 500;\n  padding: 0 20rpx;\n  transition: all 0.3s ease;\n}\n\n.filters .active {\n  color: #E4393C;\n  font-weight: 600;\n  position: relative;\n}\n\n.filters .active::after {\n  content: '';\n  position: absolute;\n  bottom: -14rpx;\n  left: 50%;\n  transform: translateX(-50%);\n  width: 40rpx;\n  height: 4rpx;\n  background: #E4393C;\n  border-radius: 2rpx;\n}\n\n/* 列表模式1 - 横向卡片 */\n.list1 {\n  margin: 20rpx 24rpx 0;\n  width: 702rpx;\n  display: flex;\n  background: #FFFFFF;\n  border-radius: 16rpx;\n  position: relative;\n  overflow: hidden;\n  box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06);\n  transition: all 0.3s ease;\n}\n\n.list1:active {\n  transform: scale(0.98);\n}\n\n.list1 .img {\n  width: 240rpx;\n  height: 240rpx;\n  flex-shrink: 0;\n  background: #F8F8F8;\n}\n\n.list1 .goods-info {\n  padding: 20rpx 24rpx;\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n}\n\n.list1 .goods-info .title {\n  color: #333333;\n  font-size: 28rpx;\n  line-height: 40rpx;\n  font-weight: 500;\n  margin-bottom: 8rpx;\n}\n\n.list1 .goods-info .characteristic {\n  font-size: 24rpx;\n  color: #999;\n  line-height: 34rpx;\n  margin-bottom: 12rpx;\n}\n\n.ellipsis {\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  -webkit-box-orient: vertical;\n  word-break: break-all;\n}\n\n.list1 .goods-info .price {\n  color: #E4393C;\n  font-size: 36rpx;\n  font-weight: 700;\n  margin-bottom: 8rpx;\n  display: flex;\n  align-items: baseline;\n}\n\n.list1 .goods-info .price::before {\n  content: '¥';\n  font-size: 24rpx;\n  font-weight: 500;\n  margin-right: 2rpx;\n}\n\n.list1 .goods-info .buy-info {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding-right: 60rpx;\n}\n\n.list1 .goods-info .buy-info .num {\n  font-size: 22rpx;\n  color: #999999;\n  background: #F5F5F5;\n  padding: 4rpx 12rpx;\n  border-radius: 4rpx;\n}\n\n.list1 .goods-info .buy-info .car {\n  position: absolute;\n  right: 20rpx;\n  bottom: 20rpx;\n  width: 56rpx;\n  height: 56rpx;\n  background: linear-gradient(135deg, #FF6B6B 0%, #E4393C 100%);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 4rpx 12rpx rgba(228, 57, 60, 0.3);\n}\n\n/* 购物车图标设置为白色 */\n.list1 .goods-info .buy-info .car .van-icon {\n  color: #FFFFFF !important;\n}\n\n/* 列表模式2 - 网格布局 */\n.list2-box {\n  padding: 12rpx 20rpx;\n  display: flex;\n  justify-content: space-between;\n  flex-wrap: wrap;\n}\n\n.list2 {\n  margin: 12rpx 0;\n  width: 345rpx;\n  background: #FFFFFF;\n  border-radius: 16rpx;\n  overflow: hidden;\n  position: relative;\n  box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06);\n  transition: all 0.3s ease;\n}\n\n.list2:active {\n  transform: scale(0.97);\n}\n\n.list2 .img {\n  width: 345rpx;\n  height: 345rpx;\n  background: #F8F8F8;\n}\n\n.list2 .goods-info {\n  padding: 16rpx 16rpx 20rpx;\n}\n\n.list2 .goods-info .title {\n  color: #333333;\n  font-size: 26rpx;\n  line-height: 38rpx;\n  font-weight: 500;\n  height: 76rpx;\n  margin-bottom: 8rpx;\n}\n\n.list2 .goods-info .characteristic {\n  font-size: 22rpx;\n  color: #999;\n  line-height: 32rpx;\n  margin-bottom: 12rpx;\n}\n\n.list2 .goods-info .price {\n  color: #E4393C;\n  font-size: 32rpx;\n  font-weight: 700;\n  margin-bottom: 8rpx;\n  display: flex;\n  align-items: baseline;\n}\n\n.list2 .goods-info .price::before {\n  content: '¥';\n  font-size: 22rpx;\n  font-weight: 500;\n  margin-right: 2rpx;\n}\n\n.list2 .goods-info .buy-info {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding-right: 60rpx;\n}\n\n.list2 .goods-info .buy-info .num {\n  font-size: 20rpx;\n  color: #999999;\n  background: #F5F5F5;\n  padding: 4rpx 10rpx;\n  border-radius: 4rpx;\n}\n\n.list2 .goods-info .buy-info .car {\n  width: 52rpx;\n  height: 52rpx;\n  position: absolute;\n  right: 16rpx;\n  bottom: 16rpx;\n  background: linear-gradient(135deg, #FF6B6B 0%, #E4393C 100%);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 4rpx 12rpx rgba(228, 57, 60, 0.3);\n}\n\n/* 购物车图标设置为白色 */\n.list2 .goods-info .buy-info .car .van-icon {\n  color: #FFFFFF !important;\n}\n\n/* 原价样式 */\n.originalPrice {\n  color: #BBBBBB;\n  text-decoration: line-through;\n  margin-left: 12rpx;\n  font-size: 22rpx;\n  font-weight: 400;\n}"
  },
  {
    "path": "pages/goods-details/day.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst dayjs = require(\"dayjs\")\n\nPage({\n  data: {\n    list: undefined,\n    maxDate: dayjs().add(7, 'day').valueOf(),\n  },\n  onLoad(options) {\n    this.setData({\n      goodsId: options.goodsId\n    })\n    this.goodsPriceDaily()\n  },\n  onShow() {\n\n  },\n  async goodsPriceDaily() {\n    // https://www.yuque.com/apifm/nu0f75/zg7uw6\n    const res = await WXAPI.goodsPriceDaily(this.data.goodsId)\n    if (res.code != 0) {\n      wx.showModal({\n        content: res.msg\n      })\n      return\n    }\n    const list = res.data.filter(ele => ele.stores > 0)\n    this.setData({\n      list\n    })\n  },\n  async onSelect(event) {\n    event.detail.forEach(ele => {\n      const day = dayjs(ele).format('YYYY-MM-DD')\n      const item = this.data.list.find(a => a.day == day)\n      if (!item) {\n        wx.showModal({\n          content: day + '预约已满，请更换日期'\n        })\n      }\n    })\n  },\n  async onConfirm(event) {\n    const days = []\n    event.detail.forEach(ele => {\n      days.push(dayjs(ele).format('YYYY-MM-DD'))\n    })\n    const goodsJsonStr = [{\n      goodsId: this.data.goodsId,\n      number: days.length,\n      days\n    }]\n    const d = {\n      token: wx.getStorageSync('token'),\n      goodsJsonStr: JSON.stringify(goodsJsonStr),\n    }\n    // https://www.yuque.com/apifm/nu0f75/qx4w98\n    const res = await WXAPI.orderCreate(d)\n    if (res.code != 0) {\n      wx.showModal({\n        content: res.msg\n      })\n      return\n    }\n    this.setData({\n      orderId: res.data.id,\n      money: res.data.amountReal,\n      paymentShow: true,\n      nextAction: {\n        type: 0,\n        id: res.data.id\n      }\n    })\n  },\n  paymentOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      paymentShow: false\n    })\n    wx.redirectTo({\n      url: '/pages/order-details/index?id=' + this.data.orderId,\n    })\n  },\n  paymentCancel() {\n    this.setData({\n      paymentShow: false\n    })\n  },\n})"
  },
  {
    "path": "pages/goods-details/day.json",
    "content": "{\n  \"navigationBarTitleText\": \"按天定价演示\"\n}"
  },
  {
    "path": "pages/goods-details/day.wxml",
    "content": "<van-empty wx:if=\"{{ !list || list.length == 0 }}\" description=\"暂无可预定日期\" />\n<van-calendar wx:else type=\"multiple\" poppable=\"{{ false }}\" max-date=\"{{ maxDate }}\" formatter=\"{{ formatter }}\" bind:select=\"onSelect\" bind:confirm=\"onConfirm\" />\n\n<payment\n  money=\"{{ money }}\"\n  remark=\"支付订单 ：{{ orderId }}\"\n  nextAction=\"{{ nextAction }}\"\n  show=\"{{ paymentShow }}\"\n  bind:cancel=\"paymentCancel\"\n  bind:ok=\"paymentOk\"\n/>"
  },
  {
    "path": "pages/goods-details/day.wxss",
    "content": "/* pages/goods-details/day.wxss */"
  },
  {
    "path": "pages/goods-details/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst TOOLS = require('../../utils/tools.js')\nconst AUTH = require('../../utils/auth')\nconst CONFIG = require('../../config.js')\nimport Poster from 'wxa-plugin-canvas/poster/poster'\n\nPage({\n  data: {\n    createTabs: false, //绘制tabs\n    goodsDetail: {},\n    hasMoreSelect: false,\n    selectSizePrice: 0,\n    selectSizeOPrice: 0,\n    totalScoreToPay: 0,\n    shopNum: 0,\n    hideShopPopup: true,\n    buyNumber: 0,\n    buyNumMin: 1,\n    buyNumMax: 0,\n    propertyChildIds: \"\",\n    propertyChildNames: \"\",\n    canSubmit: false, //  选中规格尺寸时候是否允许加入购物车\n    shopType: \"addShopCar\", //购物类型，加入购物车或立即购买，默认为加入购物车\n  },\n  bindscroll(e) {\n    if (this.data.tabclicked) {\n      return\n    }\n    //计算页面 轮播图、详情、评价(砍价)view 高度\n    this.getTopHeightFunction()\n    var tabsHeight = this.data.tabsHeight //顶部距离（tabs高度）\n    if (this.data.tabs[0].topHeight-tabsHeight<=0 && 0 < this.data.tabs[1].topHeight-tabsHeight) { //临界值，根据自己的需求来调整\n      this.setData({\n        active: this.data.tabs[0].tabs_name //设置当前标签栏\n      })\n    } else if (this.data.tabs.length == 2) {\n      this.setData({\n        active: this.data.tabs[1].tabs_name\n      })\n    } else if (this.data.tabs[1].topHeight-tabsHeight<=0 && 0 < this.data.tabs[2].topHeight-tabsHeight) {\n      this.setData({\n        active: this.data.tabs[1].tabs_name\n      })\n    } else if (this.data.tabs[2].topHeight-tabsHeight<=0) {\n      this.setData({\n        active: this.data.tabs[2].tabs_name\n      })\n    }\n  },\n  onLoad(e) {\n    // e.id = 122843\n    // 读取分享链接中的邀请人编号\n    if (e && e.inviter_id) {\n      wx.setStorageSync('referrer', e.inviter_id)\n    }\n    // 读取小程序码中的邀请人编号\n    if (e && e.scene) {\n      const scene = decodeURIComponent(e.scene) // 处理扫码进商品详情页面的逻辑\n      if (scene && scene.split(',').length >= 2) {\n        e.id = scene.split(',')[0]\n        wx.setStorageSync('referrer', scene.split(',')[1])\n      }\n    }\n    this.data.goodsId = e.id\n    this.data.kjJoinUid = e.kjJoinUid\n    let goodsDetailSkuShowType = wx.getStorageSync('goodsDetailSkuShowType')\n    if (!goodsDetailSkuShowType) {\n      goodsDetailSkuShowType = 0\n    }\n    // 补偿写法\n    getApp().configLoadOK = () => {\n      this.readConfigVal()\n    }\n    this.setData({\n      goodsDetailSkuShowType,\n      curuid: wx.getStorageSync('uid'),\n      customerServiceType: CONFIG.customerServiceType\n    })\n    this.readConfigVal()\n    this.getGoodsDetailAndKanjieInfo(this.data.goodsId)\n    this.shippingCartInfo()\n    this.goodsAddition()\n    // 弹出编辑昵称头像框\n    getApp().initNickAvatarUrlPOP(this)\n  },\n  readConfigVal() {\n    // 读取系统参数\n    const hide_reputation = wx.getStorageSync('hide_reputation')\n    let tabs = [{\n      tabs_name: '商品简介',\n      view_id: 'swiper-container',\n      topHeight: 0\n    }, {\n      tabs_name: '商品详情',\n      view_id: 'goods-des-info',\n      topHeight: 0,\n    }, {\n      tabs_name: '商品评价',\n      view_id: 'reputation',\n      topHeight: 0,\n    }]\n    if (hide_reputation == '1') {\n      // 隐藏评价\n      tabs = [{\n        tabs_name: '商品简介',\n        view_id: 'swiper-container',\n        topHeight: 0\n      }, {\n        tabs_name: '商品详情',\n        view_id: 'goods-des-info',\n        topHeight: 0,\n      }]\n    } else {\n      // 读取评价\n      if (!this.data.reputation) { // 保证只读取一次\n        this.reputation(this.data.goodsId)\n      }\n    }\n    this.setData({\n      hide_reputation,\n      tabs\n    })\n  },\n  async goodsAddition() {\n    const res = await WXAPI.goodsAddition(this.data.goodsId)\n    if (res.code == 0) {\n      this.setData({\n        goodsAddition: res.data,\n        hasMoreSelect: true,\n      })\n    }\n  },\n  async shippingCartInfo() {\n    const number = await TOOLS.showTabBarBadge(true)\n    this.setData({\n      shopNum: number\n    })\n  },\n  onShow() {\n    this.setData({\n      createTabs: true //绘制tabs\n    })\n    //计算tabs高度\n    var query = wx.createSelectorQuery();\n    query.select('#tabs').boundingClientRect((rect) => {\n      var tabsHeight = rect.height\n      this.setData({\n        tabsHeight:tabsHeight\n      })\n    }).exec()\n\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.goodsFavCheck()\n      }\n    })\n  },\n  getTopHeightFunction() {\n    var that = this\n    var tabs = that.data.tabs\n    tabs.forEach((element, index) => {\n      var viewId = \"#\" + element.view_id\n      that.getTopHeight(viewId, index)\n    });\n  },\n  getTopHeight(viewId, index) {\n    var query = wx.createSelectorQuery();\n    query.select(viewId).boundingClientRect((rect) => {\n      if (!rect) {\n        return\n      }\n      let top = rect.top\n      var tabs = this.data.tabs\n      tabs[index].topHeight = top\n      this.setData({\n        tabs: tabs\n      })\n    }).exec()\n  },\n  async goodsFavCheck() {\n    const res = await WXAPI.goodsFavCheck(wx.getStorageSync('token'), this.data.goodsId)\n    if (res.code == 0) {\n      this.setData({\n        faved: true\n      })\n    } else {\n      this.setData({\n        faved: false\n      })\n    }\n  },\n  async addFav() {\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        if (this.data.faved) {\n          // 取消收藏\n          WXAPI.goodsFavDelete(wx.getStorageSync('token'), '', this.data.goodsId).then(res => {\n            this.goodsFavCheck()\n          })\n        } else {\n          // 加入收藏\n          WXAPI.goodsFavPut(wx.getStorageSync('token'), this.data.goodsId).then(res => {\n            this.goodsFavCheck()\n          })\n        }\n      } else {\n        wx.navigateTo({\n          url: '/pages/login/index',\n        })\n      }\n    })\n  },\n  async getGoodsDetailAndKanjieInfo(goodsId) {\n    const token = wx.getStorageSync('token')\n    const that = this;\n    const goodsDetailRes = await WXAPI.goodsDetail(goodsId, token ? token : '')\n    const goodsKanjiaSetRes = await WXAPI.kanjiaSet(goodsId)\n    if (goodsDetailRes.code == 0) {\n      if (!goodsDetailRes.data.pics || goodsDetailRes.data.pics.length == 0) {\n        goodsDetailRes.data.pics = [{\n          pic: goodsDetailRes.data.basicInfo.pic\n        }]\n      }\n      const _data = {\n        goodsDetail: goodsDetailRes.data,\n        selectSizePrice: goodsDetailRes.data.basicInfo.minPrice,\n        selectSizeOPrice: goodsDetailRes.data.basicInfo.originalPrice,\n        totalScoreToPay: goodsDetailRes.data.basicInfo.minScore,\n        buyNumMax: goodsDetailRes.data.basicInfo.stores,\n        buyNumber: (goodsDetailRes.data.basicInfo.stores > 0) ? 1 : 0\n      }\n      if (goodsDetailRes.data.properties) {\n        _data.hasMoreSelect = true\n      }\n      if (goodsDetailRes.data.basicInfo.shopId) {\n        this.shopSubdetail(goodsDetailRes.data.basicInfo.shopId)\n      }\n      if (goodsDetailRes.data.basicInfo.pingtuan) {\n        that.pingtuanList(goodsId)\n      }\n      that.data.goodsDetail = goodsDetailRes.data;\n      if (goodsDetailRes.data.basicInfo.videoId) {\n        that.getVideoSrc(goodsDetailRes.data.basicInfo.videoId);\n      }\n      \n      if (goodsKanjiaSetRes.code == 0) {\n        _data.curGoodsKanjia = goodsKanjiaSetRes.data[0]\n        that.data.kjId = _data.curGoodsKanjia.id\n        // 获取当前砍价进度\n        if (!that.data.kjJoinUid) {\n          that.data.kjJoinUid = wx.getStorageSync('uid')\n        }\n        const curKanjiaprogress = await WXAPI.kanjiaDetail(_data.curGoodsKanjia.id, that.data.kjJoinUid)\n        const myHelpDetail = await WXAPI.kanjiaHelpDetail(wx.getStorageSync('token'), _data.curGoodsKanjia.id, that.data.kjJoinUid)\n        if (curKanjiaprogress.code == 0) {\n          _data.curKanjiaprogress = curKanjiaprogress.data\n        }\n        if (myHelpDetail.code == 0) {\n          _data.myHelpDetail = myHelpDetail.data\n        }\n        //砍价商品 tabs栏显示砍价情况\n        // var tabs = that.data.tabs\n        // tabs[2].tabs_name=\"砍价记录\"\n        // tabs[2].view_id=\"kanjia\"\n        // that.setData({\n        //   tabs:tabs\n        // })\n      }\n      if (goodsDetailRes.data.basicInfo.pingtuan) {\n        const pingtuanSetRes = await WXAPI.pingtuanSet(goodsId)\n        if (pingtuanSetRes.code == 0) {\n          _data.pingtuanSet = pingtuanSetRes.data\n          // 如果是拼团商品， 默认显示拼团价格\n          _data.selectSizePrice = goodsDetailRes.data.basicInfo.pingtuanPrice\n        }\n      }\n      that.setData(_data)\n    }\n  },\n  async shopSubdetail(shopId) {\n    const res = await WXAPI.shopSubdetail(shopId)\n    if (res.code == 0) {\n      this.setData({\n        shopSubdetail: res.data\n      })\n    }\n  },\n  goShopCar: function () {\n    wx.reLaunch({\n      url: \"/pages/shop-cart/index\"\n    });\n  },\n  toAddShopCar: function () {\n    this.setData({\n      shopType: \"addShopCar\"\n    })\n    this.bindGuiGeTap();\n  },\n  tobuy: function () {\n    this.setData({\n      shopType: \"tobuy\"\n    });\n    this.bindGuiGeTap();\n  },\n  toPingtuan: function (e) {\n    let pingtuanopenid = 0\n    if (e.currentTarget.dataset.pingtuanopenid) {\n      pingtuanopenid = e.currentTarget.dataset.pingtuanopenid\n    }\n    this.setData({\n      shopType: \"toPingtuan\",\n      selectSizePrice: this.data.goodsDetail.basicInfo.pingtuanPrice,\n      selectSizeOPrice: this.data.goodsDetail.basicInfo.originalPrice,\n      pingtuanopenid: pingtuanopenid,\n\n      hideShopPopup: false,\n      skuGoodsPic: this.data.goodsDetail.basicInfo.pic\n    });\n\n  },\n  /**\n   * 规格选择弹出框\n   */\n  bindGuiGeTap: function () {\n    this.setData({\n      hideShopPopup: false,\n      selectSizePrice: this.data.goodsDetail.basicInfo.minPrice,\n      selectSizeOPrice: this.data.goodsDetail.basicInfo.originalPrice,\n      skuGoodsPic: this.data.goodsDetail.basicInfo.pic\n    })\n  },\n  /**\n   * 规格选择弹出框隐藏\n   */\n  closePopupTap: function () {\n    this.setData({\n      hideShopPopup: true\n    })\n  },\n  stepChange(event) {\n    this.setData({\n      buyNumber: event.detail\n    })\n  },\n  // 判断当前商品是否支持某个sku的属性\n  checkHasSkuItems(sk) {    \n    this.data.goodsDetail.skuList.filter(ele => {\n      const a = this.data.goodsDetail.properties.filter(ele => {\n        return ele.optionValueId\n      })\n      console.log(a);\n      for (let index = 0; index < array.length; index++) {\n        const element = array[index];\n        \n      }\n    })\n  },\n  /**\n   * 选择商品规格\n   */\n  async labelItemTap(e) {\n    const propertyindex = e.currentTarget.dataset.propertyindex\n    const propertychildindex = e.currentTarget.dataset.propertychildindex\n\n    const property = this.data.goodsDetail.properties[propertyindex]\n    const child = property.childsCurGoods[propertychildindex]\n    const _childActive = child.active\n    // 当前位置往下的所有sku取消选中状态\n    for (let index = propertyindex; index < this.data.goodsDetail.properties.length; index++) {\n      const element = this.data.goodsDetail.properties[index]\n      element.optionValueId = null\n      element.childsCurGoods.forEach(child => {\n        child.active = false\n      })\n    }\n    // // 取消该分类下的子栏目所有的选中状态\n    // property.childsCurGoods.forEach(child => {\n    //   child.active = false\n    // })\n    // 设置当前选中状态，或者取消选中\n    property.optionValueId = child.id\n    child.active = true\n    // 下面代码块，支持点击后取消选中\n    // if (!_childActive) {\n    //   property.optionValueId = child.id\n    //   child.active = true\n    // } else {\n    //   property.optionValueId = null\n    //   child.active = false\n    // }\n    \n    \n    // 获取所有的选中规格尺寸数据\n    const needSelectNum = this.data.goodsDetail.properties.length\n    let curSelectNum = 0;\n    let propertyChildIds = \"\";\n    let propertyChildNames = \"\";\n    let _skuList = this.data.goodsDetail.skuList\n\n    this.data.goodsDetail.properties.forEach(p => {\n      p.childsCurGoods.forEach(c => {\n        // 处理当前选中的sku信息\n        if (c.active) {\n          _skuList = _skuList.filter(aaa => {\n            return aaa.propertyChildIds.indexOf(p.id + ':' + c.id) != -1\n          })\n          curSelectNum++;\n          propertyChildIds = propertyChildIds + p.id + \":\" + c.id + \",\";\n          propertyChildNames = propertyChildNames + p.name + \":\" + c.name + \"  \";\n        } else if(!p.optionValueId) {\n          const nextO = _skuList.find(aaa => {\n            return aaa.propertyChildIds.indexOf(p.id + ':' + c.id) != -1\n          })\n          c.hidden = nextO ? false : true\n        }\n      })\n    })\n    let canSubmit = false;\n    if (needSelectNum == curSelectNum) {\n      canSubmit = true;\n    }\n    let skuGoodsPic = this.data.skuGoodsPic\n    if (this.data.goodsDetail.subPics && this.data.goodsDetail.subPics.length > 0) {\n      const _subPic = this.data.goodsDetail.subPics.find(ele => {\n        return ele.optionValueId == child.id\n      })\n      if (_subPic) {\n        skuGoodsPic = _subPic.pic\n      }\n    }\n    this.setData({\n      goodsDetail: this.data.goodsDetail,\n      canSubmit,\n      skuGoodsPic,\n      propertyChildIds,\n      propertyChildNames,\n    })\n    this.calculateGoodsPrice()\n  },\n  async calculateGoodsPrice() {\n    // 计算最终的商品价格\n    let price = this.data.goodsDetail.basicInfo.minPrice\n    let originalPrice = this.data.goodsDetail.basicInfo.originalPrice\n    let totalScoreToPay = this.data.goodsDetail.basicInfo.minScore\n    let buyNumMax = this.data.goodsDetail.basicInfo.stores\n    let buyNumber = this.data.goodsDetail.basicInfo.minBuyNumber\n    if (this.data.shopType == 'toPingtuan') {\n      price = this.data.goodsDetail.basicInfo.pingtuanPrice\n    }\n    // 计算 sku 价格\n    if (this.data.canSubmit) {\n      const token = wx.getStorageSync('token')\n      const res = await WXAPI.goodsPriceV2({\n        token: token ? token : '',\n        goodsId: this.data.goodsDetail.basicInfo.id,\n        propertyChildIds: this.data.propertyChildIds\n      })\n      if (res.code == 0) {\n        price = res.data.price\n        if (this.data.shopType == 'toPingtuan') {\n          price = res.data.pingtuanPrice\n        }\n        originalPrice = res.data.originalPrice\n        totalScoreToPay = res.data.score\n        buyNumMax = res.data.stores\n      }\n    }\n    // 计算配件价格\n    if (this.data.goodsAddition) {\n      this.data.goodsAddition.forEach(big => {\n        big.items.forEach(small => {\n          if (small.active) {\n            price = (price * 100 + small.price * 100) / 100\n          }\n        })\n      })\n    }\n    this.setData({\n      selectSizePrice: price,\n      selectSizeOPrice: originalPrice,\n      totalScoreToPay: totalScoreToPay,\n      buyNumMax,\n      buyNumber: (buyNumMax >= buyNumber) ? buyNumber : 0\n    });\n  },\n  /**\n   * 选择可选配件\n   */\n  async labelItemTap2(e) {\n    const propertyindex = e.currentTarget.dataset.propertyindex\n    const propertychildindex = e.currentTarget.dataset.propertychildindex\n\n    const goodsAddition = this.data.goodsAddition\n    const property = goodsAddition[propertyindex]\n    const child = property.items[propertychildindex]\n    if (child.active) {\n      // 该操作为取消选择\n      child.active = false\n      this.setData({\n        goodsAddition\n      })\n      this.calculateGoodsPrice()\n      return\n    }\n    // 单选配件取消所有子栏目选中状态\n    if (property.type == 0) {\n      property.items.forEach(child => {\n        child.active = false\n      })\n    }\n    // 设置当前选中状态\n    child.active = true\n    this.setData({\n      goodsAddition\n    })\n    this.calculateGoodsPrice()\n  },\n  /**\n   * 加入购物车\n   */\n  async addShopCar() {\n    if (this.data.goodsDetail.properties && !this.data.canSubmit) {\n      if (!this.data.canSubmit) {\n        wx.showToast({\n          title: '请选择规格',\n          icon: 'none'\n        })\n      }\n      this.bindGuiGeTap()\n      return\n    }\n    const goodsAddition = []\n    if (this.data.goodsAddition) {\n      let canSubmit = true\n      this.data.goodsAddition.forEach(ele => {\n        if (ele.required) {\n          const a = ele.items.find(item => {\n            return item.active\n          })\n          if (!a) {\n            canSubmit = false\n          }\n        }\n        ele.items.forEach(item => {\n          if (item.active) {\n            goodsAddition.push({\n              id: item.id,\n              pid: item.pid\n            })\n          }\n        })\n      })\n      if (!canSubmit) {\n        wx.showToast({\n          title: '请选择配件',\n          icon: 'none'\n        })\n        this.bindGuiGeTap()\n        return\n      }\n    }\n    if (this.data.buyNumber < 1) {\n      wx.showToast({\n        title: '请选择购买数量',\n        icon: 'none'\n      })\n      return\n    }\n    const isLogined = await AUTH.checkHasLogined()\n    if (!isLogined) {\n      wx.navigateTo({\n        url: '/pages/login/index',\n      })\n      return\n    }\n    const token = wx.getStorageSync('token')\n    const goodsId = this.data.goodsDetail.basicInfo.id\n    const sku = []\n    if (this.data.goodsDetail.properties) {\n      this.data.goodsDetail.properties.forEach(p => {\n        sku.push({\n          optionId: p.id,\n          optionValueId: p.optionValueId\n        })\n      })\n    }\n    const res = await WXAPI.shippingCarInfoAddItem(token, goodsId, this.data.buyNumber, sku, goodsAddition)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n\n    this.closePopupTap();\n    wx.showToast({\n      title: '加入购物车',\n      icon: 'success'\n    })\n    this.shippingCartInfo()\n  },\n  /**\n   * 立即购买\n   */\n  async buyNow(e) {\n    const isLogined = await AUTH.checkHasLogined()\n    if (!isLogined) {\n      wx.navigateTo({\n        url: '/pages/login/index',\n      })\n      return\n    }\n    let that = this\n    let shoptype = e.currentTarget.dataset.shoptype\n    if (this.data.goodsDetail.properties && !this.data.canSubmit) {\n      wx.showToast({\n        title: '请选择规格',\n        icon: 'none'\n      })\n      this.bindGuiGeTap()\n      return;\n    }\n    if (this.data.goodsAddition) {\n      let canSubmit = true\n      this.data.goodsAddition.forEach(ele => {\n        if (ele.required) {\n          const a = ele.items.find(item => {\n            return item.active\n          })\n          if (!a) {\n            canSubmit = false\n          }\n        }\n      })\n      if (!canSubmit) {\n        wx.showToast({\n          title: '请选择配件',\n          icon: 'none'\n        })\n        this.bindGuiGeTap()\n        return\n      }\n    }\n    if (this.data.buyNumber < 1) {\n      wx.showModal({\n        title: '提示',\n        content: '购买数量不能为0！',\n        showCancel: false\n      })\n      return;\n    }\n    //组建立即购买信息\n    var buyNowInfo = this.buliduBuyNowInfo(shoptype);\n    // 写入本地存储\n    wx.setStorage({\n      key: \"buyNowInfo\",\n      data: buyNowInfo\n    })\n    this.closePopupTap();\n    if (shoptype == 'toPingtuan') {\n      if (this.data.pingtuanopenid) {\n        wx.navigateTo({\n          url: \"/pages/to-pay-order/index?orderType=buyNow&pingtuanOpenId=\" + this.data.pingtuanopenid\n        })\n      } else {\n        WXAPI.pingtuanOpen(wx.getStorageSync('token'), that.data.goodsDetail.basicInfo.id).then(function (res) {\n          if (res.code == 2000) {\n            return\n          }\n          if (res.code != 0) {\n            wx.showToast({\n              title: res.msg,\n              icon: 'none',\n              duration: 2000\n            })\n            return\n          }\n          wx.navigateTo({\n            url: \"/pages/to-pay-order/index?orderType=buyNow&pingtuanOpenId=\" + res.data.id\n          })\n        })\n      }\n    } else {\n      wx.navigateTo({\n        url: \"/pages/to-pay-order/index?orderType=buyNow\"\n      })\n    }\n\n  },\n  /**\n   * 组建立即购买信息\n   */\n  buliduBuyNowInfo: function (shoptype) {\n    var shopCarMap = {};\n    shopCarMap.goodsId = this.data.goodsDetail.basicInfo.id;\n    shopCarMap.shopId = this.data.goodsDetail.basicInfo.shopId;\n    shopCarMap.pic = this.data.goodsDetail.basicInfo.pic;\n    shopCarMap.name = this.data.goodsDetail.basicInfo.name;\n    // shopCarMap.label=this.data.goodsDetail.basicInfo.id; 规格尺寸 \n    shopCarMap.propertyChildIds = this.data.propertyChildIds;\n    shopCarMap.label = this.data.propertyChildNames;\n    shopCarMap.price = this.data.selectSizePrice;\n    // if (shoptype == 'toPingtuan') { // 20190714 拼团价格注释掉\n    //   shopCarMap.price = this.data.goodsDetail.basicInfo.pingtuanPrice;\n    // }\n    shopCarMap.score = this.data.totalScoreToPay;\n    shopCarMap.left = \"\";\n    shopCarMap.active = true;\n    shopCarMap.number = this.data.buyNumber;\n    shopCarMap.logisticsType = this.data.goodsDetail.basicInfo.logisticsId;\n    shopCarMap.logistics = this.data.goodsDetail.logistics;\n    shopCarMap.weight = this.data.goodsDetail.basicInfo.weight;\n\n    if (this.data.goodsAddition && this.data.goodsAddition.length > 0) {\n      const additions = []\n      this.data.goodsAddition.forEach(ele => {\n        ele.items.forEach(item => {\n          if (item.active) {\n            additions.push({\n              id: item.id,\n              name: item.name,\n              pid: ele.id,\n              pname: ele.name\n            })\n          }\n        })\n      })\n      if (additions.length > 0) {\n        shopCarMap.additions = additions\n      }\n    }\n\n    var buyNowInfo = {};\n    buyNowInfo.shopNum = 0;\n    buyNowInfo.shopList = [];\n\n    buyNowInfo.shopList.push(shopCarMap);\n    buyNowInfo.kjId = this.data.kjId;\n    if (this.data.shopSubdetail) {\n      buyNowInfo.shopInfo = this.data.shopSubdetail.info\n    } else {\n      buyNowInfo.shopInfo = {\n        id: 0,\n        name: \"其他\",\n        pic: null,\n        serviceDistance: 99999999,\n      }\n    }\n\n    return buyNowInfo;\n  },\n  onShareAppMessage() {\n    let _data = {\n      title: this.data.goodsDetail.basicInfo.name,\n      path: '/pages/goods-details/index?id=' + this.data.goodsDetail.basicInfo.id + '&inviter_id=' + wx.getStorageSync('uid'),\n      success: function (res) {\n        // 转发成功\n      },\n      fail: function (res) {\n        // 转发失败\n      }\n    }\n    if (this.data.kjJoinUid) {\n      _data.title = this.data.curKanjiaprogress.joiner.nick + '邀请您帮TA砍价'\n      _data.path += '&kjJoinUid=' + this.data.kjJoinUid\n    }\n    return _data\n  },\n  onShareTimeline() {\n    let title = this.data.goodsDetail.basicInfo.name\n    let query = 'id=' + this.data.goodsDetail.basicInfo.id + '&inviter_id=' + wx.getStorageSync('uid')\n    if (this.data.kjJoinUid) {\n      title = this.data.curKanjiaprogress.joiner.nick + '邀请您帮TA砍价'\n      query += '&kjJoinUid=' + this.data.kjJoinUid\n    }\n    return {\n      title,\n      query,\n      imageUrl: this.data.goodsDetail.basicInfo.pic\n    }\n  },\n  reputation: function (goodsId) {\n    var that = this;\n    WXAPI.goodsReputationV2({\n      goodsId: goodsId\n    }).then(function (res) {\n      if (res.code == 0) {\n        res.data.result.forEach(ele => {\n          if (ele.goods.goodReputation == 0) {\n            ele.goods.goodReputation = 1\n          } else if (ele.goods.goodReputation == 1) {\n            ele.goods.goodReputation = 3\n          } else if (ele.goods.goodReputation == 2) {\n            ele.goods.goodReputation = 5\n          }\n        })\n        that.setData({\n          reputation: res.data\n        });\n      } else {\n        if (that.data.tabs && that.data.tabs.length == 3) {\n          const tabs = that.data.tabs\n          tabs.splice(2, 1)\n          that.setData({\n            tabs\n          })\n        }\n      }\n    })\n  },\n  pingtuanList: function (goodsId) {\n    var that = this;\n    WXAPI.pingtuanList({\n      goodsId: goodsId,\n      status: 0\n    }).then(function (res) {\n      if (res.code == 0) {\n        that.setData({\n          pingtuanList: res.data.result\n        });\n      }\n    })\n  },\n  getVideoSrc: function (videoId) {\n    var that = this;\n    WXAPI.videoDetail(videoId).then(function (res) {\n      if (res.code == 0) {\n        that.setData({\n          videoMp4Src: res.data.fdMp4\n        });\n      }\n    })\n  },\n  joinKanjia() {\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.doneJoinKanjia();\n      }\n    })\n  },\n  doneJoinKanjia: function () { // 报名参加砍价活动\n    const _this = this;\n    if (!_this.data.curGoodsKanjia) {\n      return;\n    }\n    wx.showLoading({\n      title: '加载中',\n      mask: true\n    })\n    WXAPI.kanjiaJoin(wx.getStorageSync('token'), _this.data.curGoodsKanjia.id).then(function (res) {\n      wx.hideLoading()\n      if (res.code == 0) {\n        _this.setData({\n          kjJoinUid: wx.getStorageSync('uid'),\n          myHelpDetail: null\n        })\n        _this.getGoodsDetailAndKanjieInfo(_this.data.goodsDetail.basicInfo.id)\n      } else {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n      }\n    })\n  },\n  joinPingtuan: function (e) {\n    let pingtuanopenid = e.currentTarget.dataset.pingtuanopenid\n    wx.navigateTo({\n      url: \"/pages/to-pay-order/index?orderType=buyNow&pingtuanOpenId=\" + pingtuanopenid\n    })\n  },\n  goIndex() {\n    wx.switchTab({\n      url: '/pages/index/index',\n    });\n  },\n  helpKanjia() {\n    const _this = this;\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        _this.helpKanjiaDone()\n      }\n    })\n  },\n  helpKanjiaDone() {\n    const _this = this;\n    WXAPI.kanjiaHelp(wx.getStorageSync('token'), _this.data.kjId, _this.data.kjJoinUid, '').then(function (res) {\n      if (res.code != 0) {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n        return;\n      }\n      _this.setData({\n        myHelpDetail: res.data\n      });\n      wx.showModal({\n        title: '成功',\n        content: '成功帮TA砍掉 ' + res.data.cutPrice + ' 元',\n        showCancel: false\n      })\n      _this.getGoodsDetailAndKanjieInfo(_this.data.goodsDetail.basicInfo.id)\n    })\n  },\n  closePop() {\n    this.setData({\n      posterShow: false\n    })\n  },\n  async drawSharePic() {\n    const _this = this\n    // https://www.yuque.com/apifm/nu0f75/ak40es\n    const accountInfo = wx.getAccountInfoSync()\n    const envVersion = accountInfo.miniProgram.envVersion\n    const qrcodeRes = await WXAPI.wxaQrcode({\n      scene: _this.data.goodsDetail.basicInfo.id + ',' + wx.getStorageSync('uid'),\n      page: 'pages/goods-details/index',\n      is_hyaline: true,\n      autoColor: true,\n      expireHours: 1,\n      env_version: envVersion,\n      check_path: envVersion == 'release' ? true : false,\n    })\n    if (qrcodeRes.code != 0) {\n      wx.showToast({\n        title: qrcodeRes.msg,\n        icon: 'none'\n      })\n      return\n    }\n    const qrcode = qrcodeRes.data\n    const pic = _this.data.goodsDetail.basicInfo.pic\n    wx.getImageInfo({\n      src: pic,\n      success(res) {\n        const height = 490 * res.height / res.width\n        _this.drawSharePicDone(height, qrcode)\n      },\n      fail(e) {\n        console.error(e)\n      }\n    })\n  },\n  drawSharePicDone(picHeight, qrcode) {\n    const _this = this\n    const _baseHeight = 74 + (picHeight + 120)\n    this.setData({\n      posterConfig: {\n        width: 750,\n        height: picHeight + 660,\n        backgroundColor: '#fff',\n        debug: false,\n        blocks: [{\n          x: 76,\n          y: 74,\n          width: 604,\n          height: picHeight + 120,\n          borderWidth: 2,\n          borderColor: '#c2aa85',\n          borderRadius: 8\n        }],\n        images: [{\n            x: 133,\n            y: 133,\n            url: _this.data.goodsDetail.basicInfo.pic, // 商品图片\n            width: 490,\n            height: picHeight\n          },\n          {\n            x: 76,\n            y: _baseHeight + 199,\n            url: qrcode, // 二维码\n            width: 222,\n            height: 222\n          }\n        ],\n        texts: [{\n            x: 375,\n            y: _baseHeight + 80,\n            width: 650,\n            lineNum: 2,\n            text: _this.data.goodsDetail.basicInfo.name,\n            textAlign: 'center',\n            fontSize: 40,\n            color: '#333'\n          },\n          {\n            x: 375,\n            y: _baseHeight + 180,\n            text: '￥' + _this.data.goodsDetail.basicInfo.minPrice,\n            textAlign: 'center',\n            fontSize: 50,\n            color: '#e64340'\n          },\n          {\n            x: 352,\n            y: _baseHeight + 320,\n            text: '长按识别小程序码',\n            fontSize: 28,\n            color: '#999'\n          }\n        ],\n      }\n    }, () => {\n      Poster.create();\n    });\n  },\n  onPosterSuccess(e) {\n    console.log('success:', e)\n    this.setData({\n      posterImg: e.detail,\n      showposterImg: true\n    })\n  },\n  onPosterFail(e) {\n    console.error('fail:', e)\n  },\n  savePosterPic() {\n    const _this = this\n    wx.saveImageToPhotosAlbum({\n      filePath: this.data.posterImg,\n      success: (res) => {\n        wx.showModal({\n          content: '已保存到手机相册',\n          showCancel: false,\n          confirmText: '知道了',\n          confirmColor: '#333'\n        })\n      },\n      complete: () => {\n        _this.setData({\n          showposterImg: false\n        })\n      },\n      fail: (res) => {\n        if (res.errMsg.indexOf('fail privacy permission is not authorized') != -1) {\n          wx.showModal({\n            content: '请阅读并同意隐私条款以后才能继续本操作',\n            confirmText: '阅读协议',\n            cancelText: '取消',\n            success (res) {\n              if (res.confirm) {\n                wx.requirePrivacyAuthorize() // 弹出用户隐私授权框\n              }\n            }\n          })\n        } else if (res.errMsg.indexOf('fail auth deny') != -1) {\n          wx.showModal({\n            content: '本次操作需要您同意并将图片写入手机相册',\n            confirmText: '立即授权',\n            cancelText: '取消',\n            success (res) {\n              if (res.confirm) {\n                // 弹出设置窗口，让用户去设置\n                wx.openSetting({\n                  withSubscriptions: true,\n                  fail: aaa => console.log(aaa)\n                });\n              }\n            }\n          })\n        } else if (res.errMsg.indexOf('fail cancel') != -1) {\n          wx.showToast({\n            title: '已取消',\n            icon: 'none'\n          })\n        } else {\n          console.error(res);\n          wx.showToast({\n            title: res.errMsg,\n            icon: 'none'\n          })\n        }\n      }\n    })\n  },\n  previewImage(e) {\n    const url = e.currentTarget.dataset.url\n    wx.previewImage({\n      current: url, // 当前显示图片的http链接\n      urls: [url] // 需要预览的图片http链接列表\n    })\n  },\n  previewImage2(e) {\n    const url = e.currentTarget.dataset.url\n    const urls = []\n    this.data.goodsDetail.pics.forEach(ele => {\n      urls.push(ele.pic)\n    })\n    wx.previewImage({\n      current: url, // 当前显示图片的http链接\n      urls // 需要预览的图片http链接列表\n    })\n  },\n  onTabsChange(e) {\n    var index = e.detail.index\n    this.setData({\n      toView: this.data.tabs[index].view_id,\n      tabclicked: true\n    })\n    setTimeout(() => {\n      this.setData({\n        tabclicked: false\n      })\n    }, 1000);\n  },\n  backToHome() {\n    wx.switchTab({\n      url: '/pages/index/index',\n    })\n  },\n  customerService() {\n    wx.openCustomerServiceChat({\n      extInfo: {url: wx.getStorageSync('customerServiceChatUrl')},\n      corpId: wx.getStorageSync('customerServiceChatCorpId'),\n      showMessageCard: true,\n      sendMessageTitle: this.data.goodsDetail.basicInfo.name,\n      sendMessagePath: '/pages/goods-details/index?id=' + this.data.goodsDetail.basicInfo.id,\n      sendMessageImg: this.data.goodsDetail.basicInfo.pic,\n      success: res => {},\n      fail: err => {\n        console.error(err)\n      }\n    })\n  },\n})\n\n"
  },
  {
    "path": "pages/goods-details/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"商品详情\",\n  \"usingComponents\": {\n    \"poster\": \"wxa-plugin-canvas/poster\"\n  }\n}"
  },
  {
    "path": "pages/goods-details/index.wxml",
    "content": "<view class=\"container\">\n  <van-sticky wx:if=\"{{createTabs}}\">\n    <view id=\"tabs\" class=\"tabs-container\">\n      <van-tabs sticky bind:click=\"onTabsChange\" custom-class=\"\" active=\"{{ active }}\">\n        <van-tab wx:for=\"{{tabs}}\" title=\"{{item.tabs_name}}\" name=\"{{item.tabs_name}}\"/>\n      </van-tabs>\n    </view>\n  </van-sticky>\n  <scroll-view class=\"scroll-container\" scroll-into-view=\"{{toView}}\" scroll-y=\"true\" scroll-with-animation=\"true\" bindscroll=\"bindscroll\">\n    <view class=\"swiper-container\" id=\"swiper-container\">\n      <swiper class=\"swiper_box\" indicator-dots=\"true\" indicator-active-color=\"#fff\"\n        autoplay=\"{{!goodsDetail.basicInfo.videoId}}\" circular>\n        <swiper-item wx:if=\"{{goodsDetail.basicInfo.videoId}}\">\n          <video src=\"{{videoMp4Src}}\" autoplay=\"true\" loop=\"true\" style='width:100%;height:100%;'></video>\n        </swiper-item>\n        <swiper-item wx:for=\"{{goodsDetail.pics}}\" wx:key=\"id\">\n          <image src=\"{{item.pic}}\" class=\"slide-image\" mode=\"aspectFill\" lazy-load=\"true\" bindtap=\"previewImage2\" data-url=\"{{ item.pic }}\" />\n        </swiper-item>\n      </swiper>\n    </view>\n    <view class=\"goods-info\">\n      <view class=\"goods-info-top-container\">\n        <view class=\"goods-profile\">\n          <view class=\"p\"><text>¥</text> {{selectSizePrice}}</view>\n          <view wx:if=\"{{goodsDetail.basicInfo.originalPrice && goodsDetail.basicInfo.originalPrice > 0}}\"\n            class=\"goods-price\" style='color:#aaa;text-decoration:line-through;padding: 15rpx 0rpx 0rpx 15rpx;'>\n            <text>¥</text> {{selectSizeOPrice}}</view>\n        </view>\n        <view class=\"goods-info-fx\">\n          <view class='item left'>\n            <van-icon name=\"share-o\" size=\"24px\" />\n            <view class=\"icon-title\">分享</view>\n            <button open-type='share'></button>\n          </view>\n          <view class='item' bindtap=\"drawSharePic\">\n            <van-icon name=\"qr\" size=\"24px\"/>\n            <view class=\"icon-title\">二维码</view>            \n          </view>\n        </view>\n      </view>\n      <view class=\"goods-title\">{{goodsDetail.basicInfo.name}}</view>\n      <view wx:if=\"{{ goodsDetail.basicInfo.purchaseNotes }}\" class=\"goods-des-info\">\n        <view class=\"label-title\"> \n          <view class=\"left\">购买须知</view>\n        </view>\n        <view class=\"characteristic\"><text>{{ goodsDetail.basicInfo.purchaseNotes }}</text></view>\n      </view>\n      <view wx:if=\"{{ goodsDetail.basicInfo.characteristic }}\" class=\"goods-des-info\">\n        <view class=\"label-title\"> \n          <view class=\"left\">商品特色</view>\n        </view>\n        <view class=\"characteristic\"><text>{{ goodsDetail.basicInfo.characteristic }}</text></view>\n      </view>\n      <!-- 商品附加费用展示 -->\n      <van-cell-group wx:if=\"{{ goodsDetail.goodsAdditionalPriceItems }}\" title=\"其他费用\">\n        <van-cell\n          wx:for=\"{{ goodsDetail.goodsAdditionalPriceItems }}\" wx:key=\"id\"\n          title=\"{{ item.name }}\"\n          value=\"{{ item.type == 0 ? ('￥' + item.price) : (item.price + '%') }}\"\n        />\n      </van-cell-group>\n      <view class=\"goods-share\" wx:if=\"{{goodsDetail.basicInfo.commissionType == 1}}\">分享有赏，好友下单后可得\n        {{goodsDetail.basicInfo.commission}} 积分奖励</view>\n      <view class=\"goods-share\" wx:if=\"{{goodsDetail.basicInfo.commissionType == 2}}\">分享有赏，好友下单后可得\n        {{goodsDetail.basicInfo.commission}}元 现金奖励</view>     \n    </view>\n\n    <van-cell-group wx:if=\"{{curGoodsKanjia}}\" title=\"商品砍价设置\">\n      <van-cell title=\"限量\" value=\"{{curGoodsKanjia.number}}份\" />\n      <van-cell title=\"已售\" value=\"{{curGoodsKanjia.numberBuy}}份\" />\n      <van-cell title=\"原价\" value=\"￥{{curGoodsKanjia.originalPrice}}\" />\n      <van-cell title=\"底价\" value=\"￥{{curGoodsKanjia.minPrice}}\" />\n      <van-cell title=\"截止\" value=\"{{curGoodsKanjia.dateEnd}}\" />\n    </van-cell-group>\n    <van-cell-group wx:if=\"{{pingtuanSet}}\" title=\"商品拼团设置\">\n      <van-cell title=\"已成团\" value=\"{{pingtuanSet.numberSucccess}}\" />\n      <van-cell title=\"成团人数\" value=\"{{pingtuanSet.numberPersion}}\" />\n      <van-cell title=\"退款条件\" value=\"{{pingtuanSet.timeoutHours}}小时未成团\" />\n      <van-cell title=\"截止\" value=\"{{pingtuanSet.dateEnd}}\" />\n    </van-cell-group>\n    <view class=\"curKanjiaprogress\" wx:if=\"{{curKanjiaprogress}}\">\n      <view class=\"name\">帮\n        <text style='color:red;font-weight:bold;'>{{curKanjiaprogress.joiner.nick}}</text> 砍价吧！\n      </view>\n      <van-progress\n        percentage=\"{{100 * (curGoodsKanjia.originalPrice - curKanjiaprogress.kanjiaInfo.curPrice) / (curGoodsKanjia.originalPrice - curGoodsKanjia.minPrice)}}\"\n        pivot-text=\"￥{{curKanjiaprogress.kanjiaInfo .curPrice}}\"\n        pivot-color=\"#1aad19\"\n        color=\"#1aad19\"\n        custom-class=\"van-progress\"\n      />\n      <view class=\"flex\">\n        <view class=\"kjbutton\">\n          <button type=\"primary\" open-type=\"share\">邀请朋友帮忙</button>\n        </view>\n        <view class=\"kjbutton\">\n          <button type=\"warn\" bindtap=\"helpKanjia\"\n            disabled=\"{{myHelpDetail}}\">{{myHelpDetail?\"您已砍过\":\"帮TA砍\"}}</button>\n        </view>\n      </view>\n      <van-cell title=\"帮砍人数\" value=\"{{curKanjiaprogress.kanjiaInfo .helpNumber}}\" />\n      <van-cell title=\"状态\" value=\"{{curKanjiaprogress.kanjiaInfo .statusStr}}\" />\n      <van-cell title=\"报名时间\" value=\"{{curKanjiaprogress.kanjiaInfo .dateAdd}}\" />\n    </view>\n    <block wx:if=\"{{curGoodsKanjia && (!curKanjiaprogress || curKanjiaprogress.kanjiaInfo.uid != curuid)}}\">\n      <button type=\"warn\" bindtap=\"joinKanjia\" style='width:700rpx;'>我也要报名参与</button>\n      <view class='space'></view>\n    </block>\n    <view class=\"goods-des-info\" style=\"margin-top:35rpx;\" wx:if=\"{{pingtuanList}}\">\n      <view class=\"label-title\" style=\"border-bottom:1px solid #eee;\">{{pingtuanList.length}}人在拼单，可直接参与</view>\n      <view class=\"goods-text\" style=\"margin-top:15rpx;border-bottom:1px solid #eee;overflow:hidden;\"\n        wx:for=\"{{pingtuanList}}\" wx:key=\"id\">\n        <view style=\"width:150rpx;float:left;\">\n          <image style=\"width: 150rpx; height: 150rpx;\" src=\"{{item.apiExtUser.avatarUrl}}\"></image>\n          <view style=\"width:150rpx;text-align:center;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;\">\n            {{item.apiExtUser.nick}}</view>\n        </view>\n        <view style=\"width:500rpx;float:left;margin-left:35rpx;\">\n          <view>已有\n            <text style=\"color:red\"> {{item.helpNumber}} </text>人参与</view>\n          <view style=\"color: #B0B0B0;font-size:24rpx;\">截止: {{item.dateEnd}}</view>\n          <button type=\"warn\" size=\"mini\" data-pingtuanopenid=\"{{item.id}}\" bindtap=\"toPingtuan\"> 去拼单 </button>\n        </view>\n      </view>\n    </view>\n    <van-cell wx:if=\"{{hasMoreSelect && goodsDetailSkuShowType==0}}\" custom-class=\"vw100 goods-property-container\" border=\"{{false}}\" \n      is-link bind:click=\"bindGuiGeTap\">\n      <view slot=\"title\">\n        请选择:\n        <block wx:for=\"{{goodsDetail.properties}}\" wx:key=\"id\"> {{item.name}}</block>\n        <block wx:for=\"{{goodsAddition}}\" wx:key=\"id\"> {{item.name}}</block>\n      </view>\n    </van-cell>\n    <view class=\"size-label-box2\" wx:if=\"{{goodsDetailSkuShowType==1}}\">\n      <view class=\"label-title\">选择商品规格</view>\n      <view class=\"size-label-box\">\n        <block wx:for=\"{{goodsDetail.properties}}\" wx:for-item=\"property\" wx:for-index=\"idx\" wx:key=\"id\">\n          <view class=\"label\">{{property.name}}</view>\n          <view class=\"label-item-box\">\n            <view class=\"label-item {{item.active ? 'active' : '' }}\" wx:for=\"{{property.childsCurGoods}}\" hidden=\"{{ item.hidden }}\" wx:key=\"id\"\n              bindtap=\"labelItemTap\" data-propertyindex=\"{{idx}}\" data-propertychildindex=\"{{index}}\">\n              {{item.name}}\n            </view>\n          </view>\n        </block>\n      </view>\n      <van-cell title=\"购买数量\">\n        <view>\n          <van-stepper value=\"{{ buyNumber }}\" min=\"{{ buyNumMin }}\" max=\"{{ buyNumMax }}\" bind:change=\"stepChange\" />\n        </view>\n      </van-cell>\n    </view>\n    <view wx:if=\"{{shopSubdetail}}\" class=\"shop-container\">\n      <image mode=\"aspectFill\" src=\"{{shopSubdetail.info.pic}}\"></image>\n      <view class=\"info\">\n        <view class=\"title\">{{shopSubdetail.info.name}}</view>\n        <view class=\"address\">{{shopSubdetail.info.address}}</view>\n      </view>\n    </view>\n    <view class=\"goods-des-info\" id=\"goods-des-info\">\n      <view class=\"label-title\"> \n        <view class=\"left\">商品详情</view>\n      </view>\n      <view class=\"goods-text\">\n        <mp-html content=\"{{goodsDetail.content}}\" />\n      </view>\n    </view>\n    <van-cell-group id=\"reputation\" wx:if=\"{{!curGoodsKanjia && reputation}}\" custom-class=\"vw100 reputation-cell-group\">\n      <view class=\"label-title\"> \n        <wxs module=\"goodReputationPercent\">\n        module.exports = {\n          v : function(goodsDetail) {\n            if (!goodsDetail || !goodsDetail.basicInfo) {\n              return \"100\"\n            }\n            var goodReputation = goodsDetail.basicInfo.numberGoodReputation / goodsDetail.basicInfo.numberReputation * 100\n            goodReputation = goodReputation.toFixed(0)\n            if (goodReputation > 100) {\n              goodReputation = 100\n            }\n            return goodReputation\n          }\n        }\n        </wxs>\n        <view class=\"left\">宝贝评价 {{goodsDetail.basicInfo.numberGoodReputation}}</view>\n        <view>好评度：{{goodReputationPercent.v(goodsDetail)}}%</view>\n      </view>\n      <block wx:for=\"{{reputation.result}}\" wx:key=\"id\">\n        <van-cell custom-class=\"reputation-cell\" title=\"{{ item.user.nick || ('用户' + item.user.id) }}\"\n          label=\"{{item.goods.dateReputation}}\" border=\"{{ false }}\">\n          <van-image slot=\"icon\" custom-class=\"avatarUrl-img\" src=\"{{ item.user.avatarUrl ? (item.user.avatarUrl + '_m') : '/images/default.png' }}\" round/>\n          <van-rate value=\"{{ item.goods.goodReputation }}\" color=\"#e64340\" readonly />          \n        </van-cell>\n        <van-cell wx:if=\"{{ item.goods.goodReputationRemark }}\" title-class=\"reputation-cell-reamrk\"\n          title=\"{{item.goods.goodReputationRemark}}\" />\n        <view wx:if=\"{{ item.reputationPics }}\" class=\"reputation-pics\">\n          <image wx:for=\"{{item.reputationPics}}\" wx:for-item=\"picItem\" src=\"{{ picItem.pic }}_m\" mode=\"aspectFill\"\n            bindtap=\"previewImage\" data-url=\"{{ picItem.pic }}\"></image>\n        </view>\n        <van-cell wx:if=\"{{ item.goods.goodReputationReply }}\" title-class=\"reputation-cell-reamrk\"\n          title=\"掌柜回复:{{item.goods.goodReputationReply}}\" />\n      </block>\n    </van-cell-group>\n    <van-cell-group wx:if=\"{{curKanjiaprogress && curKanjiaprogress.helps && curKanjiaprogress.helps.length>0}}\" title=\"砍价记录\">\n      <view class=\"kjlj\"  wx:for=\"{{curKanjiaprogress.helps}}\" wx:key=\"*this\">\n        <image class=\"kjlj-l\" src=\"{{item.avatarUrl}}\" mode=\"aspectFill\" />\n        <van-cell custom-class=\"kjlj-r\" title=\"￥ {{item.cutPrice}}\" label=\"{{item.nick}} {{item.dateAdd}} 帮砍\" size=\"large\" />\n      </view>\n    </van-cell-group>\n    <view class='kjBuyButton' wx:if=\"{{curGoodsKanjia && curKanjiaprogress}}\">\n      <view class=\"item\" wx:if=\"{{curKanjiaprogress.kanjiaInfo.uid != curuid}}\">\n        <van-button type=\"primary\" block bind:click=\"helpKanjia\" disabled=\"{{myHelpDetail}}\">\n          {{myHelpDetail?\"您已砍过\":\"帮TA砍\"}}</van-button>\n      </view>\n      <view class=\"item\" wx:else>\n        <van-button type=\"danger\" block bind:click=\"tobuy\">用当前价购买</van-button>\n      </view>\n    </view>\n  </scroll-view>\n  <van-goods-action wx:if=\"{{!curGoodsKanjia}}\">\n    <van-goods-action-icon wx:if=\"{{ customerServiceType == 'QW' }}\" icon=\"chat-o\" text=\"客服\" bind:click=\"customerService\" />\n    <van-goods-action-icon wx:else icon=\"chat-o\" text=\"客服\" open-type=\"contact\"\n      send-message-title=\"{{goodsDetail.basicInfo.name}}\" send-message-img=\"{{goodsDetail.basicInfo.pic}}\"\n      send-message-path=\"/pages/goods-details/index?id={{goodsDetail.basicInfo.id}}\" show-message-card=\"{{ true }}\" />\n    <van-goods-action-icon icon=\"cart-o\" text=\"购物车\" bind:click=\"goShopCar\" info=\"{{ shopNum ? shopNum : '' }}\" />\n    <van-goods-action-icon icon=\"{{faved?'like':'like-o'}}\" text=\"收藏\" bind:click=\"addFav\" />\n    <van-goods-action-button wx:if=\"{{!goodsDetail.basicInfo.pingtuan}}\" text=\"加入购物车\" type=\"warning\"\n      bind:click=\"{{goodsDetailSkuShowType==0?'toAddShopCar':'addShopCar'}}\" />\n    <van-goods-action-button wx:if=\"{{!goodsDetail.basicInfo.pingtuan}}\" text=\"立即购买\" data-shopType=\"{{shopType}}\"\n      bind:click=\"{{goodsDetailSkuShowType==0?'tobuy':'buyNow'}}\" />\n    <van-goods-action-button wx:if=\"{{goodsDetail.basicInfo.pingtuan}}\" text=\"单独购买\" type=\"warning\"\n      bind:click=\"tobuy\" />\n    <van-goods-action-button wx:if=\"{{goodsDetail.basicInfo.pingtuan}}\" text=\"发起拼团\" bind:click=\"toPingtuan\" />\n  </van-goods-action>\n</view>\n\n<block wx:if=\"{{posterShow}}\">\n  <view class=\"poster-mask\"></view>\n  <view class=\"poster\">\n    <canvas class=\"canvas\" style=\"{{canvasstyle}}\" canvas-id=\"firstCanvas\"></canvas>\n  </view>\n  <view class=\"poster-btn\">\n    <button type=\"primary\" size=\"mini\" bindtap='_saveToMobile'> 保存图片 </button>\n    <button type=\"warn\" size=\"mini\" bindtap='closePop'> 关闭 </button>\n  </view>\n</block>\n\n<poster id=\"poster\" config=\"{{posterConfig}}\" bind:success=\"onPosterSuccess\" bind:fail=\"onPosterFail\"></poster>\n<view wx:if=\"{{showposterImg}}\" class=\"popup-mask\"></view>\n<view wx:if=\"{{showposterImg}}\" class=\"posterImg-box\">\n  <image mode=\"widthFix\" class=\"posterImg\" src=\"{{posterImg}}\"></image>\n  <view class=\"btn-create\" bindtap=\"savePosterPic\">保存到相册</view>\n</view>\n\n<van-popup show=\"{{ !hideShopPopup }}\" round closeable position=\"bottom\"\n  custom-style=\"padding-top:48rpx;max-height: 80%;\" bind:close=\"closePopupTap\">\n  <van-card centered price=\"{{ selectSizePrice }}\"\n    origin-price=\"{{ selectSizePrice != selectSizePrice ? selectSizeOPrice : '' }}\"\n    title=\"{{ goodsDetail.basicInfo.name }}\" thumb=\"{{ skuGoodsPic }}\" />\n  <view class=\"size-label-box\">\n    <block wx:for=\"{{goodsDetail.properties}}\" wx:for-item=\"property\" wx:for-index=\"idx\" wx:key=\"id\">\n      <view class=\"label\">{{property.name}}</view>\n      <view class=\"label-item-box\">\n        <view class=\"label-item {{item.active ? 'active' : '' }}\" wx:for=\"{{property.childsCurGoods}}\" hidden=\"{{ item.hidden }}\" wx:key=\"id\"\n          bindtap=\"labelItemTap\" data-propertyindex=\"{{idx}}\" data-propertychildindex=\"{{index}}\">\n          {{item.name}}\n        </view>\n      </view>\n    </block>\n    <block wx:for=\"{{goodsAddition}}\" wx:for-item=\"property\" wx:for-index=\"idx\" wx:key=\"id\">\n      <view class=\"label\">{{property.name}}</view>\n      <view class=\"label-item-box\">\n        <view class=\"label-item {{item.active ? 'active' : '' }}\" wx:for=\"{{property.items}}\" wx:key=\"id\"\n          bindtap=\"labelItemTap2\" data-propertyindex=\"{{idx}}\" data-propertychildindex=\"{{index}}\">\n          {{item.name}}\n        </view>\n      </view>\n    </block>\n  </view>\n  <van-cell title=\"购买数量\">\n    <view>\n      <van-stepper value=\"{{ buyNumber }}\" min=\"{{ buyNumMin }}\" max=\"{{ buyNumMax }}\" bind:change=\"stepChange\" />\n    </view>\n  </van-cell>\n  <van-button wx:if=\"{{shopType =='addShopCar'}}\" bindtap=\"addShopCar\" type=\"danger\" block>加入购物车</van-button>\n  <van-button wx:if=\"{{shopType =='tobuy' || shopType =='toPingtuan'}}\" data-shopType=\"{{shopType}}\" bindtap=\"buyNow\"\n    type=\"danger\" block>立即购买</van-button>\n</van-popup>\n\n<!-- 弹出编辑昵称和头像的框 -->\n<login show=\"{{ nickPopShow }}\" avatarUrl=\"{{ popavatarUrl }}\" name=\"{{ popnick }}\" />"
  },
  {
    "path": "pages/goods-details/index.wxss",
    "content": "\npage,\nview,\nimage,\ninput,\ntextarea {\n  display: block;\n  box-sizing: border-box;\n}\n\n.van-cell {\n  padding: 10px 38rpx;\n}\n\n.container {\n  background-color: #F2f2f2;\n  min-height: 100vh;\n  padding-bottom: 100rpx;\n}\n\n.scroll-container {\n  box-sizing: border-box;\n  height: 100vh;\n  padding-bottom: 64rpx;\n}\n\n.tabs-container {\n  width: 100%;\n  display: flex;\n  background-color: white;\n}\n\n.home-o {\n  width: 20%;\n}\n\n.swiper-container {\n  width: 100%;\n  position: relative;\n}\n\n.swiper_box {\n  width: 100%;\n  height: 748rpx;\n}\n\nswiper-item image {\n  width: 100%;\n  display: inline-block;\n  overflow: hidden;\n  height: 748rpx;\n}\n\n.goods-info {\n  background-color: #fff;\n  padding-top: 35rpx;\n  width: 100%;\n  position: relative;\n}\n\n.goods-info-top-container {\n  display: flex;\n  justify-content: space-between;\n}\n\n.goods-info-fx {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-right: 35rpx;\n  position: relative;\n}\n\n.goods-info-fx .item {\n  /* height: 50rpx; */\n  right: 130rpx;\n  top: 100rpx;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  font-size: 24rpx;\n  background: #fff;\n  z-index: 20;\n}\n\n.goods-info-fx .left {\n  margin-right: 10px;\n}\n\n.goods-info-fx .icon-title{\n  padding-top:5px ;\n  font-size: 11px;\n}\n\n.goods-info-fx .item image {\n  width: 50rpx;\n  height: 50rpx;\n}\n\n.goods-info-fx .item button {\n  position: absolute;\n  height: 100%;\n  width: 100%;\n  opacity: 0;\n  z-index: 99;\n}\n\n.goods-info .goods-title {\n  box-sizing: border-box;\n  padding: 0 30rpx;\n  font-size: 32rpx;\n  line-height: 1.4;\n  color: #000;\n  /* padding-bottom: 26rpx; */\n}\n\n.goods-info .goods-share {\n  box-sizing: border-box;\n  padding: 0 30rpx;\n  font-size: 25rpx;\n  line-height: 1.4;\n  color: #CC0000;\n  padding-top: 26rpx;\n}\n\n.vcell{\n  border-bottom-left-radius: 12px;\n  border-bottom-right-radius: 12px;\n}\n\n.goods-profile {\n  display: flex;\n  align-items: center;\n}\n\n.goods-profile .p {\n  color: #e64340;\n  font-size: 20pt;\n  margin-left: 30rpx;\n}\n\n.goods-profile .p text {\n  font-size: 12pt;\n}\n\n.goods-profile .r {\n  color: #ccc;\n  font-size: 10pt;\n  margin-left: 30rpx;\n}\n\n.row-arrow {\n  width: 100vw;\n  padding: 0 32rpx;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  height: 102rpx;\n  font-size: 28rpx;\n  line-height: 102rpx;\n  background: #fff;\n  margin-bottom: 32rpx;\n}\n\n.row-arrow image {\n  width: 40rpx;\n  height: 40rpx;\n}\n\n.goods-des-info {\n  width: 100%;\n  box-sizing: border-box;\n  background-color: #fff;\n  border-radius: 12px;\n}\n\n.label-title {\n  font-size: 28rpx;\n  color: #000000;\n  padding: 30rpx;\n  display: flex;\n  justify-content: space-between;\n}\n\n.label-title .left{\n  border-left: 3px solid #e64340;\n  height: auto;\n  padding-left: 10px;\n}\n\n.goods-text {\n  padding: 0 10rpx;\n  font-size: 28rpx;\n  color: #666666;\n  line-height: 56rpx;\n  margin-bottom: 30rpx;\n}\n\n.goods-text image {\n  width: 100%;\n  margin-top: -1rpx;\n}\n\n.des-imgs {\n  width: 100%;\n}\n\n.des-imgs image {\n  width: 100%;\n}\n\n.footer-box {\n  width: 100%;\n  height: 100rpx;\n  background-color: #fff;\n  position: fixed;\n  bottom: 0;\n  left: 0;\n  display: flex;\n  box-shadow: 0 0 1rpx 0;\n  align-items: center;\n}\n\n.footer-box .contact {\n  position: relative;\n  height: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-left: 32rpx;\n}\n\n.footer-box .contact button {\n  position: absolute;\n  height: 100%;\n  width: 100%;\n  opacity: 0;\n  z-index: 99;\n}\n\n.footer-box .contact image {\n  width: 60rpx;\n  height: 60rpx;\n}\n\n.footer-box .shop-cart-btn {\n  position: relative;\n  height: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-left: 32rpx;\n}\n\n.footer-box .shop-cart-btn image {\n  width: 55rpx;\n  height: 55rpx;\n}\n\n.fav-icon {\n  width: 60rpx;\n  height: 60rpx;\n  margin-left: 32rpx;\n  /*707070*/\n}\n\n.footer-box .shop-cart-btn .shop-num {\n  position: absolute;\n  color: #fff;\n  left: 32rpx;\n  top: 10rpx;\n\n  width: 40rpx;\n  height: 40rpx;\n  line-height: 40rpx;\n  text-align: center;\n  border-radius: 50%;\n  background: #e64340;\n  font-size: 24rpx;\n}\n\n.footer-box .join-shop-cart {\n  text-align: center;\n  height: 100%;\n  line-height: 100rpx;\n  background-color: #ff6850;\n  color: #fff;\n  font-size: 34rpx;\n  flex: 1;\n  margin-left: 32rpx;\n}\n\n.footer-box .now-buy {\n  text-align: center;\n  height: 100%;\n  width: 250rpx;\n  line-height: 100rpx;\n  background-color: #e64340;\n  color: #fff;\n  font-size: 34rpx;\n  flex: 1;\n}\n\n.show-popup {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  z-index: 999;\n}\n\n.popup-mask {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.5);\n  z-index: 5;\n}\n\n.popup-contents {\n  position: fixed;\n  left: 0;\n  bottom: 0;\n  width: 100%;\n  background-color: #fff;\n  z-index: 6;\n}\n\n.pop-goods-info {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-left: 32rpx;\n  margin-right: 32rpx;\n  padding: 30rpx 0;\n  border-bottom: 1px solid #eee;\n}\n\n.pop-img-box {\n  width: 120rpx;\n  height: 120rpx;\n  overflow: hidden;\n  margin-right: 26rpx;\n}\n\n.pop-img-box .goods-thumbnail {\n  width: 120rpx;\n  height: 120rpx;\n}\n\n.pop-goods-title {\n  width: 484rpx;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  overflow: hidden;\n  font-size: 26rpx;\n  color: #000000;\n}\n\n.pop-goods-price {\n  font-size: 26rpx;\n  color: #e64340;\n  margin-top: 20rpx;\n}\n\n.pop-goods-price .t1 {\n  font-size: 50rpx;\n}\n\n.pop-goods-price-original {\n  font-size: 26rpx;\n  color: #aaa;\n  text-decoration: line-through;\n  margin-left: 16rpx;\n}\n\n.pop-goods-close {\n  width: 36rpx;\n  height: 36rpx;\n}\n\n.goods-property-container {\n  height: 56px;\n  align-items: center;\n  border-radius: 12px;\n  padding: 0 16px;\n}\n\n.size-label-box2 {\n  width: 100vw;\n  background: #fff;\n}\n\n.size-label-box .label {\n  font-size: 26rpx;\n  color: #000;\n  padding-left: 30rpx;\n  padding: 30rpx 0 20rpx 30rpx;\n}\n\n.size-label-box .label-item-box {\n  display: flex;\n  margin-left: 30rpx;\n  flex-direction: row;\n  flex-wrap: wrap;\n}\n\n.size-label-box .label-item {\n  font-size: 26rpx;\n  color: #000;\n  padding: 14rpx 20rpx;\n  border: 1px solid #ddd;\n  border-radius: 6rpx;\n  margin: 0 20rpx 20rpx 0;\n}\n\n.size-label-box .label-item.active {\n  color: #e64340;\n  border: 1px solid #e64340;\n}\n\n.buy-num-box {\n  display: flex;\n  justify-content: space-between;\n  padding: 30rpx 30rpx 48rpx 0;\n  margin-left: 30rpx;\n  border-top: 1px solid #eee;\n  margin-top: 30rpx;\n  align-items: center;\n}\n\n.num-label {\n  font-size: 26rpx;\n  color: #000000;\n}\n\n.buy-num-box .num-box {\n  display: flex;\n}\n\n.buy-num-box .num-box .num-jian,\n.buy-num-box .num-box .num-input,\n.buy-num-box .num-box .num-jia {\n  width: 80rpx;\n  height: 64rpx;\n  line-height: 62rpx;\n  text-align: center;\n  border: 1px solid #eee;\n}\n\n.buy-num-box .num-box .num-input {\n  font-size: 28rpx;\n}\n\n.buy-num-box .num-box .num-input input {\n  height: 100%;\n}\n\n.popup-join-btn {\n  width: 100%;\n  height: 89rpx;\n  text-align: center;\n  line-height: 89rpx;\n  font-size: 34rpx;\n  color: #ffffff;\n  background-color: #e64340;\n}\n\n.buy-num-box .num-box .hui {\n  background-color: #f5f5f9;\n}\n\n.curKanjiaprogress {\n  width: 750rpx;\n  background-color: #fff;\n  margin-top: 20rpx;\n}\n\n.curKanjiaprogress .name {\n  font-size: 40rpx;\n  padding: 20rpx;\n  text-align: center;\n}\n\n.curKanjiaprogress .placeholder {\n  margin-left: 30rpx;\n  margin-right: 30rpx;\n  text-align: center;\n  font-size: 26rpx;\n  width: 100rpx;\n  color: #999;\n}\n\n.kjBuyButton {\n  position: fixed;\n  left: 0;\n  bottom: calc(env(safe-area-inset-bottom) / 2);\n  width: 750rpx;\n  display: flex;\n}\n\n.kjBuyButton .item {\n  flex: 1;\n}\n\n.shareFloatDiv1 {\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  width: 100vw;\n  height: 100vh;\n  background-color: #555;\n  filter: Alpha(Opacity=60);\n  opacity: 0.6;\n  z-index: 99998;\n}\n\n.shareFloatDiv2 {\n  position: fixed;\n  width: 100%;\n  height: 400rpx;\n  background-color: #ffffff;\n  bottom: 0rpx;\n  z-index: 99999;\n}\n\n.shareFloatDiv2 .p1 {\n  height: 260rpx;\n}\n\n.shareFloatDiv2 .p2 {\n  height: 20rpx;\n  background-color: #EEEEEE;\n}\n\n.shareFloatDiv2 .p3 {\n  height: 120rpx;\n  line-height: 120rpx;\n  text-align: center;\n  color: #555555;\n  font-size: 16px;\n}\n\n.qrcode-button {\n  padding: 30rpx;\n  margin-top: 50rpx;\n}\n\n.qrcode {\n  width: 300rpx;\n  height: 300rpx;\n  margin-top: 50rpx;\n}\n\n\n\n.posterImg-box {\n  position: absolute;\n  top: 104rpx;\n  left: 32rpx;\n  width: 686rpx;\n  margin-bottom: 100rpx;\n  z-index: 999999;\n}\n\n.posterImg {\n  width: 100%;\n}\n\n.btn-create {\n  margin: 32rpx;\n  margin-bottom: 0;\n  height: 88rpx;\n  line-height: 88rpx;\n  background: #e64340;\n  color: #fff;\n  text-align: center;\n  border-radius: 8rpx;\n}\n\n.clearfix:after {\n  /*伪元素是行内元素 正常浏览器清除浮动方法*/\n  content: \"\";\n  display: block;\n  height: 0;\n  clear: both;\n  visibility: hidden;\n}\n\n.shop-container {\n  width: 100vw;\n  margin: 16rpx 0rpx;\n  padding: 32rpx;\n  display: flex;\n  align-items: center;\n  background: #fff;\n}\n\n.shop-container image {\n  width: 90rpx;\n  height: 90rpx;\n}\n\n.shop-container .info {\n  margin-left: 32rpx;\n}\n\n.shop-container .info .title {\n  font-size: 30rpx;\n  color: #333;\n}\n\n.shop-container .info .address {\n  font-size: 26rpx;\n  color: #666;\n}\n\n.reputation-cell-group{\n  background-color:white !important;\n  border-radius: 12px;\n}\n\n.reputation-cell {\n  padding-bottom: 0rpx !important;\n  --cell-icon-size: 88rpx;\n}\n\n.reputation-cell .van-icon {\n  top: 16rpx !important;\n}\n\n.reputation-cell .avatarUrl-img{\n  width: 40px;\n  height: 40px;\n  border-radius: 100%;\n  margin-right: 26rpx;\n}\n\n.reputation-cell-reamrk {\n  /* padding-left: 96rpx; */\n}\n\n.reputation-pics {\n  width: 100vw;\n  display: flex;\n  flex-wrap: wrap;\n  background: #ffffff;\n}\n\n.reputation-pics image {\n  width: 207rpx;\n  height: 207rpx;\n  margin: 32rpx 0 0 32rpx;\n  border-radius: 16rpx;\n}\n.characteristic {\n  padding: 8rpx 32rpx;\n  color: #000;\n  font-size: 28rpx;\n  line-height: 64rpx;\n}\n.van-progress {\n   margin: 32rpx 0;\n}\n.flex {\n  display: flex;\n  width: 100vw;\n}\n.kjbutton {\n  flex: 1;\n  padding: 30rpx;\n}\n.kjlj {\n  display: flex;\n  background-color: #ffffff;\n  padding: 0 32rpx;\n  align-items: center;\n}\n.kjlj-l {\n  width: 88rpx;\n  height: 88rpx;\n  border-radius: 50%;\n  flex-shrink: 0;\n}"
  },
  {
    "path": "pages/goods-details/times01.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst dayjs = require(\"dayjs\")\n\nPage({\n  data: {\n    list: undefined,\n  },\n  onLoad(options) {\n    this.setData({\n      goodsId: options.goodsId\n    })\n    this.goodsTimesDays()\n  },\n  onShow() {\n\n  },\n  async goodsTimesDays() {\n    // https://www.yuque.com/apifm/nu0f75/wy8nlq\n    const res = await WXAPI.goodsTimesDays(this.data.goodsId)\n    if (res.code != 0) {\n      wx.showModal({\n        content: res.msg\n      })\n      return\n    }\n    const list = res.data\n    this.setData({\n      list,\n      maxDate: dayjs(list[list.length - 1]).valueOf(),\n    })\n  },\n  async onConfirm(event) {\n    const day = dayjs(event.detail).format('YYYY-MM-DD')\n    if (!this.data.list.includes(day)) {\n      wx.showModal({\n        content: day + '预约已满，请更换日期'\n      })\n      return\n    }\n    wx.navigateTo({\n      url: '/pages/goods-details/times02?goodsId='+ this.data.goodsId +'&day=' + day,\n    })\n  },\n})"
  },
  {
    "path": "pages/goods-details/times01.json",
    "content": "{\n  \"navigationBarTitleText\": \"时段定价演示\"\n}"
  },
  {
    "path": "pages/goods-details/times01.wxml",
    "content": "<van-empty wx:if=\"{{ !list || list.length == 0 }}\" description=\"暂无可预定日期\" />\n<van-calendar wx:else poppable=\"{{ false }}\" max-date=\"{{ maxDate }}\" formatter=\"{{ formatter }}\" bind:confirm=\"onConfirm\" />"
  },
  {
    "path": "pages/goods-details/times01.wxss",
    "content": "/* pages/goods-details/times01.wxss */"
  },
  {
    "path": "pages/goods-details/times02.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst dayjs = require(\"dayjs\")\n\nPage({\n  data: {\n    list: undefined,\n    maxDate: dayjs().add(7, 'day').valueOf(),\n  },\n  onLoad(options) {\n    this.setData({\n      goodsId: options.goodsId,\n      day: options.day\n    })\n    this.goodsTimesDayItems()\n  },\n  onShow() {\n\n  },\n  async goodsTimesDayItems() {\n    // https://www.yuque.com/apifm/nu0f75/dlpp5v\n    const res = await WXAPI.goodsTimesDayItems(this.data.day, this.data.goodsId)\n    if (res.code != 0) {\n      wx.showModal({\n        content: res.msg\n      })\n      return\n    }\n    const list = res.data.filter(ele => ele.stores > 0)\n    this.setData({\n      list\n    })\n  },\n  async submit(event) {\n    console.log(event);\n    const idx = event.target.dataset.idx\n    const item = this.data.list[idx]\n    const goodsJsonStr = [{\n      goodsId: this.data.goodsId,\n      number: 1,\n      goodsTimesDay: this.data.day,\n      goodsTimesItem: item.name,\n    }]\n    const d = {\n      token: wx.getStorageSync('token'),\n      goodsJsonStr: JSON.stringify(goodsJsonStr),\n    }\n    // https://www.yuque.com/apifm/nu0f75/qx4w98\n    const res = await WXAPI.orderCreate(d)\n    if (res.code != 0) {\n      wx.showModal({\n        content: res.msg\n      })\n      return\n    }\n    this.setData({\n      orderId: res.data.id,\n      money: res.data.amountReal,\n      paymentShow: true,\n      nextAction: {\n        type: 0,\n        id: res.data.id\n      }\n    })\n  },\n  paymentOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      paymentShow: false\n    })\n    wx.redirectTo({\n      url: '/pages/order-details/index?id=' + this.data.orderId,\n    })\n  },\n  paymentCancel() {\n    this.setData({\n      paymentShow: false\n    })\n  },\n})"
  },
  {
    "path": "pages/goods-details/times02.json",
    "content": "{\n  \"navigationBarTitleText\": \"选择时段\"\n}"
  },
  {
    "path": "pages/goods-details/times02.wxml",
    "content": "<van-empty wx:if=\"{{ !list || list.length == 0 }}\" description=\"暂无可预定日期\" />\n<van-cell-group>\n  <van-cell wx:for=\"{{ list }}\" wx:key=\"id\" title=\"{{ item.name }}\" border=\"{{ true }}\" value=\"预约 ￥{{ item.price }}\" is-link data-idx=\"{{ index }}\" bind:click=\"submit\" />\n</van-cell-group>\n\n<payment\n  money=\"{{ money }}\"\n  remark=\"支付订单 ：{{ orderId }}\"\n  nextAction=\"{{ nextAction }}\"\n  show=\"{{ paymentShow }}\"\n  bind:cancel=\"paymentCancel\"\n  bind:ok=\"paymentOk\"\n/>"
  },
  {
    "path": "pages/goods-details/times02.wxss",
    "content": "/* pages/goods-details/times02.wxss */"
  },
  {
    "path": "pages/goods-details/vop.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst TOOLS = require('../../utils/tools.js')\nconst AUTH = require('../../utils/auth')\nconst CONFIG = require('../../config.js')\nimport Poster from 'wxa-plugin-canvas/poster/poster'\n\nPage({\n  data: {\n    createTabs: false, //绘制tabs\n    tabs: [{\n      tabs_name: '商品简介',\n      view_id: 'swiper-container',\n      topHeight: 0\n    }, {\n      tabs_name: '商品详情',\n      view_id: 'goods-des-info',\n      topHeight: 0,\n    }],\n    goodsDetail: {},\n    hasMoreSelect: false,\n    selectSizePrice: 0,\n    selectSizeOPrice: 0,\n    totalScoreToPay: 0,\n    shopNum: 0,\n    hideShopPopup: true,\n    buyNumber: 1,\n    buyNumMin: 1,\n    buyNumMax: 0,\n    propertyChildIds: \"\",\n    propertyChildNames: \"\",\n    canSubmit: false, //  选中规格尺寸时候是否允许加入购物车\n    shopType: \"addShopCar\", //购物类型，加入购物车或立即购买，默认为加入购物车\n  },\n  bindscroll(e) {\n    if (this.data.tabclicked) {\n      return\n    }\n    //计算页面 轮播图、详情、评价(砍价)view 高度\n    this.getTopHeightFunction()\n    var tabsHeight = this.data.tabsHeight //顶部距离（tabs高度）\n    if (this.data.tabs[0].topHeight-tabsHeight<=0 && 0 < this.data.tabs[1].topHeight-tabsHeight) { //临界值，根据自己的需求来调整\n      this.setData({\n        active: this.data.tabs[0].tabs_name //设置当前标签栏\n      })\n    } else if (this.data.tabs[1].topHeight-tabsHeight<=0) {\n      this.setData({\n        active: this.data.tabs[1].tabs_name\n      })\n    }\n  },\n  onLoad(e) {\n    // e.id = 4659376\n    // 读取分享链接中的邀请人编号\n    if (e && e.inviter_id) {\n      wx.setStorageSync('referrer', e.inviter_id)\n    }\n    // 读取小程序码中的邀请人编号\n    if (e && e.scene) {\n      const scene = decodeURIComponent(e.scene) // 处理扫码进商品详情页面的逻辑\n      if (scene && scene.split(',').length >= 2) {\n        e.id = scene.split(',')[0]\n        e.goodsId = scene.split(',')[1]\n      }\n      if (scene && scene.split(',').length >= 3) {\n        e.id = scene.split(',')[0]\n        e.goodsId = scene.split(',')[1]\n        wx.setStorageSync('referrer', scene.split(',')[2])\n      }\n    }\n    this.data.goodsId = e.id\n    this.data.goodsId2 = e.goodsId ? e.goodsId : ''\n    this.data.kjJoinUid = e.kjJoinUid    \n    let goodsDetailSkuShowType = wx.getStorageSync('goodsDetailSkuShowType')\n    if (!goodsDetailSkuShowType) {\n      goodsDetailSkuShowType = 0\n    }\n    this.setData({\n      goodsDetailSkuShowType,\n      curuid: wx.getStorageSync('uid'),\n      customerServiceType: CONFIG.customerServiceType\n    })\n    this.getGoodsDetailAndKanjieInfo(this.data.goodsId)\n    this.skuImages(this.data.goodsId)\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.goodsFavCheck()\n        this.shippingCartInfo()\n        this.initShippingAddress()\n      } else {\n        getApp().loginOK = () => {\n          this.goodsFavCheck()\n          this.shippingCartInfo()\n          this.initShippingAddress()\n        }\n      }\n    })\n  },\n  async initShippingAddress() {\n    const res = await WXAPI.defaultAddress(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      this.setData({\n        curAddressData: res.data.info\n      })\n      this.checkCanBuy()\n    } else {\n      this.setData({\n        curAddressData: null\n      });\n    }\n  },\n  selectAddress: function () {\n    wx.navigateTo({\n      url: \"/pages/select-address/index\"\n    })\n  },\n  async shippingCartInfo(){\n    const number = await TOOLS.showTabBarBadge(true)\n    this.setData({\n      shopNum: number\n    })\n  },\n  async checkCanBuy(){\n    const token = wx.getStorageSync('token')\n    if (!token) {\n      return\n    }\n    const curAddressData = this.data.curAddressData\n    const sku = [\n      {\"skuId\": this.data.goodsId,\"skuNumber\": 1}\n    ]\n    const res = await WXAPI.jdvopGoodsCheckCanBuyV3({\n      checkSkuSale: 1,\n      checkAreaLimit: 1,\n      sku: JSON.stringify(sku),\n      address: curAddressData.provinceStr + curAddressData.cityStr + curAddressData.areaStr + curAddressData.streetStr + curAddressData.address\n    })\n    if (res.code == 0) {\n      this.setData({\n        canPurchase: res.data[0].canPurchase\n      })\n    } else {\n      this.setData({\n        canPurchase: false\n      })\n    }\n  },\n  onShow (){\n    this.setData({\n      createTabs: true //绘制tabs\n    })\n    //计算tabs高度\n    var query = wx.createSelectorQuery();\n    query.select('#tabs').boundingClientRect((rect) => {\n      var tabsHeight = rect.height\n      this.setData({\n        tabsHeight:tabsHeight\n      })\n    }).exec()\n    this.initShippingAddress()\n  },\n  getTopHeightFunction() {\n    var that = this\n    var tabs = that.data.tabs\n    tabs.forEach((element, index) => {\n      var viewId = \"#\" + element.view_id\n      that.getTopHeight(viewId, index)\n    });\n  },\n  getTopHeight(viewId, index) {\n    var query = wx.createSelectorQuery();\n    query.select(viewId).boundingClientRect((rect) => {\n      if (!rect) {\n        return\n      }\n      let top = rect.top\n      var tabs = this.data.tabs\n      tabs[index].topHeight = top\n      this.setData({\n        tabs: tabs\n      })\n    }).exec()\n    \n  },\n  async goodsFavCheck() {\n    const res = await WXAPI.goodsFavCheck(wx.getStorageSync('token'), this.data.goodsId)\n    if (res.code == 0) {\n      this.setData({\n        faved: true\n      })\n    } else {\n      this.setData({\n        faved: false\n      })\n    }\n  },\n  async addFav(){\n    if (this.data.faved) {\n      // 取消收藏\n      WXAPI.goodsFavDeleteV2({\n        token: wx.getStorageSync('token'),\n        goodsId: this.data.goodsId,\n        type: 1\n      }).then(res => {\n        this.goodsFavCheck()\n      })\n    } else {\n      const extJsonStr = {\n        wxaurl: `/pages/goods-details/vop?id=${this.data.goodsId}&goodsId=${this.data.goodsId2}`,\n        skuId: this.data.goodsId,\n        pic: this.data.imageDomain + this.data.info.imagePath,\n        name: this.data.info.name\n      }\n      // 加入收藏\n      WXAPI.goodsFavAdd({\n        token: wx.getStorageSync('token'),\n        goodsId: this.data.goodsId,\n        type: 1,\n        extJsonStr: JSON.stringify(extJsonStr)\n      }).then(res => {\n        this.goodsFavCheck()\n      })\n    }\n  },\n  async getGoodsDetailAndKanjieInfo(goodsId) {\n    const token = wx.getStorageSync('token')\n    if (this.data.goodsId2) {\n      const goodsDetailRes = await WXAPI.goodsDetail(this.data.goodsId2, token ? token : '')\n      if (goodsDetailRes.code == 0) {\n        this.setData({\n          goodsDetail: goodsDetailRes.data\n        })\n      }\n    }\n    const res = await WXAPI.jdvopGoodsDetailV3({\n      skuId: goodsId,\n      queryExts: 3\n    })\n    if (res.data.info.introduceWechat) {\n      res.data.wxintroduction = JSON.parse(res.data.info.introduceWechat)\n    }\n    if (res.code == 0) {\n      this.setData(res.data)\n    }\n  },\n  async skuImages(goodsId) {\n    const res = await WXAPI.jdvopGoodsSkuImagesV2(goodsId)\n    if (res.code == 0) {\n      this.setData({\n        skuImages: res.data\n      })\n    }\n  },\n  async shopSubdetail(shopId){\n    const res = await WXAPI.shopSubdetail(shopId)\n    if (res.code == 0) {\n      this.setData({\n        shopSubdetail: res.data\n      })\n    }\n  },\n  goShopCar: function() {\n    wx.reLaunch({\n      url: \"/pages/shop-cart/index\"\n    });\n  },\n  toAddShopCar: function() {\n    this.setData({\n      shopType: \"addShopCar\"\n    })\n    this.bindGuiGeTap();\n  },\n  tobuy: function() {\n    this.setData({\n      shopType: \"tobuy\"\n    });\n    this.bindGuiGeTap();\n  },\n  toPingtuan: function(e) {\n    let pingtuanopenid = 0\n    if (e.currentTarget.dataset.pingtuanopenid) {\n      pingtuanopenid = e.currentTarget.dataset.pingtuanopenid\n    }\n    this.setData({\n      shopType: \"toPingtuan\",\n      selectSizePrice: this.data.goodsDetail.basicInfo.pingtuanPrice,\n      selectSizeOPrice: this.data.goodsDetail.basicInfo.originalPrice,\n      pingtuanopenid: pingtuanopenid,\n      \n      hideShopPopup: false,\n      skuGoodsPic: this.data.goodsDetail.basicInfo.pic\n    });\n    \n  },\n  /**\n   * 规格选择弹出框\n   */\n  bindGuiGeTap: function() {\n    this.setData({\n      hideShopPopup: false\n    })\n  },\n  /**\n   * 规格选择弹出框隐藏\n   */\n  closePopupTap: function() {\n    this.setData({\n      hideShopPopup: true\n    })\n  },\n  stepChange(event) {\n    this.setData({\n      buyNumber: event.detail\n    })\n  },\n  /**\n   * 选择商品规格\n   */\n  async labelItemTap(e) {\n    const propertyindex = e.currentTarget.dataset.propertyindex\n    const propertychildindex = e.currentTarget.dataset.propertychildindex\n\n    const property = this.data.goodsDetail.properties[propertyindex]\n    const child = property.childsCurGoods[propertychildindex]\n    // 取消该分类下的子栏目所有的选中状态\n    property.childsCurGoods.forEach(child => {\n      child.active = false\n    })\n    // 设置当前选中状态\n    property.optionValueId = child.id\n    child.active = true\n    // 获取所有的选中规格尺寸数据\n    const needSelectNum = this.data.goodsDetail.properties.length\n    let curSelectNum = 0;\n    let propertyChildIds = \"\";\n    let propertyChildNames = \"\";\n\n    this.data.goodsDetail.properties.forEach(p => {\n      p.childsCurGoods.forEach(c => {\n        if (c.active) {\n          curSelectNum++;\n          propertyChildIds = propertyChildIds + p.id + \":\" + c.id + \",\";\n          propertyChildNames = propertyChildNames + p.name + \":\" + c.name + \"  \";\n        }\n      })\n    })\n    let canSubmit = false;\n    if (needSelectNum == curSelectNum) {\n      canSubmit = true;\n    }\n    let skuGoodsPic = this.data.skuGoodsPic\n    if (this.data.goodsDetail.subPics && this.data.goodsDetail.subPics.length > 0) {\n      const _subPic = this.data.goodsDetail.subPics.find(ele => {\n        return ele.optionValueId == child.id\n      })\n      if (_subPic) {\n        skuGoodsPic = _subPic.pic\n      }\n    }\n    this.setData({\n      goodsDetail: this.data.goodsDetail,\n      canSubmit,\n      skuGoodsPic,\n      propertyChildIds,\n      propertyChildNames,\n    })\n    this.calculateGoodsPrice()\n  },\n  async calculateGoodsPrice() {\n    // 计算最终的商品价格\n    let price = this.data.goodsDetail.basicInfo.minPrice\n    let originalPrice = this.data.goodsDetail.basicInfo.originalPrice\n    let totalScoreToPay = this.data.goodsDetail.basicInfo.minScore\n    let buyNumMax = this.data.goodsDetail.basicInfo.stores\n    let buyNumber = this.data.goodsDetail.basicInfo.minBuyNumber\n    if (this.data.shopType == 'toPingtuan') {\n      price = this.data.goodsDetail.basicInfo.pingtuanPrice\n    }\n    // 计算 sku 价格\n    if (this.data.canSubmit) {\n      const token = wx.getStorageSync('token')\n      const res = await WXAPI.goodsPriceV2({\n        token: token ? token : '',\n        goodsId: this.data.goodsDetail.basicInfo.id,\n        propertyChildIds: this.data.propertyChildIds\n      })\n      if (res.code == 0) {\n        price = res.data.price\n        if (this.data.shopType == 'toPingtuan') {\n          price = res.data.pingtuanPrice\n        }\n        originalPrice = res.data.originalPrice\n        totalScoreToPay = res.data.score\n        buyNumMax = res.data.stores\n      }\n    }\n    // 计算配件价格\n    if (this.data.goodsAddition) {\n      this.data.goodsAddition.forEach(big => {\n        big.items.forEach(small => {\n          if (small.active) {\n            price = (price*100 + small.price*100) / 100\n          }\n        })\n      })\n    }\n    this.setData({\n      selectSizePrice: price,\n      selectSizeOPrice: originalPrice,\n      totalScoreToPay: totalScoreToPay,\n      buyNumMax,\n      buyNumber: (buyNumMax >= buyNumber) ? buyNumber : 0\n    });\n  },\n  /**\n   * 选择可选配件\n   */\n  async labelItemTap2(e) {\n    const propertyindex = e.currentTarget.dataset.propertyindex\n    const propertychildindex = e.currentTarget.dataset.propertychildindex\n\n    const goodsAddition = this.data.goodsAddition\n    const property = goodsAddition[propertyindex]\n    const child = property.items[propertychildindex]\n    if (child.active) {\n      // 该操作为取消选择\n      child.active = false\n      this.setData({\n        goodsAddition\n      })\n      this.calculateGoodsPrice()\n      return\n    }\n    // 单选配件取消所有子栏目选中状态\n    if (property.type == 0) {\n      property.items.forEach(child => {\n        child.active = false\n      })\n    }\n    // 设置当前选中状态\n    child.active = true\n    this.setData({\n      goodsAddition\n    })\n    this.calculateGoodsPrice()\n  },\n  /**\n   * 加入购物车\n   */\n  async addShopCar() {\n    if (this.data.buyNumber < 1) {\n      wx.showToast({\n        title: '请选择购买数量',\n        icon: 'none'\n      })\n      return\n    }\n    const token = wx.getStorageSync('token')\n    const goodsId = this.data.goodsId\n    const res = await WXAPI.jdvopCartAddV2({\n      token,\n      goodsId,\n      number: this.data.buyNumber\n    })\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n\n    this.closePopupTap();\n    wx.showToast({\n      title: '加入购物车',\n      icon: 'success'\n    })\n    this.shippingCartInfo()\n  },\n  /**\n   * 立即购买\n   */\n  buyNow(e) {\n    let shoptype = e.currentTarget.dataset.shoptype\n    if (this.data.buyNumber < 1) {\n      wx.showModal({\n        title: '提示',\n        content: '购买数量不能为0！',\n        showCancel: false\n      })\n      return;\n    }\n    //组建立即购买信息\n    var buyNowInfo = this.buliduBuyNowInfo(shoptype);\n    // 写入本地存储\n    wx.setStorage({\n      key: \"buyNowInfo\",\n      data: buyNowInfo\n    })\n    this.closePopupTap();\n    wx.navigateTo({\n      url: \"/pages/to-pay-order/index?orderType=buyNow&shopCarType=1\"\n    })\n  },\n  /**\n   * 组建立即购买信息\n   */\n  buliduBuyNowInfo: function(shoptype) {\n    var shopCarMap = {};\n    shopCarMap.goodsId = this.data.goodsId;\n    shopCarMap.pic = this.data.imageDomain + this.data.price.pic;\n    shopCarMap.name = this.data.price.skuName;\n    shopCarMap.price = this.data.price.priceSale;\n    shopCarMap.left = \"\";\n    shopCarMap.active = true;\n    shopCarMap.number = this.data.buyNumber;\n    \n    var buyNowInfo = {};\n    buyNowInfo.shopNum = 0;\n    buyNowInfo.shopList = [shopCarMap];\n    \n    return buyNowInfo;\n  },\n  onShareAppMessage() {\n    return {\n      title: this.data.price.skuName,\n      path: '/pages/goods-details/vop?id=' + this.data.goodsId + '&goodsId=' + this.data.goodsId2 + '&inviter_id=' + wx.getStorageSync('uid'),\n      success: function(res) {\n        // 转发成功\n      },\n      fail: function(res) {\n        // 转发失败\n      }\n    }\n  },\n  onShareTimeline() {\n    return {\n      title: this.data.price.skuName,\n      query: 'id=' + this.data.goodsId + '&goodsId=' + this.data.goodsId2 + '&inviter_id=' + wx.getStorageSync('uid'),\n      imageUrl: wx.getStorageSync('share_pic'),\n    }\n  },\n  reputation: function(goodsId) {\n    var that = this;\n    WXAPI.goodsReputation({\n      goodsId: goodsId\n    }).then(function(res) {\n      if (res.code == 0) {\n        res.data.forEach(ele => {\n          if (ele.goods.goodReputation == 0) {\n            ele.goods.goodReputation = 1\n          } else if (ele.goods.goodReputation == 1) {\n            ele.goods.goodReputation = 3\n          } else if (ele.goods.goodReputation == 2) {\n            ele.goods.goodReputation = 5\n          }\n        })\n        that.setData({\n          reputation: res.data\n        });\n      }\n    })\n  },\n  pingtuanList: function(goodsId) {\n    var that = this;\n    WXAPI.pingtuanList({\n      goodsId: goodsId,\n      status: 0\n    }).then(function(res) {\n      if (res.code == 0) {\n        that.setData({\n          pingtuanList: res.data.result\n        });\n      }\n    })\n  },\n  getVideoSrc: function(videoId) {\n    var that = this;\n    WXAPI.videoDetail(videoId).then(function(res) {\n      if (res.code == 0) {\n        that.setData({\n          videoMp4Src: res.data.fdMp4\n        });\n      }\n    })\n  },\n  joinKanjia(){\n    this.doneJoinKanjia();\n  },\n  doneJoinKanjia: function() { // 报名参加砍价活动\n    const _this = this;\n    if (!_this.data.curGoodsKanjia) {\n      return;\n    }\n    wx.showLoading({\n      title: '加载中',\n      mask: true\n    })\n    WXAPI.kanjiaJoin(wx.getStorageSync('token'), _this.data.curGoodsKanjia.id).then(function(res) {\n      wx.hideLoading()\n      if (res.code == 0) {\n        _this.setData({\n          kjJoinUid: wx.getStorageSync('uid'),\n          myHelpDetail: null\n        })\n        _this.getGoodsDetailAndKanjieInfo(_this.data.goodsDetail.basicInfo.id)\n      } else {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n      }\n    })\n  },\n  joinPingtuan: function(e) {\n    let pingtuanopenid = e.currentTarget.dataset.pingtuanopenid\n    wx.navigateTo({\n      url: \"/pages/to-pay-order/index?orderType=buyNow&pingtuanOpenId=\" + pingtuanopenid\n    })\n  },\n  goIndex() {\n    wx.switchTab({\n      url: '/pages/index/index',\n    });\n  },\n  helpKanjia() {\n    this.helpKanjiaDone()\n  },\n  helpKanjiaDone(){\n    const _this = this;\n    WXAPI.kanjiaHelp(wx.getStorageSync('token'), _this.data.kjId, _this.data.kjJoinUid, '').then(function (res) {\n      if (res.code != 0) {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n        return;\n      }\n      _this.setData({\n        myHelpDetail: res.data\n      });\n      wx.showModal({\n        title: '成功',\n        content: '成功帮TA砍掉 ' + res.data.cutPrice + ' 元',\n        showCancel: false\n      })\n      _this.getGoodsDetailAndKanjieInfo(_this.data.goodsDetail.basicInfo.id)\n    })\n  },\n  closePop(){\n    this.setData({\n      posterShow: false\n    })\n  },\n  async drawSharePic() {\n    const _this = this\n    const accountInfo = wx.getAccountInfoSync()\n    const envVersion = accountInfo.miniProgram.envVersion\n    const qrcodeRes = await WXAPI.wxaQrcode({\n      scene: _this.data.goodsId + ',' + _this.data.goodsId2 + ',' + wx.getStorageSync('uid'),\n      page: 'pages/goods-details/vop',\n      is_hyaline: true,\n      autoColor: true,\n      expireHours: 1,\n      env_version: envVersion,\n      check_path: envVersion == 'release' ? true : false,\n    })\n    if (qrcodeRes.code != 0) {\n      wx.showToast({\n        title: qrcodeRes.msg,\n        icon: 'none'\n      })\n      return\n    }\n    const qrcode = qrcodeRes.data\n    const pic = _this.data.goodsDetail.basicInfo.pic\n    wx.getImageInfo({\n      src: pic,\n      success(res) {\n        const height = 490 * res.height / res.width\n        _this.drawSharePicDone(height, qrcode)\n      },\n      fail(e) {\n        console.error(e)\n      }\n    })\n  },\n  drawSharePicDone(picHeight, qrcode) {\n    const _this = this\n    const _baseHeight = 74 + (picHeight + 120)\n    this.setData({\n      posterConfig: {\n        width: 750,\n        height: picHeight + 660,\n        backgroundColor: '#fff',\n        debug: false,\n        blocks: [\n          {\n            x: 76,\n            y: 74,\n            width: 604,\n            height: picHeight + 120,\n            borderWidth: 2,\n            borderColor: '#c2aa85',\n            borderRadius: 8\n          }\n        ],\n        images: [\n          {\n            x: 133,\n            y: 133,\n            url: _this.data.goodsDetail.basicInfo.pic, // 商品图片\n            width: 490,\n            height: picHeight\n          },\n          {\n            x: 76,\n            y: _baseHeight + 199,\n            url: qrcode, // 二维码\n            width: 222,\n            height: 222\n          }\n        ],\n        texts: [\n          {\n            x: 375,\n            y: _baseHeight + 80,\n            width: 650,\n            lineNum:2,\n            text: _this.data.goodsDetail.basicInfo.name,\n            textAlign: 'center',\n            fontSize: 40,\n            color: '#333'\n          },\n          {\n            x: 375,\n            y: _baseHeight + 180,\n            text: '￥' + _this.data.goodsDetail.basicInfo.minPrice,\n            textAlign: 'center',\n            fontSize: 50,\n            color: '#e64340'\n          },\n          {\n            x: 352,\n            y: _baseHeight + 320,\n            text: '长按识别小程序码',\n            fontSize: 28,\n            color: '#999'\n          }\n        ],\n      }\n    }, () => {\n      Poster.create();\n    });\n  },\n  onPosterSuccess(e) {\n    console.log('success:', e)\n    this.setData({\n      posterImg: e.detail,\n      showposterImg: true\n    })\n  },\n  onPosterFail(e) {\n    console.error('fail:', e)\n  },\n  savePosterPic() {\n    const _this = this\n    wx.saveImageToPhotosAlbum({\n      filePath: this.data.posterImg,\n      success: (res) => {\n        wx.showModal({\n          content: '已保存到手机相册',\n          showCancel: false,\n          confirmText: '知道了',\n          confirmColor: '#333'\n        })\n      },\n      complete: () => {\n        _this.setData({\n          showposterImg: false\n        })\n      },\n      fail: (res) => {\n        if (res.errMsg.indexOf('fail privacy permission is not authorized') != -1) {\n          wx.showModal({\n            content: '请阅读并同意隐私条款以后才能继续本操作',\n            confirmText: '阅读协议',\n            cancelText: '取消',\n            success (res) {\n              if (res.confirm) {\n                wx.requirePrivacyAuthorize() // 弹出用户隐私授权框\n              }\n            }\n          })\n        } else if (res.errMsg.indexOf('fail auth deny') != -1) {\n          wx.showModal({\n            content: '本次操作需要您同意并将图片写入手机相册',\n            confirmText: '立即授权',\n            cancelText: '取消',\n            success (res) {\n              if (res.confirm) {\n                // 弹出设置窗口，让用户去设置\n                wx.openSetting({\n                  withSubscriptions: true,\n                  fail: aaa => console.log(aaa)\n                });\n              }\n            }\n          })\n        } else {\n          console.error(res);\n          wx.showToast({\n            title: res.errMsg,\n            icon: 'none'\n          })\n        }\n      }\n    })\n  },\n  previewImage(e) {\n    const url = e.currentTarget.dataset.url\n    wx.previewImage({\n      current: url, // 当前显示图片的http链接\n      urls: [url] // 需要预览的图片http链接列表\n    })\n  },\n  onTabsChange(e) {\n    var index = e.detail.index\n    this.setData({\n      toView: this.data.tabs[index].view_id,\n      tabclicked: true\n    })\n    setTimeout(() => {\n      this.setData({\n        tabclicked: false\n      })\n    }, 1000);\n  },\n  backToHome() {\n    wx.switchTab({\n      url: '/pages/index/index',\n    })\n  },\n  customerService() {\n    wx.openCustomerServiceChat({\n      extInfo: {url: wx.getStorageSync('customerServiceChatUrl')},\n      corpId: wx.getStorageSync('customerServiceChatCorpId'),\n      showMessageCard: true,\n      sendMessageTitle: this.data.price.skuName,\n      sendMessagePath: '/pages/goods-details/vop?id='+ this.data.goodsId +'&goodsId=' + this.data.goodsId2,\n      sendMessageImg: this.data.imageDomain + this.data.price.pic,\n      success: res => {},\n      fail: err => {\n        console.error(err)\n      }\n    })\n  },\n})\n"
  },
  {
    "path": "pages/goods-details/vop.json",
    "content": "{\n  \"navigationBarTitleText\": \"商品详情\",\n  \"usingComponents\": {\n    \"poster\": \"wxa-plugin-canvas/poster\"\n  }\n}"
  },
  {
    "path": "pages/goods-details/vop.wxml",
    "content": "<view class=\"container\">\n  <van-sticky wx:if=\"{{createTabs}}\">\n    <view id=\"tabs\" class=\"tabs-container\">\n      <van-tabs sticky bind:click=\"onTabsChange\" custom-class=\"\" active=\"{{ active }}\">\n        <van-tab wx:for=\"{{tabs}}\" title=\"{{item.tabs_name}}\" name=\"{{item.tabs_name}}\" />\n      </van-tabs>\n    </view>\n  </van-sticky>\n  <scroll-view class=\"scroll-container\" scroll-into-view=\"{{toView}}\" scroll-y=\"true\" scroll-with-animation=\"true\"\n    bindscroll=\"bindscroll\">\n    <view wx:if=\"{{ imageDomain }}\" class=\"swiper-container\" id=\"swiper-container\">\n      <swiper class=\"swiper_box\" indicator-dots=\"true\" indicator-active-color=\"#fff\" autoplay circular>\n        <swiper-item wx:for=\"{{skuImages}}\" wx:key=\"id\">\n          <image src=\"{{imageDomain}}{{item.shortPath}}\" class=\"slide-image\" mode=\"aspectFill\" lazy-load=\"true\" />\n        </swiper-item>\n      </swiper>\n    </view>\n    <view class=\"goods-info vcell\">\n      <view class=\"goods-info-top-container\">\n        <view class=\"goods-profile\">\n          <view class=\"p\"><text>¥</text> {{price.priceSale}}</view>\n          <view wx:if=\"{{price.priceJd && price.priceJd > 0}}\" class=\"goods-price\"\n            style='color:#aaa;text-decoration:line-through;padding: 15rpx 0rpx 0rpx 15rpx;'><text>¥</text>\n            {{price.priceJd}}</view>\n        </view>\n        <view class=\"goods-info-fx\">\n          <view class='item left'>\n            <van-icon name=\"share-o\" size=\"24px\" />\n            <view class=\"icon-title\">分享</view>\n            <button open-type='share'></button>\n          </view>\n          <view class='item' bindtap=\"drawSharePic\">\n            <van-icon name=\"qr\" size=\"24px\" />\n            <view class=\"icon-title\">二维码</view>\n          </view>\n        </view>\n      </view>\n      <view class=\"goods-title\">{{price.skuName}}</view>\n      <view class=\"characteristic\">{{goodsDetail.basicInfo.characteristic}}</view>\n    </view>\n\n    <view class=\"goods-des-info\" style=\"margin-top:35rpx;\" wx:if=\"{{pingtuanList}}\">\n      <view class=\"label-title\" style=\"border-bottom:1px solid #eee;\">{{pingtuanList.length}}人在拼单，可直接参与</view>\n      <view class=\"goods-text\" style=\"margin-top:15rpx;border-bottom:1px solid #eee;overflow:hidden;\"\n        wx:for=\"{{pingtuanList}}\" wx:key=\"id\">\n        <view style=\"width:150rpx;float:left;\">\n          <image style=\"width: 150rpx; height: 150rpx;\" src=\"{{item.apiExtUser.avatarUrl}}\"></image>\n          <view style=\"width:150rpx;text-align:center;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;\">\n            {{item.apiExtUser.nick}}</view>\n        </view>\n        <view style=\"width:500rpx;float:left;margin-left:35rpx;\">\n          <view>已有\n            <text style=\"color:red\"> {{item.helpNumber}} </text>人参与</view>\n          <view style=\"color: #B0B0B0;font-size:24rpx;\">截止: {{item.dateEnd}}</view>\n          <button type=\"warn\" size=\"mini\" data-pingtuanopenid=\"{{item.id}}\" bindtap=\"toPingtuan\"> 去拼单 </button>\n        </view>\n      </view>\n    </view>\n    <van-cell wx:if=\"{{hasMoreSelect && goodsDetailSkuShowType==0}}\" custom-class=\"vw100\" is-link\n      bind:click=\"bindGuiGeTap\">\n      <view slot=\"title\">\n        请选择:\n        <block wx:for=\"{{goodsDetail.properties}}\" wx:key=\"id\"> {{item.name}}</block>\n        <block wx:for=\"{{goodsAddition}}\" wx:key=\"id\"> {{item.name}}</block>\n      </view>\n    </van-cell>\n    <view class=\"size-label-box2\" wx:if=\"{{goodsDetailSkuShowType==1}}\">\n      <view class=\"label-title\">选择商品规格</view>\n      <view class=\"size-label-box\">\n        <block wx:for=\"{{goodsDetail.properties}}\" wx:for-item=\"property\" wx:for-index=\"idx\" wx:key=\"id\">\n          <view class=\"label\">{{property.name}}</view>\n          <view class=\"label-item-box\">\n            <view class=\"label-item {{item.active ? 'active' : '' }}\" wx:for=\"{{property.childsCurGoods}}\" wx:key=\"id\"\n              bindtap=\"labelItemTap\" data-propertyindex=\"{{idx}}\" data-propertychildindex=\"{{index}}\">\n              {{item.name}}\n            </view>\n          </view>\n        </block>\n      </view>\n      <van-cell title=\"购买数量\">\n        <view>\n          <van-stepper value=\"{{ buyNumber }}\" min=\"{{ buyNumMin }}\" max=\"{{ buyNumMax }}\" bind:change=\"stepChange\" />\n        </view>\n      </van-cell>\n    </view>\n    <view wx:if=\"{{shopSubdetail}}\" class=\"shop-container\">\n      <image mode=\"aspectFill\" src=\"{{shopSubdetail.info.pic}}\"></image>\n      <view class=\"info\">\n        <view class=\"title\">{{shopSubdetail.info.name}}</view>\n        <view class=\"address\">{{shopSubdetail.info.address}}</view>\n      </view>\n    </view>\n    <view class=\"goods-des-info\" id=\"goods-des-info\">\n      <view class=\"label-title\">\n        <view class=\"left\">商品详情</view>\n      </view>\n      <view class=\"goods-text\">\n        <image wx:for=\"{{wxintroduction}}\" wx:key=\"id\" mode=\"widthFix\" src=\"{{ item }}\"></image>\n        <mp-html wx:if=\"{{ wxintroduction && goodsDetail.content }}\" content=\"{{goodsDetail.content}}\" />\n      </view>\n    </view>\n    <van-cell-group wx:if=\"{{!curGoodsKanjia && reputation}}\" custom-class=\"vw100\" title=\"宝贝评价\">\n      <block wx:for=\"{{reputation}}\" wx:key=\"id\">\n        <van-cell custom-class=\"reputation-cell\" icon=\"{{item.user.avatarUrl}}\" title=\"{{item.user.nick}}\"\n          label=\"{{item.goods.dateReputation}}\" border=\"{{ false }}\">\n          <van-rate value=\"{{ item.goods.goodReputation }}\" color=\"#e64340\" readonly />\n        </van-cell>\n        <van-cell wx:if=\"{{ item.goods.goodReputationRemark }}\" title-class=\"reputation-cell-reamrk\"\n          title=\"{{item.goods.goodReputationRemark}}\" />\n        <view wx:if=\"{{ item.reputationPics }}\" class=\"reputation-pics\">\n          <image wx:for=\"{{item.reputationPics}}\" wx:for-item=\"picItem\" src=\"{{ picItem.pic }}\" mode=\"aspectFill\"\n            bindtap=\"previewImage\" data-url=\"{{ picItem.pic }}\"></image>\n        </view>\n        <van-cell wx:if=\"{{ item.goods.goodReputationReply }}\" title-class=\"reputation-cell-reamrk\"\n          title=\"掌柜回复:{{item.goods.goodReputationReply}}\" />\n      </block>\n    </van-cell-group>\n    <view class='kjBuyButton' wx:if=\"{{curGoodsKanjia && curKanjiaprogress}}\">\n      <view class=\"item\" wx:if=\"{{curKanjiaprogress.kanjiaInfo.uid != curuid}}\">\n        <van-button type=\"primary\" block bind:click=\"helpKanjia\" disabled=\"{{myHelpDetail}}\">\n          {{myHelpDetail?\"您已砍过\":\"帮TA砍\"}}</van-button>\n      </view>\n      <view class=\"item\" wx:else>\n        <van-button type=\"danger\" block bind:click=\"tobuy\">用当前价购买</van-button>\n      </view>\n    </view>\n    <van-goods-action wx:if=\"{{!curGoodsKanjia}}\">\n      <van-goods-action-icon wx:if=\"{{ customerServiceType == 'QW' }}\" icon=\"chat-o\" text=\"客服\" bind:click=\"customerService\" />\n      <van-goods-action-icon wx:else icon=\"chat-o\" text=\"客服\" open-type=\"contact\"\n        send-message-title=\"{{price.skuName}}\" send-message-img=\"{{imageDomain}}{{price.pic}}\"\n        send-message-path=\"/pages/goods-details/vop?id={{goodsId}}&goodsId={{ goodsId2 }}\" show-message-card=\"{{ true }}\" />\n      <van-goods-action-icon icon=\"cart-o\" text=\"购物车\" bind:click=\"goShopCar\" info=\"{{ shopNum ? shopNum : '' }}\" />\n      <van-goods-action-icon icon=\"{{faved?'like':'like-o'}}\" text=\"收藏\" bind:click=\"addFav\" />\n      <van-goods-action-button text=\"加入购物车\" type=\"warning\"\n        bind:click=\"{{goodsDetailSkuShowType==0?'toAddShopCar':'addShopCar'}}\" />\n      <van-goods-action-button text=\"立即购买\" data-shopType=\"{{shopType}}\"\n        bind:click=\"{{goodsDetailSkuShowType==0?'tobuy':'buyNow'}}\" />\n    </van-goods-action>\n  </scroll-view>\n</view>\n\n<block wx:if=\"{{posterShow}}\">\n  <view class=\"poster-mask\"></view>\n  <view class=\"poster\">\n    <canvas class=\"canvas\" style=\"{{canvasstyle}}\" canvas-id=\"firstCanvas\"></canvas>\n  </view>\n  <view class=\"poster-btn\">\n    <button type=\"primary\" size=\"mini\" bindtap='_saveToMobile'> 保存图片 </button>\n    <button type=\"warn\" size=\"mini\" bindtap='closePop'> 关闭 </button>\n  </view>\n</block>\n\n<poster id=\"poster\" config=\"{{posterConfig}}\" bind:success=\"onPosterSuccess\" bind:fail=\"onPosterFail\"></poster>\n<view wx:if=\"{{showposterImg}}\" class=\"popup-mask\"></view>\n<view wx:if=\"{{showposterImg}}\" class=\"posterImg-box\">\n  <image mode=\"widthFix\" class=\"posterImg\" src=\"{{posterImg}}\"></image>\n  <view class=\"btn-create\" bindtap=\"savePosterPic\">保存到相册</view>\n</view>\n\n<van-popup show=\"{{ !hideShopPopup }}\" round closeable position=\"bottom\"\n  custom-style=\"padding-top:48rpx;max-height: 80%;\" bind:close=\"closePopupTap\">\n  <van-card centered price=\"{{price.priceSale}}\" origin-price=\"{{ price.priceJd ? price.priceJd : '' }}\"\n    title=\"{{price.skuName}}\" thumb=\"{{ imageDomain }}{{ price.pic }}\" />\n  <van-cell title=\"购买数量\">\n    <view>\n      <van-stepper value=\"{{ buyNumber }}\" min=\"{{ 1 }}\" max=\"{{ 999 }}\" bind:change=\"stepChange\" />\n    </view>\n  </van-cell>\n  <van-cell-group wx:if=\"{{ curAddressData }}\" title=\"配送地址\">\n    <van-cell title=\"{{curAddressData.linkMan}} {{curAddressData.mobile}}\" label=\"{{curAddressData.address}}\" value=\"更换\"\n      is-link bind:click=\"selectAddress\" />\n  </van-cell-group>\n  <van-button wx:if=\"{{!curAddressData}}\" bindtap=\"selectAddress\" type=\"warning\" block>添加收货地址</van-button>\n  <van-button wx:if=\"{{curAddressData && !canPurchase}}\" type=\"warning\" disabled block>该地区已售罄</van-button>\n  <van-button wx:if=\"{{curAddressData && canPurchase && shopType =='addShopCar'}}\" bindtap=\"addShopCar\" type=\"danger\"\n    block>加入购物车</van-button>\n  <van-button wx:if=\"{{curAddressData && canPurchase && (shopType =='tobuy' || shopType =='toPingtuan')}}\"\n    data-shopType=\"{{shopType}}\" bindtap=\"buyNow\" type=\"danger\" block>立即购买</van-button>\n</van-popup>"
  },
  {
    "path": "pages/goods-details/vop.wxss",
    "content": "\npage,\nview,\nimage,\ninput,\ntextarea {\n  display: block;\n  box-sizing: border-box;\n}\n\n.van-cell {\n  padding: 10px 38rpx;\n}\n\n.container {\n  background-color: #F2f2f2;\n  min-height: 100%;\n  padding-bottom: 100rpx;\n}\n\n.scroll-container {\n  height: 100vh;\n  padding-bottom: 64rpx;\n}\n\n.tabs-container {\n  width: 100%;\n  display: flex;\n  background-color: white;\n}\n\n.home-o {\n  width: 20%;\n}\n\n.swiper-container {\n  width: 100%;\n  position: relative;\n}\n\n.swiper_box {\n  width: 100%;\n  height: 748rpx;\n}\n\nswiper-item image {\n  width: 100%;\n  display: inline-block;\n  overflow: hidden;\n  height: 748rpx;\n}\n\n.goods-info {\n  background-color: #fff;\n  padding: 35rpx 0;\n  width: 100%;\n  position: relative;\n}\n\n.goods-info-top-container {\n  display: flex;\n  justify-content: space-between;\n  margin-bottom: 10rpx;\n}\n\n.goods-info-fx {\n  bottom: 60rpx;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-right: 35rpx;\n}\n\n.goods-info-fx .item {\n  /* height: 50rpx; */\n  right: 130rpx;\n  top: 100rpx;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  font-size: 24rpx;\n  background: #fff;\n  z-index: 20;\n}\n\n.goods-info-fx .left {\n  margin-right: 10px;\n}\n\n.goods-info-fx .icon-title{\n  padding-top:5px ;\n  font-size: 11px;\n}\n\n.goods-info-fx .item image {\n  width: 50rpx;\n  height: 50rpx;\n}\n\n.goods-info-fx .item button {\n  position: absolute;\n  height: 100%;\n  width: 100%;\n  opacity: 0;\n  z-index: 99;\n}\n\n.goods-info .goods-title {\n  box-sizing: border-box;\n  padding: 0 30rpx;\n  font-size: 32rpx;\n  line-height: 1.4;\n  color: #000;\n  /* padding-bottom: 26rpx; */\n}\n\n.goods-info .goods-share {\n  box-sizing: border-box;\n  padding: 0 30rpx;\n  font-size: 25rpx;\n  line-height: 1.4;\n  color: #CC0000;\n  padding-top: 26rpx;\n}\n\n.vcell{\n  border-bottom-left-radius: 12px;\n  border-bottom-right-radius: 12px;\n}\n\n.goods-profile {\n  display: flex;\n  align-items: center;\n}\n\n.goods-profile .p {\n  color: #e64340;\n  font-size: 20pt;\n  margin-left: 30rpx;\n}\n\n.goods-profile .p text {\n  font-size: 12pt;\n}\n\n.goods-profile .r {\n  color: #ccc;\n  font-size: 10pt;\n  margin-left: 30rpx;\n}\n\n.row-arrow {\n  width: 100vw;\n  padding: 0 32rpx;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  height: 102rpx;\n  font-size: 28rpx;\n  line-height: 102rpx;\n  background: #fff;\n  margin-bottom: 32rpx;\n}\n\n.row-arrow image {\n  width: 40rpx;\n  height: 40rpx;\n}\n\n.goods-des-info {\n  width: 100%;\n  box-sizing: border-box;\n  background-color: #fff;\n  border-radius: 12px;\n}\n\n.label-title {\n  font-size: 28rpx;\n  color: #000000;\n  padding: 30rpx;\n  display: flex;\n  justify-content: space-between;\n}\n\n.label-title .left{\n  border-left: 3px solid #e64340;\n  height: auto;\n  padding-left: 10px;\n}\n\n.goods-text {\n  padding: 0 10rpx;\n  font-size: 28rpx;\n  color: #666666;\n  line-height: 56rpx;\n  margin-bottom: 30rpx;\n}\n\n.goods-text image {\n  width: 100%;\n}\n\n.des-imgs {\n  width: 100%;\n}\n\n.des-imgs image {\n  width: 100%;\n}\n\n.footer-box {\n  width: 100%;\n  height: 100rpx;\n  background-color: #fff;\n  position: fixed;\n  bottom: 0;\n  left: 0;\n  display: flex;\n  box-shadow: 0 0 1rpx 0;\n  align-items: center;\n}\n\n.footer-box .contact {\n  position: relative;\n  height: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-left: 32rpx;\n}\n\n.footer-box .contact button {\n  position: absolute;\n  height: 100%;\n  width: 100%;\n  opacity: 0;\n  z-index: 99;\n}\n\n.footer-box .contact image {\n  width: 60rpx;\n  height: 60rpx;\n}\n\n.footer-box .shop-cart-btn {\n  position: relative;\n  height: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin-left: 32rpx;\n}\n\n.footer-box .shop-cart-btn image {\n  width: 55rpx;\n  height: 55rpx;\n}\n\n.fav-icon {\n  width: 60rpx;\n  height: 60rpx;\n  margin-left: 32rpx;\n  /*707070*/\n}\n\n.footer-box .shop-cart-btn .shop-num {\n  position: absolute;\n  color: #fff;\n  left: 32rpx;\n  top: 10rpx;\n\n  width: 40rpx;\n  height: 40rpx;\n  line-height: 40rpx;\n  text-align: center;\n  border-radius: 50%;\n  background: #e64340;\n  font-size: 24rpx;\n}\n\n.footer-box .join-shop-cart {\n  text-align: center;\n  height: 100%;\n  line-height: 100rpx;\n  background-color: #ff6850;\n  color: #fff;\n  font-size: 34rpx;\n  flex: 1;\n  margin-left: 32rpx;\n}\n\n.footer-box .now-buy {\n  text-align: center;\n  height: 100%;\n  width: 250rpx;\n  line-height: 100rpx;\n  background-color: #e64340;\n  color: #fff;\n  font-size: 34rpx;\n  flex: 1;\n}\n\n.show-popup {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  z-index: 999;\n}\n\n.popup-mask {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.5);\n  z-index: 5;\n}\n\n.popup-contents {\n  position: fixed;\n  left: 0;\n  bottom: 0;\n  width: 100%;\n  background-color: #fff;\n  z-index: 6;\n}\n\n.pop-goods-info {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-left: 32rpx;\n  margin-right: 32rpx;\n  padding: 30rpx 0;\n  border-bottom: 1px solid #eee;\n}\n\n.pop-img-box {\n  width: 120rpx;\n  height: 120rpx;\n  overflow: hidden;\n  margin-right: 26rpx;\n}\n\n.pop-img-box .goods-thumbnail {\n  width: 120rpx;\n  height: 120rpx;\n}\n\n.pop-goods-title {\n  width: 484rpx;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  overflow: hidden;\n  font-size: 26rpx;\n  color: #000000;\n}\n\n.pop-goods-price {\n  font-size: 26rpx;\n  color: #e64340;\n  margin-top: 20rpx;\n}\n\n.pop-goods-price .t1 {\n  font-size: 50rpx;\n}\n\n.pop-goods-price-original {\n  font-size: 26rpx;\n  color: #aaa;\n  text-decoration: line-through;\n  margin-left: 16rpx;\n}\n\n.pop-goods-close {\n  width: 36rpx;\n  height: 36rpx;\n}\n\n.goods-property-container {\n  height: 56px;\n  align-items: center;\n  border-radius: 12px;\n  padding: 0 16px;\n}\n\n.size-label-box2 {\n  width: 100vw;\n  background: #fff;\n}\n\n.size-label-box .label {\n  font-size: 26rpx;\n  color: #000;\n  padding-left: 30rpx;\n  padding: 30rpx 0 20rpx 30rpx;\n}\n\n.size-label-box .label-item-box {\n  display: flex;\n  margin-left: 30rpx;\n  flex-direction: row;\n  flex-wrap: wrap;\n}\n\n.size-label-box .label-item {\n  font-size: 26rpx;\n  color: #000;\n  padding: 14rpx 20rpx;\n  border: 1px solid #ddd;\n  border-radius: 6rpx;\n  margin: 0 20rpx 20rpx 0;\n}\n\n.size-label-box .label-item.active {\n  color: #e64340;\n  border: 1px solid #e64340;\n}\n\n.buy-num-box {\n  display: flex;\n  justify-content: space-between;\n  padding: 30rpx 30rpx 48rpx 0;\n  margin-left: 30rpx;\n  border-top: 1px solid #eee;\n  margin-top: 30rpx;\n  align-items: center;\n}\n\n.num-label {\n  font-size: 26rpx;\n  color: #000000;\n}\n\n.buy-num-box .num-box {\n  display: flex;\n}\n\n.buy-num-box .num-box .num-jian,\n.buy-num-box .num-box .num-input,\n.buy-num-box .num-box .num-jia {\n  width: 80rpx;\n  height: 64rpx;\n  line-height: 62rpx;\n  text-align: center;\n  border: 1px solid #eee;\n}\n\n.buy-num-box .num-box .num-input {\n  font-size: 28rpx;\n}\n\n.buy-num-box .num-box .num-input input {\n  height: 100%;\n}\n\n.popup-join-btn {\n  width: 100%;\n  height: 89rpx;\n  text-align: center;\n  line-height: 89rpx;\n  font-size: 34rpx;\n  color: #ffffff;\n  background-color: #e64340;\n}\n\n.buy-num-box .num-box .hui {\n  background-color: #f5f5f9;\n}\n\n.curKanjiaprogress {\n  width: 750rpx;\n  background-color: #fff;\n  margin-top: 20rpx;\n}\n\n.curKanjiaprogress .name {\n  font-size: 40rpx;\n  padding: 20rpx;\n  text-align: center;\n}\n\n.curKanjiaprogress .placeholder {\n  margin-left: 30rpx;\n  margin-right: 30rpx;\n  text-align: center;\n  font-size: 26rpx;\n  width: 100rpx;\n  color: #999;\n}\n\n.curKanjiaprogress .kjbutton {\n  padding: 30rpx;\n}\n\n.kjBuyButton {\n  position: fixed;\n  left: 0;\n  bottom: calc(env(safe-area-inset-bottom) / 2);\n  width: 750rpx;\n  display: flex;\n}\n\n.kjBuyButton .item {\n  flex: 1;\n}\n\n.shareFloatDiv1 {\n  position: fixed;\n  top: 0px;\n  left: 0px;\n  width: 100vw;\n  height: 100vh;\n  background-color: #555;\n  filter: Alpha(Opacity=60);\n  opacity: 0.6;\n  z-index: 99998;\n}\n\n.shareFloatDiv2 {\n  position: fixed;\n  width: 100%;\n  height: 400rpx;\n  background-color: #ffffff;\n  bottom: 0rpx;\n  z-index: 99999;\n}\n\n.shareFloatDiv2 .p1 {\n  height: 260rpx;\n}\n\n.shareFloatDiv2 .p2 {\n  height: 20rpx;\n  background-color: #EEEEEE;\n}\n\n.shareFloatDiv2 .p3 {\n  height: 120rpx;\n  line-height: 120rpx;\n  text-align: center;\n  color: #555555;\n  font-size: 16px;\n}\n\n.qrcode-button {\n  padding: 30rpx;\n  margin-top: 50rpx;\n}\n\n.qrcode {\n  width: 300rpx;\n  height: 300rpx;\n  margin-top: 50rpx;\n}\n\n\n\n.posterImg-box {\n  position: absolute;\n  top: 104rpx;\n  left: 32rpx;\n  width: 686rpx;\n  margin-bottom: 100rpx;\n  z-index: 999999;\n}\n\n.posterImg {\n  width: 100%;\n}\n\n.btn-create {\n  margin: 32rpx;\n  margin-bottom: 0;\n  height: 88rpx;\n  line-height: 88rpx;\n  background: #e64340;\n  color: #fff;\n  text-align: center;\n  border-radius: 8rpx;\n}\n\n.clearfix:after {\n  /*伪元素是行内元素 正常浏览器清除浮动方法*/\n  content: \"\";\n  display: block;\n  height: 0;\n  clear: both;\n  visibility: hidden;\n}\n\n.shop-container {\n  width: 100vw;\n  margin: 32rpx 0rpx;\n  padding: 32rpx;\n  display: flex;\n  align-items: center;\n  background: #fff;\n}\n\n.shop-container image {\n  width: 90rpx;\n  height: 90rpx;\n}\n\n.shop-container .info {\n  margin-left: 32rpx;\n}\n\n.shop-container .info .title {\n  font-size: 30rpx;\n  color: #333;\n}\n\n.shop-container .info .address {\n  font-size: 26rpx;\n  color: #666;\n}\n\n.reputation-cell-group{\n  background-color:white !important;\n  border-radius: 12px;\n}\n\n.reputation-cell {\n  padding-bottom: 0rpx !important;\n  --cell-icon-size: 88rpx;\n}\n\n.reputation-cell .van-icon {\n  top: 16rpx !important;\n}\n\n.reputation-cell .avatarUrl-img{\n  width: 40px;\n  height: 40px;\n  border-radius: 100%;\n  margin-right: 26rpx;\n}\n\n.reputation-cell-reamrk {\n  /* padding-left: 96rpx; */\n}\n\n.reputation-pics {\n  width: 100vw;\n  display: flex;\n  flex-wrap: wrap;\n  background: #ffffff;\n}\n\n.reputation-pics image {\n  width: 207rpx;\n  height: 207rpx;\n  margin: 32rpx 0 0 32rpx;\n  border-radius: 16rpx;\n}\n.characteristic {\n  padding: 8rpx 32rpx;\n  color: #666;\n  font-size: 26rpx;\n}"
  },
  {
    "path": "pages/help/detail.js",
    "content": "const WXAPI = require('apifm-wxapi')\nPage({\n  data: {\n\n  },\n  onLoad: function (options) {\n    // options.id = 34094\n    this.data.id = options.id\n    this.fetchDetail()\n  },\n  onShow: function () {\n\n  },\n  async fetchDetail() {\n    const res = await WXAPI.cmsArticleDetailV3({ id: this.data.id })\n    if (res.code == 0) {\n      this.setData({\n        cmsArticleDetail: res.data.info\n      })\n      wx.setNavigationBarTitle({\n        title: res.data.info.title,\n      })\n    }\n  },\n  onShareAppMessage: function() {\n    const uid = wx.getStorageSync('uid')\n    return {\n      title: wx.getStorageSync('mallName') + ' - ' + this.data.cmsArticleDetail.title,\n      path: `/pages/help/detail?id=${this.data.id}&inviter_id=${ uid ? uid : ''}`,\n      imageUrl: wx.getStorageSync('share_pic')\n    }\n  },\n  onShareTimeline() {\n    const uid = wx.getStorageSync('uid')   \n    return {\n      title: wx.getStorageSync('mallName') + ' - ' + this.data.cmsArticleDetail.title,\n      query: `id=${this.data.id}&inviter_id=${ uid ? uid : ''}`,\n      imageUrl: wx.getStorageSync('share_pic')\n    }\n  },\n})"
  },
  {
    "path": "pages/help/detail.json",
    "content": "{\n  \"navigationBarTitleText\": \"\"\n}"
  },
  {
    "path": "pages/help/detail.wxml",
    "content": "<view class=\"content\">\n  <mp-html content=\"{{cmsArticleDetail.content}}\" />\n</view>"
  },
  {
    "path": "pages/help/detail.wxss",
    "content": ".content {\n  padding: 32rpx;\n  color: #333;\n  line-height: 64rpx;\n}"
  },
  {
    "path": "pages/help/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nPage({\n  data: {\n\n  },\n  onLoad: function (options) {\n    this.category()\n  },\n  onShow: function () {\n\n  },\n  async category() {\n    const res = await WXAPI.cmsCategories()\n    if (res.code == 0) {\n      const category = res.data.filter(ele => {\n        return ele.type == 'qa'\n      })\n      this.setData({\n        category: category\n      })\n      if (category && category.length > 0) {\n        this.articles(category[0].id)\n      }\n    }\n  },\n  async articles(categoryId) {\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.cmsArticlesV3({\n      categoryId\n    })\n    wx.hideLoading()\n    if (res.code == 0) {\n      this.setData({\n        cmsArticles: res.data.result\n      })\n    } else {\n      this.setData({\n        cmsArticles: null\n      })\n    }\n  },\n  categoryChange(e) {\n    const index = e.detail\n    const category = this.data.category[index]\n    this.articles(category.id)\n  },\n  onShareAppMessage: function() {\n    const uid = wx.getStorageSync('uid')\n    return {\n      title: wx.getStorageSync('mallName') + ' - 帮助中心',\n      path: `/pages/help/index?inviter_id=${ uid ? uid : ''}`,\n      imageUrl: wx.getStorageSync('share_pic')\n    }\n  },\n  onShareTimeline() {\n    const uid = wx.getStorageSync('uid')   \n    return {\n      title: wx.getStorageSync('mallName') + ' - 帮助中心',\n      query: `inviter_id=${ uid ? uid : ''}`,\n      imageUrl: wx.getStorageSync('share_pic')\n    }\n  },\n})"
  },
  {
    "path": "pages/help/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"帮助中心\"\n}"
  },
  {
    "path": "pages/help/index.wxml",
    "content": "<scroll-view class=\"category\" scroll-y=\"true\" scroll-with-animation=\"true\">\n  <van-sidebar bind:change=\"categoryChange\">\n    <van-sidebar-item wx:for=\"{{category}}\" wx:key=\"id\" title=\"{{item.name}}\" />\n  </van-sidebar>\n</scroll-view>\n<scroll-view class=\"articles\" scroll-y=\"true\" scroll-top=\"{{scrolltop}}\">\n  <van-empty wx:if=\"{{!cmsArticles}}\" description=\"暂无记录\" />\n  <van-cell wx:for=\"{{cmsArticles}}\" wx:key=\"id\" title=\"{{item.title}}\" is-link url=\"/pages/help/detail?id={{item.id}}\" />\n</scroll-view>"
  },
  {
    "path": "pages/help/index.wxss",
    "content": "page {\n  width: 100vw;\n  height: 100vh;\n  display: flex;\n}\n.category {\n  width: 176rpx;\n  height: 100vh;\n  flex-shrink: 0;\n}\n.articles {\n  height: 100vh;\n  flex: 1;\n}"
  },
  {
    "path": "pages/idCheck/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nPage({\n  data: {\n\n  },\n  onLoad: function (options) {\n\n  },\n  onShow: function () {\n\n  },\n  async submit() {\n    if (!this.data.name) {\n      wx.showToast({\n        title: '请输入姓名',\n        icon: 'none'\n      })\n      return\n    }\n    if (!this.data.idcard) {\n      wx.showToast({\n        title: '请输入身份证号码',\n        icon: 'none'\n      })\n      return\n    }\n    wx.showLoading({\n      title: '',\n    })\n    this.setData({\n      loading: true\n    })\n    const res = await WXAPI.idcardCheck(wx.getStorageSync('token'), this.data.name, this.data.idcard)\n    wx.hideLoading({\n      success: (res) => {},\n    })\n    this.setData({\n      loading: false\n    })\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.showToast({\n      title: '认证通过',\n    })\n    setTimeout(() => {\n      wx.navigateBack()\n    }, 1000);\n  },\n})"
  },
  {
    "path": "pages/idCheck/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"实名认证\"\n}"
  },
  {
    "path": "pages/idCheck/index.wxml",
    "content": "<van-field\n  label=\"姓名\"\n  size=\"large\"\n  model:value=\"{{ name }}\"\n  placeholder=\"请输入姓名\"\n  required\n/>\n<van-field\n  label=\"身份证号码\"\n  type=\"idcard\"\n  size=\"large\"\n  model:value=\"{{ idcard }}\"\n  placeholder=\"请输入身份证号码\"\n  required\n/>\n<view class=\"btn\">\n  <van-button type=\"primary\" block loading=\"{{loading}}\" bind:click=\"submit\">立即认证</van-button>\n</view>"
  },
  {
    "path": "pages/idCheck/index.wxss",
    "content": ".btn {\n  width: 700rpx;\n  margin: 64rpx auto;\n}"
  },
  {
    "path": "pages/index/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst TOOLS = require('../../utils/tools.js')\nconst AUTH = require('../../utils/auth')\nconst APP = getApp()\n\nPage({\n  data: {\n    inputVal: \"\", // 搜索框内容\n    goodsRecommend: [], // 推荐商品\n    kanjiaList: [], //砍价商品列表\n    pingtuanList: [], //拼团商品列表\n    loadingHidden: false, // loading\n    selectCurrent: 0,\n    categories: [],\n    goods: [],\n    loadingMoreHidden: true,\n    coupons: [],\n    curPage: 1,\n    pageSize: 20\n  },\n  tabClick(e) {\n    // 商品分类点击\n    const category = this.data.categories.find(ele => {\n      return ele.id == e.currentTarget.dataset.id\n    })\n    if (category.vopCid1 || category.vopCid2) {\n      wx.navigateTo({\n        url: '/pages/goods/list-vop?cid1=' + (category.vopCid1 ? category.vopCid1 : '') + '&cid2=' + (category.vopCid2 ? category.vopCid2 : ''),\n      })\n    } else {\n      wx.setStorageSync(\"_categoryId\", category.id)\n      wx.switchTab({\n        url: '/pages/category/category',\n      })\n    }\n  },\n  tabClickCms(e) {\n    // 文章分类点击\n    const category = this.data.cmsCategories[e.currentTarget.dataset.idx]\n    wx.navigateTo({\n      url: '/pages/cms/list?categoryId=' + category.id,\n    })\n  },\n  toDetailsTap: function(e) {\n    console.log(e);\n    const id = e.currentTarget.dataset.id\n    const supplytype = e.currentTarget.dataset.supplytype\n    const yyId = e.currentTarget.dataset.yyid\n    if (supplytype == 'cps_jd') {\n      wx.navigateTo({\n        url: `/packageCps/pages/goods-details/cps-jd?id=${id}`,\n      })\n    } else if (supplytype == 'vop_jd') {\n      wx.navigateTo({\n        url: `/pages/goods-details/vop?id=${yyId}&goodsId=${id}`,\n      })\n    } else if (supplytype == 'cps_pdd') {\n      wx.navigateTo({\n        url: `/packageCps/pages/goods-details/cps-pdd?id=${id}`,\n      })\n    } else if (supplytype == 'cps_taobao') {\n      wx.navigateTo({\n        url: `/packageCps/pages/goods-details/cps-taobao?id=${id}`,\n      })\n    } else {\n      wx.navigateTo({\n        url: `/pages/goods-details/index?id=${id}`,\n      })\n    }\n  },\n  tapBanner(e) {\n    const item = e.currentTarget.dataset.item\n    if (item.linkType == 1) {\n      // 跳小程序\n      wx.navigateToMiniProgram({\n        appId: item.appid,\n        path: item.linkUrl || '',\n      })\n    } else {\n      if (item.linkUrl) {\n        wx.navigateTo({\n          url: item.linkUrl\n        })\n      }\n    }\n  },\n  adClick: function(e) {\n    const url = e.currentTarget.dataset.url\n    if (url) {\n      wx.navigateTo({\n        url\n      })\n    }\n  },\n  bindTypeTap: function(e) {\n    this.setData({\n      selectCurrent: e.index\n    })\n  },\n  onLoad: function(e) {\n    wx.showShareMenu({\n      withShareTicket: true,\n    })\n    const that = this\n    // 读取分享链接中的邀请人编号\n    if (e && e.inviter_id) {\n      wx.setStorageSync('referrer', e.inviter_id)\n    }\n    // 读取小程序码中的邀请人编号\n    if (e && e.scene) {\n      const scene = decodeURIComponent(e.scene)\n      if (scene) {        \n        wx.setStorageSync('referrer', scene.substring(11))\n      }\n    }\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        TOOLS.showTabBarBadge()\n      } else {\n        getApp().loginOK = () => {\n          TOOLS.showTabBarBadge()\n        }\n      }\n    })\n    this.initBanners()\n    this.cmsCategories()\n    // https://www.yuque.com/apifm/nu0f75/wg5t98\n    WXAPI.goodsv2({\n      recommendStatus: 1\n    }).then(res => {\n      if (res.code === 0){\n        that.setData({\n          goodsRecommend: res.data.result\n        })\n      }      \n    })\n    that.getCoupons()\n    that.getNotice()\n    that.kanjiaGoods()\n    that.pingtuanGoods()\n    this.adPosition()\n    // 读取系统参数\n    this.readConfigVal()\n    getApp().configLoadOK = () => {\n      this.readConfigVal()\n    }\n  },\n  readConfigVal() {\n    const mallName = wx.getStorageSync('mallName')\n    if (!mallName) {\n      return\n    }\n    this.categories()\n    wx.setNavigationBarTitle({\n      title: mallName\n    })\n    this.setData({\n      mallName:wx.getStorageSync('mallName')?wx.getStorageSync('mallName'):'',\n      show_buy_dynamic: wx.getStorageSync('show_buy_dynamic'),\n      hidden_goods_index: wx.getStorageSync('hidden_goods_index'),\n    })\n    const shopMod = wx.getStorageSync('shopMod')\n    const shopInfo = wx.getStorageSync('shopInfo')\n    if (shopMod == '1' && !shopInfo) {\n      wx.redirectTo({\n        url: '/pages/shop/select'\n      })\n    }\n  },\n  async miaoshaGoods(){\n    // https://www.yuque.com/apifm/nu0f75/wg5t98\n    const res = await WXAPI.goodsv2({\n      miaosha: true\n    })\n    if (res.code == 0) {\n      res.data.result.forEach(ele => {\n        const _now = new Date().getTime()\n        if (ele.dateStart) {\n          ele.dateStartInt = new Date(ele.dateStart.replace(/-/g, '/')).getTime() - _now\n        }\n        if (ele.dateEnd) {\n          ele.dateEndInt = new Date(ele.dateEnd.replace(/-/g, '/')).getTime() -_now\n        }\n      })\n      this.setData({\n        miaoshaGoods: res.data.result\n      })\n    }\n  },\n  async initBanners(){\n    const _data = {}\n    // 读取头部轮播图\n    const res1 = await WXAPI.banners({\n      type: 'index'\n    })\n    if (res1.code == 700) {\n      wx.showModal({\n        title: '提示',\n        content: '请在后台添加 banner 轮播图片，自定义类型填写 index',\n        showCancel: false\n      })\n    } else {\n      _data.banners = res1.data\n    }\n    this.setData(_data)\n  },\n  onShow: function(e){\n    this.setData({\n      navHeight: APP.globalData.navHeight,\n      navTop: APP.globalData.navTop,\n      windowHeight: APP.globalData.windowHeight,\n      menuButtonObject: APP.globalData.menuButtonObject //小程序胶囊信息\n    })\n    this.setData({\n      shopInfo: wx.getStorageSync('shopInfo')\n    })\n    // 获取购物车数据，显示TabBarBadge\n    TOOLS.showTabBarBadge()\n    this.goodsDynamicV2()\n    this.miaoshaGoods()\n    const refreshIndex = wx.getStorageSync('refreshIndex')\n    if (refreshIndex) {\n      this.onPullDownRefresh()\n      wx.removeStorageSync('refreshIndex')\n    }\n  },\n  async goodsDynamicV2(){\n    const res = await WXAPI.goodsDynamicV2({\n      type: 0\n    })\n    if (res.code == 0) {\n      this.setData({\n        goodsDynamicV2: res.data.result\n      })\n    }\n  },\n  async categories(){\n    const res = await WXAPI.goodsCategory()\n    let categories = [];\n    if (res.code == 0) {\n      const _categories = res.data.filter(ele => {\n        return ele.level == 1\n      })\n      categories = categories.concat(_categories)\n    }\n    this.setData({\n      categories: categories,\n      curPage: 1\n    });\n    this.getGoodsList(0);\n  },\n  async getGoodsList(categoryId, append) {\n    if (categoryId == 0) {\n      categoryId = \"\";\n    }\n    wx.showLoading({\n      title: ''\n    })\n    // https://www.yuque.com/apifm/nu0f75/wg5t98\n    const res = await WXAPI.goodsv2({\n      categoryId: categoryId,\n      page: this.data.curPage,\n      pageSize: this.data.pageSize\n    })\n    wx.hideLoading()\n    if (res.code == 404 || res.code == 700) {\n      let newData = {\n        loadingMoreHidden: false\n      }\n      if (!append) {\n        newData.goods = []\n      }\n      this.setData(newData);\n      return\n    }\n    let goods = [];\n    if (append) {\n      goods = this.data.goods\n    }\n    for (var i = 0; i < res.data.result.length; i++) {\n      const item = res.data.result[i]\n      const hidden_goods_index = wx.getStorageSync('hidden_goods_index')\n      if (hidden_goods_index.indexOf(item.id) != -1) {\n        continue\n      }\n      goods.push(item);\n    }\n    this.setData({\n      loadingMoreHidden: true,\n      goods: goods,\n    });\n  },\n  getCoupons: function() {\n    var that = this;\n    WXAPI.coupons().then(function (res) {\n      if (res.code == 0) {\n        that.setData({\n          coupons: res.data\n        });\n      }\n    })\n  },\n  onShareAppMessage: function() {    \n    return {\n      title: '\"' + wx.getStorageSync('mallName') + '\" ' + wx.getStorageSync('share_profile'),\n      path: '/pages/index/index?inviter_id=' + wx.getStorageSync('uid')\n    }\n  },\n  onShareTimeline() {    \n    return {\n      title: '\"' + wx.getStorageSync('mallName') + '\" ' + wx.getStorageSync('share_profile'),\n      query: 'inviter_id=' + wx.getStorageSync('uid'),\n      imageUrl: wx.getStorageSync('share_pic')\n    }\n  },\n  getNotice: function() {\n    var that = this;\n    WXAPI.noticeList({pageSize: 5}).then(function (res) {\n      if (res.code == 0) {\n        that.setData({\n          noticeList: res.data\n        });\n      }\n    })\n  },\n  onReachBottom: function() {\n    this.setData({\n      curPage: this.data.curPage + 1\n    });\n    this.getGoodsList(0, true)\n  },\n  onPullDownRefresh: function() {\n    this.setData({\n      curPage: 1\n    });\n    this.getGoodsList(0)\n    wx.stopPullDownRefresh()\n  },\n  // 获取砍价商品\n  async kanjiaGoods(){\n    // https://www.yuque.com/apifm/nu0f75/wg5t98\n    const res = await WXAPI.goodsv2({\n      kanjia: true\n    });\n    if (res.code == 0) {\n      const kanjiaGoodsIds = []\n      res.data.result.forEach(ele => {\n        kanjiaGoodsIds.push(ele.id)\n      })\n      const goodsKanjiaSetRes = await WXAPI.kanjiaSet(kanjiaGoodsIds.join())\n      if (goodsKanjiaSetRes.code == 0) {\n        res.data.result.forEach(ele => {\n          const _process = goodsKanjiaSetRes.data.find(_set => {\n            return _set.goodsId == ele.id\n          })\n          if (_process) {\n            ele.process = 100 * _process.numberBuy / _process.number\n            ele.process = ele.process.toFixed(0)\n          }\n        })\n        this.setData({\n          kanjiaList: res.data.result\n        })\n      }\n    }\n  },\n  goCoupons: function (e) {\n    wx.switchTab({\n      url: \"/pages/coupons/index\"\n    })\n  },\n  pingtuanGoods(){ // 获取团购商品列表\n    const _this = this\n    // https://www.yuque.com/apifm/nu0f75/wg5t98\n    WXAPI.goodsv2({\n      pingtuan: true\n    }).then(res => {\n      if (res.code === 0) {\n        _this.setData({\n          pingtuanList: res.data.result\n        })\n      }\n    })\n  },\n  goSearch(){\n    wx.navigateTo({\n      url: '/pages/search/index'\n    })\n  },\n  goNotice(e) {\n    const id = e.currentTarget.dataset.id\n    wx.navigateTo({\n      url: '/pages/notice/show?id=' + id,\n    })\n  },\n  async adPosition() {\n    let res = await WXAPI.adPosition('indexPop')\n    if (res.code == 0) {\n      this.setData({\n        adPositionIndexPop: res.data\n      })\n    }\n    res = await WXAPI.adPosition('index-live-pic')\n    if (res.code == 0) {\n      this.setData({\n        adPositionIndexLivePic: res.data\n      })\n    }\n  },\n  clickAdPositionIndexLive() {\n    if (!this.data.adPositionIndexLivePic || !this.data.adPositionIndexLivePic.url) {\n      return\n    }\n    wx.navigateTo({\n      url: this.data.adPositionIndexLivePic.url,\n    })\n  },\n  closeAdPositionIndexPop() {\n    this.setData({\n      adPositionIndexPop: null\n    })\n  },\n  clickAdPositionIndexPop() {\n    const adPositionIndexPop = this.data.adPositionIndexPop\n    this.setData({\n      adPositionIndexPop: null\n    })\n    if (!adPositionIndexPop || !adPositionIndexPop.url) {\n      return\n    }\n    wx.navigateTo({\n      url: adPositionIndexPop.url,\n    })\n  },\n  async cmsCategories() {\n    // https://www.yuque.com/apifm/nu0f75/slu10w\n    const res = await WXAPI.cmsCategories()\n    if (res.code == 0) {\n      const cmsCategories = res.data.filter(ele => {\n        return ele.type == 'index' // 只筛选类型为 index 的分类\n      })\n      this.setData({\n        cmsCategories\n      })\n    }\n  },\n})"
  },
  {
    "path": "pages/index/index.json",
    "content": "{\n  \"enablePullDownRefresh\": true\n}\n"
  },
  {
    "path": "pages/index/index.wxml",
    "content": "<van-search placeholder=\"请输入搜索关键词\" shape=\"round\" readonly bindtap=\"goSearch\"></van-search>\n<navigator wx:if=\"{{shopInfo}}\" url=\"/pages/shop/select\">\n  <view class=\"jd-shop-selector\">\n    <view class=\"jd-shop-info\">\n      <image src=\"/images/order-details/icon-address.png\"></image>\n      <text class=\"jd-shop-name\">{{shopInfo.name}}</text>\n    </view>\n    <view class=\"jd-shop-change\">\n      <text>切换</text>\n      <image src=\"/images/icon/next.png\"></image>\n    </view>\n  </view>\n</navigator>\n<wxs module=\"goodsDetailPage\">\nmodule.exports = {\n  url : function(item) {\n    if (item.supplyType == 'cps_jd') {\n      return '/packageCps/pages/goods-details/cps-jd?id=' + item.goodsId\n    } else if (item.supplyType == 'vop_jd') {\n      return '/pages/goods-details/vop?id=' + item.yyId + '&goodsId=' + item.id\n    } else if (item.supplyType == 'cps_pdd') {\n      return '/packageCps/pages/goods-details/cps-pdd?id=' + item.goodsId\n    } else if (item.supplyType == 'cps_taobao') {\n      return '/packageCps/pages/goods-details/cps-taobao?id=' + item.goodsId\n    } else {\n      return '/pages/goods-details/index?id=' + item.goodsId\n    }\n  }\n}\n</wxs>\n<view class=\"jd-banner-container\">\n  <swiper class=\"jd-banner-swiper\" indicator-dots=\"true\" indicator-color=\"rgba(255,255,255,0.5)\" indicator-active-color=\"#E4393C\" autoplay circular>\n    <swiper-item wx:for=\"{{banners}}\" wx:key=\"id\">\n      <view class=\"jd-banner-item\">\n        <image mode=\"aspectFill\" bindtap=\"tapBanner\" data-item=\"{{ item }}\" src=\"{{item.picUrl}}\" />\n      </view>\n    </swiper-item>\n  </swiper>\n  <view wx:if=\"{{ goodsDynamicV2 && show_buy_dynamic == '1' }}\" class=\"jd-buy-dynamic\">\n    <swiper class=\"jd-dynamic-swiper\" autoplay circular vertical>\n      <navigator wx:for=\"{{ goodsDynamicV2 }}\" wx:key=\"index\" url=\"{{ goodsDetailPage.url(item) }}\">\n        <swiper-item>\n          <view class=\"jd-dynamic-item\">\n            <image mode=\"aspectFill\" src=\"{{item.avatarUrl}}\"></image>\n            <text>{{item.nick}} 购买了 {{item.goodsName}}</text>\n          </view>\n        </swiper-item>\n      </navigator>\n    </swiper>\n  </view>\n</view>\n<view class=\"jd-category-container\">\n  <view class=\"jd-category-grid\">\n    <view class=\"jd-category-item\" wx:for=\"{{categories}}\" wx:key=\"id\" bindtap=\"tabClick\" data-id=\"{{item.id}}\">\n      <view class=\"jd-category-icon-wrap\">\n        <image mode=\"aspectFill\" src=\"{{item.icon}}\"></image>\n      </view>\n      <text class=\"jd-category-name\">{{item.name}}</text>\n    </view>\n    <view class=\"jd-category-item\" wx:for=\"{{cmsCategories}}\" wx:key=\"id\" bindtap=\"tabClickCms\" data-idx=\"{{ index }}\">\n      <view class=\"jd-category-icon-wrap\">\n        <image mode=\"aspectFill\" src=\"{{item.icon}}\"></image>\n      </view>\n      <text class=\"jd-category-name\">{{item.name}}</text>\n    </view>\n  </view>\n</view>\n<view class=\"jd-notice-container\" wx:if=\"{{noticeList}}\">\n  <swiper class=\"jd-notice-swiper\" vertical autoplay circular interval=\"8000\">\n    <swiper-item wx:for=\"{{noticeList.dataList}}\" wx:key=\"id\">\n      <van-notice-bar wx:if=\"{{noticeList}}\" mode=\"link\" text=\"{{ item.title }}\" background=\"#FFF5F5\"\n        data-id=\"{{ item.id }}\" speed=\"30\" bind:click=\"goNotice\" color=\"#E4393C\">\n        <image slot=\"left-icon\" class=\"jd-notice-icon\" src=\"../../images/home/notice.png\"></image>\n      </van-notice-bar>\n    </swiper-item>\n  </swiper>\n</view>\n<view class=\"jd-main-container\">\n  <image wx:if=\"{{ adPositionIndexLivePic }}\" class=\"jd-live-banner\" src=\"{{ adPositionIndexLivePic.val }}\" mode=\"widthFix\" bindtap=\"clickAdPositionIndexLive\"></image>\n  \n  <!-- 秒杀开始 -->\n  <block wx:if=\"{{miaoshaGoods && miaoshaGoods.length > 0}}\">\n    <view class=\"jd-section-header\">\n      <view class=\"jd-section-title\">\n        <image class=\"jd-section-icon\" src=\"../../images/home/miaosha.png\"></image>\n        <text class=\"jd-section-name\">限时秒杀</text>\n      </view>\n      <view class=\"jd-section-more\">更多 ></view>\n    </view>\n    <view class=\"jd-seckill-container\">\n      <view class=\"jd-seckill-item\" wx:for=\"{{miaoshaGoods}}\" wx:key=\"id\" bindtap=\"toDetailsTap\"\n        data-id=\"{{item.id}}\" data-supplytype=\"{{item.supplyType}}\" data-yyid=\"{{item.yyId}}\">\n        <view class=\"jd-seckill-img-wrap\">\n          <image src=\"{{item.pic}}\" mode=\"aspectFill\" lazy-load=\"true\" />\n        </view>\n        <view class=\"jd-seckill-info\">\n          <view class=\"jd-seckill-title\">{{item.name}}</view>\n          <view class=\"jd-seckill-countdown\">\n            <van-count-down wx:if=\"{{item.dateStartInt > 0}}\" time=\"{{ item.dateStartInt }}\"\n              format=\"{{ item.dateStartInt > 86400000 ? '距开始 DD天 HH:mm:ss' : '距开始 HH:mm:ss' }}\" />\n            <van-count-down wx:if=\"{{item.dateStartInt <= 0 && item.dateEndInt > 0}}\" time=\"{{ item.dateEndInt }}\"\n              format=\"{{ item.dateEndInt > 86400000 ? '剩余 DD天 HH:mm:ss' : '剩余 HH:mm:ss' }}\" />\n          </view>\n          <view class=\"jd-seckill-footer\">\n            <view class=\"jd-seckill-price\">\n              <text class=\"jd-price-symbol\">¥</text>\n              <text class=\"jd-price-num\">{{item.minPrice}}</text>\n              <text class=\"jd-price-del\">¥{{item.originalPrice}}</text>\n            </view>\n            <view class=\"jd-seckill-btn-wrap\">\n              <view class=\"jd-seckill-btn jd-btn-disabled\" wx:if=\"{{item.dateStartInt > 0}}\">未开始</view>\n              <view class=\"jd-seckill-btn jd-btn-disabled\" wx:if=\"{{item.dateEndInt <= 0}}\">已结束</view>\n              <view class=\"jd-seckill-btn jd-btn-disabled\" wx:if=\"{{item.stores <= 0}}\">已抢完</view>\n              <view class=\"jd-seckill-btn jd-btn-active\" wx:if=\"{{item.dateStartInt <= 0 && item.dateEndInt > 0 && item.stores > 0}}\">马上抢</view>\n            </view>\n          </view>\n        </view>\n      </view>\n    </view>\n  </block>\n  <!-- 秒杀结束 -->\n\n  \n  <!-- 爆品推荐开始 -->\n  <block wx:if=\"{{goodsRecommend.length > 0}}\">\n    <view class=\"jd-section-header\">\n      <view class=\"jd-section-title\">\n        <image class=\"jd-section-icon\" src=\"../../images/home/recommend.png\"></image>\n        <text class=\"jd-section-name\">爆品推荐</text>\n      </view>\n      <view class=\"jd-section-more\">更多 ></view>\n    </view>\n    <view class=\"jd-goods-grid\">\n      <view class=\"jd-goods-card\" wx:for=\"{{goodsRecommend}}\" wx:key=\"id\" bindtap=\"toDetailsTap\" data-id=\"{{item.id}}\" data-supplytype=\"{{item.supplyType}}\" data-yyid=\"{{item.yyId}}\">\n        <view class=\"jd-goods-img-wrap\">\n          <image src=\"{{item.pic}}\" mode=\"aspectFill\" lazy-load=\"true\" />\n        </view>\n        <view class=\"jd-goods-info\">\n          <view class=\"jd-goods-name\">{{item.name}}</view>\n          <view wx:if=\"{{item.characteristic}}\" class=\"jd-goods-desc\">{{item.characteristic}}</view>\n          <view class=\"jd-goods-price-box\">\n            <view class=\"jd-goods-price\">\n              <text class=\"jd-price-symbol\">¥</text>\n              <text class=\"jd-price-num\">{{item.minPrice}}</text>\n            </view>\n            <view wx:if=\"{{item.originalPrice && item.originalPrice > 0}}\" class=\"jd-goods-original-price\">¥{{item.originalPrice}}</view>\n          </view>\n        </view>\n      </view>\n    </view>\n  </block>\n  <!-- 爆品推荐结束 -->\n  \n  <!-- 砍价开始 -->\n  <block wx:if=\"{{kanjiaList.length > 0}}\">\n    <view class=\"jd-section-header\">\n      <view class=\"jd-section-title\">\n        <image class=\"jd-section-icon\" src=\"../../images/home/kanjia.png\"></image>\n        <text class=\"jd-section-name\">疯狂砍价</text>\n      </view>\n      <view class=\"jd-section-more\">更多 ></view>\n    </view>\n    <view class=\"jd-kanjia-container\">\n      <view class=\"jd-kanjia-card\" wx:for=\"{{kanjiaList}}\" wx:key=\"id\">\n        <view class=\"jd-kanjia-img-wrap\">\n          <image src=\"{{item.pic}}\" mode=\"aspectFill\" lazy-load=\"true\" />\n        </view>\n        <view class=\"jd-kanjia-info\">\n          <view class=\"jd-kanjia-title\">{{item.name}}</view>\n          <view class=\"jd-kanjia-desc\">{{item.characteristic}}</view>\n          <view class=\"jd-kanjia-progress\">\n            <van-progress custom-class=\"jd-kanjia-bar\" percentage=\"{{item.process}}\" stroke-width=\"6\" color=\"#E4393C\" />\n          </view>\n          <view class=\"jd-kanjia-footer\">\n            <view class=\"jd-kanjia-price\">\n              <text class=\"jd-price-symbol\">¥</text>\n              <text class=\"jd-price-num\">{{item.kanjiaPrice}}</text>\n              <text class=\"jd-price-del\">¥{{item.originalPrice}}</text>\n            </view>\n            <view class=\"jd-kanjia-btn\" data-id=\"{{item.id}}\" data-supplytype=\"{{item.supplyType}}\" data-yyid=\"{{item.yyId}}\" bindtap=\"toDetailsTap\">去砍价</view>\n          </view>\n        </view>\n      </view>\n    </view>\n  </block>\n  <!-- 砍价结束 -->\n  <!-- 拼团开始 -->\n  <block wx:if=\"{{pingtuanList.length > 0}}\">\n    <view class=\"jd-section-header\">\n      <view class=\"jd-section-title\">\n        <image class=\"jd-section-icon\" src=\"../../images/home/pingtuan.png\"></image>\n        <text class=\"jd-section-name\">全民拼团</text>\n      </view>\n      <view class=\"jd-section-more\">更多 ></view>\n    </view>\n    <view class='jd-pingtuan-container'>\n      <view class='jd-pingtuan-card' wx:for=\"{{pingtuanList}}\" wx:key=\"id\">\n        <view class='jd-pingtuan-img-wrap'>\n          <image src=\"{{item.pic}}\" mode=\"aspectFill\" lazy-load='{{true}}' />\n          <view class=\"jd-pingtuan-tag\" wx:if=\"{{item.tags}}\">{{item.tags}}</view>\n        </view>\n        <view class=\"jd-pingtuan-info\">\n          <view class='jd-pingtuan-title'>{{item.name}}</view>\n          <view class='jd-pingtuan-desc'>{{item.characteristic}}</view>\n          <view class=\"jd-pingtuan-footer\">\n            <view class='jd-pingtuan-price'>\n              <text class='jd-price-symbol'>¥</text>\n              <text class='jd-price-num'>{{item.pingtuanPrice}}</text>\n              <text class='jd-price-del'>¥{{item.originalPrice}}</text>\n            </view>\n            <view class=\"jd-pingtuan-btn\" bindtap=\"toDetailsTap\" data-id=\"{{item.id}}\" data-supplytype=\"{{item.supplyType}}\" data-yyid=\"{{item.yyId}}\">\n              <text>去拼团</text>\n            </view>\n          </view>\n        </view>\n      </view>\n    </view>\n  </block>\n  <!-- 拼团结束 -->\n\n  \n  <!-- 商品列表开始 -->\n  <view class=\"jd-section-header\">\n    <view class=\"jd-section-title\">\n      <image class=\"jd-section-icon\" src=\"../../images/home/goodslist.png\"></image>\n      <text class=\"jd-section-name\">为你推荐</text>\n    </view>\n  </view>\n  <view class=\"jd-goods-grid\">\n    <view class=\"jd-goods-card\" wx:for=\"{{goods}}\" wx:key=\"id\" bindtap=\"toDetailsTap\" data-id=\"{{item.id}}\" data-supplytype=\"{{item.supplyType}}\" data-yyid=\"{{item.yyId}}\">\n      <view class=\"jd-goods-img-wrap\">\n        <image src=\"{{item.pic}}\" mode=\"aspectFill\" lazy-load=\"true\" />\n      </view>\n      <view class=\"jd-goods-info\">\n        <view class=\"jd-goods-name\">{{item.name}}</view>\n        <view wx:if=\"{{item.characteristic}}\" class=\"jd-goods-desc\">{{item.characteristic}}</view>\n        <view class=\"jd-goods-price-box\">\n          <view class=\"jd-goods-price\">\n            <text class=\"jd-price-symbol\">¥</text>\n            <text class=\"jd-price-num\">{{item.minPrice}}</text>\n          </view>\n          <view wx:if=\"{{item.originalPrice && item.originalPrice > 0}}\" class=\"jd-goods-original-price\">¥{{item.originalPrice}}</view>\n        </view>\n      </view>\n    </view>\n  </view>\n  <van-divider wx:if=\"{{ !loadingMoreHidden }}\" custom-class=\"jd-end-divider\" contentPosition=\"center\">— 已经到底啦 —</van-divider>\n</view>\n<!-- <view class='jd-coupon-float' bindtap=\"goCoupons\">\n  <image src=\"/images/coupon-icon.svg\"></image>\n  <text>领券</text>\n</view> -->\n\n<van-overlay show=\"{{ adPositionIndexPop }}\">\n  <view class=\"adPositionIndexPop\">\n    <image src=\"{{ adPositionIndexPop.val }}\" mode=\"widthFix\" bindtap=\"clickAdPositionIndexPop\"></image>\n    <van-icon custom-class=\"close\" name=\"close\" size=\"64rpx\" color=\"#fff\" bind:click=\"closeAdPositionIndexPop\" />\n  </view>\n</van-overlay>"
  },
  {
    "path": "pages/index/index.wxss",
    "content": "/* ==========================\n   京东风格 - 首页样式\n   配色: 京东红 #E4393C, 黑色 #333, 灰色 #999, 浅灰 #F5F5F5\n   ========================== */\n\npage {\n  background-color: #F5F5F5;\n}\n\n/* ========== 顶部搜索栏 ========== */\n.jd-search-container {\n  background: linear-gradient(135deg, #E4393C 0%, #D81E06 100%);\n  padding: 20rpx 24rpx 24rpx;\n  position: relative;\n}\n\n.jd-search {\n  position: relative;\n  width: 100%;\n  display: flex;\n  align-items: center;\n  box-sizing: border-box;\n}\n\n.jd-search-title {\n  font-weight: bold;\n  font-size: 36rpx;\n  color: #FFFFFF;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  margin-right: 16rpx;\n  letter-spacing: 2rpx;\n}\n\n.jd-search-box {\n  display: flex;\n  align-items: center;\n  background: rgba(255, 255, 255, 0.92);\n  backdrop-filter: blur(10rpx);\n  height: 72rpx;\n  border-radius: 36rpx;\n  padding: 0 28rpx;\n  margin: 0 24rpx 16rpx;\n  box-shadow: 0 6rpx 24rpx rgba(0, 0, 0, 0.12);\n  transition: all 0.3s ease;\n}\n\n.jd-search-icon {\n  width: 32rpx;\n  height: 32rpx;\n  margin-right: 16rpx;\n  flex-shrink: 0;\n  opacity: 0.5;\n}\n\n.jd-search-box input {\n  flex: 1;\n  height: 72rpx;\n  line-height: 72rpx;\n  font-size: 28rpx;\n  color: #333;\n  background: transparent;\n}\n\n.jd-search-placeholder {\n  font-size: 28rpx;\n  color: #999;\n}\n\n/* ========== 门店选择 ========== */\n.jd-shop-selector {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 20rpx 24rpx;\n  background: #FFFFFF;\n  margin: 16rpx 24rpx;\n  border-radius: 12rpx;\n  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);\n}\n\n.jd-shop-info {\n  display: flex;\n  align-items: center;\n  flex: 1;\n}\n\n.jd-shop-info image {\n  width: 36rpx;\n  height: 36rpx;\n  margin-right: 12rpx;\n}\n\n.jd-shop-name {\n  font-size: 28rpx;\n  color: #333;\n  font-weight: 500;\n}\n\n.jd-shop-change {\n  display: flex;\n  align-items: center;\n  font-size: 26rpx;\n  color: #E4393C;\n}\n\n.jd-shop-change text {\n  margin-right: 8rpx;\n}\n\n.jd-shop-change image {\n  width: 24rpx;\n  height: 24rpx;\n}\n\n/* ========== 轮播图 ========== */\n.jd-banner-container {\n  width: 100%;\n  height: 400rpx;\n  position: relative;\n  margin-bottom: 20rpx;\n  padding-top: 16rpx;\n}\n\n.jd-banner-swiper {\n  width: 100%;\n  height: 400rpx;\n}\n\n.jd-banner-item {\n  width: 100%;\n  height: 400rpx;\n  padding: 0 24rpx;\n  box-sizing: border-box;\n}\n\n.jd-banner-item image {\n  width: 100%;\n  height: 100%;\n  border-radius: 16rpx;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);\n}\n\n/* 购买动态 */\n.jd-buy-dynamic {\n  position: absolute;\n  bottom: 32rpx;\n  left: 48rpx;\n  right: 48rpx;\n  z-index: 10;\n}\n\n.jd-dynamic-swiper {\n  width: 100%;\n  height: 60rpx;\n}\n\n.jd-dynamic-item {\n  display: flex;\n  align-items: center;\n  background: linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%);\n  backdrop-filter: blur(10rpx);\n  border-radius: 30rpx;\n  padding: 8rpx 20rpx;\n  font-size: 24rpx;\n  color: #FFFFFF;\n}\n\n.jd-dynamic-item image {\n  width: 36rpx;\n  height: 36rpx;\n  border-radius: 50%;\n  margin-right: 12rpx;\n  border: 2rpx solid #FFFFFF;\n  flex-shrink: 0;\n}\n\n.jd-dynamic-item text {\n  flex: 1;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n/* ========== 分类导航 ========== */\n.jd-category-container {\n  background: #FFFFFF;\n  padding: 28rpx 16rpx 32rpx;\n  margin: 0 24rpx 20rpx;\n  border-radius: 16rpx;\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);\n}\n\n.jd-category-grid {\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: space-between;\n}\n\n.jd-category-item {\n  width: 20%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  margin-bottom: 24rpx;\n}\n\n.jd-category-icon-wrap {\n  width: 88rpx;\n  height: 88rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-bottom: 12rpx;\n  border-radius: 16rpx;\n  background: linear-gradient(135deg, #FFF5F5 0%, #FFFFFF 100%);\n  box-shadow: 0 2rpx 8rpx rgba(228, 57, 60, 0.1);\n  transition: all 0.3s ease;\n}\n\n.jd-category-icon-wrap image {\n  width: 64rpx;\n  height: 64rpx;\n}\n\n.jd-category-name {\n  font-size: 24rpx;\n  color: #333;\n  text-align: center;\n  max-width: 100%;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n/* ========== 公告通知 ========== */\n.jd-notice-container {\n  margin: 0 24rpx 20rpx;\n  border-radius: 12rpx;\n  overflow: hidden;\n  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);\n}\n\n.jd-notice-swiper {\n  height: 72rpx;\n}\n\n.jd-notice-icon {\n  width: 120rpx;\n  height: 32rpx;\n  margin-right: 16rpx;\n}\n\n/* ========== 主容器 ========== */\n.jd-main-container {\n  min-height: 100vh;\n  padding-bottom: 40rpx;\n}\n\n/* 直播广告横幅 */\n.jd-live-banner {\n  display: block;\n  width: 702rpx;\n  margin: 0 auto 28rpx;\n  border-radius: 16rpx;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);\n}\n\n/* ========== 区块标题 ========== */\n.jd-section-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 32rpx 24rpx 28rpx;\n}\n\n.jd-section-title {\n  display: flex;\n  align-items: center;\n}\n\n.jd-section-icon {\n  width: 40rpx;\n  height: 40rpx;\n  margin-right: 12rpx;\n}\n\n.jd-section-name {\n  font-size: 36rpx;\n  font-weight: bold;\n  color: #333;\n  position: relative;\n}\n\n.jd-section-name::after {\n  content: '';\n  position: absolute;\n  bottom: -6rpx;\n  left: 0;\n  width: 60%;\n  height: 6rpx;\n  background: linear-gradient(90deg, #E4393C 0%, transparent 100%);\n  border-radius: 3rpx;\n}\n\n.jd-section-more {\n  font-size: 26rpx;\n  color: #999;\n  display: flex;\n  align-items: center;\n}\n\n/* ========== 秒杀商品 ========== */\n.jd-seckill-container {\n  padding: 0 24rpx 20rpx;\n  display: flex;\n  flex-direction: column;\n  gap: 24rpx;\n}\n\n.jd-seckill-item {\n  background: linear-gradient(135deg, #FFF5F5 0%, #FFFFFF 100%);\n  border-radius: 16rpx;\n  overflow: hidden;\n  box-shadow: 0 4rpx 20rpx rgba(228, 57, 60, 0.12);\n  position: relative;\n}\n\n.jd-seckill-img-wrap {\n  width: 100%;\n  height: 702rpx;\n  position: relative;\n  overflow: hidden;\n}\n\n.jd-seckill-img-wrap image {\n  width: 100%;\n  height: 100%;\n  display: block;\n}\n\n.jd-seckill-info {\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.95) 30%, rgba(255, 255, 255, 1) 60%);\n  padding: 80rpx 24rpx 24rpx;\n}\n\n.jd-seckill-title {\n  font-size: 32rpx;\n  font-weight: bold;\n  color: #333;\n  margin-bottom: 16rpx;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.jd-seckill-countdown {\n  background: linear-gradient(135deg, #FFF0F0 0%, #FFE5E5 100%);\n  border-radius: 8rpx;\n  padding: 12rpx 20rpx;\n  margin-bottom: 20rpx;\n  display: inline-block;\n}\n\n.jd-seckill-countdown .van-count-down {\n  color: #E4393C !important;\n  font-size: 26rpx !important;\n  font-weight: bold !important;\n}\n\n.jd-seckill-footer {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.jd-seckill-price {\n  display: flex;\n  align-items: baseline;\n}\n\n.jd-price-symbol {\n  font-size: 32rpx;\n  color: #E4393C;\n  font-weight: bold;\n  margin-right: 4rpx;\n}\n\n.jd-price-num {\n  font-size: 48rpx;\n  color: #E4393C;\n  font-weight: bold;\n  line-height: 1;\n}\n\n.jd-price-del {\n  font-size: 26rpx;\n  color: #999;\n  text-decoration: line-through;\n  margin-left: 16rpx;\n}\n\n.jd-seckill-btn-wrap {\n  flex-shrink: 0;\n}\n\n.jd-seckill-btn {\n  min-width: 160rpx;\n  height: 64rpx;\n  line-height: 64rpx;\n  text-align: center;\n  border-radius: 32rpx;\n  font-size: 28rpx;\n  font-weight: bold;\n  padding: 0 32rpx;\n}\n\n.jd-btn-active {\n  background: linear-gradient(135deg, #FF6B6B 0%, #E4393C 100%);\n  color: #FFFFFF;\n  box-shadow: 0 4rpx 16rpx rgba(228, 57, 60, 0.4);\n}\n\n.jd-btn-disabled {\n  background: #F5F5F5;\n  color: #999;\n}\n\n/* ========== 商品网格（推荐、列表） ========== */\n.jd-goods-grid {\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: space-between;\n  padding: 0 24rpx 20rpx;\n  gap: 20rpx;\n}\n\n.jd-goods-card {\n  width: calc(50% - 15rpx);\n  background: #FFFFFF;\n  border-radius: 12rpx;\n  overflow: hidden;\n  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);\n  transition: all 0.3s ease;\n}\n\n.jd-goods-img-wrap {\n  width: 100%;\n  height: 345rpx;\n  position: relative;\n  overflow: hidden;\n  background: #F9F9F9;\n}\n\n.jd-goods-img-wrap image {\n  width: 100%;\n  height: 100%;\n  display: block;\n}\n\n.jd-goods-info {\n  padding: 16rpx;\n}\n\n.jd-goods-name {\n  font-size: 28rpx;\n  color: #333;\n  line-height: 1.4;\n  height: 78rpx;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n  margin-bottom: 8rpx;\n}\n\n.jd-goods-desc {\n  font-size: 24rpx;\n  color: #999;\n  line-height: 1.3;\n  height: 31rpx;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  margin-bottom: 12rpx;\n}\n\n.jd-goods-price-box {\n  display: flex;\n  align-items: baseline;\n  justify-content: space-between;\n}\n\n.jd-goods-price {\n  display: flex;\n  align-items: baseline;\n  color: #E4393C;\n}\n\n.jd-goods-price .jd-price-symbol {\n  font-size: 24rpx;\n}\n\n.jd-goods-price .jd-price-num {\n  font-size: 36rpx;\n}\n\n.jd-goods-original-price {\n  font-size: 22rpx;\n  color: #999;\n  text-decoration: line-through;\n  margin-left: 8rpx;\n}\n\n/* ========== 砍价商品 ========== */\n.jd-kanjia-container {\n  padding: 0 24rpx 20rpx;\n  display: flex;\n  flex-direction: column;\n  gap: 20rpx;\n}\n\n.jd-kanjia-card {\n  display: flex;\n  background: #FFFFFF;\n  border-radius: 12rpx;\n  overflow: hidden;\n  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);\n  padding: 20rpx;\n}\n\n.jd-kanjia-img-wrap {\n  width: 200rpx;\n  height: 200rpx;\n  border-radius: 8rpx;\n  overflow: hidden;\n  flex-shrink: 0;\n  margin-right: 20rpx;\n  background: #F9F9F9;\n}\n\n.jd-kanjia-img-wrap image {\n  width: 100%;\n  height: 100%;\n  display: block;\n}\n\n.jd-kanjia-info {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n}\n\n.jd-kanjia-title {\n  font-size: 30rpx;\n  font-weight: bold;\n  color: #333;\n  line-height: 1.3;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n  margin-bottom: 8rpx;\n}\n\n.jd-kanjia-desc {\n  font-size: 24rpx;\n  color: #999;\n  line-height: 1.3;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  margin-bottom: 12rpx;\n}\n\n.jd-kanjia-progress {\n  margin-bottom: 16rpx;\n}\n\n.jd-kanjia-bar {\n  border-radius: 3rpx !important;\n}\n\n.jd-kanjia-footer {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.jd-kanjia-price {\n  display: flex;\n  align-items: baseline;\n}\n\n.jd-kanjia-price .jd-price-symbol {\n  font-size: 26rpx;\n}\n\n.jd-kanjia-price .jd-price-num {\n  font-size: 40rpx;\n}\n\n.jd-kanjia-btn {\n  min-width: 140rpx;\n  height: 56rpx;\n  line-height: 56rpx;\n  text-align: center;\n  background: linear-gradient(135deg, #FF6B6B 0%, #E4393C 100%);\n  color: #FFFFFF;\n  border-radius: 28rpx;\n  font-size: 26rpx;\n  font-weight: bold;\n  padding: 0 24rpx;\n  box-shadow: 0 4rpx 12rpx rgba(228, 57, 60, 0.3);\n}\n\n/* ========== 拼团商品 ========== */\n.jd-pingtuan-container {\n  padding: 0 0 20rpx;\n  display: flex;\n  flex-direction: column;\n  gap: 24rpx;\n}\n\n.jd-pingtuan-card {\n  background: #FFFFFF;\n  overflow: hidden;\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);\n  transition: all 0.3s ease;\n}\n\n.jd-pingtuan-img-wrap {\n  width: 100%;\n  height: 420rpx;\n  position: relative;\n  overflow: hidden;\n  background: linear-gradient(135deg, #F9F9F9 0%, #FFFFFF 100%);\n}\n\n.jd-pingtuan-img-wrap image {\n  width: 100%;\n  height: 100%;\n  display: block;\n}\n\n.jd-pingtuan-tag {\n  position: absolute;\n  top: 16rpx;\n  left: 16rpx;\n  background: linear-gradient(135deg, #FF6B6B 0%, #E4393C 100%);\n  color: #FFFFFF;\n  font-size: 22rpx;\n  padding: 8rpx 16rpx;\n  border-radius: 20rpx 20rpx 20rpx 4rpx;\n  font-weight: bold;\n  box-shadow: 0 2rpx 8rpx rgba(228, 57, 60, 0.4);\n}\n\n.jd-pingtuan-info {\n  padding: 20rpx;\n}\n\n.jd-pingtuan-title {\n  font-size: 30rpx;\n  font-weight: bold;\n  color: #333;\n  line-height: 1.3;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n  margin-bottom: 8rpx;\n  min-height: 78rpx;\n}\n\n.jd-pingtuan-desc {\n  font-size: 24rpx;\n  color: #999;\n  line-height: 1.3;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  margin-bottom: 16rpx;\n}\n\n.jd-pingtuan-footer {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.jd-pingtuan-price {\n  display: flex;\n  align-items: baseline;\n}\n\n.jd-pingtuan-price .jd-price-symbol {\n  font-size: 26rpx;\n}\n\n.jd-pingtuan-price .jd-price-num {\n  font-size: 40rpx;\n}\n\n.jd-pingtuan-btn {\n  min-width: 140rpx;\n  height: 56rpx;\n  line-height: 56rpx;\n  text-align: center;\n  background: linear-gradient(135deg, #FF6B6B 0%, #E4393C 100%);\n  color: #FFFFFF;\n  border-radius: 28rpx;\n  font-size: 26rpx;\n  font-weight: bold;\n  padding: 0 24rpx;\n  box-shadow: 0 4rpx 12rpx rgba(228, 57, 60, 0.3);\n}\n\n/* ========== 优惠券悬浮按钮 ========== */\n.jd-coupon-float {\n  position: fixed;\n  right: 24rpx;\n  bottom: 120rpx;\n  width: 104rpx;\n  height: 104rpx;\n  background: linear-gradient(135deg, #FF6B6B 0%, #E4393C 100%);\n  border-radius: 50%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 8rpx 32rpx rgba(228, 57, 60, 0.45);\n  z-index: 100;\n  animation: float-bounce 3s ease-in-out infinite;\n}\n\n@keyframes float-bounce {\n  0%, 100% {\n    transform: translateY(0);\n  }\n  50% {\n    transform: translateY(-8rpx);\n  }\n}\n\n.jd-coupon-float image {\n  width: 52rpx;\n  height: 52rpx;\n  margin-bottom: 4rpx;\n  filter: brightness(0) invert(1);\n}\n\n.jd-coupon-float text {\n  font-size: 22rpx;\n  color: #FFFFFF;\n  font-weight: bold;\n  letter-spacing: 1rpx;\n}\n\n/* ========== 弹窗广告 ========== */\n.adPositionIndexPop {\n  width: 100vw;\n  height: 100vh;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n}\n\n.adPositionIndexPop image {\n  max-width: 600rpx;\n  border-radius: 16rpx;\n}\n\n.adPositionIndexPop .close {\n  margin-top: 48rpx;\n}\n\n/* ========== 底部分割线 ========== */\n.jd-end-divider {\n  margin-top: 40rpx !important;\n  margin-bottom: 40rpx !important;\n  color: #999 !important;\n  font-size: 24rpx !important;\n}\n\n/* ========== 滚动条隐藏 ========== */\n::-webkit-scrollbar {\n  width: 0;\n  height: 0;\n  color: transparent;\n}\n\n/* ========== 通用间距 ========== */\n.space {\n  height: 24rpx;\n}\n\n/* ========== 兼容旧样式 ========== */\n.container {\n  background-color: #F5F5F5;\n}\n\n/* Van组件自定义样式 */\n.van-card__price-integer {\n  font-size: 36rpx !important;\n  color: #E4393C !important;\n  font-weight: bold !important;\n}\n\n.van-progress__portion {\n  background: #E4393C !important;\n}\n\n.van-count-down {\n  color: #E4393C !important;\n  font-size: 26rpx !important;\n}\n\n/* ========== 响应式优化 ========== */\n@media (max-width: 375px) {\n  .jd-section-name {\n    font-size: 32rpx;\n  }\n  \n  .jd-goods-name {\n    font-size: 26rpx;\n  }\n}\n"
  },
  {
    "path": "pages/invoice/apply.js",
    "content": "const WXAPI = require('apifm-wxapi')\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    consumption: '服务费'\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad(e) {\n    // 读取分享链接中的邀请人编号\n    if (e && e.inviter_id) {\n      wx.setStorageSync('referrer', e.inviter_id)\n    }\n    // 弹出编辑昵称头像框\n    getApp().initNickAvatarUrlPOP(this)\n  },\n  onShow() {\n  },\n  chooseInvoiceTitle(){\n    wx.chooseInvoiceTitle({\n      success: (res) => {\n        this.setData({\n          wxInvoiceInfo: res,\n          comName: res.title,\n          tfn: res.taxNumber,\n          address: res.companyAddress + res.telephone,\n          bank: res.bankName + res.bankAccount,\n        })\n      },\n      fail: err => {\n        console.error(err);\n        wx.showToast({\n          title: '读取失败',\n          icon: 'none'\n        })\n      }\n    })\n  },\n  onShareAppMessage() {    \n    return {\n      title: '申请开票',\n      path: '/pages/invoice/apply?inviter_id=' + wx.getStorageSync('uid'),\n      imageUrl: wx.getStorageSync('invoice_share_pic')\n    }\n  },\n  onShareTimeline() {\n    return {\n      title: '申请开票',\n      query: 'inviter_id=' + wx.getStorageSync('uid'),\n      imageUrl: wx.getStorageSync('invoice_share_pic')\n    }\n  },\n  async bindSave() {\n    const invoice_subscribe_ids = wx.getStorageSync('invoice_subscribe_ids')\n    if (invoice_subscribe_ids) {\n      wx.requestSubscribeMessage({\n        tmplIds: invoice_subscribe_ids.split(','),\n        success(res) {\n          console.log(res)\n        },\n        fail(err) {\n          console.error(err)\n        },\n        complete: (res) => {\n          this._bindSave()\n        },\n      })\n    } else {\n      this._bindSave()\n    }\n  },\n  async _bindSave() {\n    // 提交保存\n    let comName = this.data.comName;\n    let tfn = this.data.tfn;\n    let mobile = this.data.mobile;\n    let amount = this.data.amount;\n    let consumption = this.data.consumption;\n    let remark = this.data.remark || '';\n    let email = this.data.email\n    let address = this.data.address;\n    let bank = this.data.bank;\n    if (!mobile) {\n      wx.showToast({\n        title: '请填写您在工厂注册的手机号码',\n        icon: 'none'\n      })\n      return\n    }\n    if (!comName) {\n      wx.showToast({\n        title: '公司名称不能为空',\n        icon: 'none'\n      })\n      return\n    }\n    if (!tfn) {\n      wx.showToast({\n        title: '税号不能为空',\n        icon: 'none'\n      })\n      return\n    }\n    if (!consumption) {\n      wx.showToast({\n        title: '发票内容不能为空',\n        icon: 'none'\n      })\n      return\n    }\n    if (!email) {\n      wx.showToast({\n        title: '请填写邮箱地址',\n        icon: 'none'\n      })\n      return\n    }\n    if (!amount || amount*1 < 100) {\n      wx.showToast({\n        title: '开票金额不能低于100',\n        icon: 'none'\n      })\n      return\n    }\n    const extJsonStr = {}\n    extJsonStr['api工厂账号'] = mobile\n    extJsonStr['地址与电话'] = address\n    extJsonStr['开户行与账号'] = bank\n    WXAPI.invoiceApply({\n      token: wx.getStorageSync('token'),\n      comName,\n      tfn,\n      amount,\n      consumption,\n      remark,\n      email,\n      extJsonStr: JSON.stringify(extJsonStr)\n    }).then(res => {\n      if (res.code == 2000) {\n        wx.navigateTo({\n            url: '/pages/login/index',\n        })\n        return\n      }\n      if (res.code == 0) {\n        wx.showModal({\n          title: '成功',\n          content: '提交成功，请耐心等待我们处理！',\n          showCancel: false,\n          confirmText: '我知道了',\n          success(res) {\n            wx.navigateTo({\n              url: \"/pages/invoice/list\"\n            })\n          }\n        })\n      } else {\n        wx.showModal({\n          title: '失败',\n          content: res.msg,\n          showCancel: false,\n          confirmText: '我知道了'\n        })\n      }\n    })\n  },\n})"
  },
  {
    "path": "pages/invoice/apply.json",
    "content": "{\n  \"navigationBarTitleText\": \"发票申请\"\n}"
  },
  {
    "path": "pages/invoice/apply.wxml",
    "content": "<view class=\"page-container\">\n  <!-- 顶部装饰栏 -->\n  <view class=\"header-bar\">\n    <view class=\"header-content\">\n      <view class=\"header-title\">发票申请</view>\n      <view class=\"header-subtitle\">INVOICE APPLICATION</view>\n    </view>\n  </view>\n\n  <!-- 快捷导入卡片 -->\n  <view class=\"quick-import-card\" bindtap=\"chooseInvoiceTitle\">\n    <view class=\"import-icon\">📋</view>\n    <view class=\"import-content\">\n      <view class=\"import-title\">快速填写</view>\n      <view class=\"import-desc\">读取微信开票信息</view>\n    </view>\n    <view class=\"import-arrow\">›</view>\n  </view>\n\n  <!-- 主表单卡片 -->\n  <view class=\"form-card\">\n    <view class=\"card-header\">\n      <view class=\"card-title\">\n        <view class=\"title-icon\"></view>\n        <text>发票信息</text>\n      </view>\n    </view>\n\n    <view class=\"form-content\">\n      <view class=\"input-group\">\n        <view class=\"input-label\">\n          <text class=\"label-text\">工厂账号</text>\n          <text class=\"required\">*</text>\n        </view>\n        <view class=\"input-wrapper\">\n          <input model:value='{{mobile}}' type=\"text\" placeholder=\"api工厂注册的手机号码\" placeholder-class=\"placeholder\" class=\"custom-input\" />\n        </view>\n      </view>\n\n      <view class=\"input-group\">\n        <view class=\"input-label\">\n          <text class=\"label-text\">发票抬头</text>\n          <text class=\"required\">*</text>\n        </view>\n        <view class=\"input-wrapper\">\n          <input model:value='{{comName}}' type=\"text\" placeholder=\"公司名称\" placeholder-class=\"placeholder\" class=\"custom-input\" />\n        </view>\n      </view>\n\n      <view class=\"input-group\">\n        <view class=\"input-label\">\n          <text class=\"label-text\">税号</text>\n          <text class=\"required\">*</text>\n        </view>\n        <view class=\"input-wrapper\">\n          <input model:value='{{tfn}}' type=\"text\" placeholder=\"填写税号\" placeholder-class=\"placeholder\" class=\"custom-input\" />\n        </view>\n      </view>\n\n      <view class=\"input-group\">\n        <view class=\"input-label\">\n          <text class=\"label-text\">发票内容</text>\n          <text class=\"required\">*</text>\n        </view>\n        <view class=\"input-wrapper\">\n          <input model:value='{{consumption}}' type=\"text\" placeholder=\"开票项目说明\" placeholder-class=\"placeholder\" class=\"custom-input\" />\n        </view>\n      </view>\n\n      <view class=\"input-group amount-group\">\n        <view class=\"input-label\">\n          <text class=\"label-text\">发票金额</text>\n          <text class=\"required\">*</text>\n        </view>\n        <view class=\"input-wrapper amount-wrapper\">\n          <text class=\"currency-symbol\">¥</text>\n          <input model:value='{{amount}}' type=\"digit\" placeholder=\"申请开票金额\" placeholder-class=\"placeholder\" class=\"custom-input amount-input\" />\n        </view>\n      </view>\n\n      <view class=\"input-group\">\n        <view class=\"input-label\">\n          <text class=\"label-text\">地址与电话</text>\n        </view>\n        <view class=\"input-wrapper\">\n          <input model:value='{{address}}' type=\"text\" placeholder=\"发票栏目处填写的地址与电话\" placeholder-class=\"placeholder\" class=\"custom-input\" />\n        </view>\n      </view>\n\n      <view class=\"input-group\">\n        <view class=\"input-label\">\n          <text class=\"label-text\">开户行与账号</text>\n        </view>\n        <view class=\"input-wrapper\">\n          <input model:value='{{bank}}' type=\"text\" placeholder=\"发票栏目处填写的开户行与账号\" placeholder-class=\"placeholder\" class=\"custom-input\" />\n        </view>\n      </view>\n\n      <view class=\"input-group\">\n        <view class=\"input-label\">\n          <text class=\"label-text\">电子邮箱</text>\n          <text class=\"required\">*</text>\n        </view>\n        <view class=\"input-wrapper\">\n          <input model:value='{{email}}' type=\"text\" placeholder=\"发票将通过邮件发送给你\" placeholder-class=\"placeholder\" class=\"custom-input\" />\n        </view>\n      </view>\n\n      <view class=\"input-group last-group\">\n        <view class=\"input-label\">\n          <text class=\"label-text\">备注</text>\n        </view>\n        <view class=\"input-wrapper\">\n          <input model:value='{{remark}}' type=\"text\" placeholder=\"如有特殊说明，请告诉我们\" placeholder-class=\"placeholder\" class=\"custom-input\" />\n        </view>\n      </view>\n    </view>\n  </view>\n\n  <!-- 温馨提示 -->\n  <view class=\"tips-card\">\n    <view class=\"tips-title\">💡 温馨提示</view>\n    <view class=\"tips-text\">• 发票金额不能低于100元</view>\n    <view class=\"tips-text\">• 电子发票将在3-5个工作日内发送到您的邮箱</view>\n  </view>\n\n  <!-- 底部操作区 -->\n  <view class=\"bottom-actions\">\n    <button class=\"submit-btn\" bind:tap=\"bindSave\">提交申请</button>\n    <navigator url=\"/pages/invoice/list\" class=\"record-link\">\n      <text>查看开票记录</text>\n      <text class=\"link-arrow\">›</text>\n    </navigator>\n  </view>\n</view>\n<fuwuxieyi k=\"invoice_apply\" />\n\n<!-- 弹出编辑昵称和头像的框 -->\n<login show=\"{{ nickPopShow }}\" avatarUrl=\"{{ popavatarUrl }}\" name=\"{{ popnick }}\" />"
  },
  {
    "path": "pages/invoice/apply.wxss",
    "content": "/* 京东风格 - 发票申请页面 */\npage {\n  background: linear-gradient(180deg, #f8f8f8 0%, #ffffff 100%);\n  min-height: 100vh;\n}\n\n.page-container {\n  padding-bottom: 40rpx;\n}\n\n/* 顶部装饰栏 */\n.header-bar {\n  background: linear-gradient(135deg, #E4393C 0%, #F85959 100%);\n  padding: 40rpx 32rpx 60rpx;\n  position: relative;\n  overflow: hidden;\n}\n\n.header-bar::after {\n  content: '';\n  position: absolute;\n  width: 400rpx;\n  height: 400rpx;\n  background: rgba(255, 255, 255, 0.1);\n  border-radius: 50%;\n  right: -100rpx;\n  top: -200rpx;\n}\n\n.header-content {\n  position: relative;\n  z-index: 1;\n}\n\n.header-title {\n  font-size: 40rpx;\n  font-weight: 600;\n  color: #ffffff;\n  margin-bottom: 8rpx;\n  letter-spacing: 2rpx;\n}\n\n.header-subtitle {\n  font-size: 22rpx;\n  color: rgba(255, 255, 255, 0.9);\n  letter-spacing: 1rpx;\n  font-weight: 300;\n}\n\n/* 快捷导入卡片 */\n.quick-import-card {\n  margin: -30rpx 24rpx 20rpx;\n  background: #ffffff;\n  border-radius: 16rpx;\n  padding: 28rpx 32rpx;\n  box-shadow: 0 4rpx 20rpx rgba(228, 57, 60, 0.12);\n  display: flex;\n  align-items: center;\n  position: relative;\n  overflow: hidden;\n}\n\n.quick-import-card::before {\n  content: '';\n  position: absolute;\n  left: 0;\n  top: 0;\n  bottom: 0;\n  width: 6rpx;\n  background: linear-gradient(180deg, #E4393C 0%, #F85959 100%);\n}\n\n.import-icon {\n  font-size: 48rpx;\n  margin-right: 24rpx;\n  margin-left: 12rpx;\n}\n\n.import-content {\n  flex: 1;\n}\n\n.import-title {\n  font-size: 30rpx;\n  font-weight: 600;\n  color: #333333;\n  margin-bottom: 4rpx;\n}\n\n.import-desc {\n  font-size: 24rpx;\n  color: #999999;\n}\n\n.import-arrow {\n  font-size: 48rpx;\n  color: #E4393C;\n  font-weight: 300;\n  margin-right: 8rpx;\n}\n\n/* 主表单卡片 */\n.form-card {\n  margin: 0 24rpx 20rpx;\n  background: #ffffff;\n  border-radius: 16rpx;\n  box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06);\n  overflow: hidden;\n}\n\n.card-header {\n  padding: 32rpx;\n  border-bottom: 1rpx solid #f5f5f5;\n}\n\n.card-title {\n  display: flex;\n  align-items: center;\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333333;\n}\n\n.title-icon {\n  width: 6rpx;\n  height: 28rpx;\n  background: linear-gradient(180deg, #E4393C 0%, #F85959 100%);\n  border-radius: 3rpx;\n  margin-right: 16rpx;\n}\n\n/* 表单内容 */\n.form-content {\n  padding: 0 32rpx;\n}\n\n.input-group {\n  padding: 32rpx 0;\n  border-bottom: 1rpx solid #f0f0f0;\n}\n\n.input-group.last-group {\n  border-bottom: none;\n}\n\n.input-label {\n  display: flex;\n  align-items: center;\n  margin-bottom: 20rpx;\n}\n\n.label-text {\n  font-size: 28rpx;\n  color: #333333;\n  font-weight: 500;\n}\n\n.required {\n  color: #E4393C;\n  margin-left: 6rpx;\n  font-size: 28rpx;\n}\n\n.input-wrapper {\n  position: relative;\n}\n\n.custom-input {\n  width: 100%;\n  height: 80rpx;\n  background: #f8f9fa;\n  border-radius: 12rpx;\n  padding: 0 24rpx;\n  font-size: 28rpx;\n  color: #333333;\n  border: 2rpx solid transparent;\n  transition: all 0.3s;\n}\n\n.custom-input:focus {\n  background: #ffffff;\n  border-color: #E4393C;\n}\n\n.placeholder {\n  color: #bbbbbb;\n  font-size: 26rpx;\n}\n\n/* 金额输入特殊样式 */\n.amount-group {\n  position: relative;\n}\n\n.amount-wrapper {\n  display: flex;\n  align-items: center;\n  background: #fff5f5;\n  border-radius: 12rpx;\n  padding: 0 24rpx;\n  border: 2rpx solid #ffe5e5;\n}\n\n.currency-symbol {\n  font-size: 32rpx;\n  color: #E4393C;\n  font-weight: 600;\n  margin-right: 12rpx;\n}\n\n.amount-input {\n  flex: 1;\n  background: transparent !important;\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #E4393C;\n  padding: 0;\n  height: 80rpx;\n  border: none !important;\n}\n\n/* 温馨提示卡片 */\n.tips-card {\n  margin: 0 24rpx 20rpx;\n  background: linear-gradient(135deg, #fff9e6 0%, #fff5dc 100%);\n  border-radius: 16rpx;\n  padding: 28rpx 32rpx;\n  border: 1rpx solid #ffe8b3;\n}\n\n.tips-title {\n  font-size: 28rpx;\n  font-weight: 600;\n  color: #ff9900;\n  margin-bottom: 16rpx;\n  display: flex;\n  align-items: center;\n}\n\n.tips-text {\n  font-size: 24rpx;\n  color: #666666;\n  line-height: 38rpx;\n  margin-bottom: 8rpx;\n}\n\n.tips-text:last-child {\n  margin-bottom: 0;\n}\n\n/* 底部操作区 */\n.bottom-actions {\n  padding: 0 24rpx;\n  margin-top: 20rpx;\n}\n\n.submit-btn {\n  width: 100%;\n  height: 96rpx;\n  background: linear-gradient(135deg, #E4393C 0%, #F85959 100%);\n  border-radius: 48rpx;\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #ffffff;\n  border: none;\n  box-shadow: 0 8rpx 24rpx rgba(228, 57, 60, 0.3);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  letter-spacing: 2rpx;\n  transition: all 0.3s;\n}\n\n.submit-btn::after {\n  border: none;\n}\n\n.submit-btn:active {\n  transform: scale(0.98);\n  box-shadow: 0 4rpx 16rpx rgba(228, 57, 60, 0.3);\n}\n\n.record-link {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-top: 28rpx;\n  padding: 24rpx 0;\n  font-size: 28rpx;\n  color: #666666;\n}\n\n.record-link text:first-child {\n  margin-right: 8rpx;\n}\n\n.link-arrow {\n  font-size: 36rpx;\n  color: #E4393C;\n  font-weight: 300;\n}"
  },
  {
    "path": "pages/invoice/list.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    invoiceList: []\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function (options) {\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.invoiceList()\n      } else {\n        getApp().loginOK = () => {\n          this.invoiceList()\n        }\n      }\n    })\n  },\n  onShow: function () {\n  },\n  async invoiceList() {\n    wx.showLoading({\n      title: '',\n    })\n    // https://www.yuque.com/apifm/nu0f75/ygzggg\n    const res = await WXAPI.invoiceList({\n      token: wx.getStorageSync('token')\n    })\n    wx.hideLoading()\n    if (res.code == 0) {\n      this.setData({\n        invoiceList: res.data.result\n      })\n    } else {\n      this.setData({\n        invoiceList: []\n      })\n    }\n  },\n  download(e) {\n    const _this = this\n    const file = e.currentTarget.dataset.file\n    wx.downloadFile({\n      url: file,\n      success (res) {\n        const tempFilePath = res.tempFilePath\n        console.log(tempFilePath);\n        wx.openDocument({\n          filePath: tempFilePath,\n          showMenu: true,\n          success: function (res) {\n            console.log('打开文档成功')\n          }\n        })\n      }\n    })\n  },\n})"
  },
  {
    "path": "pages/invoice/list.json",
    "content": "{\n  \"navigationBarTitleText\": \"开票记录\"\n}"
  },
  {
    "path": "pages/invoice/list.wxml",
    "content": "<view class=\"invoice-container\">\n  <!-- 空状态 -->\n  <view wx:if=\"{{invoiceList.length <= 0}}\" class=\"empty-state\">\n    <image class=\"empty-icon\" src=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath fill='%23e0e0e0' d='M100 20 L180 60 L180 140 L100 180 L20 140 L20 60 Z'/%3E%3Cpath fill='%23f5f5f5' d='M100 40 L160 70 L160 130 L100 160 L40 130 L40 70 Z'/%3E%3Crect x='70' y='80' width='60' height='4' rx='2' fill='%23bdbdbd'/%3E%3Crect x='70' y='95' width='40' height='4' rx='2' fill='%23bdbdbd'/%3E%3Crect x='70' y='110' width='50' height='4' rx='2' fill='%23bdbdbd'/%3E%3C/svg%3E\"></image>\n    <view class=\"empty-text\">暂无开票信息</view>\n    <view class=\"empty-tip\">您还没有申请过发票哦~</view>\n  </view>\n\n  <!-- 发票列表 -->\n  <view class=\"invoice-list\" wx:else>\n    <view class=\"invoice-card\" wx:for=\"{{invoiceList}}\" wx:key=\"index\">\n      <!-- 卡片头部 -->\n      <view class=\"card-header\">\n        <view class=\"header-left\">\n          <image class=\"invoice-icon\" src=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23E4393C'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm4 18H6V4h7v5h5v11z'/%3E%3Cpath d='M8 12h8v2H8zm0 4h5v2H8z'/%3E%3C/svg%3E\"></image>\n          <text class=\"company-name\">{{item.comName}}</text>\n        </view>\n        <view class=\"status-tag status-{{item.status}}\">\n          <text wx:if=\"{{item.status == 0}}\">待处理</text>\n          <text wx:if=\"{{item.status == 1}}\">不通过</text>\n          <text wx:if=\"{{item.status == 2}}\">开票中</text>\n          <text wx:if=\"{{item.status == 3}}\">已开票</text>\n        </view>\n      </view>\n\n      <!-- 卡片内容 -->\n      <view class=\"card-content\">\n        <!-- 金额显示 -->\n        <view class=\"amount-section\">\n          <text class=\"amount-label\">开票金额</text>\n          <text class=\"amount-value\">¥{{item.amount}}</text>\n        </view>\n\n        <!-- 发票信息 -->\n        <view class=\"info-section\">\n          <view class=\"info-item\">\n            <text class=\"info-label\">发票内容</text>\n            <text class=\"info-value\">{{item.consumption}}</text>\n          </view>\n          <view class=\"info-item\" wx:if=\"{{item.email}}\">\n            <text class=\"info-label\">接收邮箱</text>\n            <text class=\"info-value\">{{item.email}}</text>\n          </view>\n          <view class=\"info-item\">\n            <text class=\"info-label\">申请时间</text>\n            <text class=\"info-value\">{{item.dateAdd}}</text>\n          </view>\n        </view>\n      </view>\n\n      <!-- 已开票查看按钮 -->\n      <view class=\"card-footer\" wx:if=\"{{item.status == 3 && item.file}}\">\n        <view class=\"view-invoice-btn\" data-file=\"{{item.file}}\" bind:tap=\"download\">\n          <image class=\"btn-icon\" src=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z'/%3E%3C/svg%3E\"></image>\n          <text class=\"btn-text\">查看电子发票</text>\n        </view>\n      </view>\n    </view>\n  </view>\n</view>"
  },
  {
    "path": "pages/invoice/list.wxss",
    "content": "/* 京东风格 - 发票记录页面 */\n\npage {\n  background: linear-gradient(180deg, #f5f5f5 0%, #ffffff 100%);\n  min-height: 100vh;\n}\n\n/* ========== 容器 ========== */\n.invoice-container {\n  padding: 20rpx;\n  min-height: 100vh;\n}\n\n/* ========== 空状态 ========== */\n.empty-state {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: 200rpx 40rpx;\n}\n\n.empty-icon {\n  width: 240rpx;\n  height: 240rpx;\n  margin-bottom: 40rpx;\n  opacity: 0.6;\n}\n\n.empty-text {\n  font-size: 32rpx;\n  color: #666666;\n  font-weight: 500;\n  margin-bottom: 16rpx;\n}\n\n.empty-tip {\n  font-size: 26rpx;\n  color: #999999;\n}\n\n/* ========== 发票列表 ========== */\n.invoice-list {\n  display: flex;\n  flex-direction: column;\n  gap: 24rpx;\n}\n\n/* ========== 发票卡片 ========== */\n.invoice-card {\n  background: #ffffff;\n  border-radius: 16rpx;\n  overflow: hidden;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);\n  transition: all 0.3s ease;\n}\n\n.invoice-card:active {\n  transform: scale(0.98);\n  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);\n}\n\n/* ========== 卡片头部 ========== */\n.card-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 28rpx 28rpx 24rpx;\n  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);\n  border-bottom: 2rpx solid #f5f5f5;\n}\n\n.header-left {\n  display: flex;\n  align-items: center;\n  flex: 1;\n  overflow: hidden;\n}\n\n.invoice-icon {\n  width: 40rpx;\n  height: 40rpx;\n  margin-right: 16rpx;\n  flex-shrink: 0;\n}\n\n.company-name {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333333;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n/* ========== 状态标签 ========== */\n.status-tag {\n  padding: 8rpx 20rpx;\n  border-radius: 20rpx;\n  font-size: 24rpx;\n  font-weight: 500;\n  flex-shrink: 0;\n  margin-left: 16rpx;\n}\n\n.status-0 {\n  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);\n  color: #ffffff;\n  box-shadow: 0 4rpx 12rpx rgba(79, 172, 254, 0.3);\n}\n\n.status-1 {\n  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);\n  color: #ffffff;\n  box-shadow: 0 4rpx 12rpx rgba(245, 87, 108, 0.3);\n}\n\n.status-2 {\n  background: linear-gradient(135deg, #ffd89b 0%, #ff9a56 100%);\n  color: #ffffff;\n  box-shadow: 0 4rpx 12rpx rgba(255, 154, 86, 0.3);\n}\n\n.status-3 {\n  background: linear-gradient(135deg, #a8edea 0%, #52d29a 100%);\n  color: #ffffff;\n  box-shadow: 0 4rpx 12rpx rgba(82, 210, 154, 0.3);\n}\n\n/* ========== 卡片内容 ========== */\n.card-content {\n  padding: 24rpx 28rpx;\n}\n\n/* ========== 金额区域 ========== */\n.amount-section {\n  display: flex;\n  align-items: baseline;\n  justify-content: space-between;\n  padding: 24rpx;\n  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);\n  border-radius: 12rpx;\n  margin-bottom: 24rpx;\n  border-left: 6rpx solid #E4393C;\n}\n\n.amount-label {\n  font-size: 26rpx;\n  color: #666666;\n  font-weight: 500;\n}\n\n.amount-value {\n  font-size: 44rpx;\n  font-weight: 700;\n  color: #E4393C;\n  letter-spacing: 1rpx;\n}\n\n/* ========== 信息区域 ========== */\n.info-section {\n  display: flex;\n  flex-direction: column;\n  gap: 20rpx;\n}\n\n.info-item {\n  display: flex;\n  justify-content: space-between;\n  align-items: flex-start;\n  padding: 16rpx 0;\n  border-bottom: 1rpx solid #f5f5f5;\n}\n\n.info-item:last-child {\n  border-bottom: none;\n}\n\n.info-label {\n  font-size: 28rpx;\n  color: #999999;\n  min-width: 140rpx;\n  flex-shrink: 0;\n}\n\n.info-value {\n  font-size: 28rpx;\n  color: #333333;\n  text-align: right;\n  flex: 1;\n  word-break: break-all;\n  line-height: 1.6;\n}\n\n/* ========== 卡片底部（查看按钮区域） ========== */\n.card-footer {\n  padding: 20rpx 28rpx 28rpx;\n  border-top: 2rpx solid #f5f5f5;\n  background: #fafafa;\n}\n\n/* ========== 查看电子发票按钮（京东风格） ========== */\n.view-invoice-btn {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 80rpx;\n  background: linear-gradient(135deg, #E4393C 0%, #C81623 100%);\n  border-radius: 40rpx;\n  box-shadow: 0 6rpx 20rpx rgba(228, 57, 60, 0.35);\n  transition: all 0.3s ease;\n  position: relative;\n  overflow: hidden;\n}\n\n.view-invoice-btn::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: -100%;\n  width: 100%;\n  height: 100%;\n  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);\n  transition: left 0.6s ease;\n}\n\n.view-invoice-btn:active::before {\n  left: 100%;\n}\n\n.view-invoice-btn:active {\n  transform: scale(0.96);\n  box-shadow: 0 4rpx 12rpx rgba(228, 57, 60, 0.4);\n}\n\n.btn-icon {\n  width: 36rpx;\n  height: 36rpx;\n  margin-right: 12rpx;\n}\n\n.btn-text {\n  font-size: 30rpx;\n  color: #ffffff;\n  font-weight: 600;\n  letter-spacing: 2rpx;\n}\n\n/* ========== 动画效果 ========== */\n@keyframes fadeInUp {\n  from {\n    opacity: 0;\n    transform: translateY(30rpx);\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n\n.invoice-card {\n  animation: fadeInUp 0.4s ease-out backwards;\n}\n\n.invoice-card:nth-child(1) { animation-delay: 0.1s; }\n.invoice-card:nth-child(2) { animation-delay: 0.15s; }\n.invoice-card:nth-child(3) { animation-delay: 0.2s; }\n.invoice-card:nth-child(4) { animation-delay: 0.25s; }\n.invoice-card:nth-child(5) { animation-delay: 0.3s; }\n"
  },
  {
    "path": "pages/live/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst APP = getApp()\n// fixed首次打开不显示标题的bug\nAPP.configLoadOK = () => {\n  wx.setNavigationBarTitle({\n    \n  })\n}\nDate.prototype.format = function(format) {\n  var date = {\n         \"M+\": this.getMonth() + 1,\n         \"d+\": this.getDate(),\n         \"h+\": this.getHours(),\n         \"m+\": this.getMinutes(),\n         \"s+\": this.getSeconds(),\n         \"q+\": Math.floor((this.getMonth() + 3) / 3),\n         \"S+\": this.getMilliseconds()\n  };\n  if (/(y+)/i.test(format)) {\n         format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));\n  }\n  for (var k in date) {\n         if (new RegExp(\"(\" + k + \")\").test(format)) {\n                format = format.replace(RegExp.$1, RegExp.$1.length == 1\n                       ? date[k] : (\"00\" + date[k]).substr((\"\" + date[k]).length));\n         }\n  }\n  return format;\n}\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    aliveRooms: [],\n    useFingerprintEmoji: false   // 新增\n  },\n  onLoad: function (options) {\n    this.wxaMpLiveRooms()\n    this.setData({ useFingerprintEmoji: this.shouldUseFingerprintEmoji() })\n  },\n  onShow: function () {\n\n  },\n  async wxaMpLiveRooms(){\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.wxaMpLiveRooms()\n    wx.hideLoading({\n      success: (res) => {},\n    })\n    if (res.code == 0 && res.data.length > 0) {\n      res.data.forEach(ele => {\n        if (ele.start_time) {\n          ele.start_time_str = new Date(ele.start_time*1000).format('yyyy-MM-dd h:m:s')\n        }\n      })\n      this.setData({\n        aliveRooms: res.data\n      })\n    }\n  },\n  onPullDownRefresh: function() {\n    // console.log('ppppp')\n    this.setData({\n      curPage: 1\n    });\n    this.wxaMpLiveRooms()\n    wx.stopPullDownRefresh()\n  },\n  goLiveRoom(e) {\n    const roomId = e.currentTarget.dataset.id\n    const status = e.currentTarget.dataset.status\n    if (status == 107 || status == 106 || status == 104) {\n      return\n    }\n    wx.navigateTo({\n      url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${roomId}`\n    })\n  },\n  /* 与 sign 页完全相同的判断逻辑*/\n  shouldUseFingerprintEmoji() {\n    try {\n      const info = wx.getDeviceInfo ? wx.getDeviceInfo() : wx.getSystemInfoSync()\n      const plat = (info.platform || '').toLowerCase()\n      const sys  = info.system || ''\n  \n      if (plat === 'android') {\n        const m = sys.match(/Android\\s+(\\d+)/)\n        return m ? (parseInt(m[1]) >= 16) : false\n      }\n      if (plat === 'ios') {\n        const m = sys.match(/iOS\\s+(\\d+)\\.(\\d+)/)\n        if (!m) return false\n        const major = parseInt(m[1]), minor = parseInt(m[2])\n        return major > 18 || (major === 18 && minor >= 4)\n      }\n      if (plat === 'windows' || plat === 'win32') {\n        const m = sys.match(/Windows\\s+(\\d+)\\s*H(\\d+)/)\n        if (!m) return false\n        const build = parseInt(m[1]), h = parseInt(m[2])\n        return build >= 25 && h >= 2\n      }\n    } catch (e) {}\n    return false\n  }\n})"
  },
  {
    "path": "pages/live/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"品质直播\",\n  \"enablePullDownRefresh\": true\n}"
  },
  {
    "path": "pages/live/index.wxml",
    "content": "<view class=\"live-page\">\n  <block wx:if=\"{{aliveRooms}}\">\n    <view class=\"live-container\">\n      <view class=\"live-card\" wx:for=\"{{aliveRooms}}\" wx:key=\"id\" bindtap=\"goLiveRoom\" data-id=\"{{item.roomid}}\" data-status=\"{{item.live_status}}\">\n        <!-- 直播封面 -->\n        <view class=\"live-cover\">\n          <image src=\"{{item.share_img}}\" class=\"cover-image\" mode=\"aspectFill\" lazy-load=\"true\" />\n          \n          <!-- 直播状态标签 -->\n          <view class=\"status-badge status-{{item.live_status}}\">\n            <block wx:if=\"{{item.live_status == 101}}\">\n              <view class=\"status-dot\"></view>\n              <text class=\"status-text\">正在直播</text>\n            </block>\n            <block wx:elif=\"{{item.live_status == 102}}\">\n              <text class=\"status-text\">即将开播</text>\n            </block>\n            <block wx:elif=\"{{item.live_status == 103}}\">\n              <text class=\"status-text\">已结束</text>\n            </block>\n            <block wx:else>\n              <text class=\"status-text\">已过期</text>\n            </block>\n          </view>\n\n          <!-- 渐变遮罩 -->\n          <view class=\"cover-mask\"></view>\n        </view>\n\n        <!-- 直播信息 -->\n        <view class=\"live-info\">\n          <view class=\"live-title\">{{item.name}}</view>\n          \n          <view class=\"live-meta\">\n            <view class=\"meta-item\">\n              <van-icon size=\"28rpx\" name=\"manager-o\" color=\"#666\" />\n              <text class=\"meta-text\">{{item.anchor_name}}</text>\n            </view>\n            <view class=\"meta-item\">\n              <van-icon size=\"28rpx\" name=\"clock-o\" color=\"#666\" />\n              <text class=\"meta-text\">{{item.start_time_str}}</text>\n            </view>\n          </view>\n\n          <!-- 操作按钮 -->\n          <view class=\"live-action\">\n            <view wx:if=\"{{item.live_status == 107 || item.live_status == 106 || item.live_status == 104}}\" class=\"action-btn btn-disabled\">\n              <text>已过期</text>\n            </view>\n            <view wx:elif=\"{{item.live_status == 102}}\" class=\"action-btn btn-upcoming\">\n              <van-icon size=\"28rpx\" name=\"bell\" />\n              <text>预约提醒</text>\n            </view>\n            <view wx:elif=\"{{item.live_status == 103}}\" class=\"action-btn btn-ended\">\n              <van-icon size=\"28rpx\" name=\"replay\" />\n              <text>查看回放</text>\n            </view>\n            <view wx:else class=\"action-btn btn-live\">\n              <view class=\"live-pulse\"></view>\n              <text>进入直播间</text>\n            </view>\n          </view>\n        </view>\n      </view>\n    </view>\n  </block>\n\n  <!-- 空状态 -->\n  <block wx:else>\n    <view class=\"empty-state\">\n      <!-- 高版本系统：emoji -->\n      <text wx:if=\"{{useFingerprintEmoji}}\"\n        class=\"empty-emoji\">🫆</text>\n      <!-- 低版本或未知系统：原图 -->\n      <image wx:else\n        class=\"empty-image\"\n        src=\"/images/zw.png\"\n        mode=\"aspectFit\" />\n      <text class=\"empty-text\">暂无直播内容</text>\n    </view>\n  </block>\n</view>"
  },
  {
    "path": "pages/live/index.wxss",
    "content": "/* 页面容器 */\n.live-page {\n  min-height: 100vh;\n  background: linear-gradient(180deg, #f8f8f8 0%, #ffffff 100%);\n  padding-bottom: 32rpx;\n}\n\n/* 页面头部 */\n.page-header {\n  padding: 48rpx 32rpx 32rpx;\n  background: linear-gradient(135deg, #E4393C 0%, #C81623 100%);\n  position: relative;\n  overflow: hidden;\n}\n\n.page-header::after {\n  content: '';\n  position: absolute;\n  right: -50rpx;\n  top: -50rpx;\n  width: 300rpx;\n  height: 300rpx;\n  background: rgba(255, 255, 255, 0.08);\n  border-radius: 50%;\n}\n\n.header-title {\n  font-size: 48rpx;\n  font-weight: 700;\n  color: #ffffff;\n  letter-spacing: 2rpx;\n  position: relative;\n  z-index: 1;\n}\n\n.header-subtitle {\n  font-size: 26rpx;\n  color: rgba(255, 255, 255, 0.85);\n  margin-top: 12rpx;\n  position: relative;\n  z-index: 1;\n}\n\n/* 直播列表容器 */\n.live-container {\n  padding: 24rpx 24rpx 0;\n}\n\n/* 直播卡片 */\n.live-card {\n  background: #ffffff;\n  border-radius: 20rpx;\n  margin-bottom: 24rpx;\n  overflow: hidden;\n  box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.06);\n  transition: all 0.3s ease;\n}\n\n.live-card:active {\n  transform: scale(0.98);\n  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);\n}\n\n/* 直播封面区域 */\n.live-cover {\n  width: 100%;\n  height: 400rpx;\n  position: relative;\n  overflow: hidden;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n}\n\n.cover-image {\n  width: 100%;\n  height: 100%;\n  display: block;\n}\n\n/* 渐变遮罩 */\n.cover-mask {\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  height: 120rpx;\n  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);\n  pointer-events: none;\n}\n\n/* 状态标签 */\n.status-badge {\n  position: absolute;\n  top: 24rpx;\n  left: 24rpx;\n  padding: 12rpx 24rpx;\n  border-radius: 40rpx;\n  backdrop-filter: blur(12rpx);\n  -webkit-backdrop-filter: blur(12rpx);\n  display: flex;\n  align-items: center;\n  gap: 8rpx;\n  font-size: 24rpx;\n  font-weight: 600;\n  z-index: 2;\n  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);\n}\n\n/* 正在直播 */\n.status-badge.status-101 {\n  background: rgba(232, 67, 62, 0.95);\n  color: #ffffff;\n}\n\n/* 即将开播 */\n.status-badge.status-102 {\n  background: rgba(255, 148, 62, 0.95);\n  color: #ffffff;\n}\n\n/* 已结束 */\n.status-badge.status-103 {\n  background: rgba(153, 153, 153, 0.95);\n  color: #ffffff;\n}\n\n/* 已过期 */\n.status-badge.status-104,\n.status-badge.status-106,\n.status-badge.status-107 {\n  background: rgba(204, 204, 204, 0.85);\n  color: #666666;\n}\n\n.status-text {\n  line-height: 1;\n}\n\n/* 直播中圆点动画 */\n.status-dot {\n  width: 12rpx;\n  height: 12rpx;\n  background: #ffffff;\n  border-radius: 50%;\n  animation: pulse 1.5s ease-in-out infinite;\n}\n\n@keyframes pulse {\n  0%, 100% {\n    opacity: 1;\n    transform: scale(1);\n  }\n  50% {\n    opacity: 0.6;\n    transform: scale(1.3);\n  }\n}\n\n/* 直播信息区域 */\n.live-info {\n  padding: 28rpx 28rpx 24rpx;\n}\n\n.live-title {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333333;\n  line-height: 1.4;\n  margin-bottom: 20rpx;\n  display: -webkit-box;\n  -webkit-box-orient: vertical;\n  -webkit-line-clamp: 2;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  min-height: 90rpx;\n}\n\n/* 元信息 */\n.live-meta {\n  display: flex;\n  flex-direction: column;\n  gap: 12rpx;\n  margin-bottom: 24rpx;\n}\n\n.meta-item {\n  display: flex;\n  align-items: center;\n  gap: 8rpx;\n}\n\n.meta-text {\n  font-size: 26rpx;\n  color: #666666;\n  line-height: 1.2;\n}\n\n/* 操作按钮区域 */\n.live-action {\n  padding-top: 16rpx;\n  border-top: 1rpx solid #f0f0f0;\n}\n\n.action-btn {\n  height: 80rpx;\n  border-radius: 48rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 12rpx;\n  font-size: 28rpx;\n  font-weight: 600;\n  letter-spacing: 1rpx;\n  position: relative;\n  transition: all 0.3s ease;\n}\n\n/* 正在直播按钮 */\n.btn-live {\n  background: linear-gradient(135deg, #E4393C 0%, #C81623 100%);\n  color: #ffffff;\n  box-shadow: 0 8rpx 24rpx rgba(232, 67, 62, 0.3);\n}\n\n.btn-live:active {\n  transform: scale(0.96);\n}\n\n/* 直播脉冲动画 */\n.live-pulse {\n  width: 16rpx;\n  height: 16rpx;\n  background: #ffffff;\n  border-radius: 50%;\n  position: relative;\n  animation: livePulse 2s ease-in-out infinite;\n}\n\n.live-pulse::before {\n  content: '';\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n  width: 100%;\n  height: 100%;\n  background: #ffffff;\n  border-radius: 50%;\n  animation: ripple 2s ease-out infinite;\n}\n\n@keyframes livePulse {\n  0%, 100% {\n    opacity: 1;\n  }\n  50% {\n    opacity: 0.7;\n  }\n}\n\n@keyframes ripple {\n  0% {\n    width: 16rpx;\n    height: 16rpx;\n    opacity: 0.8;\n  }\n  100% {\n    width: 40rpx;\n    height: 40rpx;\n    opacity: 0;\n  }\n}\n\n/* 即将开播按钮 */\n.btn-upcoming {\n  background: linear-gradient(135deg, #FF943E 0%, #FF7F39 100%);\n  color: #ffffff;\n  box-shadow: 0 8rpx 24rpx rgba(255, 148, 62, 0.25);\n}\n\n/* 已结束按钮 */\n.btn-ended {\n  background: linear-gradient(135deg, #999999 0%, #777777 100%);\n  color: #ffffff;\n  box-shadow: 0 6rpx 20rpx rgba(153, 153, 153, 0.2);\n}\n\n/* 已过期按钮 */\n.btn-disabled {\n  background: #f5f5f5;\n  color: #cccccc;\n  border: 1rpx solid #e5e5e5;\n}\n\n/* 空状态 */\n.empty-state {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: 120rpx 0;\n}\n\n.empty-image {\n  width: 300rpx;\n  height: 300rpx;\n  opacity: 0.4;\n  margin-bottom: 32rpx;\n}\n\n.empty-text {\n  font-size: 28rpx;\n  color: #999999;\n}\n\n/* 响应式优化 */\n@media (prefers-color-scheme: dark) {\n  .live-page {\n    background: #1a1a1a;\n  }\n  \n  .live-card {\n    background: #2a2a2a;\n  }\n  \n  .live-title {\n    color: #e5e5e5;\n  }\n  \n  .meta-text {\n    color: #999999;\n  }\n}\n\n/* 滚动条隐藏 */\n::-webkit-scrollbar {\n  width: 0;\n  height: 0;\n  color: transparent;\n}\n\n/* 以下为旧样式保留（备用） */\n.shops-container {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin: 16rpx;\n}\n.shops-container .l {\n  display: flex;\n  align-items: center;\n}\n.shops-container .l text {\n  color: #666;\n  margin-left: 16rpx;\n}\n.shops-container .l image {\n  width: 40rpx;\n  height: 40rpx;\n}\n.shops-container .r {\n  display: flex;\n  align-items: center;\n}\n.shops-container .r text {\n  color: #666;\n}\n.shops-container .r image {\n  width: 40rpx;\n  height: 40rpx;\n}\n\n.search {\n  position: absolute;\n  top: 32rpx;\n  left: 25rpx;\n  width: 700rpx;\n  height: 66rpx;\n  display: block;\n  box-sizing: border-box;\n}\n.search input {\n  display: block;\n  box-sizing: border-box;\n  background: rgba(255, 255, 255, 0.8);\n  border: 1rpx solid #e3e3e3;\n  width: 700rpx;\n  height: 66rpx;\n  border-radius: 30rpx;\n  padding-left: 32rpx; \n}\n.search image {\n  width: 35rpx;\n  height: 35rpx;\n  position: absolute;\n  top: 16rpx;\n  right: 32rpx;\n  z-index: 99;\n}\n.goodsDynamic {\n  position: absolute;\n  top: 110rpx;\n  left: 25rpx;\n  width: 650rpx;\n  height:66rpx;\n  line-height:66rpx;\n  background: rgba(0, 0, 0, 0.6);\n  color: #fff;  \n  padding: 0 16rpx;\n  border-radius: 32rpx;\n  font-size: 24rpx;  \n}\n.goodsDynamic .swiper2 {\n  width: 100%;\n  height: 100%;\n}\n.goodsDynamic-item {\n  width: 100%;\n  display: flex;\n  align-items: center;\n}\n.goodsDynamic-item image {\n  width: 32rpx;\n  height: 32rpx;\n  border-radius: 50%;\n  flex-shrink: 0;\n}\n.goodsDynamic-item text {\n  margin-left: 8rpx;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  overflow: hidden;\n}\n.notice-box {\n  display: flex;\n  box-sizing: border-box;\n  width: 100vw;\n  height: 88rpx;\n  line-height: 88rpx;\n  justify-content: space-between;\n  align-items: center;\n  padding-right: 32rpx;\n  border-bottom: 1rpx solid #efeff4;\n}\n.notice{\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  width: 600rpx;\n}\n.notice_icon {\n  margin-left:20rpx;\n  width:30rpx;\n  height:30rpx;\n}\n.notice_swiper{\n  height: 88rpx;\n  width: 600rpx;\n}\n.notice_itemr {\n  padding-left: 16rpx;\n  font-size: 24rpx;\n  overflow: hidden;\n  color: #e64340;\n}\n.notice-box .more {\n  color: #666;\n  font-size: 24rpx;\n}\n\n.container {\n  background-color: #fff;\n  min-height: 100%;\n  display: block;\n}\n.category-box {  \n  background-color: #fff;\n  display: flex;\n  flex-wrap: wrap;\n}\n.category-list{\n  flex:1;\n  margin-top:20rpx;\n  text-align: center;\n  display: inline-block;\n  overflow: hidden;\n}\n.category-column{\n  width:100%;\n  margin-top:20rpx;\n  overflow: hidden;\n}\n.category-imgbox{\n  width:90rpx;\n  height:90rpx;\n}\n.category-title{\n  font-size: 24rpx;\n  text-align:center;\n  margin-top:10rpx;\n}\n\n.swiper-container{\n  width: 750rpx;\n  height: 375rpx;\n  position: relative;  \n}\n.swiper-container .swiper1 {\n  width: 750rpx;\n  height: 375rpx;\n}\n.swiper-container .swiper1 image {\n  width: 750rpx;\n  height: 375rpx;\n}\n\n.type-item-on{\n  color:#e64340;\n  border-bottom: 1rpx solid #e64340;\n}\n.goods-container{\n  display: flex;\n  justify-content: space-between;  \n  flex-wrap:wrap;\n  box-sizing: content-box;\n  padding: 24rpx;\n  background-color: #F2f2f2;\n}\n.goods-box{\n  width: 339rpx;\n  height: 472rpx;\n  background-color: #fff;\n  overflow: hidden;\n  margin-bottom: 24rpx;\n  border-radius:5px;\n}\n.goods-box .img-box{\n  width: 339rpx;\n  height: 339rpx;\n  overflow: hidden;\n}\n.goods-box .img-box image{\n   width: 339rpx;\n   height: 339rpx;\n}\n.goods-box .goods-title{\n  width: 280rpx;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  overflow: hidden;\n  font-size: 24rpx;\n  padding: 24rpx 0 0rpx 0;\n  color:#000;\n  margin-left: 24rpx;\n}\n.goods-box .goods-price{\n  width: 280rpx;\n  overflow: hidden;\n  font-size: 24rpx;\n  padding: 24rpx 0;\n  color:#e64340;\n  margin-left: 24rpx;\n}\n\n.pos-fiexd{\n  position: fixed;\n  top: 0;\n  left: 0;\n}\n.coupons{\n  margin-top:10rpx;\n  width: 100%;\n  height: 180rpx;\n  overflow: hidden;\n}\n.coupons-scroll{\n  white-space: nowrap;\n  height: 180rpx;\n  width: 100%;\n  background-color: #fff;\n}\n.coupons-item{\n  width:300rpx;\n  height: 180rpx;\n  margin: 10rpx;\n  padding-top: 20rpx;\n  padding-left: 15rpx;\n  background-color: #f1a83b;\n  box-sizing: content-box;\n  font-size: 20rpx;\n  line-height: 35rpx;\n  overflow: hidden;\n  color: #fff;\n  display: inline-block;\n}\n.coupons-float {\n  position: fixed;\n  right:15rpx;\n  bottom:80rpx;\n  text-align: center;\n}\n.coupons-float image {\n  width:110rpx;\n  height:110rpx;\n  margin-top: 10rpx;\n}\n.tuan {\n  width:750rpx;\n  background-color: #F2f2f2;\n  padding-top:10rpx;\n}\n.tuan-item {\n  width:720rpx;\n  margin: auto;\n  margin-top: 20rpx;\n  background-color: #FFF;\n  position: relative;\n}\n.tuan-goods-pic {\n  width:720rpx;\n  height: 250rpx;\n  overflow: hidden;\n}\n.tuan-goods-pic image {\n  width:720rpx;\n}\n.tuan-title {\n  margin-top: 20rpx;\n  margin-left: 20rpx;\n  font-size:30rpx;\n  font-weight: 400;\n}\n.tuan-profile {\n  margin-left: 20rpx;\n  font-size:28rpx;\n  color:#999;\n}\n.tuan-price {\n  margin-left: 20rpx;\n}\n.tuan-price .now {\n  font-size:36rpx;\n  color:#e64340;\n}\n.tuan-price .original {\n  margin-left: 20rpx;\n  font-size:26rpx;\n  color:#999;\n  text-decoration:line-through;\n}\n.tuan-btn {\n  position: absolute;\n  right:30rpx;\n  bottom: 10rpx;\n}\n.category-goods-title {\n  width: 100vw;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 8rpx;\n  border-bottom: 1rpx solid #efeff4;\n}\n.category-goods-title .more {\n  color: #666;\n  font-size: 24rpx;\n  margin-right: 32rpx;\n}\n.progress {\n  width: 686rpx;\n  padding: 0 32rpx;\n  margin-bottom: 16rpx;\n}\n\n/* 旧的秒杀样式（保留作为备用） */\n.miaosha-container {\n  padding: 0;\n}\n.miaosha-goods-list {\n  margin: 20rpx;\n  background: #f6f6f6;\n  border-radius: 16rpx;\n  display: flex;\n  padding: 20rpx;\n}\n.miaosha-goods-list .image {\n  width: 260rpx;\n  height: 260rpx;\n  flex-shrink: 0;\n  border-radius: 16rpx;\n}\n.miaosha-goods-list .r {\n  margin-left: 32rpx;  \n}\n.miaosha-goods-list .r .goods-title {\n  color: #333;\n  font-size: 28rpx;\n}\n.miaosha-goods-list .r .label {\n  color: #e64340;\n  font-size: 24rpx;\n  display: flex;\n  align-items: flex-start;\n  margin-top: 8rpx;\n}\n.miaosha-goods-list .r .label text {\n  margin-left: 8rpx;\n}\n.miaosha-goods-list .count-down {\n  background: #e64340;\n  padding: 8rpx 16rpx;\n  border-radius: 16rpx;\n  margin-top: 12rpx;\n}\n.van-count-down {\n  color: #fff !important;\n  font-size: 26rpx !important;\n  text-align: center;\n}\n.miaosha-price-btn {\n  padding-top: 32rpx;\n}\n.miaosha-price-btn .price {\n  color: #e64340;\n  font-size: 40rpx;\n  margin-top: 12rpx;\n}\n.miaosha-price-btn .price text {\n  color: #666666;\n  font-size: 26rpx;\n  text-decoration:line-through;\n}\n.empty-emoji {\n  display: block;          /* 同 image 默认 block */\n  width: 200rpx;           /* 与原图默认尺寸一致，若原图不是 200rpx 请按实际改 */\n  height: 200rpx;\n  margin: 0 auto;\n  font-size: 160rpx;       /* 视觉上填满容器，可微调 */\n  line-height: 200rpx;\n  text-align: center;\n  cursor: pointer;\n}"
  },
  {
    "path": "pages/login/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nPage({\n  data: {\n\n  },\n  onLoad(options) {\n  },\n  onShow() {\n\n  },\n  xieyiChange(e) {\n    this.setData({\n      checked: e.detail,\n    })\n  },\n  goxieyi(e) {\n    wx.navigateTo({\n      url: '/pages/about/index?key=' + e.currentTarget.dataset.key,\n    })\n  },\n  showModal2() {\n    wx.showModal({\n      title: '温馨提示',\n      content: '已经阅读并同意《用户协议》、《隐私协议》',\n      cancelText: '不同意',\n      confirmText: '同意',\n      success: res => {\n        if (res.confirm) {\n          this.setData({\n            checked: true\n          })\n        }\n      }\n    })\n  },\n  showModal(action) {\n    wx.showModal({\n      title: '温馨提示',\n      content: '已经阅读并同意《用户协议》、《隐私协议》',\n      cancelText: '不同意',\n      confirmText: '同意',\n      success: res => {\n        if (res.confirm) {\n          this.setData({\n            checked: true\n          })\n          if (action == 'loginOne') {\n            this.loginOne()\n          }\n        }\n      }\n    })\n  },\n  async loginOne() {\n    if (!this.data.checked) {\n      this.showModal('loginOne')\n      return\n    }\n    const res = await AUTH.login20241025()\n    if (res.code == 10000) {\n      // 用户不存在\n      wx.showModal({\n        content: '您还未注册，请使用《手机号安全登陆》方式登陆',\n        showCancel: false\n      })\n      return\n    }\n    if (res.code != 0) {\n      // 登录错误\n      return\n    }\n    wx.reLaunch({\n      url: '/pages/index/index',\n    })\n  },\n  async getPhoneNumber(e) {\n    if (e.detail.errMsg.indexOf('privacy permission is not authorized') != -1) {\n      wx.showModal({\n        content: '请阅读并同意隐私条款以后才能继续本操作',\n        confirmText: '阅读协议',\n        cancelText: '取消',\n        success (res) {\n          if (res.confirm) {\n            wx.requirePrivacyAuthorize() // 弹出用户隐私授权框\n          }\n        }\n      })\n      return\n    }\n    if (!e.detail.errMsg) {\n      wx.showModal({\n        content: 'getPhoneNumber异常',\n        showCancel: false\n      })\n      return\n    }\n    if (e.detail.errMsg == \"getPhoneNumber:fail user deny\") {\n      return\n    }\n    if (!e.detail.errMsg || e.detail.errMsg != \"getPhoneNumber:ok\") {\n      wx.showModal({\n        content: e.detail.errMsg,\n        showCancel: false\n      })\n      return;\n    }\n    this._getPhoneNumber(e)\n  },\n  async _getPhoneNumber(e) {\n    let referrer = '' // 推荐人\n    let referrer_storge = wx.getStorageSync('referrer');\n    if (referrer_storge) {\n      referrer = referrer_storge;\n    }\n    wx.showLoading({\n      title: '',\n    })\n    const code = await AUTH.wxaCode()\n    // https://www.yuque.com/apifm/nu0f75/yiglsl\n    const res = await WXAPI.loginWxaMobileV3({\n      code,\n      codeMobile: e.detail.code,\n      autoReg: true,\n      referrer\n    })\n    wx.hideLoading()\n    if (res.code != 0) {\n      // 登录错误\n      return\n    }\n    wx.setStorageSync('token', res.data.token)\n    wx.setStorageSync('uid', res.data.uid)\n    wx.setStorageSync('openid', res.data.openid)\n    wx.setStorageSync('mobile', res.data.mobile)\n    wx.reLaunch({\n      url: '/pages/index/index',\n    })\n  },\n})"
  },
  {
    "path": "pages/login/index.json",
    "content": "{\n  \"usingComponents\": {},\n  \"navigationBarTitleText\": \"账户登录\"\n}"
  },
  {
    "path": "pages/login/index.wxml",
    "content": "<view class=\"box\">\n  <view class=\"title\">本次操作需要先登陆</view>\n  <view class=\"btn\">\n    <van-button wx:if=\"{{ checked }}\" block round open-type=\"getPhoneNumber\" bind:getphonenumber=\"getPhoneNumber\">手机号安全登录</van-button>\n    <van-button wx:else block round bind:click=\"showModal2\">手机号安全登录</van-button>\n  </view>\n  <view class=\"btn\">\n    <van-button type=\"primary\" block round bind:click=\"loginOne\">一键登录</van-button>\n  </view>\n</view>\n<view class=\"xieyi\">\n  <van-checkbox value=\"{{ checked }}\" bind:change=\"xieyiChange\">阅读并同意</van-checkbox>\n  <text data-key=\"yhxy\" bind:tap=\"goxieyi\">《用户协议》</text>、\n  <text data-key=\"ysxy\" bind:tap=\"goxieyi\">《隐私协议》</text>\n</view>\n"
  },
  {
    "path": "pages/login/index.wxss",
    "content": "page {\n  background: rgb(236, 236, 236);\n}\n.box {\n  margin: 32rpx;\n  background: #fff;\n  border-radius: 24rpx;\n  padding-bottom: 64rpx;\n}\n.title {\n  padding: 88rpx 0 56rpx 0;\n  text-align: center;\n}\n.btn {\n  box-sizing: border-box;\n  margin: 32rpx 125rpx 0 125rpx;\n}\n.van-button--default {\n  background: #000 !important;\n  color: #fff !important;\n  padding: 16rpx !important;\n  border-radius: 64rpx;\n}\n.xieyi {\n  padding: 0 32rpx;\n  font-size: 24rpx;\n  color: #000;\n  display: flex;\n  align-items: center;\n}"
  },
  {
    "path": "pages/maidan/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nPage({\n  data: {\n    payType: 'wxpay'\n  },\n  onLoad(e) {\n    this.payBillDiscounts()\n    // 读取系统参数\n    this.readConfigVal()\n    getApp().configLoadOK = () => {\n      this.readConfigVal()\n    }\n  },\n  onShow () {\n    AUTH.checkHasLogined().then(isLogined => {\n      if (!isLogined) {\n        AUTH.login(this)\n      } else {\n        this.userAmount()\n      }\n    })    \n  },\n  readConfigVal() {\n    this.setData({\n      balance_pay_pwd: wx.getStorageSync('balance_pay_pwd'),\n      needBindMobile: wx.getStorageSync('needBindMobile'),\n    })\n  },\n  async payBillDiscounts() {\n    const res = await WXAPI.payBillDiscounts()\n    if (res.code === 0) {\n      this.setData({\n        rechargeSendRules: res.data\n      })\n    }\n  },\n  async userAmount() {\n    const res = await WXAPI.userAmount(wx.getStorageSync('token'))\n    if (res.code === 0) {\n      this.setData({\n        balance: res.data.balance\n      })\n    }\n  },\n  async bindSave() {\n    const amount = this.data.amount;\n    if (!amount) {\n      wx.showToast({\n        title: '请填写正确的消费金额',\n        icon: 'none'\n      })\n      return\n    }\n    if (this.data.payType == 'balance') {\n      if (this.data.balance_pay_pwd == '1' && !this.data.pwd) {\n        wx.showToast({\n          title: '请输入交易密码',\n          icon: 'none'\n        })\n        return\n      }\n    }\n    // 判断是否需要绑定手机号码\n    // https://www.yuque.com/apifm/nu0f75/zgf8pu\n    if (this.data.needBindMobile == 1) {\n      const resUserDetail = await WXAPI.userDetail(wx.getStorageSync('token'))\n      if (resUserDetail.code == 0 && !resUserDetail.data.base.mobile) {\n        this.setData({\n          bindMobileShow: true\n        })\n        return\n      }\n    }\n    const res = await WXAPI.payBillV2({\n      token: wx.getStorageSync('token'),\n      money: amount,\n      calculate: true\n    })\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    const amountReal = res.data.realMoney\n    const _msg = `您本次消费${amount}，优惠后只需支付${amountReal}`\n    \n    wx.showModal({\n      title: '请确认消费金额',\n      content: _msg,\n      confirmText: \"确认支付\",\n      cancelText: \"取消支付\",\n      success: res => {\n        if (res.confirm) {\n          this.goPay(amount, amountReal)\n        }\n      }\n    });\n  },\n  async goPay(amount, wxpayAmount){\n    if (this.data.payType == 'balance') {\n      const res = await WXAPI.payBillV2({\n        token: wx.getStorageSync('token'),\n        money: amount,\n        pwd: this.data.pwd\n      })\n      if (res.code != 0) {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n        return\n      }\n      wx.showModal({\n        title: '成功',\n        content: '买单成功，欢迎下次光临！',\n        showCancel: false\n      })\n    } else {\n      this.setData({\n        money: wxpayAmount,\n        paymentShow: true,\n        nextAction: {\n          type: 4,\n          uid: wx.getStorageSync('uid'),\n          money: amount\n        }\n      })\n    }\n  },\n  payTypeChange(event) {\n    this.setData({\n      payType: event.detail,\n    });\n  },\n  payTypeClick(event) {\n    const { name } = event.currentTarget.dataset;\n    this.setData({\n      payType: name,\n    });\n  },\n  bindMobileOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      bindMobileShow: false\n    })\n  },\n  bindMobileCancel() {\n    this.setData({\n      bindMobileShow: false\n    })\n  },\n  paymentOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      paymentShow: false\n    })\n    wx.redirectTo({\n      url: '/pages/asset/index',\n    })\n  },\n  paymentCancel() {\n    this.setData({\n      paymentShow: false\n    })\n  },\n})"
  },
  {
    "path": "pages/maidan/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"优惠买单\"\n}"
  },
  {
    "path": "pages/maidan/index.wxml",
    "content": "<van-cell-group title=\"消费金额\">\n  <van-field\n    type=\"digit\"\n    model:value=\"{{ amount }}\"\n    placeholder=\"询问服务员本次消费金额\"\n    clearable\n  />\n</van-cell-group>\n<van-cell-group wx:if=\"{{ balance_pay_pwd == '1' && payType =='balance' }}\" title=\"交易密码\">\n  <van-field\n    password\n    model:value=\"{{ pwd }}\"\n    placeholder=\"请输入交易密码\"\n    clearable\n  />\n</van-cell-group>\n<van-cell-group wx:if='{{rechargeSendRules}}' title=\"优惠规则\">\n  <van-cell wx:for='{{rechargeSendRules}}' wx:key=\"index\" title=\"减 {{item.discounts}} 元\" value=\"消费满 {{item.consume}} 元\" />\n</van-cell-group>\n<van-radio-group value=\"{{ payType }}\" bind:change=\"payTypeChange\">\n  <van-cell-group title=\"付款方式\">\n    <van-cell title=\"余额支付\" label=\"{{ balance }}\" clickable data-name=\"balance\" bind:click=\"payTypeClick\">\n      <van-radio slot=\"right-icon\" name=\"balance\" />\n    </van-cell>\n    <van-cell title=\"在线支付\" clickable data-name=\"wxpay\" bind:click=\"payTypeClick\">\n      <van-radio slot=\"right-icon\" name=\"wxpay\" />\n    </van-cell>\n  </van-cell-group>\n</van-radio-group>\n<view class=\"block-btn btn\">\n  <van-button type=\"primary\" block bind:click=\"bindSave\">确认支付</van-button>\n</view>\n\n\n<bind-mobile\n  title=\"绑定手机号码\"\n  alarmText=\"为保障您的资金安全，请先绑定手机号码\"\n  show=\"{{ bindMobileShow }}\"\n  bind:cancel=\"bindMobileCancel\"\n  bind:ok=\"bindMobileOk\"\n/>\n\n<payment\n  money=\"{{ money }}\"\n  remark=\"优惠买单 ：{{ money }}\"\n  nextAction=\"{{ nextAction }}\"\n  show=\"{{ paymentShow }}\"\n  bind:cancel=\"paymentCancel\"\n  bind:ok=\"paymentOk\"\n/>"
  },
  {
    "path": "pages/maidan/index.wxss",
    "content": "/* 京东风格 - 页面整体样式 */\npage {\n  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);\n  min-height: 100vh;\n  padding: 32rpx 0 40rpx 0;\n  box-sizing: border-box;\n  width: 100%;\n  overflow-x: hidden;\n}\n/* 输入框容器美化 */\n.van-cell-group {\n  margin: 24rpx !important;\n  border-radius: 20rpx !important;\n  overflow: hidden !important;\n}\n\n/* 标题美化 */\n.van-cell-group__title {\n  padding: 32rpx 32rpx 24rpx 32rpx !important;\n  font-size: 32rpx !important;\n  font-weight: 600 !important;\n  color: #333 !important;\n  position: relative;\n}\n\n.van-cell-group__title::before {\n  content: '';\n  position: absolute;\n  left: 16rpx;\n  top: 50%;\n  transform: translateY(-50%);\n  width: 6rpx;\n  height: 32rpx;\n  background: linear-gradient(180deg, #E1251B 0%, #FF6B6B 100%);\n  border-radius: 3rpx;\n}\n\n/* 让输入框标题和内容分成两行显示 */\n.van-field .van-cell {\n  flex-direction: column !important;\n  align-items: flex-start !important;\n  padding: 0 !important;\n}\n\n.van-field .van-cell__title {\n  width: 100% !important;\n  margin-bottom: 20rpx !important;\n  font-size: 28rpx !important;\n  color: #666 !important;\n  font-weight: 400 !important;\n}\n\n.van-field .van-cell__value {\n  width: 100% !important;\n}\n\n/* 输入框单元格美化 */\n.van-cell {\n  padding: 28rpx 32rpx !important;\n  font-size: 28rpx !important;\n  transition: all 0.3s ease;\n  box-sizing: border-box !important;\n  width: 100% !important;\n}\n\n.van-cell::after {\n  border-bottom: 1rpx solid #f5f5f5 !important;\n}\n\n.van-cell:last-child::after {\n  border-bottom: none !important;\n}\n\n/* 输入框标签 */\n.van-cell__title {\n  font-size: 30rpx !important;\n  color: #333 !important;\n  font-weight: 500 !important;\n}\n\n/* 输入框内容 */\n.van-field__control {\n  font-size: 40rpx !important;\n  color: #E1251B !important;\n  font-weight: 600 !important;\n  width: 100% !important;\n}\n\n.van-field__control::-webkit-input-placeholder {\n  color: #bbb !important;\n  font-weight: 400 !important;\n  font-size: 28rpx !important;\n}\n\n/* 金额输入特殊样式 - 取消右对齐，因为改成两行了 */\n.van-field__control[type=\"digit\"] {\n  text-align: left !important;\n}\n\n/* 余额显示美化 */\n.van-cell__label {\n  color: #E1251B !important;\n  font-size: 26rpx !important;\n  margin-top: 8rpx !important;\n  font-weight: 500 !important;\n}\n\n/* 单选框美化 */\n.van-radio__icon--checked {\n  background-color: #E1251B !important;\n  border-color: #E1251B !important;\n}\n\n.van-radio__icon {\n  border: 2rpx solid #ddd !important;\n  width: 40rpx !important;\n  height: 40rpx !important;\n}\n\n/* 支付方式容器 */\n.van-radio-group {\n  width: 100%;\n  box-sizing: border-box;\n}\n\n/* 支付方式标题样式 */\n.van-radio-group .van-cell-group__title {\n  background: linear-gradient(135deg, #fff 0%, #fafafa 100%);\n}\n\n/* 确认支付按钮容器 */\n.btn {\n  margin: 24rpx 24rpx 0 24rpx;\n  padding: 0;\n  box-sizing: border-box;\n}\n\n/* 支付按钮美化 - 京东红色主题 */\n.van-button--primary {\n  background: linear-gradient(135deg, #E1251B 0%, #FF4655 100%) !important;\n  border: none !important;\n  border-radius: 50rpx !important;\n  height: 96rpx !important;\n  font-size: 36rpx !important;\n  font-weight: 600 !important;\n  box-shadow: 0 8rpx 24rpx rgba(225, 37, 27, 0.35) !important;\n  transition: all 0.3s ease !important;\n  letter-spacing: 4rpx !important;\n  position: relative;\n  overflow: hidden;\n}\n\n/* 按钮按下效果 */\n.van-button--primary:active {\n  transform: translateY(4rpx);\n  box-shadow: 0 4rpx 16rpx rgba(225, 37, 27, 0.25) !important;\n}\n\n/* 按钮光泽效果 */\n.van-button--primary::before {\n  content: '';\n  position: absolute;\n  top: -50%;\n  left: -50%;\n  width: 200%;\n  height: 200%;\n  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.15), transparent);\n  transform: rotate(45deg);\n  animation: buttonShine 3s infinite;\n}\n\n@keyframes buttonShine {\n  0% {\n    transform: translateX(-100%) translateY(-100%) rotate(45deg);\n  }\n  50%, 100% {\n    transform: translateX(100%) translateY(100%) rotate(45deg);\n  }\n}\n\n/* 输入框聚焦效果 */\n.van-field__control:focus {\n  background-color: #fffbfb !important;\n}\n\n/* 清除按钮美化 */\n.van-field__clear {\n  color: #E1251B !important;\n}\n\n/* 付款方式选项卡片效果 */\n.van-radio-group .van-cell {\n  position: relative;\n  transition: all 0.3s ease;\n}\n\n.van-radio-group .van-cell:active {\n  background-color: #fff5f5 !important;\n}\n\n/* 已选中的支付方式高亮 */\n.van-cell--clickable:active {\n  background-color: #fffbfb !important;\n}\n\n/* 分隔线美化 */\n.van-hairline--top-bottom::after {\n  border-color: #f0f0f0 !important;\n}\n\n\n/* 图标增强 */\n.van-icon {\n  transition: all 0.3s ease;\n}\n\n/* 空状态美化 */\n.van-empty {\n  padding: 80rpx 0;\n}"
  },
  {
    "path": "pages/my/feedback.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst dayjs = require(\"dayjs\")\n\nPage({\n  data: {\n    autosize: {\n      minHeight: 100\n    },\n    day: dayjs().format('YYYY-MM-DD')\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function(options) {\n    \n  },\n  onShow: function() {\n    this.checkTodayComments()\n  },\n  async checkTodayComments() {\n    // 判断一天只能留言5次\n    const res = await WXAPI.jsonList({\n      token: wx.getStorageSync('token'),\n      type: 'feedback_times_' + this.data.day\n    })\n    if (res.code === 0) {\n      this.setData({\n        feedbackTimes: res.data[0]\n      })\n    }\n  },\n  async bindSave() {\n    const comment_subscribe_ids = wx.getStorageSync('comment_subscribe_ids')\n    if (comment_subscribe_ids) {\n      wx.requestSubscribeMessage({\n        tmplIds: comment_subscribe_ids.split(','),\n        success(res) {\n          console.log(res)\n        },\n        fail(err) {\n          console.error(err)\n        },\n        complete: (res) => {\n          this._bindSave()\n        },\n      })\n    } else {\n      this._bindSave()\n    }\n  },\n  async _bindSave() {    \n    if (!this.data.name) {\n      wx.showToast({\n        title: '请填写您的姓名',\n        icon: 'none',\n      })\n      return\n    }\n    if (!this.data.content) {\n      wx.showToast({\n        title: '请填写反馈信息',\n        icon: 'none',\n      })\n      return\n    }\n    const extJsonStr = {}\n    extJsonStr['姓名'] = this.data.name\n    extJsonStr['联系电话'] = this.data.mobile\n    extJsonStr['微信'] = this.data.wx\n\n    // 批量上传附件\n    if (this.data.picsList) {\n      for (let index = 0; index < this.data.picsList.length; index++) {\n        const pic = this.data.picsList[index];\n        const res = await WXAPI.uploadFileV2(wx.getStorageSync('token'), pic.url)\n        if (res.code == 0) {\n          extJsonStr['file' + index] = res.data.url\n        }\n      }\n    }\n\n    const res = await WXAPI.addComment({\n      token: wx.getStorageSync('token'),\n      type: 1,\n      extJsonStr: JSON.stringify(extJsonStr),\n      content: this.data.content\n    })\n    if (res.code == 0) {\n      // 提交次数 + 1 \n      let feedbackTimes = this.data.feedbackTimes\n      if (!feedbackTimes) {\n        feedbackTimes = {\n          id: '',\n          refId: 0,\n          content: '{}'\n        }\n      }\n      await WXAPI.jsonSet({\n        token: wx.getStorageSync('token'),\n        id: feedbackTimes.id,\n        type: 'feedback_times_' + this.data.day,\n        refId: feedbackTimes.refId + 1,\n        content: feedbackTimes.content\n      })\n      await this.checkTodayComments()\n      wx.showToast({\n        title: '提交成功',\n      })\n      setTimeout(() => {\n        wx.navigateBack({\n          delta: 0,\n        })\n      }, 1000);\n    } else {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    }\n  },\n  afterPicRead(e) {\n    let picsList = this.data.picsList\n    if (!picsList) {\n      picsList = []\n    }\n    picsList = picsList.concat(e.detail.file)\n    this.setData({\n      picsList\n    })\n  },\n  afterPicDel(e) {\n    let picsList = this.data.picsList\n    picsList.splice(e.detail.index, 1)\n    this.setData({\n      picsList\n    })\n  }\n})"
  },
  {
    "path": "pages/my/feedback.json",
    "content": "{\n  \"navigationBarTitleText\": \"意见反馈\"\n}"
  },
  {
    "path": "pages/my/feedback.wxml",
    "content": "<view class=\"feedback-container\">\n  <!-- 页面头部 -->\n  <view class=\"feedback-header\">\n    <view class=\"header-title\">意见反馈</view>\n    <view class=\"header-subtitle\">您的建议是我们前进的动力</view>\n  </view>\n\n  <block wx:if=\"{{feedbackTimes && feedbackTimes.refId > 5}}\">\n    <view class=\"limit-tips\">\n      <van-empty image=\"error\" description=\"今天你已经提交{{ feedbackTimes.refId }}次，明天再来吧\" />\n    </view>\n  </block>\n  \n  <block wx:else>\n    <!-- 联系信息卡片 -->\n    <view class=\"feedback-card\">\n      <view class=\"card-title\">\n        <view class=\"title-icon\">📞</view>\n        <view class=\"title-text\">联系方式</view>\n      </view>\n      <view class=\"card-content\">\n        <van-field\n          label=\"姓名\"\n          model:value=\"{{ name }}\"\n          placeholder=\"如何称呼您\"\n          clearable\n          input-align=\"right\"\n          custom-style=\"background: transparent;\"\n        />\n        <van-field\n          label=\"联系电话\"\n          type=\"number\"\n          model:value=\"{{ mobile }}\"\n          placeholder=\"方便我们与您联系\"\n          clearable\n          input-align=\"right\"\n          custom-style=\"background: transparent;\"\n        />\n        <van-field\n          label=\"微信号\"\n          model:value=\"{{ wx }}\"\n          placeholder=\"填写您的微信号\"\n          clearable\n          input-align=\"right\"\n          custom-style=\"background: transparent;\"\n        />\n      </view>\n    </view>\n\n    <!-- 反馈内容卡片 -->\n    <view class=\"feedback-card\">\n      <view class=\"card-title\">\n        <view class=\"title-icon\">✍️</view>\n        <view class=\"title-text\">反馈内容</view>\n      </view>\n      <view class=\"card-content\">\n        <van-field\n          model:value=\"{{ content }}\"\n          placeholder=\"请详细描述您的问题或建议，我们会认真对待每一条反馈...\"\n          type=\"textarea\"\n          autosize=\"{{ autosize }}\"\n          border=\"{{false}}\"\n        />\n      </view>\n    </view>\n\n    <!-- 上传图片卡片 -->\n    <view class=\"feedback-card\">\n      <view class=\"card-title\">\n        <view class=\"title-icon\">📷</view>\n        <view class=\"title-text\">添加图片或视频</view>\n        <view class=\"title-tip\">（选填）</view>\n      </view>\n      <view class=\"card-content upload-content\">\n        <van-uploader\n          accept=\"media\"\n          multiple\n          upload-text=\"上传\"\n          image-fit=\"aspectFill\"\n          file-list=\"{{ picsList }}\"\n          bind:after-read=\"afterPicRead\"\n          bind:delete=\"afterPicDel\"\n        />\n      </view>\n    </view>\n\n    <!-- 提交按钮 -->\n    <view class=\"submit-wrapper\">\n      <view class=\"submit-btn\" bind:tap=\"bindSave\">\n        <text class=\"submit-text\">提交反馈</text>\n      </view>\n    </view>\n\n    <!-- 温馨提示 -->\n    <view class=\"tips-box\">\n      <view class=\"tips-title\">温馨提示：</view>\n      <view class=\"tips-item\">• 我们将在1-3个工作日内处理您的反馈</view>\n      <view class=\"tips-item\">• 如需快速联系，请留下您的手机号</view>\n      <view class=\"tips-item\">• 每天最多可提交5次反馈</view>\n    </view>\n  </block>\n</view>"
  },
  {
    "path": "pages/my/feedback.wxss",
    "content": "/* 京东风格 - 意见反馈页面 */\npage {\n  background: #f4f4f4;\n}\n\n.feedback-container {\n  min-height: 100vh;\n  padding-bottom: 40rpx;\n}\n\n/* 页面头部 */\n.feedback-header {\n  background: linear-gradient(135deg, #E93323 0%, #E4393C 100%);\n  padding: 60rpx 40rpx 50rpx;\n  color: #fff;\n  position: relative;\n  overflow: hidden;\n}\n\n.feedback-header::before {\n  content: '';\n  position: absolute;\n  top: -50%;\n  right: -20%;\n  width: 400rpx;\n  height: 400rpx;\n  background: rgba(255, 255, 255, 0.1);\n  border-radius: 50%;\n}\n\n.header-title {\n  font-size: 48rpx;\n  font-weight: bold;\n  margin-bottom: 16rpx;\n  position: relative;\n  z-index: 1;\n}\n\n.header-subtitle {\n  font-size: 26rpx;\n  opacity: 0.9;\n  position: relative;\n  z-index: 1;\n}\n\n/* 限制提示 */\n.limit-tips {\n  margin-top: 40rpx;\n  padding: 0 40rpx;\n}\n\n/* 反馈卡片 */\n.feedback-card {\n  background: #fff;\n  margin: 24rpx 30rpx;\n  border-radius: 16rpx;\n  overflow: hidden;\n  box-shadow: 0 4rpx 20rpx rgba(233, 51, 35, 0.08);\n}\n\n.card-title {\n  display: flex;\n  align-items: center;\n  padding: 32rpx 30rpx 24rpx;\n  border-bottom: 1rpx solid #f5f5f5;\n}\n\n.title-icon {\n  font-size: 36rpx;\n  margin-right: 16rpx;\n}\n\n.title-text {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333;\n  flex: 1;\n}\n\n.title-tip {\n  font-size: 24rpx;\n  color: #999;\n  margin-left: 8rpx;\n}\n\n.card-content {\n  padding: 8rpx 0 16rpx;\n}\n\n.upload-content {\n  padding: 16rpx 30rpx 24rpx;\n}\n\n/* 提交按钮 */\n.submit-wrapper {\n  padding: 40rpx 30rpx 20rpx;\n}\n\n.submit-btn {\n  background: linear-gradient(90deg, #E93323 0%, #E4393C 100%);\n  height: 96rpx;\n  border-radius: 48rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 8rpx 24rpx rgba(233, 51, 35, 0.3);\n  transition: all 0.3s;\n}\n\n.submit-btn:active {\n  transform: scale(0.98);\n  box-shadow: 0 4rpx 16rpx rgba(233, 51, 35, 0.2);\n}\n\n.submit-text {\n  font-size: 34rpx;\n  font-weight: 600;\n  color: #fff;\n  letter-spacing: 2rpx;\n}\n\n/* 温馨提示 */\n.tips-box {\n  background: #fff;\n  margin: 24rpx 30rpx;\n  padding: 32rpx;\n  border-radius: 16rpx;\n  border-left: 6rpx solid #E93323;\n}\n\n.tips-title {\n  font-size: 28rpx;\n  font-weight: 600;\n  color: #333;\n  margin-bottom: 20rpx;\n}\n\n.tips-item {\n  font-size: 26rpx;\n  color: #666;\n  line-height: 44rpx;\n  padding-left: 8rpx;\n}\n\n/* 优化 van-field 样式 */\n.feedback-card /deep/ .van-cell {\n  padding: 20rpx 30rpx;\n  font-size: 28rpx;\n}\n\n.feedback-card /deep/ .van-field__label {\n  color: #333;\n  font-weight: 500;\n  width: 140rpx;\n}\n\n.feedback-card /deep/ .van-field__control {\n  color: #333;\n}\n\n.feedback-card /deep/ .van-field__placeholder {\n  color: #c8c9cc;\n}\n\n/* 文本域特殊样式 */\n.feedback-card /deep/ .van-field__control--textarea {\n  min-height: 200rpx;\n  padding: 24rpx 30rpx;\n  font-size: 28rpx;\n  line-height: 44rpx;\n}\n\n/* 上传组件优化 */\n.upload-content /deep/ .van-uploader__wrapper {\n  margin: -8rpx;\n}\n\n.upload-content /deep/ .van-uploader__preview,\n.upload-content /deep/ .van-uploader__upload {\n  margin: 8rpx;\n  width: 160rpx;\n  height: 160rpx;\n  border-radius: 12rpx;\n}\n\n.upload-content /deep/ .van-uploader__upload {\n  border: 2rpx dashed #E4393C;\n  background: #fff5f5;\n}\n\n.upload-content /deep/ .van-uploader__upload-icon {\n  color: #E4393C;\n  font-size: 48rpx;\n}\n\n.upload-content /deep/ .van-uploader__upload-text {\n  color: #E4393C;\n  font-size: 24rpx;\n  margin-top: 8rpx;\n}\n\n/* 响应式优化 */\n@media (max-width: 375px) {\n  .header-title {\n    font-size: 44rpx;\n  }\n  \n  .feedback-card {\n    margin: 20rpx 24rpx;\n  }\n}"
  },
  {
    "path": "pages/my/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nconst TOOLS = require('../../utils/tools.js')\nconst CONFIG = require('../../config.js')\nPage({\n\tdata: {\n    balance:0.00,\n    freeze:0,\n    score:0,\n    growth:0,\n    score_sign_continuous:0,\n    rechargeOpen: false, // 是否开启充值[预存]功能\n\n    // 用户订单统计数据\n    count_id_no_confirm: 0,\n    count_id_no_pay: 0,\n    count_id_no_reputation: 0,\n    count_id_no_transfer: 0,\n    nick: undefined,\n    cardsExpanded: false, // 会员卡展开状态\n    \n    // 会员等级配置（根据不同等级显示不同图标和样式）\n    vipLevelConfig: {\n      1: { icon: '🥇', name: '黄金会员' },\n      2: { icon: '💎', name: '白金会员' },\n      3: { icon: '💠', name: '钻石会员' },\n      4: { icon: '👑', name: '至尊会员' },\n      5: { icon: '🔱', name: '皇冠会员' }\n    }\n  },\n\tonLoad() {\n    this.readConfigVal()\n    // 补偿写法\n    getApp().configLoadOK = () => {\n      this.readConfigVal()\n    }\n\t},\n  onShow() {\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.getUserApiInfo();\n        this.getUserAmount();\n        this.orderStatistics();\n        this.cardMyList();\n        TOOLS.showTabBarBadge();\n      } else {\n        getApp().loginOK = () => {\n          this.getUserApiInfo();\n          this.getUserAmount();\n          this.orderStatistics();\n          this.cardMyList();\n          TOOLS.showTabBarBadge();\n        }\n      }\n    })\n  },\n  readConfigVal() {\n    this.setData({\n      order_hx_uids: wx.getStorageSync('order_hx_uids'),\n      cps_open: wx.getStorageSync('cps_open'),\n      recycle_open: wx.getStorageSync('recycle_open'),\n      show_3_seller: wx.getStorageSync('show_3_seller'),\n      show_quan_exchange_score: wx.getStorageSync('show_quan_exchange_score'),\n      show_score_exchange_growth: wx.getStorageSync('show_score_exchange_growth'),\n      show_score_sign: wx.getStorageSync('show_score_sign'),\n      fx_type: wx.getStorageSync('fx_type'),\n      invoice_open: wx.getStorageSync('invoice_open'),\n      customerServiceType: CONFIG.customerServiceType\n    })\n  },\n  async getUserApiInfo() {\n    const res = await WXAPI.userDetail(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      let _data = {}\n      _data.apiUserInfoMap = res.data\n      if (res.data.base.mobile) {\n        _data.userMobile = res.data.base.mobile\n      }\n      _data.nick = res.data.base.nick\n      if (this.data.order_hx_uids && this.data.order_hx_uids.indexOf(res.data.base.id) != -1) {\n        _data.canHX = true // 具有扫码核销的权限\n      }\n      if (res.data.peisongMember && res.data.peisongMember.status == 1) {\n        _data.memberChecked = false\n      } else {\n        _data.memberChecked = true\n      }\n      this.setData(_data);\n    }\n  },\n  async memberCheckedChange() {\n    const res = await WXAPI.peisongMemberChangeWorkStatus(wx.getStorageSync('token'))\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    } else {\n      this.getUserApiInfo()\n    }\n  },\n  getUserAmount: function () {\n    var that = this;\n    WXAPI.userAmount(wx.getStorageSync('token')).then(function (res) {\n      if (res.code == 0) {\n        that.setData({\n          balance: res.data.balance.toFixed(2),\n          freeze: res.data.freeze.toFixed(2),\n          score: res.data.score,\n          growth: res.data.growth\n        });\n      }\n    })\n  },\n  handleOrderCount: function (count) {\n    return count > 99 ? '99+' : count;\n  },\n  orderStatistics: function () {\n    WXAPI.orderStatistics(wx.getStorageSync('token')).then((res) => {\n      if (res.code == 0) {\n        const {\n          count_id_no_confirm,\n          count_id_no_pay,\n          count_id_no_reputation,\n          count_id_no_transfer,\n        } = res.data || {}\n        this.setData({\n          count_id_no_confirm: this.handleOrderCount(count_id_no_confirm),\n          count_id_no_pay: this.handleOrderCount(count_id_no_pay),\n          count_id_no_reputation: this.handleOrderCount(count_id_no_reputation),\n          count_id_no_transfer: this.handleOrderCount(count_id_no_transfer),\n        })\n      }\n    })\n  },\n  goAsset: function () {\n    wx.navigateTo({\n      url: \"/pages/asset/index\"\n    })\n  },\n  goScore: function () {\n    wx.navigateTo({\n      url: \"/pages/score/index\"\n    })\n  },\n  goOrder: function (e) {\n    wx.navigateTo({\n      url: \"/pages/order-list/index?type=\" + e.currentTarget.dataset.type\n    })\n  },\n  scanOrderCode(){\n    wx.scanCode({\n      success(res) {\n        console.log('res', res);\n        if (res.scanType == 'WX_CODE' && res.path) {\n          wx.navigateTo({\n            url: '/' + res.path,\n          })\n        } else {\n          wx.navigateTo({\n            url: '/pages/order-details/scan-result?hxNumber=' + res.result,\n          })\n        }\n      },\n      fail(err) {\n        console.error(err)\n        wx.showToast({\n          title: err.errMsg,\n          icon: 'none'\n        })\n      }\n    })\n  },\n  gogrowth() {\n    wx.navigateTo({\n      url: '/pages/score/growth',\n    })\n  },\n  async cardMyList() {\n    const res = await WXAPI.cardMyList(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      const myCards = res.data.filter(ele => { return ele.status == 0 })\n      if (myCards.length > 0) {\n        this.setData({\n          myCards: res.data\n        })\n      }\n    }\n  },\n  editNick() {\n    this.setData({\n      nickShow: true\n    })\n  },\n  async _editNick() {\n    if (!this.data.nick) {\n      wx.showToast({\n        title: '请填写昵称',\n        icon: 'none'\n      })\n      return\n    }\n    const postData = {\n      token: wx.getStorageSync('token'),\n      nick: this.data.nick,\n    }\n    // https://www.yuque.com/apifm/nu0f75/ykr2zr\n    const res = await WXAPI.modifyUserInfoV2(postData)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.showToast({\n      title: '设置成功',\n    })\n    this.hideNickModal()\n    this.getUserApiInfo()\n  },\n  async onChooseAvatar(e) {\n    console.log(e);\n    const avatarUrl = e.detail.avatarUrl\n    let res = await WXAPI.uploadFileV2(wx.getStorageSync('token'), avatarUrl)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    // https://www.yuque.com/apifm/nu0f75/ykr2zr\n    res = await WXAPI.modifyUserInfoV2({\n      token: wx.getStorageSync('token'),\n      avatarUrl: res.data.url,\n    })\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.showToast({\n      title: '设置成功',\n    })\n    this.getUserApiInfo()\n  },\n  goUserCode() {\n    wx.navigateTo({\n      url: '/pages/my/user-code',\n    })\n  },\n  customerService() {\n    wx.openCustomerServiceChat({\n      extInfo: {url: wx.getStorageSync('customerServiceChatUrl')},\n      corpId: wx.getStorageSync('customerServiceChatCorpId'),\n      success: res => {},\n      fail: err => {\n        console.error(err)\n      }\n    })\n  },\n  copyUid() {\n    wx.setClipboardData({\n      data: this.data.apiUserInfoMap.base.id + '',\n    })\n  },\n  login() {\n    wx.navigateTo({\n      url: '/pages/login/index',\n    })\n  },\n  hideNickModal() {\n    this.setData({\n      nickShow: false\n    })\n  },\n  toggleCards() {\n    this.setData({\n      cardsExpanded: !this.data.cardsExpanded\n    })\n  },\n})"
  },
  {
    "path": "pages/my/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"会员中心\"\n}"
  },
  {
    "path": "pages/my/index.wxml",
    "content": "<view class=\"page-container\">\n  <!-- 头部用户信息区域 -->\n  <view class=\"header-section\">\n    <view wx:if=\"{{ !apiUserInfoMap }}\" class=\"login-container\">\n      <view class=\"login-tips\">欢迎来到商城</view>\n      <view class=\"login-btn\" bindtap=\"login\">\n        <text>立即登录</text>\n      </view>\n    </view>\n    \n    <view wx:else class=\"user-info-container\">\n      <view class=\"user-main\">\n        <button class=\"avatar-btn\" open-type=\"chooseAvatar\" bind:chooseavatar=\"onChooseAvatar\">\n          <image class=\"avatar\" src=\"{{ apiUserInfoMap.base.avatarUrl ? apiUserInfoMap.base.avatarUrl : '/images/default.png' }}\" mode=\"aspectFill\"></image>\n          <view class=\"avatar-border\"></view>\n        </button>\n        <view class=\"user-detail\">\n          <view class=\"nickname-row\">\n            <text class=\"nickname\" bindtap=\"editNick\">{{ apiUserInfoMap.base.nick ? apiUserInfoMap.base.nick : '点击设置昵称' }}</text>\n          </view>\n          <view class=\"user-id\" bind:tap=\"copyUid\">ID: {{ apiUserInfoMap.base.id }}</view>\n        </view>\n      </view>\n      <view class=\"qr-code-btn\" bindtap=\"goUserCode\">\n        <view class=\"qr-icon-box\">\n          <van-icon name=\"qr\" size=\"52rpx\" color=\"#E4393C\" />\n        </view>\n        <view class=\"qr-text\">会员码</view>\n      </view>\n    </view>\n    \n    <!-- 会员等级卡片 -->\n    <navigator url=\"/pages/vip/index\" class=\"vip-card-wrapper\">\n      <!-- 已开通会员 -->\n      <view wx:if=\"{{ apiUserInfoMap.userLevel }}\" class=\"vip-card vip-card-active vip-level-{{ apiUserInfoMap.userLevel.level || 1 }}\">\n        <view class=\"vip-card-bg\">\n          <view class=\"vip-shine\"></view>\n          <view class=\"vip-shine vip-shine-2\"></view>\n          <view class=\"vip-decoration vip-decoration-1\"></view>\n          <view class=\"vip-decoration vip-decoration-2\"></view>\n        </view>\n        <view class=\"vip-card-content\">\n          <view class=\"vip-main-info\">\n            <view class=\"vip-badge-wrapper\">\n              <view class=\"vip-badge\">\n                <text class=\"vip-badge-icon\">{{ vipLevelConfig[apiUserInfoMap.userLevel.level] ? vipLevelConfig[apiUserInfoMap.userLevel.level].icon : '👑' }}</text>\n              </view>\n              <view class=\"vip-badge-glow\"></view>\n            </view>\n            <view class=\"vip-text-info\">\n              <view class=\"vip-name-row\">\n                <text class=\"vip-level-name\">{{ apiUserInfoMap.userLevel.name }}</text>\n                <text class=\"vip-level-tag\">VIP{{ apiUserInfoMap.userLevel.level || '' }}</text>\n              </view>\n              <view class=\"vip-desc\">专属特权 · 尊享服务</view>\n            </view>\n          </view>\n          <view class=\"vip-action-btn\">\n            <text class=\"vip-action-text\">会员中心</text>\n            <text class=\"vip-action-arrow\">›</text>\n          </view>\n        </view>\n        <view class=\"vip-card-footer\">\n          <view class=\"vip-expire-info\">\n            <text class=\"vip-expire-icon\">⏰</text>\n            <text class=\"vip-expire-text\">有效期至 {{ apiUserInfoMap.base.levelExpire || '长期有效' }}</text>\n          </view>\n          <!-- <view class=\"vip-upgrade-hint\" wx:if=\"{{ apiUserInfoMap.userLevel.canUpgrade }}\">\n            <text class=\"upgrade-hint-text\">升级更高等级 ›</text>\n          </view> -->\n        </view>\n      </view>\n      \n      <!-- 未开通会员 -->\n      <view wx:else class=\"vip-card vip-card-inactive\">\n        <view class=\"vip-card-bg\">\n          <view class=\"vip-pattern\"></view>\n        </view>\n        <view class=\"vip-card-content\">\n          <view class=\"vip-main-info\">\n            <view class=\"vip-badge-wrapper vip-badge-inactive\">\n              <van-icon name=\"vip-card-o\" size=\"64rpx\" color=\"#666\" />\n            </view>\n            <view class=\"vip-text-info\">\n              <view class=\"vip-name-row\">\n                <text class=\"vip-level-name vip-inactive-name\">普通用户</text>\n              </view>\n              <view class=\"vip-desc vip-inactive-desc\">开通会员，尊享多重特权</view>\n            </view>\n          </view>\n          <view class=\"vip-open-btn\">\n            <text class=\"vip-open-text\">立即开通</text>\n          </view>\n        </view>\n        <view class=\"vip-card-footer vip-benefits-preview\">\n          <view class=\"benefit-item\">\n            <text class=\"benefit-icon\">🎁</text>\n            <text class=\"benefit-text\">专属折扣</text>\n          </view>\n          <view class=\"benefit-item\">\n            <text class=\"benefit-icon\">⚡</text>\n            <text class=\"benefit-text\">赠送积分</text>\n          </view>\n          <view class=\"benefit-item\">\n            <text class=\"benefit-icon\">🚀</text>\n            <text class=\"benefit-text\">优先发货</text>\n          </view>\n          <view class=\"benefit-item\">\n            <text class=\"benefit-icon\">🎫</text>\n            <text class=\"benefit-text\">专属优惠券</text>\n          </view>\n        </view>\n      </view>\n    </navigator>\n  </view>\n\n  <!-- 资产卡片 -->\n  <view class=\"asset-card\">\n    <view class=\"asset-wrapper\">\n      <view class='asset-item asset-primary' bindtap='goAsset'>\n        <view class=\"asset-label\">余额(元)</view>\n        <view class=\"asset-amount-row\">\n          <text class=\"asset-symbol\">¥</text>\n          <text class=\"asset-amount\">{{balance}}</text>\n        </view>\n      </view>\n      <view class='asset-item asset-secondary' bindtap='goAsset'>\n        <view class=\"asset-label\">冻结(元)</view>\n        <view class=\"asset-amount-row\">\n          <text class=\"asset-symbol\">¥</text>\n          <text class=\"asset-amount\">{{freeze}}</text>\n        </view>\n      </view>\n    </view>\n    <view class=\"asset-divider\"></view>\n    <view class=\"asset-wrapper\">\n      <view class='asset-item' bindtap='goScore'>\n        <view class=\"asset-amount\">{{score}}</view>\n        <view class=\"asset-label\">积分</view>\n      </view>\n      <view class='asset-item' bindtap=\"gogrowth\">\n        <view class=\"asset-amount\">{{growth}}</view>\n        <view class=\"asset-label\">成长值</view>\n      </view>\n    </view>\n  </view>\n\n  <!-- 会员卡区域 -->\n  <view wx:if=\"{{ myCards }}\" class=\"card-section\">\n    <view class=\"section-title\">\n      <text class=\"title-text\">我的会员卡</text>\n      <text class=\"title-icon\">💳</text>\n    </view>\n    <view class=\"card-list {{ cardsExpanded ? 'expanded' : 'collapsed' }}\">\n      <navigator wx:for=\"{{ cardsExpanded ? myCards : [myCards[0]] }}\" wx:key=\"id\" url=\"/pages/card/logs?id={{ item.id }}\" class=\"card-item card-item-animate\">\n        <view class=\"card-gradient\">\n          <view class=\"card-header\">\n            <view class=\"card-name\">{{ item.cardInfo.name }}</view>\n            <view class=\"card-badge\">VIP</view>\n          </view>\n          <view class=\"card-body\">\n            <view class=\"card-amount-box\">\n              <text class=\"card-amount-label\">剩余次数</text>\n              <text class=\"card-amount-value\">{{ item.amount }}</text>\n            </view>\n          </view>\n          <view class=\"card-footer\">\n            <view class=\"card-expire\">\n              <text class=\"expire-icon\">⏰</text>\n              <text>{{ item.dateEnd }} 到期</text>\n            </view>\n            <view class=\"card-arrow\">查看详情 ›</view>\n          </view>\n        </view>\n      </navigator>\n    </view>\n    <view wx:if=\"{{ myCards.length > 1 }}\" class=\"toggle-btn\" bindtap=\"toggleCards\">\n      <text class=\"toggle-text\">{{ cardsExpanded ? '收起' : '查看更多(' + (myCards.length - 1) + ')' }}</text>\n      <text class=\"toggle-icon {{ cardsExpanded ? 'rotated' : '' }}\">›</text>\n    </view>\n  </view>\n\n  <!-- 订单区域 -->\n  <view class=\"order-section\">\n    <view class=\"section-header\">\n      <view class=\"section-title\">我的订单</view>\n      <navigator url=\"/pages/order-list/index\" class=\"more-link\">\n        <text>查看全部</text>\n        <text class=\"arrow\">›</text>\n      </navigator>\n    </view>\n    <view class=\"order-grid\">\n      <view class=\"order-item\" bindtap='goOrder' data-type=\"0\">\n        <view class=\"order-icon-wrapper\">\n          <text class=\"order-icon\">💰</text>\n          <view wx:if=\"{{count_id_no_pay}}\" class=\"order-badge\">{{count_id_no_pay}}</view>\n        </view>\n        <view class=\"order-label\">待付款</view>\n      </view>\n      <view class=\"order-item\" bindtap='goOrder' data-type=\"1\">\n        <view class=\"order-icon-wrapper\">\n          <text class=\"order-icon\">📦</text>\n          <view wx:if=\"{{count_id_no_transfer}}\" class=\"order-badge\">{{count_id_no_transfer}}</view>\n        </view>\n        <view class=\"order-label\">待发货</view>\n      </view>\n      <view class=\"order-item\" bindtap='goOrder' data-type=\"2\">\n        <view class=\"order-icon-wrapper\">\n          <text class=\"order-icon\">🚚</text>\n          <view wx:if=\"{{count_id_no_confirm}}\" class=\"order-badge\">{{count_id_no_confirm}}</view>\n        </view>\n        <view class=\"order-label\">待收货</view>\n      </view>\n      <view class=\"order-item\" bindtap='goOrder' data-type=\"3\">\n        <view class=\"order-icon-wrapper\">\n          <text class=\"order-icon\">⭐</text>\n          <view wx:if=\"{{count_id_no_reputation}}\" class=\"order-badge\">{{count_id_no_reputation}}</view>\n        </view>\n        <view class=\"order-label\">待评价</view>\n      </view>\n      <view class=\"order-item\" bindtap='goOrder' data-type=\"99\">\n        <view class=\"order-icon-wrapper\">\n          <text class=\"order-icon\">🛠</text>\n        </view>\n        <view class=\"order-label\">售后</view>\n      </view>\n    </view>\n  </view>\n\n  <!-- CPS订单 -->\n  <navigator wx:if=\"{{ cps_open == '1' }}\" url=\"/packageCps/pages/order-list/cps\" class=\"menu-card\">\n    <view class=\"menu-item\">\n      <view class=\"menu-label\">CPS订单</view>\n      <view class=\"menu-right\">\n        <text class=\"menu-value\">管理</text>\n        <text class=\"arrow\">›</text>\n      </view>\n    </view>\n  </navigator>\n\n  <!-- 回收订单 -->\n  <navigator wx:if=\"{{ recycle_open == '1' }}\" url=\"/pages/recycle/orders\" class=\"menu-card\">\n    <view class=\"menu-item\">\n      <view class=\"menu-label\">回收订单</view>\n      <view class=\"menu-right\">\n        <text class=\"menu-value\">管理</text>\n        <text class=\"arrow\">›</text>\n      </view>\n    </view>\n  </navigator>\n\n  <!-- 常用功能 -->\n  <view class=\"function-section\">\n    <view class=\"section-title\">常用功能</view>\n    <view class=\"function-grid\">\n      <navigator url=\"/pages/goods/his\" class=\"function-item\">\n        <text class=\"function-icon\">📋</text>\n        <view class=\"function-label\">历史购买</view>\n      </navigator>\n      <view wx:if=\"{{canHX}}\" class=\"function-item\" bind:tap=\"scanOrderCode\">\n        <text class=\"function-icon\">📷</text>\n        <view class=\"function-label\">扫码核销</view>\n      </view>\n      <navigator url=\"/pages/maidan/index\" class=\"function-item\">\n        <text class=\"function-icon\">💳</text>\n        <view class=\"function-label\">优惠买单</view>\n      </navigator>\n      <navigator url=\"/pages/asset/index\" class=\"function-item\">\n        <text class=\"function-icon\">📊</text>\n        <view class=\"function-label\">资金明细</view>\n      </navigator>\n      <navigator wx:if=\"{{ invoice_open == 1 }}\" url=\"/pages/invoice/apply\" class=\"function-item\">\n        <text class=\"function-icon\">🧾</text>\n        <view class=\"function-label\">申请发票</view>\n      </navigator>\n      <navigator wx:if=\"{{ invoice_open == 1 }}\" url=\"/pages/invoice/list\" class=\"function-item\">\n        <text class=\"function-icon\">📄</text>\n        <view class=\"function-label\">开票记录</view>\n      </navigator>\n      <navigator url=\"/pages/coupons/index\" open-type=\"switchTab\" class=\"function-item\">\n        <text class=\"function-icon\">🎫</text>\n        <view class=\"function-label\">优惠券</view>\n      </navigator>\n      <navigator wx:if=\"{{ show_score_sign == 1 }}\" url=\"/pages/sign/index\" class=\"function-item\">\n        <text class=\"function-icon\">📅</text>\n        <view class=\"function-label\">签到赚积分</view>\n      </navigator>\n    </view>\n  </view>\n\n  <!-- 配送员工作台 -->\n  <view wx:if=\"{{apiUserInfoMap.peisongMember && apiUserInfoMap.peisongMember.type != 0}}\" class=\"work-section\">\n    <view class=\"section-title\">配送员工作台</view>\n    <view class=\"menu-item\">\n      <view class=\"menu-label\">工作状态 ({{apiUserInfoMap.peisongMember.statusStr}})</view>\n      <view class=\"menu-right\">\n        <switch checked=\"{{ memberChecked }}\" bind:change=\"memberCheckedChange\" color=\"#E4393C\" />\n      </view>\n    </view>\n    <navigator url=\"/pages/peisong/orders\" class=\"menu-item\">\n      <view class=\"menu-label\">我的配送单</view>\n      <text class=\"arrow\">›</text>\n    </navigator>\n    <navigator wx:if=\"{{apiUserInfoMap.peisongMember.type != 2}}\" url=\"/pages/peisong/orders?status=-1\" class=\"menu-item\">\n      <view class=\"menu-label\">抢单任务大厅</view>\n      <text class=\"arrow\">›</text>\n    </navigator>\n    <navigator wx:if=\"{{apiUserInfoMap.peisongMember && apiUserInfoMap.peisongMember.type == 2}}\" url=\"/pages/peisong/orders?status=1\" class=\"menu-item\">\n      <view class=\"menu-label\">管理员派单管理</view>\n      <text class=\"arrow\">›</text>\n    </navigator>\n    <navigator url=\"/pages/peisong/statistics\" class=\"menu-item\">\n      <view class=\"menu-label\">业绩统计</view>\n      <text class=\"arrow\">›</text>\n    </navigator>\n  </view>\n\n  <!-- 分销中心 -->\n  <view wx:if=\"{{ fx_type == 'hehuoren' }}\" class=\"menu-card\">\n    <navigator url=\"/packageFx/pages/hehuorenfenxiao/index\" class=\"menu-item\">\n      <view class=\"menu-label\">分销中心</view>\n      <text class=\"arrow\">›</text>\n    </navigator>\n  </view>\n\n  <!-- 三级分销 -->\n  <view wx:elif=\"{{ show_3_seller == 1 }}\" class=\"distribution-section\">\n    <view class=\"section-title\">三级分销</view>\n    <navigator wx:if=\"{{!apiUserInfoMap.base.isSeller}}\" url=\"/packageFx/pages/apply/index\" class=\"menu-item\">\n      <view class=\"menu-label\">成为分销商</view>\n      <text class=\"arrow\">›</text>\n    </navigator>\n    <navigator wx:else url=\"/packageFx/pages/index/index\" class=\"menu-item\">\n      <view class=\"menu-label\">分销中心</view>\n      <text class=\"arrow\">›</text>\n    </navigator>\n    <navigator wx:if=\"{{apiUserInfoMap.base.isSeller}}\" url=\"/packageFx/pages/myusers/index\" class=\"menu-item\">\n      <view class=\"menu-label\">我的团队</view>\n      <text class=\"arrow\">›</text>\n    </navigator>\n    <navigator wx:if=\"{{apiUserInfoMap.base.isSeller}}\" url=\"/packageFx/pages/commisionLog/index\" class=\"menu-item\">\n      <view class=\"menu-label\">推广订单</view>\n      <text class=\"arrow\">›</text>\n    </navigator>\n  </view>\n\n  <!-- 其他功能 -->\n  <view class=\"other-section\">\n    <view class=\"section-title\">其他功能</view>\n    <navigator url=\"/pages/my/info-menu\" class=\"menu-item\">\n      <view class=\"menu-label\">个人信息</view>\n      <text class=\"arrow\">›</text>\n    </navigator>\n    <navigator url=\"/pages/help/index\" class=\"menu-item\">\n      <view class=\"menu-label\">帮助中心</view>\n      <text class=\"arrow\">›</text>\n    </navigator>\n    <view wx:if=\"{{ customerServiceType == 'QW' }}\" class=\"menu-item\" bind:tap=\"customerService\">\n      <view class=\"menu-label\">联系客服</view>\n      <text class=\"arrow\">›</text>\n    </view>\n    <navigator url=\"/pages/my/setting\" class=\"menu-item\">\n      <view class=\"menu-label\">系统设置</view>\n      <text class=\"arrow\">›</text>\n    </navigator>\n  </view>\n</view>\n\n<!-- 修改昵称弹窗 -->\n<view wx:if=\"{{ nickShow }}\" class=\"modal-mask\">\n  <view class=\"modal-content\" catchtap=\"\">\n    <view class=\"modal-header\">修改昵称</view>\n    <view class=\"modal-body\">\n      <input class=\"nick-input\" model:value=\"{{ nick }}\" type=\"nickname\" placeholder=\"请输入昵称\" placeholder-class=\"input-placeholder\" />\n    </view>\n    <view class=\"modal-footer\">\n      <view class=\"modal-btn cancel-btn\" catchtap=\"hideNickModal\">取消</view>\n      <view class=\"modal-btn confirm-btn\" catchtap=\"_editNick\">确定</view>\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "pages/my/index.wxss",
    "content": "/* 全局样式 */\npage {\n  background: #f5f5f5;\n  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;\n}\n\n.page-container {\n  min-height: 100vh;\n  padding-bottom: 40rpx;\n}\n\n/* 头部用户信息区域 */\n.header-section {\n  background: #fff;\n  padding: 0rpx 32rpx 32rpx;\n  margin-bottom: 20rpx;\n}\n\n/* 未登录状态 */\n.login-container {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  padding: 60rpx 0;\n}\n\n.login-tips {\n  font-size: 32rpx;\n  margin-bottom: 32rpx;\n  color: #333;\n  font-weight: 500;\n}\n\n.login-btn {\n  background: linear-gradient(135deg, #E4393C 0%, #C81623 100%);\n  color: #fff;\n  padding: 28rpx 88rpx;\n  border-radius: 48rpx;\n  font-size: 32rpx;\n  font-weight: 600;\n  box-shadow: 0 8rpx 24rpx rgba(228, 57, 60, 0.3);\n}\n\n/* 已登录用户信息 */\n.user-info-container {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 24rpx 0;\n}\n\n.user-main {\n  display: flex;\n  align-items: center;\n  flex: 1;\n}\n\n.avatar-btn {\n  background: transparent;\n  border: none;\n  padding: 0;\n  margin: 0;\n  line-height: 1;\n  position: relative;\n}\n\n.avatar {\n  width: 128rpx;\n  height: 128rpx;\n  border-radius: 50%;\n  display: block;\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);\n}\n\n.avatar-border {\n  position: absolute;\n  top: -6rpx;\n  left: -6rpx;\n  right: -6rpx;\n  bottom: -6rpx;\n  border-radius: 50%;\n  border: 4rpx solid transparent;\n  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);\n  -webkit-mask-composite: xor;\n  mask-composite: exclude;\n  pointer-events: none;\n  opacity: 0.8;\n}\n\n.user-detail {\n  margin-left: 24rpx;\n  flex: 1;\n}\n\n.nickname-row {\n  display: flex;\n  align-items: center;\n  margin-bottom: 12rpx;\n}\n\n.nickname {\n  font-size: 36rpx;\n  font-weight: 700;\n  color: #333;\n  letter-spacing: 0.5rpx;\n}\n\n.user-id {\n  font-size: 24rpx;\n  color: #999;\n  margin-bottom: 8rpx;\n}\n\n.qr-code-btn {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: 0;\n}\n\n.qr-icon-box {\n  width: 88rpx;\n  height: 88rpx;\n  background: linear-gradient(135deg, #FFF5F5 0%, #FFE8E8 100%);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-bottom: 8rpx;\n  box-shadow: 0 4rpx 12rpx rgba(228, 57, 60, 0.12);\n}\n\n.qr-text {\n  font-size: 22rpx;\n  color: #666;\n  font-weight: 500;\n}\n\n/* 会员等级卡片 */\n.vip-card-wrapper {\n  margin: 24rpx 0 0;\n}\n\n.vip-card {\n  position: relative;\n  border-radius: 24rpx;\n  overflow: hidden;\n  box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.12);\n  transition: all 0.3s ease;\n}\n\n.vip-card:active {\n  transform: scale(0.98);\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);\n}\n\n/* 会员卡背景 */\n.vip-card-bg {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  z-index: 0;\n}\n\n/* 不同等级会员的配色方案 */\n/* 黄金会员 - VIP1 */\n.vip-level-1 {\n  background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);\n}\n\n.vip-level-1 .vip-card-bg {\n  background: \n    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),\n    radial-gradient(circle at 80% 70%, rgba(255, 140, 0, 0.3) 0%, transparent 50%);\n}\n\n/* 白金会员 - VIP2 */\n.vip-level-2 {\n  background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 50%, #A8A8A8 100%);\n}\n\n.vip-level-2 .vip-card-bg {\n  background: \n    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),\n    radial-gradient(circle at 80% 70%, rgba(192, 192, 192, 0.3) 0%, transparent 50%);\n}\n\n/* 钻石会员 - VIP3 */\n.vip-level-3 {\n  background: linear-gradient(135deg, #B9F2FF 0%, #00CED1 50%, #4682B4 100%);\n}\n\n.vip-level-3 .vip-card-bg {\n  background: \n    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),\n    radial-gradient(circle at 80% 70%, rgba(70, 130, 180, 0.3) 0%, transparent 50%);\n}\n\n/* 至尊会员 - VIP4 */\n.vip-level-4 {\n  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);\n}\n\n.vip-level-4 .vip-card-bg {\n  background: \n    radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.2) 0%, transparent 50%),\n    radial-gradient(circle at 80% 70%, rgba(255, 165, 0, 0.15) 0%, transparent 50%);\n}\n\n/* 皇冠会员 - VIP5 */\n.vip-level-5 {\n  background: linear-gradient(135deg, #8B008B 0%, #9932CC 50%, #BA55D3 100%);\n}\n\n.vip-level-5 .vip-card-bg {\n  background: \n    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),\n    radial-gradient(circle at 80% 70%, rgba(186, 85, 211, 0.3) 0%, transparent 50%);\n}\n\n/* 默认会员样式 */\n.vip-card-active {\n  min-height: 200rpx;\n}\n\n/* 光效动画 */\n.vip-shine {\n  position: absolute;\n  top: -50%;\n  left: -50%;\n  width: 200%;\n  height: 200%;\n  background: linear-gradient(\n    45deg,\n    transparent 30%,\n    rgba(255, 255, 255, 0.15) 50%,\n    transparent 70%\n  );\n  animation: shine 4s infinite;\n}\n\n.vip-shine-2 {\n  animation-delay: 2s;\n}\n\n@keyframes shine {\n  0% {\n    transform: translateX(-100%) translateY(-100%) rotate(45deg);\n  }\n  100% {\n    transform: translateX(100%) translateY(100%) rotate(45deg);\n  }\n}\n\n/* 装饰元素 */\n.vip-decoration {\n  position: absolute;\n  width: 120rpx;\n  height: 120rpx;\n  border-radius: 50%;\n  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);\n}\n\n.vip-decoration-1 {\n  top: -40rpx;\n  right: 60rpx;\n}\n\n.vip-decoration-2 {\n  bottom: -40rpx;\n  left: 60rpx;\n}\n\n/* 未开通会员样式 */\n.vip-card-inactive {\n  background: linear-gradient(135deg, #FAFAFA 0%, #F5F5F5 100%);\n  border: 2rpx solid #E8E8E8;\n}\n\n.vip-pattern {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  opacity: 0.03;\n  background-image: \n    repeating-linear-gradient(45deg, #000 0, #000 2rpx, transparent 0, transparent 50%),\n    repeating-linear-gradient(-45deg, #000 0, #000 2rpx, transparent 0, transparent 50%);\n  background-size: 30rpx 30rpx;\n}\n\n/* 卡片内容 */\n.vip-card-content {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 32rpx;\n}\n\n.vip-main-info {\n  display: flex;\n  align-items: center;\n  flex: 1;\n}\n\n/* 会员徽章 */\n.vip-badge-wrapper {\n  position: relative;\n  margin-right: 24rpx;\n}\n\n.vip-badge {\n  width: 88rpx;\n  height: 88rpx;\n  border-radius: 50%;\n  background: rgba(255, 255, 255, 0.25);\n  backdrop-filter: blur(10rpx);\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.15);\n  border: 3rpx solid rgba(255, 255, 255, 0.4);\n}\n\n@keyframes float {\n  0%, 100% {\n    transform: translateY(0);\n  }\n  50% {\n    transform: translateY(-6rpx);\n  }\n}\n\n.vip-badge-glow {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n  width: 100rpx;\n  height: 100rpx;\n  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);\n  border-radius: 50%;\n  animation: glow 2s ease-in-out infinite;\n}\n\n@keyframes glow {\n  0%, 100% {\n    opacity: 0.5;\n    transform: translate(-50%, -50%) scale(1);\n  }\n  50% {\n    opacity: 1;\n    transform: translate(-50%, -50%) scale(1.3);\n  }\n}\n\n/* 未开通会员徽章 */\n.vip-badge-inactive .vip-badge {\n  background: linear-gradient(135deg, #E8E8E8 0%, #D0D0D0 100%);\n  border: 3rpx solid #C0C0C0;\n}\n\n.vip-badge-gray {\n  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);\n}\n\n.vip-badge-inactive .vip-badge-icon {\n  animation: none;\n  opacity: 0.6;\n}\n\n/* 会员文字信息 */\n.vip-text-info {\n  flex: 1;\n}\n\n.vip-name-row {\n  display: flex;\n  align-items: center;\n  margin-bottom: 8rpx;\n}\n\n.vip-level-name {\n  font-size: 32rpx;\n  font-weight: 700;\n  color: #FFFFFF;\n  letter-spacing: 1rpx;\n  text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2);\n  margin-right: 12rpx;\n}\n\n.vip-level-tag {\n  font-size: 20rpx;\n  font-weight: 700;\n  color: rgba(255, 255, 255, 0.9);\n  background: rgba(0, 0, 0, 0.2);\n  padding: 4rpx 12rpx;\n  border-radius: 12rpx;\n  letter-spacing: 0.5rpx;\n}\n\n.vip-desc {\n  font-size: 22rpx;\n  color: rgba(255, 255, 255, 0.85);\n  letter-spacing: 0.5rpx;\n}\n\n/* 未开通会员文字样式 */\n.vip-inactive-name {\n  color: #666;\n  text-shadow: none;\n  font-size: 28rpx;\n}\n\n.vip-inactive-desc {\n  color: #999;\n  font-size: 24rpx;\n}\n\n/* 操作按钮 */\n.vip-action-btn {\n  display: flex;\n  align-items: center;\n  padding: 16rpx 24rpx;\n  background: rgba(255, 255, 255, 0.25);\n  backdrop-filter: blur(10rpx);\n  border-radius: 48rpx;\n  border: 2rpx solid rgba(255, 255, 255, 0.3);\n}\n\n.vip-action-text {\n  font-size: 24rpx;\n  color: #FFFFFF;\n  font-weight: 600;\n  margin-right: 6rpx;\n  text-shadow: 0 1rpx 4rpx rgba(0, 0, 0, 0.2);\n}\n\n.vip-action-arrow {\n  font-size: 28rpx;\n  color: #FFFFFF;\n  font-weight: 600;\n}\n\n/* 立即开通按钮 */\n.vip-open-btn {\n  background: linear-gradient(135deg, #E4393C 0%, #C81623 100%);\n  padding: 16rpx 32rpx;\n  border-radius: 48rpx;\n  box-shadow: 0 4rpx 16rpx rgba(228, 57, 60, 0.4);\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n\n.vip-open-text {\n  font-size: 26rpx;\n  color: #FFFFFF;\n  font-weight: 700;\n}\n\n/* 卡片底部信息 */\n.vip-card-footer {\n  position: relative;\n  z-index: 1;\n  padding: 20rpx 32rpx 28rpx;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  border-top: 1rpx solid rgba(255, 255, 255, 0.15);\n}\n\n.vip-expire-info {\n  display: flex;\n  align-items: center;\n}\n\n.vip-expire-icon {\n  font-size: 24rpx;\n  margin-right: 8rpx;\n}\n\n.vip-expire-text {\n  font-size: 22rpx;\n  color: rgba(255, 255, 255, 0.8);\n  letter-spacing: 0.5rpx;\n}\n\n.vip-upgrade-hint {\n  font-size: 22rpx;\n  color: rgba(255, 255, 255, 0.9);\n  font-weight: 600;\n}\n\n.upgrade-hint-text {\n  text-decoration: underline;\n  text-underline-offset: 4rpx;\n}\n\n/* 未开通会员的权益预览 */\n.vip-benefits-preview {\n  border-top: 1rpx solid #E8E8E8;\n  padding: 24rpx 32rpx;\n  display: flex;\n  justify-content: space-between;\n  gap: 8rpx;\n}\n\n.benefit-item {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  flex: 1;\n}\n\n.benefit-icon {\n  font-size: 32rpx;\n  margin-bottom: 6rpx;\n  display: block;\n}\n\n.benefit-text {\n  font-size: 20rpx;\n  color: #666;\n  text-align: center;\n  line-height: 1.3;\n}\n\n/* 资产卡片 */\n.asset-card {\n  margin: 0 32rpx 20rpx;\n  background: #fff;\n  border-radius: 24rpx;\n  padding: 0;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);\n  overflow: hidden;\n  text-align: center;\n}\n\n.asset-wrapper {\n  display: flex;\n}\n\n.asset-item {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  padding: 40rpx 24rpx;\n  position: relative;\n}\n\n.asset-item:not(:last-child)::after {\n  content: '';\n  position: absolute;\n  right: 0;\n  top: 50%;\n  transform: translateY(-50%);\n  width: 2rpx;\n  height: 60rpx;\n  background: linear-gradient(to bottom, rgba(238, 238, 238, 0), #eeeeee, rgba(238, 238, 238, 0));\n}\n\n.asset-primary {\n  background: linear-gradient(135deg, #FFF5F5 0%, #FFFFFF 100%);\n}\n\n.asset-secondary {\n  background: linear-gradient(135deg, #FFFFFF 0%, #F8F8F8 100%);\n}\n\n.asset-label {\n  font-size: 26rpx;\n  color: #999;\n  margin-bottom: 16rpx;\n  font-weight: 500;\n}\n\n.asset-amount-row {\n  display: flex;\n  align-items: baseline;\n  justify-content: center;\n}\n\n.asset-symbol {\n  font-size: 32rpx;\n  color: #E4393C;\n  font-weight: 600;\n  margin-right: 4rpx;\n}\n\n.asset-amount {\n  font-size: 48rpx;\n  font-weight: 700;\n  color: #E4393C;\n  line-height: 1;\n  letter-spacing: 1rpx;\n}\n\n.asset-divider {\n  height: 2rpx;\n  background: linear-gradient(to right, rgba(238, 238, 238, 0), #eeeeee, rgba(238, 238, 238, 0));\n  margin: 0 32rpx;\n}\n\n/* 会员卡区域 */\n.card-section {\n  margin: 0 32rpx 24rpx;\n  padding: 32rpx;\n  background: #fff;\n  border-radius: 24rpx;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);\n}\n\n.section-title {\n  font-size: 32rpx;\n  font-weight: 700;\n  color: #333;\n  margin-bottom: 24rpx;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n}\n\n.title-text {\n  letter-spacing: 0.5rpx;\n}\n\n.title-icon {\n  font-size: 36rpx;\n}\n\n.card-list {\n  display: flex;\n  flex-direction: column;\n  gap: 20rpx;\n  transition: all 0.3s ease;\n  overflow: hidden;\n}\n\n.card-item {\n  display: block;\n  color: inherit;\n}\n\nnavigator.card-item {\n  display: block;\n}\n\n.card-item-animate {\n  animation: cardSlideIn 0.4s ease-out;\n  transform-origin: top;\n}\n\n@keyframes cardSlideIn {\n  0% {\n    opacity: 0;\n    transform: translateY(-20rpx) scaleY(0.8);\n  }\n  100% {\n    opacity: 1;\n    transform: translateY(0) scaleY(1);\n  }\n}\n\n.card-gradient {\n  background: linear-gradient(135deg, #E4393C 0%, #C81623 100%);\n  border-radius: 20rpx;\n  padding: 32rpx;\n  box-shadow: 0 8rpx 24rpx rgba(228, 57, 60, 0.25);\n  position: relative;\n  overflow: hidden;\n}\n\n.card-gradient::before {\n  content: '';\n  position: absolute;\n  top: -50%;\n  right: -20%;\n  width: 200rpx;\n  height: 200rpx;\n  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);\n  border-radius: 50%;\n}\n\n.card-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 32rpx;\n}\n\n.card-name {\n  font-size: 32rpx;\n  font-weight: 700;\n  color: #fff;\n  letter-spacing: 1rpx;\n}\n\n.card-badge {\n  background: rgba(255, 215, 0, 0.9);\n  color: #C81623;\n  font-size: 20rpx;\n  font-weight: 700;\n  padding: 6rpx 16rpx;\n  border-radius: 20rpx;\n  letter-spacing: 1rpx;\n}\n\n.card-body {\n  margin-bottom: 24rpx;\n}\n\n.card-amount-box {\n  display: flex;\n  flex-direction: column;\n}\n\n.card-amount-label {\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.85);\n  margin-bottom: 8rpx;\n}\n\n.card-amount-value {\n  font-size: 56rpx;\n  font-weight: 700;\n  color: #fff;\n  letter-spacing: 2rpx;\n}\n\n.card-footer {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding-top: 20rpx;\n  border-top: 1rpx solid rgba(255, 255, 255, 0.2);\n}\n\n.card-expire {\n  display: flex;\n  align-items: center;\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.9);\n}\n\n.expire-icon {\n  margin-right: 6rpx;\n  font-size: 26rpx;\n}\n\n.card-arrow {\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.9);\n  font-weight: 500;\n}\n\n/* 查看更多按钮 */\n.toggle-btn {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-top: 24rpx;\n  padding: 20rpx 0;\n  border-radius: 12rpx;\n  background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);\n  cursor: pointer;\n  transition: all 0.3s ease;\n}\n\n.toggle-btn:active {\n  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);\n  transform: scale(0.98);\n}\n\n.toggle-text {\n  font-size: 28rpx;\n  color: #E4393C;\n  font-weight: 600;\n  margin-right: 8rpx;\n}\n\n.toggle-icon {\n  font-size: 36rpx;\n  color: #E4393C;\n  font-weight: 600;\n  transform: rotate(90deg);\n  transition: transform 0.3s ease;\n  display: inline-block;\n}\n\n.toggle-icon.rotated {\n  transform: rotate(270deg);\n}\n\n.arrow {\n  font-size: 40rpx;\n  color: #ccc;\n  font-weight: 300;\n}\n\n/* 订单区域 */\n.order-section {\n  margin: 0 32rpx 24rpx;\n  background: #fff;\n  border-radius: 24rpx;\n  padding: 32rpx;\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);\n}\n\n.order-section .section-title {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333;\n  padding-left: 20rpx;\n  border-left: 6rpx solid #E4393C;\n}\n\n.section-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 32rpx;\n}\n\n.section-header .section-title {\n  margin-bottom: 0;\n}\n\n.more-link {\n  display: flex;\n  align-items: center;\n  font-size: 26rpx;\n  color: #999;\n}\n\n.more-link .arrow {\n  margin-left: 8rpx;\n  font-size: 32rpx;\n}\n\n.order-grid {\n  display: flex;\n  justify-content: space-around;\n}\n\n.order-item {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  position: relative;\n}\n\n.order-icon-wrapper {\n  position: relative;\n  margin-bottom: 12rpx;\n}\n\n.order-icon {\n  font-size: 56rpx;\n  display: block;\n}\n\n.order-badge {\n  position: absolute;\n  top: -8rpx;\n  right: -8rpx;\n  background: #E4393C;\n  color: #fff;\n  font-size: 20rpx;\n  padding: 4rpx 8rpx;\n  border-radius: 16rpx;\n  min-width: 32rpx;\n  text-align: center;\n  line-height: 1;\n  font-style: normal;\n}\n\n.order-label {\n  font-size: 24rpx;\n  color: #666;\n}\n\n/* 通用菜单项 */\n.menu-item {\n  background: #fff;\n  margin: 0;\n  padding: 32rpx;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  border-radius: 0;\n  border-bottom: 1rpx solid #f5f5f5;\n}\n\n.menu-item:last-child {\n  border-bottom: none;\n}\n\n.menu-card {\n  margin: 0 32rpx 24rpx;\n  background: #fff;\n  border-radius: 24rpx;\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);\n  overflow: hidden;\n}\n\n.menu-card .menu-item {\n  margin: 0;\n  border-radius: 0;\n  box-shadow: none;\n}\n\n.menu-label {\n  font-size: 28rpx;\n  color: #333;\n}\n\n.menu-right {\n  display: flex;\n  align-items: center;\n}\n\n.menu-value {\n  font-size: 26rpx;\n  color: #999;\n  margin-right: 8rpx;\n}\n\n/* 常用功能区域 */\n.function-section {\n  margin: 0 32rpx 24rpx;\n  background: #fff;\n  border-radius: 24rpx;\n  padding: 32rpx;\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);\n}\n\n.function-section .section-title {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333;\n  margin-bottom: 24rpx;\n  padding-left: 20rpx;\n  border-left: 6rpx solid #E4393C;\n  display: block;\n}\n\n.function-grid {\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: flex-start;\n}\n\n.function-item {\n  width: 25%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: 32rpx 0;\n}\n\n.function-icon {\n  font-size: 56rpx;\n  margin-bottom: 12rpx;\n  display: block;\n}\n\n.function-label {\n  font-size: 24rpx;\n  color: #666;\n  text-align: center;\n}\n\n/* 配送员工作台 */\n.work-section {\n  margin: 0 32rpx 24rpx;\n  background: #fff;\n  border-radius: 24rpx;\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);\n  overflow: hidden;\n}\n\n.work-section .section-title {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333;\n  background: #fff;\n  margin: 0;\n  padding: 32rpx;\n  border-bottom: 1rpx solid #f5f5f5;\n  padding-left: 52rpx;\n  border-left: 6rpx solid #E4393C;\n  display: block;\n}\n\n.work-section .menu-item {\n  margin: 0;\n  border-radius: 0;\n}\n\n/* 分销区域 */\n.distribution-section {\n  margin: 0 32rpx 24rpx;\n  background: #fff;\n  border-radius: 24rpx;\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);\n  overflow: hidden;\n}\n\n.distribution-section .section-title {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333;\n  background: #fff;\n  margin: 0;\n  padding: 32rpx;\n  border-bottom: 1rpx solid #f5f5f5;\n  padding-left: 52rpx;\n  border-left: 6rpx solid #E4393C;\n  display: block;\n}\n\n.distribution-section .menu-item {\n  margin: 0;\n  border-radius: 0;\n}\n\n/* 其他功能 */\n.other-section {\n  margin: 0 32rpx 24rpx;\n  background: #fff;\n  border-radius: 24rpx;\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);\n  overflow: hidden;\n}\n\n.other-section .section-title {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333;\n  background: #fff;\n  margin: 0;\n  padding: 32rpx;\n  border-bottom: 1rpx solid #f5f5f5;\n  padding-left: 52rpx;\n  border-left: 6rpx solid #E4393C;\n  display: block;\n}\n\n.other-section .menu-item {\n  margin: 0;\n  border-radius: 0;\n}\n\n/* 弹窗样式 */\n.modal-mask {\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: rgba(0, 0, 0, 0.6);\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  z-index: 9999;\n}\n\n.modal-content {\n  width: 600rpx;\n  background: #fff;\n  border-radius: 24rpx;\n  overflow: hidden;\n}\n\n.modal-header {\n  padding: 48rpx 32rpx 32rpx;\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333;\n  text-align: center;\n  border-bottom: 1rpx solid #f5f5f5;\n}\n\n.modal-body {\n  padding: 48rpx 32rpx;\n}\n\n.nick-input {\n  width: 100%;\n  padding: 24rpx;\n  border: 2rpx solid #eee;\n  border-radius: 12rpx;\n  font-size: 28rpx;\n  background: #f8f8f8;\n}\n\n.input-placeholder {\n  color: #ccc;\n}\n\n.modal-footer {\n  display: flex;\n  border-top: 1rpx solid #f5f5f5;\n}\n\n.modal-btn {\n  flex: 1;\n  padding: 32rpx;\n  text-align: center;\n  font-size: 32rpx;\n}\n\n.cancel-btn {\n  color: #666;\n  border-right: 1rpx solid #f5f5f5;\n}\n\n.confirm-btn {\n  color: #E4393C;\n  font-weight: 600;\n}\n\n/* 微信原生组件适配 */\nswitch {\n  transform: scale(0.85);\n}\n\nnavigator {\n  display: block;\n  color: inherit;\n  text-decoration: none;\n}\n\nnavigator.function-item {\n  display: flex;\n}\n\nbutton {\n  background: transparent;\n  border: none;\n  padding: 0;\n  margin: 0;\n  line-height: inherit;\n}\n\nbutton::after {\n  border: none;\n}\n\n/* navigator包裹menu-card时的特殊处理 */\nnavigator.menu-card {\n  display: block;\n}\n\nnavigator.menu-item {\n  display: flex;\n}\n"
  },
  {
    "path": "pages/my/info-menu.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nPage({\n  data: {\n\n  },\n  onLoad: function (options) {\n\n  },\n  onShow: function () {\n    this.getUserApiInfo()\n  },\n  async getUserApiInfo() {\n    const res = await WXAPI.userDetail(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      let _data = {}\n      _data.apiUserInfoMap = res.data\n      if (res.data.base.mobile) {\n        _data.userMobile = res.data.base.mobile\n      }\n      if (this.data.order_hx_uids && this.data.order_hx_uids.indexOf(res.data.base.id) != -1) {\n        _data.canHX = true // 具有扫码核销的权限\n      }\n      if (res.data.peisongMember && res.data.peisongMember.status == 1) {\n        _data.memberChecked = false\n      } else {\n        _data.memberChecked = true\n      }\n      this.setData(_data);\n    }\n  },\n  bindMobile() {\n    this.setData({\n      bindMobileShow: true\n    })\n  },\n  bindMobileOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      bindMobileShow: false\n    })\n    this.getUserApiInfo()\n  },\n  bindMobileCancel() {\n    this.setData({\n      bindMobileShow: false\n    })\n  },\n})"
  },
  {
    "path": "pages/my/info-menu.json",
    "content": "{\n  \"navigationBarTitleText\": \"个人信息\",\n  \"navigationBarBackgroundColor\": \"#667eea\",\n  \"navigationBarTextStyle\": \"white\",\n  \"backgroundColor\": \"#f5f7fa\"\n}"
  },
  {
    "path": "pages/my/info-menu.wxml",
    "content": "<view class=\"page-container\">\n  <!-- 顶部装饰背景 -->\n  <view class=\"header-bg\"></view>\n  \n  <!-- 主要内容区域 -->\n  <view class=\"content-wrapper\">\n    \n    <!-- 账户安全模块 -->\n    <view class=\"section-card\">\n      <view class=\"section-header\">\n        <view class=\"section-title\">\n          <view class=\"title-icon\">🔐</view>\n          <text class=\"title-text\">账户安全</text>\n        </view>\n      </view>\n      \n      <view class=\"menu-list\">\n        <!-- 绑定手机 -->\n        <view class=\"menu-item\" wx:if=\"{{userMobile}}\">\n          <view class=\"item-left\">\n            <view class=\"item-icon\">📱</view>\n            <view class=\"item-info\">\n              <text class=\"item-title\">绑定手机</text>\n              <text class=\"item-subtitle\">已绑定安全手机号</text>\n            </view>\n          </view>\n          <view class=\"item-right\">\n            <text class=\"item-value\">{{ userMobile }}</text>\n          </view>\n        </view>\n        \n        <view class=\"menu-item\" wx:else>\n          <view class=\"item-left\">\n            <view class=\"item-icon\">📱</view>\n            <view class=\"item-info\">\n              <text class=\"item-title\">绑定手机</text>\n              <text class=\"item-subtitle\">保障账户安全</text>\n            </view>\n          </view>\n          <view class=\"item-right\">\n            <view class=\"bind-btn\" bind:tap=\"bindMobile\">立即绑定</view>\n          </view>\n        </view>\n        \n        <!-- 交易密码 -->\n        <navigator class=\"menu-item-nav\" wx:if=\"{{apiUserInfoMap.base.pwdPay}}\" url=\"/pages/pwd-pay/modify\" hover-class=\"menu-item-hover\">\n          <view class=\"menu-item\">\n            <view class=\"item-left\">\n              <view class=\"item-icon\">🔑</view>\n              <view class=\"item-info\">\n                <text class=\"item-title\">交易密码</text>\n                <text class=\"item-subtitle\">保护资金安全</text>\n              </view>\n            </view>\n            <view class=\"item-right\">\n              <text class=\"item-value\">修改密码</text>\n              <text class=\"arrow\">›</text>\n            </view>\n          </view>\n        </navigator>\n        \n        <navigator class=\"menu-item-nav\" wx:else url=\"/pages/pwd-pay/set\" hover-class=\"menu-item-hover\">\n          <view class=\"menu-item\">\n            <view class=\"item-left\">\n              <view class=\"item-icon\">🔑</view>\n              <view class=\"item-info\">\n                <text class=\"item-title\">交易密码</text>\n                <text class=\"item-subtitle\">保护资金安全</text>\n              </view>\n            </view>\n            <view class=\"item-right\">\n              <text class=\"item-value\">立即设置</text>\n              <text class=\"arrow\">›</text>\n            </view>\n          </view>\n        </navigator>\n      </view>\n    </view>\n    \n    <!-- 个人资料模块 -->\n    <view class=\"section-card\">\n      <view class=\"section-header\">\n        <view class=\"section-title\">\n          <view class=\"title-icon\">👤</view>\n          <text class=\"title-text\">个人资料</text>\n        </view>\n      </view>\n      \n      <view class=\"menu-list\">\n        <!-- 修改资料 -->\n        <navigator class=\"menu-item-nav\" url=\"/pages/my/info\" hover-class=\"menu-item-hover\">\n          <view class=\"menu-item\">\n            <view class=\"item-left\">\n              <view class=\"item-icon\">✏️</view>\n              <view class=\"item-info\">\n                <text class=\"item-title\">修改资料</text>\n                <text class=\"item-subtitle\">完善个人信息</text>\n              </view>\n            </view>\n            <view class=\"item-right\">\n              <text class=\"arrow\">›</text>\n            </view>\n          </view>\n        </navigator>\n        \n        <!-- 收货地址 -->\n        <navigator class=\"menu-item-nav\" url=\"/pages/select-address/index\" hover-class=\"menu-item-hover\">\n          <view class=\"menu-item\">\n            <view class=\"item-left\">\n              <view class=\"item-icon\">📍</view>\n              <view class=\"item-info\">\n                <text class=\"item-title\">收货地址</text>\n                <text class=\"item-subtitle\">管理收货地址</text>\n              </view>\n            </view>\n            <view class=\"item-right\">\n              <text class=\"arrow\">›</text>\n            </view>\n          </view>\n        </navigator>\n      </view>\n    </view>\n    \n    <!-- 我的收藏模块 -->\n    <view class=\"section-card\">\n      <view class=\"section-header\">\n        <view class=\"section-title\">\n          <view class=\"title-icon\">⭐</view>\n          <text class=\"title-text\">我的收藏</text>\n        </view>\n      </view>\n      \n      <view class=\"menu-list\">\n        <navigator class=\"menu-item-nav\" url=\"/pages/goods/fav\" hover-class=\"menu-item-hover\">\n          <view class=\"menu-item\">\n            <view class=\"item-left\">\n              <view class=\"item-icon\">❤️</view>\n              <view class=\"item-info\">\n                <text class=\"item-title\">收藏的商品</text>\n                <text class=\"item-subtitle\">查看我的收藏</text>\n              </view>\n            </view>\n            <view class=\"item-right\">\n              <text class=\"arrow\">›</text>\n            </view>\n          </view>\n        </navigator>\n      </view>\n    </view>\n    \n  </view>\n</view>\n\n<bind-mobile\n  title=\"绑定手机号码\"\n  alarmText=\"为保障您的资金安全，请先绑定手机号码\"\n  show=\"{{ bindMobileShow }}\"\n  bind:cancel=\"bindMobileCancel\"\n  bind:ok=\"bindMobileOk\"\n/>"
  },
  {
    "path": "pages/my/info-menu.wxss",
    "content": "/* pages/my/info-menu.wxss */\n\n/* 页面容器 */\n.page-container {\n  min-height: 100vh;\n  background: linear-gradient(180deg, #f5f7fa 0%, #ffffff 100%);\n  padding-bottom: 40rpx;\n}\n\n/* 顶部装饰背景 */\n.header-bg {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  height: 360rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 0 0 50% 50% / 0 0 60rpx 60rpx;\n  z-index: 0;\n}\n\n/* 主要内容区域 */\n.content-wrapper {\n  position: relative;\n  z-index: 1;\n  padding: 40rpx 32rpx;\n}\n\n/* 卡片模块 */\n.section-card {\n  background: #ffffff;\n  border-radius: 24rpx;\n  margin-bottom: 32rpx;\n  overflow: hidden;\n  box-shadow: 0 8rpx 32rpx rgba(102, 126, 234, 0.08);\n  transition: all 0.3s ease;\n}\n\n.section-card:active {\n  transform: scale(0.99);\n}\n\n/* 模块标题区域 */\n.section-header {\n  padding: 36rpx 32rpx 24rpx;\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);\n  border-bottom: 1rpx solid rgba(102, 126, 234, 0.08);\n}\n\n.section-title {\n  display: flex;\n  align-items: center;\n}\n\n.title-icon {\n  font-size: 44rpx;\n  margin-right: 16rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.title-text {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #2c3e50;\n  letter-spacing: 1rpx;\n}\n\n/* 菜单列表 */\n.menu-list {\n  padding: 0;\n}\n\n/* Navigator 包装器 */\n.menu-item-nav {\n  display: block;\n  text-decoration: none;\n}\n\n/* 菜单项 */\n.menu-item {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 32rpx 32rpx;\n  position: relative;\n  transition: all 0.3s ease;\n  background: #ffffff;\n}\n\n.menu-item::after {\n  content: '';\n  position: absolute;\n  left: 96rpx;\n  right: 32rpx;\n  bottom: 0;\n  height: 1rpx;\n  background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);\n}\n\n.menu-item:last-child::after {\n  display: none;\n}\n\n/* Hover效果 */\n.menu-item-hover {\n  background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.03) 100%);\n}\n\n/* 左侧内容 */\n.item-left {\n  display: flex;\n  align-items: center;\n  flex: 1;\n}\n\n.item-icon {\n  width: 88rpx;\n  height: 88rpx;\n  border-radius: 20rpx;\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-size: 40rpx;\n  margin-right: 24rpx;\n  box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.15);\n}\n\n.item-info {\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n}\n\n.item-title {\n  font-size: 30rpx;\n  font-weight: 500;\n  color: #2c3e50;\n  margin-bottom: 6rpx;\n  letter-spacing: 0.5rpx;\n}\n\n.item-subtitle {\n  font-size: 24rpx;\n  color: #8492a6;\n  font-weight: 400;\n}\n\n/* 右侧内容 */\n.item-right {\n  display: flex;\n  align-items: center;\n  margin-left: 20rpx;\n}\n\n.item-value {\n  font-size: 26rpx;\n  color: #667eea;\n  font-weight: 500;\n  margin-right: 8rpx;\n}\n\n.arrow {\n  font-size: 40rpx;\n  color: #c0c4cc;\n  font-weight: 300;\n  line-height: 1;\n  transform: translateY(-2rpx);\n}\n\n/* 立即绑定按钮 */\n.bind-btn {\n  padding: 12rpx 32rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  color: #ffffff;\n  font-size: 26rpx;\n  font-weight: 500;\n  border-radius: 40rpx;\n  box-shadow: 0 6rpx 20rpx rgba(102, 126, 234, 0.35);\n  transition: all 0.3s ease;\n  letter-spacing: 1rpx;\n}\n\n.bind-btn:active {\n  transform: scale(0.95);\n  box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.25);\n}\n\n/* 响应式优化 */\n@media (prefers-color-scheme: dark) {\n  .page-container {\n    background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%);\n  }\n  \n  .section-card {\n    background: #2d2d2d;\n    box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.3);\n  }\n  \n  .section-header {\n    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);\n    border-bottom-color: rgba(102, 126, 234, 0.15);\n  }\n  \n  .title-text {\n    color: #e4e7ed;\n  }\n  \n  .item-title {\n    color: #e4e7ed;\n  }\n  \n  .item-subtitle {\n    color: #909399;\n  }\n  \n  .menu-item {\n    background: #2d2d2d;\n  }\n  \n  .menu-item-hover {\n    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.08) 100%);\n  }\n}"
  },
  {
    "path": "pages/my/info.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nPage({\n  data: {\n    avatarUrl: undefined,\n    avatarUrlTmpFile: undefined,\n    gender: undefined,\n    genderArray: [ '男性', '女性'],\n    genderIndex: -1\n  },\n  onLoad(e) {\n    this.getUserApiInfo()\n  },\n  onShow() {\n  },\n  bindMobile() {\n    this.setData({\n      bindMobileShow: true\n    })\n  },\n  bindMobileOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      bindMobileShow: false\n    })\n    this.getUserApiInfo()\n  },\n  bindMobileCancel() {\n    this.setData({\n      bindMobileShow: false\n    })\n  },\n  async getUserApiInfo() {\n    const res = await WXAPI.userDetail(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      let _data = {}\n      _data.apiUserInfoMap = res.data\n      _data.nick = res.data.base.nick\n      _data.avatarUrl = res.data.base.avatarUrl\n      if (!res.data.base.gender) {\n        _data.gender = '未知'\n      }\n      if (res.data.base.gender == 1) {\n        _data.gender = '男性'\n      }\n      if (res.data.base.gender == 2) {\n        _data.gender = '女性'\n      }\n      \n      this.setData(_data)\n    }\n  },\n  async formSubmit() {\n    const postData = {\n      token: wx.getStorageSync('token'),\n      nick: this.data.nick\n    }\n    if (this.data.avatarUrlTmpFile) {\n      const res = await WXAPI.uploadFileV2(wx.getStorageSync('token'), this.data.avatarUrlTmpFile)\n      if (res.code == 0) {\n        postData.avatarUrl = res.data.url\n      }\n    }\n    if (this.data.genderIndex != -1) {\n      postData.gender = this.data.genderIndex*1 + 1\n    }\n    // https://www.yuque.com/apifm/nu0f75/ykr2zr\n    const res = await WXAPI.modifyUserInfoV2(postData)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    }\n    wx.showToast({\n      title: '编辑成功',\n    })\n    setTimeout(() => {\n      wx.navigateBack({\n        delta: 0,\n      })\n    }, 1000);\n  },\n  async onChooseAvatar(e) {\n    console.log(e);\n    const avatarUrl = e.detail.avatarUrl\n    this.setData({\n      avatarUrl: avatarUrl,\n      avatarUrlTmpFile: avatarUrl\n    })\n  },\n  bindPickerChange: function(e) {\n    this.setData({\n      genderIndex: e.detail.value,\n      gender: this.data.genderArray[e.detail.value]\n    })\n  },\n})"
  },
  {
    "path": "pages/my/info.json",
    "content": "{\n  \"navigationBarTitleText\": \"编辑资料\"\n}"
  },
  {
    "path": "pages/my/info.wxml",
    "content": "<view class=\"profile-container\">\n  <!-- 头部区域 -->\n  <view class=\"header-section\">\n    <view class=\"header-bg\"></view>\n    <view class=\"avatar-wrapper\">\n      <button class=\"avatar-button\" open-type=\"chooseAvatar\" bind:chooseavatar=\"onChooseAvatar\">\n        <image class=\"avatar-image\" src=\"{{ avatarUrl ? avatarUrl : '/images/default.png' }}\" mode=\"aspectFill\"></image>\n        <view class=\"avatar-mask\">\n          <text class=\"avatar-text\">更换头像</text>\n        </view>\n      </button>\n    </view>\n  </view>\n\n  <!-- 基本信息卡片 -->\n  <view class=\"info-card\">\n    <view class=\"card-title\">\n      <view class=\"title-line\"></view>\n      <text class=\"title-text\">基本信息</text>\n    </view>\n    \n    <view class=\"form-item\">\n      <view class=\"item-label\">\n        <text class=\"label-icon\">👤</text>\n        <text class=\"label-text\">昵称</text>\n      </view>\n      <input \n        class=\"item-input\" \n        type=\"nickname\"\n        model:value=\"{{ nick }}\"\n        placeholder=\"请输入昵称\"\n        placeholder-class=\"input-placeholder\"\n      />\n    </view>\n\n    <view class=\"divider\"></view>\n\n    <picker bindchange=\"bindPickerChange\" value=\"{{ genderIndex }}\" range=\"{{genderArray}}\">\n      <view class=\"form-item\">\n        <view class=\"item-label\">\n          <text class=\"label-icon\">⚥</text>\n          <text class=\"label-text\">性别</text>\n        </view>\n        <view class=\"item-value\">\n          <text class=\"value-text\">{{ gender || '请选择' }}</text>\n          <text class=\"arrow-icon\">›</text>\n        </view>\n      </view>\n    </picker>\n\n    <view class=\"divider\"></view>\n\n    <view class=\"form-item\">\n      <view class=\"item-label\">\n        <text class=\"label-icon\">📱</text>\n        <text class=\"label-text\">手机号码</text>\n      </view>\n      <view class=\"mobile-wrapper\">\n        <text class=\"mobile-text\">{{ apiUserInfoMap.base.mobile || '未绑定' }}</text>\n        <view class=\"bind-btn\" bind:tap=\"bindMobile\">\n          <text class=\"bind-text\">{{ apiUserInfoMap.base.mobile ? '更换' : '绑定' }}</text>\n        </view>\n      </view>\n    </view>\n  </view>\n\n  <!-- 扩展信息卡片 -->\n  <view class=\"info-card\" wx:if=\"{{apiUserInfoMap.ext && apiUserInfoMap.ext.length > 0}}\">\n    <view class=\"card-title\">\n      <view class=\"title-line\"></view>\n      <text class=\"title-text\">扩展信息</text>\n    </view>\n    \n    <block wx:for=\"{{apiUserInfoMap.ext}}\" wx:for-index='k' wx:key=\"index\">\n      <view class=\"form-item\">\n        <view class=\"item-label\">\n          <text class=\"label-icon\">📝</text>\n          <text class=\"label-text\">{{ k }}</text>\n        </view>\n        <input \n          class=\"item-input\" \n          name=\"{{ k}}\"\n          value=\"{{ item }}\"\n          placeholder=\"请输入信息\"\n          placeholder-class=\"input-placeholder\"\n        />\n      </view>\n      <view class=\"divider\" wx:if=\"{{index < apiUserInfoMap.ext.length - 1}}\"></view>\n    </block>\n  </view>\n\n  <!-- 保存按钮 -->\n  <view class=\"save-section\">\n    <view class=\"save-button\" bind:tap=\"formSubmit\">\n      <text class=\"save-text\">保存修改</text>\n    </view>\n  </view>\n</view>\n\n<bind-mobile\n  title=\"绑定手机号码\"\n  alarmText=\"为保障您的资金安全，请先绑定手机号码\"\n  show=\"{{ bindMobileShow }}\"\n  bind:cancel=\"bindMobileCancel\"\n  bind:ok=\"bindMobileOk\"\n/>"
  },
  {
    "path": "pages/my/info.wxss",
    "content": "page {\n  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);\n  min-height: 100vh;\n}\n\n.profile-container {\n  padding-bottom: 40rpx;\n}\n\n/* ========== 头部区域 ========== */\n.header-section {\n  position: relative;\n  height: 400rpx;\n  margin-bottom: -80rpx;\n  overflow: hidden;\n}\n\n.header-bg {\n  width: 100%;\n  height: 100%;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  position: relative;\n}\n\n.header-bg::before {\n  content: '';\n  position: absolute;\n  top: -50%;\n  right: -20%;\n  width: 400rpx;\n  height: 400rpx;\n  background: rgba(255, 255, 255, 0.1);\n  border-radius: 50%;\n}\n\n.header-bg::after {\n  content: '';\n  position: absolute;\n  bottom: -30%;\n  left: -10%;\n  width: 300rpx;\n  height: 300rpx;\n  background: rgba(255, 255, 255, 0.08);\n  border-radius: 50%;\n}\n\n.avatar-wrapper {\n  position: absolute;\n  top: 88rpx;\n  left: 50%;\n  transform: translateX(-50%);\n  z-index: 10;\n}\n\n.avatar-button {\n  position: relative;\n  width: 180rpx;\n  height: 180rpx;\n  padding: 0;\n  margin: 0;\n  border: none;\n  background: transparent;\n  border-radius: 50%;\n  overflow: visible;\n}\n\n.avatar-button::after {\n  border: none;\n}\n\n.avatar-image {\n  width: 180rpx;\n  height: 180rpx;\n  border-radius: 50%;\n  border: 8rpx solid #ffffff;\n  box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.15);\n  display: block;\n}\n\n.avatar-mask {\n  position: absolute;\n  bottom: 0;\n  left: 50%;\n  transform: translateX(-50%);\n  width: 160rpx;\n  height: 50rpx;\n  background: rgba(0, 0, 0, 0.6);\n  border-radius: 0 0 50% 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  opacity: 0;\n  transition: opacity 0.3s;\n}\n\n.avatar-button:active .avatar-mask {\n  opacity: 1;\n}\n\n.avatar-text {\n  color: #ffffff;\n  font-size: 22rpx;\n  font-weight: 500;\n}\n\n/* ========== 信息卡片 ========== */\n.info-card {\n  margin: 100rpx 30rpx 30rpx;\n  background: #ffffff;\n  border-radius: 24rpx;\n  padding: 40rpx 32rpx;\n  box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.06);\n}\n\n.info-card:first-of-type {\n  margin-top: 100rpx;\n}\n\n.card-title {\n  display: flex;\n  align-items: center;\n  margin-bottom: 36rpx;\n}\n\n.title-line {\n  width: 6rpx;\n  height: 32rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 3rpx;\n  margin-right: 16rpx;\n}\n\n.title-text {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #2c3e50;\n  letter-spacing: 1rpx;\n}\n\n/* ========== 表单项 ========== */\n.form-item {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 24rpx 0;\n  min-height: 88rpx;\n}\n\n.item-label {\n  display: flex;\n  align-items: center;\n  flex-shrink: 0;\n  width: 200rpx;\n}\n\n.label-icon {\n  font-size: 36rpx;\n  margin-right: 16rpx;\n  line-height: 1;\n}\n\n.label-text {\n  font-size: 30rpx;\n  color: #34495e;\n  font-weight: 500;\n}\n\n.item-input {\n  flex: 1;\n  text-align: right;\n  font-size: 28rpx;\n  color: #2c3e50;\n  padding-right: 8rpx;\n}\n\n.input-placeholder {\n  color: #bdc3c7;\n  font-size: 28rpx;\n}\n\n.item-value {\n  display: flex;\n  align-items: center;\n  flex: 1;\n  justify-content: flex-end;\n}\n\n.value-text {\n  font-size: 28rpx;\n  color: #7f8c8d;\n  margin-right: 8rpx;\n}\n\n.arrow-icon {\n  font-size: 48rpx;\n  color: #bdc3c7;\n  font-weight: 300;\n  line-height: 1;\n  margin-top: -4rpx;\n}\n\n/* ========== 手机号区域 ========== */\n.mobile-wrapper {\n  display: flex;\n  align-items: center;\n  flex: 1;\n  justify-content: flex-end;\n}\n\n.mobile-text {\n  font-size: 28rpx;\n  color: #7f8c8d;\n  margin-right: 16rpx;\n}\n\n.bind-btn {\n  padding: 10rpx 24rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 32rpx;\n  box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);\n}\n\n.bind-text {\n  font-size: 24rpx;\n  color: #ffffff;\n  font-weight: 500;\n}\n\n/* ========== 分割线 ========== */\n.divider {\n  height: 1rpx;\n  background: linear-gradient(to right, \n    rgba(189, 195, 199, 0) 0%, \n    rgba(189, 195, 199, 0.3) 50%, \n    rgba(189, 195, 199, 0) 100%);\n  margin: 0 -16rpx;\n}\n\n/* ========== 保存按钮 ========== */\n.save-section {\n  padding: 60rpx 30rpx 40rpx;\n}\n\n.save-button {\n  height: 96rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 48rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.4);\n  position: relative;\n  overflow: hidden;\n}\n\n.save-button::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: -100%;\n  width: 100%;\n  height: 100%;\n  background: linear-gradient(90deg, \n    transparent, \n    rgba(255, 255, 255, 0.2), \n    transparent);\n  transition: left 0.5s;\n}\n\n.save-button:active::before {\n  left: 100%;\n}\n\n.save-button:active {\n  transform: scale(0.98);\n  box-shadow: 0 6rpx 20rpx rgba(102, 126, 234, 0.3);\n}\n\n.save-text {\n  font-size: 32rpx;\n  color: #ffffff;\n  font-weight: 600;\n  letter-spacing: 4rpx;\n}\n\n/* ========== 响应式优化 ========== */\n@media (prefers-color-scheme: dark) {\n  page {\n    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);\n  }\n  \n  .info-card {\n    background: #0f3460;\n  }\n  \n  .title-text {\n    color: #e8ecf1;\n  }\n  \n  .label-text {\n    color: #e8ecf1;\n  }\n  \n  .item-input {\n    color: #e8ecf1;\n  }\n  \n  .value-text,\n  .mobile-text {\n    color: #95a5a6;\n  }\n}"
  },
  {
    "path": "pages/my/setting.js",
    "content": "const CONFIG = require('../../config.js')\nconst WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nPage({\n  data: {\n    enableDebug: wx.getSystemInfoSync().enableDebug\n  },\n  onLoad: function (options) {\n    this.setData({\n      version: CONFIG.version\n    })\n  },\n  onShow: function () {\n    this.getUserApiInfo()\n  },\n  async getUserApiInfo() {\n    const res = await WXAPI.userDetail(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      let _data = {}\n      _data.apiUserInfoMap = res.data\n      if (res.data.base.mobile) {\n        _data.userMobile = res.data.base.mobile\n      }\n      if (this.data.order_hx_uids && this.data.order_hx_uids.indexOf(res.data.base.id) != -1) {\n        _data.canHX = true // 具有扫码核销的权限\n      }\n      if (res.data.peisongMember && res.data.peisongMember.status == 1) {\n        _data.memberChecked = false\n      } else {\n        _data.memberChecked = true\n      }\n      this.setData(_data);\n    }\n  },\n  clearStorage(){\n    wx.clearStorageSync()\n    wx.showToast({\n      title: '已清除',\n      icon: 'success'\n    })\n  },\n  setEnableDebug() {\n    const enableDebug = wx.getSystemInfoSync().enableDebug\n    if (enableDebug) {\n      wx.setEnableDebug({\n        enableDebug: false\n      })\n    } else {\n      wx.setEnableDebug({\n        enableDebug: true\n      })\n    }\n  },\n  openSetting() {\n    wx.openSetting({\n      withSubscriptions: true\n    })\n  },\n  loginOut() {\n    AUTH.loginOut()\n    wx.navigateTo({\n      url: '/pages/login/index',\n    })\n  },\n})"
  },
  {
    "path": "pages/my/setting.json",
    "content": "{\n  \"navigationBarTitleText\": \"设置\"\n}"
  },
  {
    "path": "pages/my/setting.wxml",
    "content": "<view class=\"setting-container\">\n  <!-- 头部装饰区域 -->\n  <view class=\"header-section\">\n    <view class=\"header-decoration\"></view>\n    <text class=\"header-title\">系统设置</text>\n    <text class=\"header-subtitle\">System Settings</text>\n  </view>\n\n  <!-- 服务与支持 -->\n  <view class=\"section-card\">\n    <view class=\"section-header\">\n      <view class=\"section-icon\">\n        <text class=\"icon-text\">🛎️</text>\n      </view>\n      <text class=\"section-title\">服务与支持</text>\n    </view>\n    <view class=\"card-content\">\n      <navigator class=\"setting-item\" url=\"/pages/about/index\" hover-class=\"item-hover\">\n        <view class=\"item-left\">\n          <view class=\"item-icon icon-about\">\n            <text class=\"iconfont\">ℹ️</text>\n          </view>\n          <view class=\"item-info\">\n            <text class=\"item-title\">关于我们</text>\n            <text class=\"item-desc\">了解更多信息</text>\n          </view>\n        </view>\n        <text class=\"item-arrow\">›</text>\n      </navigator>\n\n      <navigator class=\"setting-item\" url=\"/packageStreamMedia/pages/videoCall/videoCall\" hover-class=\"item-hover\">\n        <view class=\"item-left\">\n          <view class=\"item-icon icon-video\">\n            <text class=\"iconfont\">📹</text>\n          </view>\n          <view class=\"item-info\">\n            <text class=\"item-title\">视频客服</text>\n            <text class=\"item-desc\">在线视频咨询</text>\n          </view>\n        </view>\n        <text class=\"item-arrow\">›</text>\n      </navigator>\n\n      <navigator class=\"setting-item\" url=\"/pages/my/feedback\" hover-class=\"item-hover\">\n        <view class=\"item-left\">\n          <view class=\"item-icon icon-feedback\">\n            <text class=\"iconfont\">💬</text>\n          </view>\n          <view class=\"item-info\">\n            <text class=\"item-title\">意见反馈</text>\n            <text class=\"item-desc\">您的建议很重要</text>\n          </view>\n        </view>\n        <text class=\"item-arrow\">›</text>\n      </navigator>\n    </view>\n  </view>\n\n  <!-- 系统管理 -->\n  <view class=\"section-card\">\n    <view class=\"section-header\">\n      <view class=\"section-icon\">\n        <text class=\"icon-text\">⚙️</text>\n      </view>\n      <text class=\"section-title\">系统管理</text>\n    </view>\n    <view class=\"card-content\">\n      <view class=\"setting-item\" bindtap=\"clearStorage\">\n        <view class=\"item-left\">\n          <view class=\"item-icon icon-clear\">\n            <text class=\"iconfont\">🗑️</text>\n          </view>\n          <view class=\"item-info\">\n            <text class=\"item-title\">清除缓存</text>\n            <text class=\"item-desc\">释放存储空间</text>\n          </view>\n        </view>\n        <text class=\"item-arrow\">›</text>\n      </view>\n\n      <view class=\"setting-item\" bindtap=\"setEnableDebug\">\n        <view class=\"item-left\">\n          <view class=\"item-icon icon-debug\">\n            <text class=\"iconfont\">🔧</text>\n          </view>\n          <view class=\"item-info\">\n            <text class=\"item-title\">{{ enableDebug ? '关闭调试模式' : '打开调试模式' }}</text>\n            <text class=\"item-desc\">开发者选项</text>\n          </view>\n        </view>\n        <text class=\"item-arrow\">›</text>\n      </view>\n\n      <view class=\"setting-item\" bindtap=\"openSetting\">\n        <view class=\"item-left\">\n          <view class=\"item-icon icon-permission\">\n            <text class=\"iconfont\">🔐</text>\n          </view>\n          <view class=\"item-info\">\n            <text class=\"item-title\">权限与设置</text>\n            <text class=\"item-desc\">管理应用权限</text>\n          </view>\n        </view>\n        <text class=\"item-arrow\">›</text>\n      </view>\n    </view>\n  </view>\n\n  <!-- 关于版本 -->\n  <view class=\"section-card version-card\">\n    <view class=\"version-content\">\n      <view class=\"version-icon\">✨</view>\n      <view class=\"version-info\">\n        <text class=\"version-label\">当前版本</text>\n        <text class=\"version-number\">{{version}}</text>\n      </view>\n      <view class=\"version-tag\">最新版</view>\n    </view>\n  </view>\n\n  <!-- 底部装饰 -->\n  <view class=\"footer-decoration\">\n    <text class=\"footer-text\">感谢您的使用</text>\n  </view>\n</view>\n\n<!-- 为了兼容性，隐藏原有的van-cell -->\n<view style=\"display:none;\">\n  <van-cell title=\"关于我们\" is-link url=\"/pages/about/index\" />\n  <van-cell title=\"视频客服\" is-link url=\"/packageStreamMedia/pages/videoCall/videoCall\" />\n  <van-cell title=\"意见反馈\" is-link url=\"/pages/my/feedback\" />\n  <van-cell title=\"清除缓存\" is-link bind:click=\"clearStorage\" />\n  <van-cell title=\"{{ enableDebug ? '关闭调试模式' : '打开调试模式' }}\" is-link bind:click=\"setEnableDebug\" />\n  <van-cell title=\"权限与设置\" is-link bind:click=\"openSetting\" />\n  <van-cell title=\"当前版本\" value=\"{{version}}\" />\n</view>"
  },
  {
    "path": "pages/my/setting.wxss",
    "content": "/* 页面容器 */\n.setting-container {\n  min-height: 100vh;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  padding: 0 0 60rpx 0;\n}\n\n/* 头部区域 */\n.header-section {\n  position: relative;\n  padding: 80rpx 40rpx 60rpx;\n  text-align: center;\n  overflow: hidden;\n}\n\n.header-decoration {\n  position: absolute;\n  top: -100rpx;\n  right: -100rpx;\n  width: 400rpx;\n  height: 400rpx;\n  background: rgba(255, 255, 255, 0.1);\n  border-radius: 50%;\n  animation: float 6s ease-in-out infinite;\n}\n\n@keyframes float {\n  0%, 100% {\n    transform: translate(0, 0) scale(1);\n  }\n  50% {\n    transform: translate(-20rpx, 20rpx) scale(1.05);\n  }\n}\n\n.header-title {\n  display: block;\n  font-size: 56rpx;\n  font-weight: 700;\n  color: #ffffff;\n  letter-spacing: 4rpx;\n  margin-bottom: 12rpx;\n  text-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);\n}\n\n.header-subtitle {\n  display: block;\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.85);\n  letter-spacing: 2rpx;\n  font-weight: 300;\n}\n\n/* 分组卡片 */\n.section-card {\n  margin: 0 30rpx 32rpx;\n  background: #ffffff;\n  border-radius: 24rpx;\n  overflow: hidden;\n  box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.12);\n  transition: all 0.3s ease;\n}\n\n.section-card:active {\n  transform: scale(0.98);\n}\n\n/* 分组标题 */\n.section-header {\n  display: flex;\n  align-items: center;\n  padding: 32rpx 32rpx 24rpx;\n  background: linear-gradient(135deg, #f5f7fa 0%, #f8f9fb 100%);\n  border-bottom: 2rpx solid #f0f2f5;\n}\n\n.section-icon {\n  width: 56rpx;\n  height: 56rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 16rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-right: 20rpx;\n  box-shadow: 0 4rpx 16rpx rgba(102, 126, 234, 0.3);\n}\n\n.icon-text {\n  font-size: 32rpx;\n}\n\n.section-title {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #1a1a1a;\n  letter-spacing: 1rpx;\n}\n\n/* 卡片内容 */\n.card-content {\n  padding: 0 32rpx;\n}\n\n/* 设置项 */\n.setting-item {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 32rpx 0;\n  border-bottom: 1rpx solid #f0f2f5;\n  transition: all 0.3s ease;\n  position: relative;\n}\n\n.setting-item:last-child {\n  border-bottom: none;\n}\n\n.setting-item::before {\n  content: '';\n  position: absolute;\n  left: -32rpx;\n  top: 50%;\n  transform: translateY(-50%);\n  width: 6rpx;\n  height: 0;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 3rpx;\n  transition: height 0.3s ease;\n}\n\n.item-hover {\n  background: #f8f9fb;\n}\n\n.setting-item:active::before {\n  height: 60%;\n}\n\n.item-left {\n  display: flex;\n  align-items: center;\n  flex: 1;\n}\n\n/* 图标样式 */\n.item-icon {\n  width: 80rpx;\n  height: 80rpx;\n  border-radius: 20rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-right: 24rpx;\n  font-size: 36rpx;\n  position: relative;\n  overflow: hidden;\n}\n\n.item-icon::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);\n  z-index: 0;\n}\n\n.iconfont {\n  position: relative;\n  z-index: 1;\n}\n\n/* 不同图标的颜色 */\n.icon-about {\n  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);\n}\n\n.icon-video {\n  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);\n}\n\n.icon-feedback {\n  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);\n}\n\n.icon-clear {\n  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);\n}\n\n.icon-debug {\n  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);\n}\n\n.icon-permission {\n  background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);\n}\n\n/* 文字信息 */\n.item-info {\n  display: flex;\n  flex-direction: column;\n}\n\n.item-title {\n  font-size: 30rpx;\n  font-weight: 500;\n  color: #1a1a1a;\n  margin-bottom: 8rpx;\n  letter-spacing: 0.5rpx;\n}\n\n.item-desc {\n  font-size: 24rpx;\n  color: #999999;\n  font-weight: 300;\n}\n\n/* 箭头 */\n.item-arrow {\n  font-size: 48rpx;\n  color: #d0d0d0;\n  font-weight: 200;\n  transition: all 0.3s ease;\n}\n\n.setting-item:active .item-arrow {\n  color: #667eea;\n  transform: translateX(6rpx);\n}\n\n/* 版本卡片 */\n.version-card {\n  margin: 48rpx 30rpx 32rpx;\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);\n  border: 2rpx solid #f0f2f5;\n}\n\n.version-content {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 40rpx 32rpx;\n  position: relative;\n}\n\n.version-icon {\n  font-size: 48rpx;\n  margin-right: 24rpx;\n}\n\n.version-info {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n}\n\n.version-label {\n  font-size: 28rpx;\n  color: #666666;\n  margin-bottom: 8rpx;\n  font-weight: 400;\n}\n\n.version-number {\n  font-size: 36rpx;\n  font-weight: 600;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  -webkit-background-clip: text;\n  -webkit-text-fill-color: transparent;\n  background-clip: text;\n  letter-spacing: 1rpx;\n}\n\n.version-tag {\n  padding: 8rpx 20rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  color: #ffffff;\n  font-size: 22rpx;\n  border-radius: 20rpx;\n  font-weight: 500;\n  box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);\n}\n\n/* 底部装饰 */\n.footer-decoration {\n  padding: 60rpx 40rpx 40rpx;\n  text-align: center;\n}\n\n.footer-text {\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.7);\n  letter-spacing: 2rpx;\n  font-weight: 300;\n}\n\n/* 保留原有的btn类以防万一 */\n.btn {\n  padding: 32rpx;\n}\n\n/* Navigator组件重置 */\nnavigator {\n  display: block;\n  text-decoration: none;\n}\n\nnavigator.setting-item {\n  color: inherit;\n}"
  },
  {
    "path": "pages/my/user-code.js",
    "content": "const WXAPI = require('apifm-wxapi')\nimport wxbarcode from 'wxbarcode'\n\nPage({\n  data: {\n    balance: 0,\n    freeze: 0,\n    score: 0,\n    growth: 0,\n    userCode: undefined\n  },\n  onLoad(e) {\n    this.getUserAmount()\n    this.dynamicUserCode()\n  },\n  onShow: function () {\n  },\n  async getUserAmount() {\n    const res = await WXAPI.userAmount(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      this.setData({\n        balance: res.data.balance,\n        freeze: res.data.freeze,\n        score: res.data.score,\n        growth: res.data.growth\n      })\n    }\n  },\n  async dynamicUserCode() {\n    const res = await WXAPI.dynamicUserCode(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      this.setData({\n        userCode: res.data\n      })\n      wxbarcode.barcode('barcode', res.data, 560, 200);\n      wxbarcode.qrcode('qrcode', res.data, 480, 480);\n    }\n  },\n  onPullDownRefresh() {\n    this.getUserAmount()\n    this.dynamicUserCode()\n    wx.stopPullDownRefresh()\n  },\n})"
  },
  {
    "path": "pages/my/user-code.json",
    "content": "{\n  \"navigationBarTitleText\": \"会员码\",\n  \"enablePullDownRefresh\": true\n}"
  },
  {
    "path": "pages/my/user-code.wxml",
    "content": "<view class=\"page-container\">\n  <!-- 顶部装饰区域 -->\n  <view class=\"header-decoration\">\n    <view class=\"decoration-circle circle-1\"></view>\n    <view class=\"decoration-circle circle-2\"></view>\n    <view class=\"decoration-circle circle-3\"></view>\n  </view>\n\n  <!-- 会员卡片 -->\n  <view class=\"membership-card\">\n    <view class=\"card-header\">\n      <view class=\"card-title\">会员专享码</view>\n      <view class=\"card-subtitle\">MEMBERSHIP CODE</view>\n    </view>\n    \n    <!-- 会员码编号 -->\n    <view class=\"code-number\">\n      <view class=\"code-label\">会员编号</view>\n      <view class=\"code-value\">{{ userCode }}</view>\n    </view>\n    \n    <!-- 二维码区域 -->\n    <view class=\"qrcode-container\">\n      <view class=\"qrcode-wrapper\">\n        <canvas class=\"user-code\" canvas-id=\"qrcode\" />\n        <view class=\"qrcode-corners\">\n          <view class=\"corner corner-tl\"></view>\n          <view class=\"corner corner-tr\"></view>\n          <view class=\"corner corner-bl\"></view>\n          <view class=\"corner corner-br\"></view>\n        </view>\n      </view>\n      <view class=\"scan-tip\">请向商家出示此码</view>\n    </view>\n    \n    <!-- 条形码区域 -->\n    <view class=\"barcode-container\">\n      <canvas class=\"user-code-bar\" canvas-id=\"barcode\" />\n    </view>\n  </view>\n\n  <!-- 资产卡片 -->\n  <view class=\"assets-card\">\n    <view class=\"assets-title\">我的资产</view>\n    <view class=\"assets-grid\">\n      <view class=\"asset-item\">\n        <view class=\"asset-icon balance-icon\">\n          <text class=\"icon-text\">¥</text>\n        </view>\n        <view class=\"asset-value\">{{ balance }}</view>\n        <view class=\"asset-label\">账户余额</view>\n      </view>\n      <view class=\"asset-divider\"></view>\n      <view class=\"asset-item\">\n        <view class=\"asset-icon points-icon\">\n          <text class=\"icon-text\">★</text>\n        </view>\n        <view class=\"asset-value\">{{ score }}</view>\n        <view class=\"asset-label\">积分</view>\n      </view>\n    </view>\n  </view>\n\n  <!-- 底部提示 -->\n  <view class=\"bottom-tips\">\n    <view class=\"tip-item\">\n      <text class=\"tip-icon\">✓</text>\n      <text class=\"tip-text\">支持扫码支付</text>\n    </view>\n    <view class=\"tip-item\">\n      <text class=\"tip-icon\">✓</text>\n      <text class=\"tip-text\">积分自动累积</text>\n    </view>\n  </view>\n</view>"
  },
  {
    "path": "pages/my/user-code.wxss",
    "content": "page {\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  min-height: 100vh;\n  padding-bottom: 60rpx;\n}\n\n.page-container {\n  position: relative;\n  min-height: 100vh;\n  overflow: hidden;\n}\n\n/* 顶部装饰 */\n.header-decoration {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  height: 400rpx;\n  overflow: hidden;\n  z-index: 0;\n}\n\n.decoration-circle {\n  position: absolute;\n  border-radius: 50%;\n  background: rgba(255, 255, 255, 0.1);\n  animation: float 6s ease-in-out infinite;\n}\n\n.circle-1 {\n  width: 300rpx;\n  height: 300rpx;\n  top: -100rpx;\n  right: -50rpx;\n  animation-delay: 0s;\n}\n\n.circle-2 {\n  width: 200rpx;\n  height: 200rpx;\n  top: 150rpx;\n  left: -80rpx;\n  animation-delay: 2s;\n}\n\n.circle-3 {\n  width: 150rpx;\n  height: 150rpx;\n  top: 50rpx;\n  left: 50%;\n  animation-delay: 4s;\n}\n\n@keyframes float {\n  0%, 100% {\n    transform: translateY(0) scale(1);\n    opacity: 0.3;\n  }\n  50% {\n    transform: translateY(-30rpx) scale(1.1);\n    opacity: 0.5;\n  }\n}\n\n/* 会员卡片 */\n.membership-card {\n  position: relative;\n  margin: 40rpx 30rpx;\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);\n  border-radius: 32rpx;\n  padding: 50rpx 40rpx 60rpx;\n  box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.15),\n              0 8rpx 20rpx rgba(0, 0, 0, 0.1);\n  z-index: 1;\n  overflow: hidden;\n}\n\n.membership-card::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  height: 8rpx;\n  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);\n}\n\n.card-header {\n  text-align: center;\n  margin-bottom: 40rpx;\n  padding-bottom: 30rpx;\n  border-bottom: 2rpx solid #f0f0f0;\n}\n\n.card-title {\n  font-size: 40rpx;\n  font-weight: 700;\n  color: #2c3e50;\n  letter-spacing: 4rpx;\n  margin-bottom: 12rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  -webkit-background-clip: text;\n  -webkit-text-fill-color: transparent;\n  background-clip: text;\n}\n\n.card-subtitle {\n  font-size: 22rpx;\n  color: #95a5a6;\n  letter-spacing: 6rpx;\n  font-weight: 500;\n}\n\n/* 会员码编号 */\n.code-number {\n  text-align: center;\n  margin-bottom: 40rpx;\n  padding: 24rpx;\n  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);\n  border-radius: 16rpx;\n  border: 2rpx dashed #d0d7de;\n}\n\n.code-label {\n  font-size: 24rpx;\n  color: #6c757d;\n  margin-bottom: 8rpx;\n}\n\n.code-value {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #495057;\n  letter-spacing: 4rpx;\n  font-family: 'Courier New', monospace;\n}\n\n/* 二维码容器 */\n.qrcode-container {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  margin: 40rpx 0;\n}\n\n.qrcode-wrapper {\n  position: relative;\n  padding: 30rpx;\n  background: #ffffff;\n  border-radius: 24rpx;\n  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08),\n              inset 0 2rpx 4rpx rgba(255, 255, 255, 0.9);\n}\n\n.user-code {\n  width: 480rpx;\n  height: 480rpx;\n  display: block;\n  border-radius: 16rpx;\n}\n\n/* 二维码四角装饰 */\n.qrcode-corners {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  pointer-events: none;\n}\n\n.corner {\n  position: absolute;\n  width: 50rpx;\n  height: 50rpx;\n  border-color: #667eea;\n  border-style: solid;\n}\n\n.corner-tl {\n  top: 20rpx;\n  left: 20rpx;\n  border-width: 6rpx 0 0 6rpx;\n  border-radius: 24rpx 0 0 0;\n}\n\n.corner-tr {\n  top: 20rpx;\n  right: 20rpx;\n  border-width: 6rpx 6rpx 0 0;\n  border-radius: 0 24rpx 0 0;\n}\n\n.corner-bl {\n  bottom: 20rpx;\n  left: 20rpx;\n  border-width: 0 0 6rpx 6rpx;\n  border-radius: 0 0 0 24rpx;\n}\n\n.corner-br {\n  bottom: 20rpx;\n  right: 20rpx;\n  border-width: 0 6rpx 6rpx 0;\n  border-radius: 0 0 24rpx 0;\n}\n\n.scan-tip {\n  margin-top: 24rpx;\n  font-size: 26rpx;\n  color: #6c757d;\n  letter-spacing: 2rpx;\n}\n\n/* 条形码容器 */\n.barcode-container {\n  display: flex;\n  justify-content: center;\n  margin-top: 40rpx;\n  padding: 20rpx;\n  background: #ffffff;\n  border-radius: 16rpx;\n  box-shadow: inset 0 2rpx 8rpx rgba(0, 0, 0, 0.05);\n}\n\n.user-code-bar {\n  width: 560rpx;\n  height: 160rpx;\n  display: block;\n}\n\n/* 资产卡片 */\n.assets-card {\n  margin: 30rpx 30rpx 0;\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);\n  border-radius: 32rpx;\n  padding: 40rpx;\n  box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.15),\n              0 8rpx 20rpx rgba(0, 0, 0, 0.1);\n  z-index: 1;\n  position: relative;\n}\n\n.assets-title {\n  font-size: 32rpx;\n  font-weight: 700;\n  color: #2c3e50;\n  margin-bottom: 32rpx;\n  text-align: center;\n  letter-spacing: 2rpx;\n}\n\n.assets-grid {\n  display: flex;\n  align-items: center;\n  justify-content: space-around;\n}\n\n.asset-item {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  padding: 24rpx;\n}\n\n.asset-divider {\n  width: 2rpx;\n  height: 120rpx;\n  background: linear-gradient(180deg, transparent 0%, #e9ecef 50%, transparent 100%);\n}\n\n.asset-icon {\n  width: 88rpx;\n  height: 88rpx;\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-bottom: 16rpx;\n  box-shadow: 0 8rpx 16rpx rgba(0, 0, 0, 0.1);\n  position: relative;\n  overflow: hidden;\n}\n\n.asset-icon::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: rgba(255, 255, 255, 0.3);\n  transform: translateX(-100%);\n  transition: transform 0.6s;\n}\n\n.balance-icon {\n  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);\n}\n\n.points-icon {\n  background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);\n}\n\n.icon-text {\n  font-size: 40rpx;\n  color: #ffffff;\n  font-weight: 700;\n  z-index: 1;\n}\n\n.asset-value {\n  font-size: 44rpx;\n  font-weight: 700;\n  color: #2c3e50;\n  margin-bottom: 8rpx;\n  letter-spacing: 2rpx;\n}\n\n.asset-label {\n  font-size: 24rpx;\n  color: #6c757d;\n  letter-spacing: 1rpx;\n}\n\n/* 底部提示 */\n.bottom-tips {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  margin: 40rpx 30rpx;\n  padding: 32rpx;\n  background: rgba(255, 255, 255, 0.15);\n  backdrop-filter: blur(20rpx);\n  border-radius: 24rpx;\n  border: 2rpx solid rgba(255, 255, 255, 0.3);\n}\n\n.tip-item {\n  display: flex;\n  align-items: center;\n  margin: 0 20rpx;\n}\n\n.tip-icon {\n  font-size: 28rpx;\n  color: #ffffff;\n  margin-right: 8rpx;\n  font-weight: 700;\n}\n\n.tip-text {\n  font-size: 24rpx;\n  color: #ffffff;\n  letter-spacing: 1rpx;\n}"
  },
  {
    "path": "pages/notagree/index.js",
    "content": "Page({\n  data: {\n\n  },\n  onLoad: function (options) {\n\n  },\n  onShow: function () {\n\n  },\n})"
  },
  {
    "path": "pages/notagree/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"很抱歉～\"\n}"
  },
  {
    "path": "pages/notagree/index.wxml",
    "content": "<view class=\"notagree\">\n  <view class=\"title\">Oops!</view>\n  <view class=\"profile\">\n    很遗憾，若您不同意《用户协议》和《隐私协议》，将无法继续使用我们的服务。\n  </view>\n  <image class=\"img\" width=\"100%\" mode=\"widthFix\" src=\"https://7.s2m.cc/2021/11/30/efd832a3-5184-4c22-af64-728999a90add.png\"></image>\n</view>"
  },
  {
    "path": "pages/notagree/index.wxss",
    "content": ".notagree {\n\tpadding: 64rpx;\n}\n.title {\n  font-size: 100rpx;\n  font-weight: bold;\n}\n.profile {\n  margin-top: 64rpx;\n  color: #666;\n  line-height: 48rpx;\n}\n.img {\n  margin-top: 64rpx;\n}"
  },
  {
    "path": "pages/notice/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function (options) {\n    WXAPI.noticeList().then(res => {\n      this.setData({\n        noticeList: res.data.dataList\n      })\n    })\n  },\n  onShow: function () {\n\n  },\n})"
  },
  {
    "path": "pages/notice/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"公告\"\n}"
  },
  {
    "path": "pages/notice/index.wxml",
    "content": "<navigator wx:for=\"{{noticeList}}\" wx:key=\"id\" url=\"/pages/notice/show?id={{item.id}}\">\n  <view class='cashlogs'>\n    <view class='profile'>\n      <view class='typeStr'>{{item.title}}</view>\n      <view class='dateAdd'>{{ item.dateAdd }}</view>\n    </view>\n    <view class='amount'> 查看 > </view>\n  </view>\n</navigator>"
  },
  {
    "path": "pages/notice/index.wxss",
    "content": "page {\n  background-color: #f3f4f5;\n}\n.no-order {\n  margin-top: 96rpx;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n\n.no-order image {\n  width: 294rpx;\n  height: 310rpx;\n}\n\n.no-order view {\n  margin-top: 30rpx;\n  font-family: PingFangSC-Medium;\n  font-size: 30rpx;\n  color: #333;\n  letter-spacing: 0;\n}\n\n.cashlogs {\n  width: 702rpx;\n  margin-top: 24rpx;  \n  margin-left: 24rpx;  \n  height: 148rpx;\n  background: #FFFFFF;\n  box-shadow: 0 0 16rpx 0 rgba(36,44,69,0.20);\n  border-radius: 8rpx;\n\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n.cashlogs .profile {\n  display: flex;\n  flex-direction: column;\n  margin-left: 24rpx;\n}\n.cashlogs .amount {\n  font-size: 24rpx;\n  color: #FEB21C;\n  margin-right: 24rpx;\n  flex-shrink: 0;\n}\n.cashlogs .profile .typeStr {\n  font-size: 30rpx;\n  color: #333333;\n}\n.cashlogs .profile .dateAdd {\n  margin-top: 16rpx;\n  font-size: 24rpx;\n  color: #999999;\n}\n.bottom {\n  width: 100vw;\n  height: 24rpx;\n}"
  },
  {
    "path": "pages/notice/show.js",
    "content": "const app = getApp();\nconst WXAPI = require('apifm-wxapi')\nPage({\n  data: {\n  \n  },\n  onLoad: function (options) {\n    var that = this;\n    WXAPI.noticeDetail(options.id).then(function (res) {\n      if (res.code == 0) {\n        that.setData({\n          notice: res.data\n        });\n      }\n    })\n  },\n  onShareAppMessage() {\n  },\n  onShareTimeline() {    \n    return {\n      title: this.data.notice.title,\n      query: 'id=' + this.data.notice.id,\n      imageUrl: wx.getStorageSync('share_pic')\n    }\n  },\n  subscribe() {\n    const notice_subscribe_ids = wx.getStorageSync('notice_subscribe_ids')\n    if (notice_subscribe_ids) {\n      wx.requestSubscribeMessage({\n        tmplIds: notice_subscribe_ids.split(','),\n        success(res) {\n          wx.showToast({\n            title: '订阅成功',\n          })\n        },\n        fail(err) {\n          console.error(err)\n        },\n      })\n    }\n  },\n})"
  },
  {
    "path": "pages/notice/show.json",
    "content": "{\n  \"navigationBarTitleText\": \"公告详情\"\n}"
  },
  {
    "path": "pages/notice/show.wxml",
    "content": "<view class=\"notice\">\n  <view class=\"title\">{{notice.title}}</view>\n  <van-cell title=\"订阅最新公告、活动提醒，不错过最新优惠信息~\" is-link bind:click=\"subscribe\" />\n  <view class=\"text\">\n    <mp-html content=\"{{notice.content}}\" />\n  </view>\n</view>"
  },
  {
    "path": "pages/notice/show.wxss",
    "content": ".notice {\n  padding: 32rpx;\n  font-size: 26rpx;\n  color: #333;\n}\n.title {\n  width: 100%;\n  font-weight: bold;\n  border-bottom: 1rpx solid #eaeaea;\n  padding-bottom: 32rpx;\n}\n.text {\n  margin-top: 32rpx;\n  line-height: 64rpx;\n}\n.text image {\n  max-width: 100%;\n}"
  },
  {
    "path": "pages/order/refundApply.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst CONFIG = require('../../config.js')\nPage({\n  data: {\n    autosize: {\n      minHeight: 100\n    },\n    orderId: 1,\n    number: 0,\n    amount: 999.00,\n\n    type: '0',\n    typeItems: [\n      { name: '我要退款(无需退货)', value: '0', checked: true },\n      { name: '我要退货退款', value: '1' },\n      { name: '我要换货', value: '2' },\n    ],\n\n    logisticsStatus:'0',\n    logisticsStatusItems: [\n      { name: '未收到货', value: '0', checked: true },\n      { name: '已收到货', value: '1' }\n    ],\n\n    reason: '不喜欢/不想要',\n    reasons: [\n      \"不喜欢/不想要\", \n      \"空包裹\", \n      \"未按约定时间发货\",\n      \"快递/物流一直未送达\",\n      \"货物破损已拒签\",\n      \"退运费\",\n      \"规格尺寸与商品页面描述不符\",\n      \"功能/效果不符\",\n      \"质量问题\",\n      \"少件/漏发\",\n      \"包装/商品破损\",\n      \"发票问题\",\n      ],\n    reasonIndex: 0,\n\n    files: [],\n    pics: [],\n    \n    // 快递信息弹窗\n    logisticsDialogShow: false,\n    shipperName: '',\n    trackingNumber: ''\n  },\n  onLoad: function (e) {\n    this.setData({\n      orderId: e.id,\n      amount: e.amount,\n      customerServiceType: CONFIG.customerServiceType,\n    })\n    this.orderDetail()\n  },\n  onShow(){\n  },\n  async orderDetail() {\n    const token = wx.getStorageSync('token')\n    const res = await WXAPI.orderDetail(token, this.data.orderId)\n    if (res.code != 0) {\n      wx.showModal({\n        content: res.msg,\n        success: (res) => {\n          wx.navigateBack()\n        }\n      })\n      return\n    }\n    res.data.goods.forEach(ele => {\n      if (ele.afterSale) {\n        ele.afterSale.split(',').forEach(a => {\n          ele['afterSale' + a] = true\n        })\n      }\n    })\n    // 读取已申请售后记录\n    const res2 = await WXAPI.refundApplyDetail(token, this.data.orderId)\n    let refundApplyList = []\n    if (res2.code == 0) {\n      res2.data.forEach(ele => {\n        ele.goodInfo = res.data.goods.find(g => g.id == ele.baseInfo.orderGoodsId)\n        console.log(ele.goodInfo);\n      })\n      refundApplyList = res2.data\n    }\n    this.setData({\n      goods: res.data.goods,\n      refundApplyList\n    })\n  },\n  async refundApplyCancel(){\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.refundApplyCancel(wx.getStorageSync('token'), this.data.curRufund.baseInfo.orderId, this.data.curRufund.baseInfo.orderGoodsId)\n    wx.hideLoading()\n    if (res.code == 0) {\n      wx.showToast({\n        title: '已取消',\n      })\n      this.popClose()\n      this.orderDetail()\n    } else {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    }\n  },\n  typeChange(event) {\n    this.setData({\n      type: event.detail,\n    });\n  },\n  typeClick(event) {\n    const { name } = event.currentTarget.dataset;\n    this.setData({\n      type: name,\n    });\n  },\n  logisticsStatusChange(event) {\n    this.setData({\n      logisticsStatus: event.detail,\n    });\n  },\n  logisticsStatusClick(event) {\n    const { name } = event.currentTarget.dataset;\n    this.setData({\n      logisticsStatus: name,\n    });\n  },\n  reasonChange(event) {\n    this.setData({\n      reason: event.detail,\n    });\n  },\n  reasonClick(event) {\n    const { name } = event.currentTarget.dataset;\n    this.setData({\n      reason: name,\n    });\n  },\n  reasonChange: function (e) {\n    this.setData({\n      reasonIndex: e.detail.value\n    })\n  },\n  afterPicRead(e) {\n    let picsList = this.data.picsList\n    if (!picsList) {\n      picsList = []\n    }\n    picsList = picsList.concat(e.detail.file)\n    this.setData({\n      picsList\n    })\n  },\n  afterPicDel(e) {\n    let picsList = this.data.picsList\n    picsList.splice(e.detail.index, 1)\n    this.setData({\n      picsList\n    })\n  },\n  previewImage: function (e) {\n    const that = this;\n    wx.previewImage({\n      current: e.currentTarget.id, // 当前显示图片的http链接\n      urls: that.data.files // 需要预览的图片http链接列表\n    })\n  },\n  async bindSave () {\n    let amount = this.data.curGoods.amountSingle * this.data.number\n    if (this.data.type == 2) {\n      // 换货金额为0\n      amount = 0.00\n    }\n    wx.showLoading({\n      title: '',\n    })\n    // 批量上传附件\n    if (this.data.picsList) {\n      for (let index = 0; index < this.data.picsList.length; index++) {\n        const pic = this.data.picsList[index];\n        const res = await WXAPI.uploadFileV2(wx.getStorageSync('token'), pic.url)\n        if (res.code == 0) {\n          this.data.pics.push(res.data.url)\n        }\n      }\n    }\n    const res = await WXAPI.refundApply({\n      token: wx.getStorageSync('token'),\n      orderId: this.data.orderId,\n      orderGoodsId: this.data.curGoods.id,\n      type: this.data.type,\n      logisticsStatus: this.data.logisticsStatus,\n      reason: this.data.reason,\n      number: this.data.number,\n      amount,\n      remark: this.data.remark || '',\n      pic: this.data.pics.join()\n    })\n    wx.hideLoading()\n    if (res.code == 20000) {\n      wx.showModal({\n        content: '当前商品正在售后中，如需重新申请，请先撤销之前的售后申请',\n        showCancel: false\n      })\n      return\n    }\n    if (res.code == 0) {\n      wx.showModal({\n        content: '提交成功，请耐心等待我们处理！',\n        showCancel: false,\n        success: res => {\n          wx.navigateBack()\n        }\n      })\n    } else {\n      wx.showModal({\n        content: res.msg,\n        showCancel: false,\n        success: res => {\n          wx.navigateBack()\n        }\n      })\n    }\n  },\n  goodsClick(e) {\n    const goodsIndex = e.currentTarget.dataset.name\n    const curGoods = this.data.goods[goodsIndex]\n    if (!curGoods || !curGoods.afterSale) {\n      return\n    }\n    this.setData({\n      goodsIndex,\n      curGoods,\n      number: curGoods.number\n    })\n  },\n  numberChange(e) {\n    let number = e.detail\n    if (!number) {\n      return\n    }\n    if (number > this.data.curGoods.number) {\n      number = this.data.curGoods.number\n    }\n    this.setData({\n      number\n    })\n  },\n  refundDetail(e) {\n    const index = e.currentTarget.dataset.idx\n    const curRufund = this.data.refundApplyList[index]\n    const imageList = []\n    if (curRufund.pics) {\n      curRufund.pics.forEach(ele => {\n        imageList.push(ele.pic + '_m')\n      })\n    }\n    let logisticsContent = curRufund.baseInfo.logisticsContent\n    if (logisticsContent) {\n      logisticsContent = JSON.parse(logisticsContent)\n    }\n    this.setData({\n      popShow: true,\n      curRufund,\n      imageList,\n      logisticsContent\n    })\n  },\n  popClose() {\n    this.setData({\n      popShow: false\n    })\n  },\n  previewImageimageList(e) {\n    console.log(e);\n    wx.previewImage({\n      current: e.currentTarget.dataset.current,\n      urls: this.data.imageList,\n    })\n  },\n  customerService() {\n    wx.openCustomerServiceChat({\n      extInfo: {url: wx.getStorageSync('customerServiceChatUrl')},\n      corpId: wx.getStorageSync('customerServiceChatCorpId'),\n      success: res => {},\n      fail: err => {\n        console.error(err)\n      }\n    })\n  },\n  // 显示快递信息输入弹窗\n  showLogisticsDialog() {\n    this.setData({\n      logisticsDialogShow: true,\n      shipperName: '',\n      trackingNumber: ''\n    })\n  },\n  // 关闭快递信息输入弹窗\n  closeLogisticsDialog() {\n    this.setData({\n      logisticsDialogShow: false,\n      shipperName: '',\n      trackingNumber: ''\n    })\n  },\n  // 提交快递信息\n  async submitLogistics() {\n    const { shipperName, trackingNumber } = this.data\n    \n    // 验证输入\n    if (!shipperName || !shipperName.trim()) {\n      wx.showToast({\n        title: '请输入快递公司名称',\n        icon: 'none'\n      })\n      return\n    }\n    \n    if (!trackingNumber || !trackingNumber.trim()) {\n      wx.showToast({\n        title: '请输入快递单号',\n        icon: 'none'\n      })\n      return\n    }\n    \n    wx.showLoading({\n      title: '提交中...',\n    })\n    // https://www.yuque.com/apifm/nu0f75/eckfsmlf1yhi5fn4\n    const res = await WXAPI.refundApplySetBackLogistics({\n      token: wx.getStorageSync('token'),\n      orderId: this.data.curRufund.baseInfo.orderId,\n      applyId: this.data.curRufund.baseInfo.id,\n      shipperName: shipperName.trim(),\n      trackingNumber: trackingNumber.trim()\n    })\n    \n    wx.hideLoading()\n    \n    if (res.code == 0) {\n      wx.showToast({\n        title: '提交成功',\n        icon: 'success'\n      })\n      // 关闭弹窗\n      this.closeLogisticsDialog()\n      // 刷新售后详情\n      this.orderDetail()\n      // 关闭详情弹窗\n      this.popClose()\n    } else {\n      wx.showToast({\n        title: res.msg || '提交失败',\n        icon: 'none'\n      })\n    }\n  }\n});"
  },
  {
    "path": "pages/order/refundApply.json",
    "content": "{\n  \"navigationBarTitleText\": \"申请售后\"\n}"
  },
  {
    "path": "pages/order/refundApply.wxml",
    "content": "<view class=\"refund-container\">\n  <!-- 我的售后记录 -->\n  <view class=\"refund-history\" wx:if=\"{{ refundApplyList && refundApplyList.length > 0 }}\">\n    <view class=\"section-title\">\n      <view class=\"title-line\"></view>\n      <text class=\"title-text\">我的售后</text>\n    </view>\n    <view class=\"history-list\">\n      <view class=\"history-item\" wx:for=\"{{ refundApplyList }}\" wx:key=\"id\" data-idx=\"{{ index }}\" bind:tap=\"refundDetail\">\n        <view class=\"history-goods\">\n          <image class=\"goods-image\" src=\"{{ item.goodInfo.pic }}_m\" mode=\"aspectFill\"></image>\n          <view class=\"goods-info\">\n            <view class=\"goods-name\">{{ item.goodInfo.goodsName }}</view>\n            <view class=\"goods-meta\">\n              <text class=\"goods-num\">x{{ item.baseInfo.number }}</text>\n              <text class=\"goods-price\">¥{{ item.baseInfo.amount }}</text>\n            </view>\n            <view class=\"apply-time\">申请时间：{{ item.baseInfo.dateAdd }}</view>\n          </view>\n        </view>\n        <view class=\"history-status\">\n          <text class=\"status-text\">{{ item.baseInfo.statusStr }}</text>\n          <view class=\"arrow-icon\">›</view>\n        </view>\n      </view>\n    </view>\n  </view>\n\n  <!-- 选择商品 -->\n  <view class=\"section-card\">\n    <view class=\"section-title\">\n      <view class=\"title-line\"></view>\n      <text class=\"title-text\">选择需要售后的商品</text>\n    </view>\n    <van-radio-group value=\"{{ goodsIndex }}\">\n      <view class=\"goods-list\">\n        <view class=\"goods-item {{ !item.afterSale ? 'disabled' : '' }}\" wx:for=\"{{ goods }}\" wx:key=\"id\" data-name=\"{{ index }}\" bind:tap=\"goodsClick\">\n          <view class=\"goods-content\">\n            <view class=\"goods-name-text\">{{ item.goodsName }}</view>\n            <view class=\"not-support\" wx:if=\"{{ !item.afterSale }}\">该商品不支持售后</view>\n          </view>\n          <van-radio name=\"{{ index }}\" disabled=\"{{ !item.afterSale }}\" checked-color=\"#E4393C\" />\n        </view>\n      </view>\n    </van-radio-group>\n  </view>\n\n  <!-- 商品预览 -->\n  <view class=\"section-card\" wx:if=\"{{ curGoods }}\">\n    <view class=\"section-title\">\n      <view class=\"title-line\"></view>\n      <text class=\"title-text\">商品信息</text>\n    </view>\n    <view class=\"goods-preview\">\n      <image class=\"preview-image\" src=\"{{ curGoods.pic }}_m\" mode=\"aspectFill\"></image>\n      <view class=\"preview-info\">\n        <view class=\"preview-name\">{{ curGoods.goodsName }}</view>\n        <view class=\"preview-price\">¥{{ curGoods.amount }}</view>\n      </view>\n    </view>\n    <view class=\"quantity-selector\">\n      <text class=\"selector-label\">退货数量</text>\n      <van-stepper value=\"{{ number }}\" integer min=\"1\" max=\"{{ curGoods.number }}\" bind:change=\"numberChange\" button-size=\"36rpx\" input-width=\"80rpx\" />\n    </view>\n  </view>\n\n  <!-- 售后类型 -->\n  <view class=\"section-card\" wx:if=\"{{ curGoods }}\">\n    <view class=\"section-title\">\n      <view class=\"title-line\"></view>\n      <text class=\"title-text\">售后类型</text>\n    </view>\n    <van-radio-group value=\"{{ type }}\" bind:change=\"typeChange\">\n      <view class=\"option-list\">\n        <block wx:for=\"{{typeItems}}\" wx:key=\"*this\">\n          <view class=\"option-item\" wx:if=\"{{ curGoods['afterSale' + index] }}\" data-name=\"{{ item.value }}\" bind:tap=\"typeClick\">\n            <text class=\"option-text\">{{ item.name }}</text>\n            <van-radio name=\"{{ item.value }}\" checked-color=\"#E4393C\" />\n          </view>\n        </block>\n      </view>\n    </van-radio-group>\n  </view>\n\n  <!-- 货物状态 -->\n  <view class=\"section-card\" wx:if=\"{{ curGoods && type == 0 }}\">\n    <view class=\"section-title\">\n      <view class=\"title-line\"></view>\n      <text class=\"title-text\">货物状态</text>\n    </view>\n    <van-radio-group value=\"{{ logisticsStatus }}\" bind:change=\"logisticsStatusChange\">\n      <view class=\"option-list\">\n        <view class=\"option-item\" wx:for=\"{{logisticsStatusItems}}\" wx:key=\"value\" data-name=\"{{ item.value }}\" bind:tap=\"logisticsStatusClick\">\n          <text class=\"option-text\">{{ item.name }}</text>\n          <van-radio name=\"{{ item.value }}\" checked-color=\"#E4393C\" />\n        </view>\n      </view>\n    </van-radio-group>\n  </view>\n\n  <!-- 售后原因 -->\n  <view class=\"section-card\" wx:if=\"{{ curGoods }}\">\n    <view class=\"section-title\">\n      <view class=\"title-line\"></view>\n      <text class=\"title-text\">售后原因</text>\n    </view>\n    <van-radio-group value=\"{{ reason }}\" bind:change=\"reasonChange\">\n      <view class=\"reason-list\">\n        <view class=\"reason-item\" wx:for=\"{{reasons}}\" wx:key=\"value\" data-name=\"{{ item }}\" bind:tap=\"reasonClick\">\n          <text class=\"reason-text\">{{ item }}</text>\n          <van-radio name=\"{{ item }}\" checked-color=\"#E4393C\" />\n        </view>\n      </view>\n    </van-radio-group>\n  </view>\n\n  <!-- 售后说明 -->\n  <view class=\"section-card\" wx:if=\"{{ curGoods }}\">\n    <view class=\"section-title\">\n      <view class=\"title-line\"></view>\n      <text class=\"title-text\">售后说明</text>\n      <text class=\"title-tip\">（选填）</text>\n    </view>\n    <view class=\"remark-box\">\n      <textarea class=\"remark-input\" model:value=\"{{ remark }}\" placeholder=\"请详细描述您的问题，有助于我们更快处理\" placeholder-class=\"remark-placeholder\" maxlength=\"500\" auto-height></textarea>\n    </view>\n  </view>\n\n  <!-- 上传图片 -->\n  <view class=\"section-card\" wx:if=\"{{ curGoods }}\">\n    <view class=\"section-title\">\n      <view class=\"title-line\"></view>\n      <text class=\"title-text\">上传凭证</text>\n      <text class=\"title-tip\">（选填，最多9张）</text>\n    </view>\n    <view class=\"upload-box\">\n      <van-uploader\n        accept=\"image\"\n        multiple\n        max-count=\"9\"\n        upload-text=\"上传图片\"\n        image-fit=\"aspectFill\"\n        file-list=\"{{ picsList }}\"\n        bind:after-read=\"afterPicRead\"\n        bind:delete=\"afterPicDel\"\n      />\n    </view>\n  </view>\n\n  <!-- 提交按钮 -->\n  <view class=\"submit-box\" wx:if=\"{{ curGoods }}\">\n    <button class=\"submit-btn\" bind:tap=\"bindSave\">提交申请</button>\n  </view>\n\n  <!-- 底部安全区 -->\n  <view class=\"safe-area\"></view>\n</view>\n\n<!-- 售后详情弹窗 -->\n<van-popup show=\"{{ popShow }}\" position=\"bottom\" round custom-style=\"max-height: 85vh; background: #F5F5F5;\" bind:close=\"popClose\">\n  <view class=\"popup-container\">\n    <!-- 标题栏 -->\n    <view class=\"popup-header\">\n      <text class=\"popup-title\">售后详情</text>\n      <view class=\"popup-close\" bind:tap=\"popClose\">✕</view>\n    </view>\n\n    <!-- 商品信息 -->\n    <view class=\"popup-goods\">\n      <image class=\"popup-goods-image\" src=\"{{ curRufund.goodInfo.pic }}_m\" mode=\"aspectFill\"></image>\n      <view class=\"popup-goods-info\">\n        <view class=\"popup-goods-name\">{{ curRufund.goodInfo.goodsName }}</view>\n        <view class=\"popup-goods-meta\">\n          <text class=\"popup-goods-num\">x{{ curRufund.baseInfo.number }}</text>\n          <text class=\"popup-goods-price\">¥{{ curRufund.baseInfo.amount }}</text>\n        </view>\n      </view>\n    </view>\n\n    <!-- 状态提示 -->\n    <view class=\"popup-notice {{ curRufund.baseInfo.status == 4 ? 'success' : curRufund.baseInfo.status == 2 ? 'error' : 'info' }}\">\n      <view class=\"notice-icon\">\n        <text wx:if=\"{{curRufund.baseInfo.status == 0}}\">⏱</text>\n        <text wx:if=\"{{curRufund.baseInfo.status == 2}}\">✕</text>\n        <text wx:if=\"{{curRufund.baseInfo.status == 3}}\">⚙</text>\n        <text wx:if=\"{{curRufund.baseInfo.status == 4}}\">✓</text>\n      </view>\n      <text class=\"notice-text\" wx:if=\"{{curRufund.baseInfo.status == 0}}\">已申请，等待商家处理，请耐心等待</text>\n      <text class=\"notice-text\" wx:if=\"{{curRufund.baseInfo.status == 2}}\">商家已拒绝，如诉求未解决请联系客服</text>\n      <text class=\"notice-text\" wx:if=\"{{curRufund.baseInfo.status == 3}}\">商家正在处理中，请耐心等待</text>\n      <text class=\"notice-text\" wx:if=\"{{curRufund.baseInfo.status == 4}}\">本次售后已处理完成</text>\n    </view>\n    <!-- 寄回地址信息 -->\n    <view wx:if=\"{{ curRufund.baseInfo.status2 > 0 }}\" class=\"back-address-card\">\n      <view class=\"address-header\">\n        <view class=\"header-icon\">📦</view>\n        <text class=\"header-title\">商品寄回地址</text>\n      </view>\n      <view class=\"address-content\">\n        <view class=\"address-row\">\n          <text class=\"address-label\">收货人：</text>\n          <text class=\"address-text\">{{ logisticsContent.linkMan }}</text>\n        </view>\n        <view class=\"address-row\">\n          <text class=\"address-label\">联系电话：</text>\n          <text class=\"address-text\">{{ logisticsContent.mobile }}</text>\n        </view>\n        <view class=\"address-row\">\n          <text class=\"address-label\">收货地址：</text>\n          <text class=\"address-text\">{{ logisticsContent.address }}</text>\n        </view>\n      </view>\n      \n      <!-- 待填写快递单号 -->\n      <view wx:if=\"{{ curRufund.baseInfo.status2 == 1 }}\" class=\"logistics-action\">\n        <button class=\"fill-logistics-btn\" bind:tap=\"showLogisticsDialog\">填写寄回快递单号</button>\n      </view>\n      \n      <!-- 已填写快递信息 -->\n      <view wx:if=\"{{ curRufund.baseInfo.status2 == 2 }}\" class=\"logistics-filled\">\n        <view class=\"filled-header\">\n          <view class=\"filled-icon\">✓</view>\n          <text class=\"filled-title\">已填写快递信息</text>\n        </view>\n        <view class=\"filled-content\">\n          <view class=\"filled-row\">\n            <text class=\"filled-label\">快递公司：</text>\n            <text class=\"filled-value\">{{ logisticsContent.shipperName }}</text>\n          </view>\n          <view class=\"filled-row\">\n            <text class=\"filled-label\">快递单号：</text>\n            <text class=\"filled-value\">{{ logisticsContent.trackingNumber }}</text>\n          </view>\n        </view>\n      </view>\n    </view>\n    <!-- 详细信息 -->\n    <view class=\"popup-details\">\n      <view class=\"detail-item\">\n        <text class=\"detail-label\">申请时间</text>\n        <text class=\"detail-value\">{{ curRufund.baseInfo.dateAdd }}</text>\n      </view>\n      <view class=\"detail-item\">\n        <text class=\"detail-label\">售后类型</text>\n        <text class=\"detail-value\">{{ curRufund.baseInfo.typeStr }}</text>\n      </view>\n      <view class=\"detail-item\">\n        <text class=\"detail-label\">物流状态</text>\n        <text class=\"detail-value\">{{ curRufund.baseInfo.logisticsStatusStr }}</text>\n      </view>\n      <view class=\"detail-item\">\n        <text class=\"detail-label\">售后原因</text>\n        <text class=\"detail-value\">{{ curRufund.baseInfo.reason }}</text>\n      </view>\n      <view class=\"detail-item\" wx:if=\"{{ curRufund.baseInfo.remark }}\">\n        <text class=\"detail-label\">备注说明</text>\n        <text class=\"detail-value remark\">{{ curRufund.baseInfo.remark }}</text>\n      </view>\n    </view>\n\n    <!-- 举证照片 -->\n    <view class=\"popup-photos\" wx:if=\"{{ curRufund.pics && curRufund.pics.length > 0 }}\">\n      <view class=\"photos-title\">举证照片</view>\n      <view class=\"photos-grid\">\n        <image\n          wx:for=\"{{ curRufund.pics }}\" wx:key=\"*this\"\n          class=\"photo-item\" mode=\"aspectFill\"\n          src=\"{{ item.pic }}_m\"\n          data-current=\"{{ item.pic }}_m\"\n          bind:tap=\"previewImageimageList\"\n        ></image>\n      </view>\n    </view>\n\n    <!-- 底部操作 -->\n    <view class=\"popup-actions\">\n      <view wx:if=\"{{ customerServiceType == 'QW' }}\" class=\"action-service\" bind:tap=\"customerService\">\n        <text class=\"service-icon\">💬</text>\n        <text class=\"service-text\">联系客服</text>\n      </view>\n      <view wx:else style=\"margin-bottom: 32rpx;\">\n        <button class=\"action-btn\" open-type=\"contact\" style=\"background: #F8F8F8;color: #333;\">联系客服</button>\n      </view>\n      <view class=\"action-btn-box\">\n        <button class=\"action-btn cancel\" wx:if=\"{{curRufund.baseInfo.status == 0}}\" bind:tap=\"refundApplyCancel\">撤回申请</button>\n        <button class=\"action-btn disabled\" wx:if=\"{{curRufund.baseInfo.status == 1}}\" disabled>您已撤销本次申请</button>\n        <button class=\"action-btn disabled\" wx:if=\"{{curRufund.baseInfo.status == 2}}\" disabled>商家已取消本次申请</button>\n        <button class=\"action-btn disabled\" wx:if=\"{{curRufund.baseInfo.status == 3}}\" disabled>商家正在处理中</button>\n        <button class=\"action-btn disabled success\" wx:if=\"{{curRufund.baseInfo.status == 4}}\" disabled>本次售后已处理完结</button>\n      </view>\n    </view>\n  </view>\n</van-popup>\n\n<!-- 快递信息输入弹窗 -->\n<van-popup show=\"{{ logisticsDialogShow }}\" position=\"center\" round custom-style=\"width: 85%; max-width: 600rpx;\" bind:close=\"closeLogisticsDialog\">\n  <view class=\"logistics-dialog\">\n    <view class=\"dialog-header\">\n      <text class=\"dialog-title\">填写快递信息</text>\n      <view class=\"dialog-close\" bind:tap=\"closeLogisticsDialog\">✕</view>\n    </view>\n    \n    <view class=\"dialog-content\">\n      <view class=\"dialog-tip\">\n        <text class=\"tip-icon\">💡</text>\n        <text class=\"tip-text\">请填写您寄回商品的快递信息</text>\n      </view>\n      \n      <view class=\"input-group\">\n        <view class=\"input-label\">快递公司</view>\n        <input \n          class=\"input-field\" \n          placeholder=\"请输入快递公司名称\" \n          placeholder-class=\"input-placeholder\"\n          model:value=\"{{ shipperName }}\"\n        />\n      </view>\n      \n      <view class=\"input-group\">\n        <view class=\"input-label\">快递单号</view>\n        <input \n          class=\"input-field\" \n          placeholder=\"请输入快递单号\" \n          placeholder-class=\"input-placeholder\"\n          model:value=\"{{ trackingNumber }}\"\n        />\n      </view>\n    </view>\n    \n    <view class=\"dialog-actions\">\n      <button class=\"dialog-btn cancel-btn\" bind:tap=\"closeLogisticsDialog\">取消</button>\n      <button class=\"dialog-btn confirm-btn\" bind:tap=\"submitLogistics\">确认提交</button>\n    </view>\n  </view>\n</van-popup>"
  },
  {
    "path": "pages/order/refundApply.wxss",
    "content": "/* 页面容器 */\npage {\n  background: #F5F5F5;\n}\n\n.refund-container {\n  min-height: 100vh;\n  padding-bottom: 40rpx;\n}\n\n/* 通用标题样式 */\n.section-title {\n  display: flex;\n  align-items: center;\n  padding: 32rpx 32rpx 24rpx;\n  position: relative;\n}\n\n.title-line {\n  width: 6rpx;\n  height: 32rpx;\n  background: linear-gradient(180deg, #E4393C 0%, #FF6B6B 100%);\n  border-radius: 3rpx;\n  margin-right: 16rpx;\n}\n\n.title-text {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333;\n  letter-spacing: 0.5rpx;\n}\n\n.title-tip {\n  font-size: 24rpx;\n  color: #999;\n  margin-left: 8rpx;\n}\n\n/* 通用卡片样式 */\n.section-card {\n  background: #fff;\n  margin: 24rpx 24rpx 0;\n  border-radius: 16rpx;\n  overflow: hidden;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04);\n}\n\n/* 售后历史记录 */\n.refund-history {\n  background: #fff;\n  margin: 24rpx 24rpx 0;\n  border-radius: 16rpx;\n  overflow: hidden;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04);\n}\n\n.history-list {\n  padding: 0 32rpx 24rpx;\n}\n\n.history-item {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 24rpx 0;\n  border-bottom: 1rpx solid #F0F0F0;\n}\n\n.history-item:last-child {\n  border-bottom: none;\n}\n\n.history-goods {\n  display: flex;\n  flex: 1;\n  margin-right: 24rpx;\n}\n\n.goods-image {\n  width: 120rpx;\n  height: 120rpx;\n  border-radius: 12rpx;\n  background: #F5F5F5;\n  flex-shrink: 0;\n}\n\n.goods-info {\n  flex: 1;\n  margin-left: 20rpx;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n}\n\n.goods-name {\n  font-size: 28rpx;\n  color: #333;\n  line-height: 40rpx;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n}\n\n.goods-meta {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-top: 8rpx;\n}\n\n.goods-num {\n  font-size: 24rpx;\n  color: #999;\n}\n\n.goods-price {\n  font-size: 28rpx;\n  color: #E4393C;\n  font-weight: 600;\n}\n\n.apply-time {\n  font-size: 24rpx;\n  color: #999;\n  margin-top: 8rpx;\n}\n\n.history-status {\n  display: flex;\n  align-items: center;\n  flex-shrink: 0;\n}\n\n.status-text {\n  font-size: 26rpx;\n  color: #E4393C;\n  font-weight: 500;\n}\n\n.arrow-icon {\n  font-size: 48rpx;\n  color: #DCDCDC;\n  margin-left: 8rpx;\n  line-height: 1;\n}\n\n/* 商品列表 */\n.goods-list {\n  padding: 0 32rpx 24rpx;\n}\n\n.goods-item {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 28rpx 0;\n  border-bottom: 1rpx solid #F0F0F0;\n}\n\n.goods-item:last-child {\n  border-bottom: none;\n}\n\n.goods-item.disabled {\n  opacity: 0.5;\n}\n\n.goods-content {\n  flex: 1;\n  margin-right: 24rpx;\n}\n\n.goods-name-text {\n  font-size: 28rpx;\n  color: #333;\n  line-height: 40rpx;\n}\n\n.not-support {\n  font-size: 24rpx;\n  color: #FF6B6B;\n  margin-top: 8rpx;\n}\n\n/* 商品预览 */\n.goods-preview {\n  display: flex;\n  padding: 24rpx 32rpx;\n  background: linear-gradient(135deg, #FFF9F9 0%, #FFFFFF 100%);\n  border-bottom: 1rpx solid #F0F0F0;\n}\n\n.preview-image {\n  width: 140rpx;\n  height: 140rpx;\n  border-radius: 12rpx;\n  background: #F5F5F5;\n  flex-shrink: 0;\n}\n\n.preview-info {\n  flex: 1;\n  margin-left: 24rpx;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n}\n\n.preview-name {\n  font-size: 30rpx;\n  color: #333;\n  font-weight: 500;\n  line-height: 42rpx;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n}\n\n.preview-price {\n  font-size: 36rpx;\n  color: #E4393C;\n  font-weight: 600;\n  margin-top: 16rpx;\n}\n\n.preview-price::before {\n  content: '¥';\n  font-size: 28rpx;\n}\n\n/* 数量选择器 */\n.quantity-selector {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 32rpx;\n}\n\n.selector-label {\n  font-size: 28rpx;\n  color: #333;\n  font-weight: 500;\n}\n\n/* 选项列表 */\n.option-list,\n.reason-list {\n  padding: 0 32rpx 24rpx;\n}\n\n.option-item,\n.reason-item {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 28rpx 0;\n  border-bottom: 1rpx solid #F0F0F0;\n}\n\n.option-item:last-child,\n.reason-item:last-child {\n  border-bottom: none;\n}\n\n.option-text,\n.reason-text {\n  font-size: 28rpx;\n  color: #333;\n  flex: 1;\n  margin-right: 24rpx;\n}\n\n/* 备注输入框 */\n.remark-box {\n  padding: 24rpx 32rpx 32rpx;\n}\n\n.remark-input {\n  width: 100%;\n  min-height: 180rpx;\n  padding: 24rpx;\n  background: #F8F8F8;\n  border-radius: 12rpx;\n  font-size: 28rpx;\n  color: #333;\n  line-height: 42rpx;\n  box-sizing: border-box;\n}\n\n.remark-placeholder {\n  color: #BFBFBF;\n}\n\n/* 上传区域 */\n.upload-box {\n  padding: 24rpx 32rpx 32rpx;\n}\n\n/* 提交按钮 */\n.submit-box {\n  padding: 40rpx 24rpx 0;\n}\n\n.submit-btn {\n  width: 100%;\n  height: 96rpx;\n  line-height: 96rpx;\n  background: linear-gradient(135deg, #E4393C 0%, #FF6B6B 100%);\n  border-radius: 48rpx;\n  font-size: 32rpx;\n  color: #fff;\n  font-weight: 600;\n  border: none;\n  box-shadow: 0 8rpx 24rpx rgba(228, 57, 60, 0.3);\n  letter-spacing: 2rpx;\n}\n\n.submit-btn::after {\n  border: none;\n}\n\n/* 底部安全区 */\n.safe-area {\n  height: 40rpx;\n}\n\n/* ========== 弹窗样式 ========== */\n.popup-container {\n  background: #F5F5F5;\n  padding-bottom: 40rpx;\n}\n\n/* 弹窗头部 */\n.popup-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 32rpx;\n  background: #fff;\n  position: sticky;\n  top: 0;\n  z-index: 10;\n}\n\n.popup-title {\n  font-size: 34rpx;\n  font-weight: 600;\n  color: #333;\n}\n\n.popup-close {\n  width: 56rpx;\n  height: 56rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-size: 40rpx;\n  color: #999;\n  background: #F5F5F5;\n  border-radius: 50%;\n}\n\n/* 弹窗商品信息 */\n.popup-goods {\n  display: flex;\n  padding: 24rpx 32rpx;\n  background: #fff;\n  margin-top: 2rpx;\n}\n\n.popup-goods-image {\n  width: 140rpx;\n  height: 140rpx;\n  border-radius: 12rpx;\n  background: #F5F5F5;\n  flex-shrink: 0;\n}\n\n.popup-goods-info {\n  flex: 1;\n  margin-left: 24rpx;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n}\n\n.popup-goods-name {\n  font-size: 30rpx;\n  color: #333;\n  font-weight: 500;\n  line-height: 42rpx;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n}\n\n.popup-goods-meta {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-top: 16rpx;\n}\n\n.popup-goods-num {\n  font-size: 26rpx;\n  color: #999;\n}\n\n.popup-goods-price {\n  font-size: 36rpx;\n  color: #E4393C;\n  font-weight: 600;\n}\n\n/* 状态提示 */\n.popup-notice {\n  display: flex;\n  align-items: center;\n  padding: 24rpx 32rpx;\n  margin: 24rpx 24rpx 0;\n  border-radius: 12rpx;\n  background: #FFF9F0;\n  border-left: 6rpx solid #FF9800;\n}\n\n.popup-notice.info {\n  background: #E8F4FF;\n  border-left-color: #1890FF;\n}\n\n.popup-notice.success {\n  background: #F0F9F0;\n  border-left-color: #52C41A;\n}\n\n.popup-notice.error {\n  background: #FFF1F0;\n  border-left-color: #FF4D4F;\n}\n\n.notice-icon {\n  width: 48rpx;\n  height: 48rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-size: 32rpx;\n  margin-right: 16rpx;\n}\n\n.notice-text {\n  flex: 1;\n  font-size: 26rpx;\n  color: #666;\n  line-height: 38rpx;\n}\n\n/* 详细信息 */\n.popup-details {\n  background: #fff;\n  margin: 24rpx 24rpx 0;\n  border-radius: 12rpx;\n  padding: 16rpx 32rpx;\n}\n\n.detail-item {\n  display: flex;\n  padding: 24rpx 0;\n  border-bottom: 1rpx solid #F0F0F0;\n}\n\n.detail-item:last-child {\n  border-bottom: none;\n}\n\n.detail-label {\n  width: 160rpx;\n  font-size: 28rpx;\n  color: #999;\n  flex-shrink: 0;\n}\n\n.detail-value {\n  flex: 1;\n  font-size: 28rpx;\n  color: #333;\n  text-align: right;\n}\n\n.detail-value.remark {\n  text-align: left;\n  line-height: 40rpx;\n}\n\n/* 举证照片 */\n.popup-photos {\n  background: #fff;\n  margin: 24rpx 24rpx 0;\n  border-radius: 12rpx;\n  padding: 24rpx 32rpx 32rpx;\n}\n\n.photos-title {\n  font-size: 28rpx;\n  color: #333;\n  font-weight: 500;\n  margin-bottom: 20rpx;\n}\n\n.photos-grid {\n  display: flex;\n  flex-wrap: wrap;\n  margin: -8rpx;\n}\n\n.photo-item {\n  width: 200rpx;\n  height: 200rpx;\n  border-radius: 12rpx;\n  background: #F5F5F5;\n  margin: 8rpx;\n}\n\n/* 底部操作 */\n.popup-actions {\n  background: #fff;\n  margin: 24rpx 24rpx 0;\n  border-radius: 12rpx;\n  padding: 24rpx 32rpx;\n}\n\n.action-service {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: 24rpx;\n  background: #F8F8F8;\n  border-radius: 12rpx;\n  margin-bottom: 20rpx;\n}\n\n.service-icon {\n  font-size: 36rpx;\n  margin-right: 12rpx;\n}\n\n.service-text {\n  font-size: 28rpx;\n  color: #333;\n  font-weight: 500;\n}\n\n.action-btn-box {\n  display: flex;\n}\n\n.action-btn {\n  flex: 1;\n  height: 88rpx;\n  line-height: 88rpx;\n  text-align: center;\n  border-radius: 44rpx;\n  font-size: 30rpx;\n  font-weight: 500;\n  border: none;\n}\n\n.action-btn::after {\n  border: none;\n}\n\n.action-btn.cancel {\n  background: linear-gradient(135deg, #E4393C 0%, #FF6B6B 100%);\n  color: #fff;\n  box-shadow: 0 8rpx 24rpx rgba(228, 57, 60, 0.3);\n}\n\n.action-btn.disabled {\n  background: #F5F5F5;\n  color: #BFBFBF;\n}\n\n.action-btn.disabled.success {\n  background: #F0F9F0;\n  color: #52C41A;\n}\n\n/* ========== 寄回地址卡片 ========== */\n.back-address-card {\n  background: #fff;\n  margin: 24rpx 24rpx 0;\n  border-radius: 12rpx;\n  overflow: hidden;\n}\n\n.address-header {\n  display: flex;\n  align-items: center;\n  padding: 24rpx 32rpx;\n  background: linear-gradient(135deg, #FFF9F9 0%, #FFFFFF 100%);\n  border-bottom: 1rpx solid #F0F0F0;\n}\n\n.header-icon {\n  font-size: 40rpx;\n  margin-right: 12rpx;\n}\n\n.header-title {\n  font-size: 30rpx;\n  color: #333;\n  font-weight: 600;\n}\n\n.address-content {\n  padding: 24rpx 32rpx;\n}\n\n.address-row {\n  display: flex;\n  margin-bottom: 20rpx;\n}\n\n.address-row:last-child {\n  margin-bottom: 0;\n}\n\n.address-row.full {\n  flex-direction: column;\n}\n\n.address-label {\n  font-size: 28rpx;\n  color: #999;\n  min-width: 140rpx;\n  flex-shrink: 0;\n}\n\n.address-row.full .address-label {\n  margin-bottom: 12rpx;\n}\n\n.address-text {\n  font-size: 28rpx;\n  color: #333;\n  line-height: 40rpx;\n  flex: 1;\n}\n\n/* 填写快递按钮 */\n.logistics-action {\n  padding: 0 32rpx 32rpx;\n}\n\n.fill-logistics-btn {\n  width: 100%;\n  height: 88rpx;\n  line-height: 88rpx;\n  background: linear-gradient(135deg, #E4393C 0%, #FF6B6B 100%);\n  border-radius: 44rpx;\n  font-size: 30rpx;\n  color: #fff;\n  font-weight: 600;\n  border: none;\n  box-shadow: 0 8rpx 24rpx rgba(228, 57, 60, 0.3);\n}\n\n.fill-logistics-btn::after {\n  border: none;\n}\n\n/* 已填写快递信息 */\n.logistics-filled {\n  padding: 0 32rpx 32rpx;\n}\n\n.filled-header {\n  display: flex;\n  align-items: center;\n  padding: 20rpx 24rpx;\n  background: #F0F9F0;\n  border-radius: 12rpx;\n  margin-bottom: 20rpx;\n}\n\n.filled-icon {\n  width: 40rpx;\n  height: 40rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  background: #52C41A;\n  color: #fff;\n  border-radius: 50%;\n  font-size: 24rpx;\n  margin-right: 12rpx;\n}\n\n.filled-title {\n  font-size: 28rpx;\n  color: #52C41A;\n  font-weight: 600;\n}\n\n.filled-content {\n  padding: 20rpx 24rpx;\n  background: #F8F8F8;\n  border-radius: 12rpx;\n}\n\n.filled-row {\n  display: flex;\n  align-items: center;\n  margin-bottom: 16rpx;\n}\n\n.filled-row:last-child {\n  margin-bottom: 0;\n}\n\n.filled-label {\n  font-size: 26rpx;\n  color: #999;\n  min-width: 140rpx;\n}\n\n.filled-value {\n  font-size: 28rpx;\n  color: #333;\n  font-weight: 500;\n}\n\n/* ========== 快递信息输入弹窗 ========== */\n.logistics-dialog {\n  background: #fff;\n  border-radius: 24rpx;\n  overflow: hidden;\n}\n\n.dialog-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 32rpx;\n  border-bottom: 1rpx solid #F0F0F0;\n}\n\n.dialog-title {\n  font-size: 34rpx;\n  font-weight: 600;\n  color: #333;\n}\n\n.dialog-close {\n  width: 56rpx;\n  height: 56rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-size: 40rpx;\n  color: #999;\n  background: #F5F5F5;\n  border-radius: 50%;\n}\n\n.dialog-content {\n  padding: 32rpx;\n}\n\n.dialog-tip {\n  display: flex;\n  align-items: center;\n  padding: 20rpx 24rpx;\n  background: #FFF9F0;\n  border-radius: 12rpx;\n  margin-bottom: 32rpx;\n  border-left: 6rpx solid #FF9800;\n}\n\n.tip-icon {\n  font-size: 32rpx;\n  margin-right: 12rpx;\n}\n\n.tip-text {\n  font-size: 26rpx;\n  color: #666;\n  line-height: 38rpx;\n}\n\n.input-group {\n  margin-bottom: 32rpx;\n}\n\n.input-group:last-child {\n  margin-bottom: 0;\n}\n\n.input-label {\n  font-size: 28rpx;\n  color: #333;\n  font-weight: 500;\n  margin-bottom: 16rpx;\n}\n\n.input-label::before {\n  content: '*';\n  color: #E4393C;\n  margin-right: 4rpx;\n}\n\n.input-field {\n  width: 100%;\n  height: 88rpx;\n  padding: 0 24rpx;\n  background: #F8F8F8;\n  border-radius: 12rpx;\n  font-size: 28rpx;\n  color: #333;\n  box-sizing: border-box;\n}\n\n.input-placeholder {\n  color: #BFBFBF;\n}\n\n.dialog-actions {\n  display: flex;\n  padding: 24rpx 32rpx 32rpx;\n  gap: 24rpx;\n}\n\n.dialog-btn {\n  flex: 1;\n  height: 88rpx;\n  line-height: 88rpx;\n  text-align: center;\n  border-radius: 44rpx;\n  font-size: 30rpx;\n  font-weight: 500;\n  border: none;\n}\n\n.dialog-btn::after {\n  border: none;\n}\n\n.cancel-btn {\n  background: #F5F5F5;\n  color: #666;\n}\n\n.confirm-btn {\n  background: linear-gradient(135deg, #E4393C 0%, #FF6B6B 100%);\n  color: #fff;\n  box-shadow: 0 8rpx 24rpx rgba(228, 57, 60, 0.3);\n}\n"
  },
  {
    "path": "pages/order-details/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\n\nPage({\n    data:{\n      orderId:0,\n      goodsList:[]\n    },\n    onLoad:function(e){\n      // e.id = e.sfsdffd\n      // e.payOrderNo = 'ZF2408290780106421'\n      this.setData({\n        orderId: e.id,\n        payOrderNo: e.payOrderNo,\n      })\n      if (e.payOrderNo) {\n        this.payLogs()\n      }\n    },\n    onShow() {\n      this.orderDetail()\n    },\n    async payLogs() {\n      wx.showLoading({\n        title: '',\n      })\n      const res = await WXAPI.payLogs({\n        token: wx.getStorageSync('token'),\n        orderNo: this.data.payOrderNo\n      })\n      wx.hideLoading()\n      if (res.code != 0) {\n        wx.showModal({\n          content: res.msg,\n          showCancel: false\n        })\n        return\n      }\n      const nextAction = res.data[0].nextAction\n      if(!nextAction) {\n        wx.navigateTo({\n          url: '/pages/asset/index',\n        })\n        return\n      }\n      const _nextAction = JSON.parse(nextAction)\n      if (_nextAction.type != 0) {\n        wx.navigateTo({\n          url: '/pages/asset/index',\n        })\n        return\n      }\n      this.setData({\n        orderId: _nextAction.id,\n      })\n      this.orderDetail()\n    },\n    async orderDetail() {\n      if (!this.data.orderId) {\n        return\n      }\n      wx.showLoading({\n        title: '',\n      })\n      const res = await WXAPI.orderDetail(wx.getStorageSync('token'), this.data.orderId)\n      wx.hideLoading()\n      if (res.code != 0) {\n        wx.showModal({\n          content: res.msg,\n          showCancel: false\n        })\n        return\n      }\n      // 绘制核销码\n      if (res.data.orderInfo.hxNumber && res.data.orderInfo.status > 0 && res.data.orderInfo.status < 3) {\n        this.wxaQrcode(res.data.orderInfo.hxNumber)\n      }\n      // 子快递单信息\n      if (res.data.orderLogisticsShippers) {\n        res.data.orderLogisticsShippers.forEach(ele => {\n          if (ele.traces) {\n            ele.tracesArray = JSON.parse (ele.traces)\n            if (ele.tracesArray && ele.tracesArray.length > 0) {\n              ele.tracesLast = ele.tracesArray[ele.tracesArray.length - 1].AcceptStation + '\\n' + ele.tracesArray[ele.tracesArray.length - 1].AcceptTime\n            }\n          }\n        })\n      }\n      let iotControl = false\n      res.data.goods.forEach(ele => {\n        if (ele.iotControl) {\n          iotControl = true\n        }\n      })\n      if (iotControl) {\n        // 读取IoT设备列表\n        this._shopIotDevices()\n      }\n      let orderStores = null\n      if (res.data.orderStores) {\n        orderStores = res.data.orderStores.filter(ele => ele.type == 2)\n      }\n      if (!res.data.extJson || Object.keys(res.data.extJson).length == 0) {\n        delete res.data.extJson\n      }\n      this.setData({\n        orderDetail: res.data,\n        orderStores\n      })\n    },\n    wuliuDetailsTap:function(e){\n      var orderId = e.currentTarget.dataset.id;\n      wx.navigateTo({\n        url: \"/pages/wuliu/index?id=\" + orderId\n      })\n    },\n    confirmBtnTap:function(e){\n      let that = this;\n      let orderId = this.data.orderId;\n      wx.showModal({\n          title: '确认您已收到商品？',\n          content: '',\n          success: function(res) {\n            if (res.confirm) {\n              WXAPI.orderDelivery(wx.getStorageSync('token'), orderId).then(function (res) {\n                if (res.code == 0) {\n                  that.orderDetail()\n                }\n              })\n            }\n          }\n      })\n    },\n    async submitReputation(e) {\n      let that = this;\n      let postJsonString = {};\n      postJsonString.token = wx.getStorageSync('token');\n      postJsonString.orderId = this.data.orderId;\n      let reputations = [];\n      let i = 0;\n      while (e.detail.value[\"orderGoodsId\" + i]) {\n        let orderGoodsId = e.detail.value[\"orderGoodsId\" + i];\n        let goodReputation = e.detail.value[\"goodReputation\" + i];\n        const goodReputationNumber = goodReputation\n        let goodReputationRemark = e.detail.value[\"goodReputationRemark\" + i];\n\n        if (!goodReputation) {\n          goodReputation = 0\n        } else if(goodReputation <= 1) {\n          goodReputation = 0\n        } else if(goodReputation <= 4) {\n          goodReputation = 1\n        } else {\n          goodReputation = 2\n        }\n\n        let reputations_json = {};\n        reputations_json.id = orderGoodsId;\n        reputations_json.reputation = goodReputation;\n        reputations_json.reputationNumber = goodReputationNumber\n        reputations_json.remark = goodReputationRemark;\n        if (this.data.picsList && this.data.picsList[i] && this.data.picsList[i].length > 0) {\n          reputations_json.pics = []\n          for (let index = 0; index < this.data.picsList[i].length; index++) {\n            const pic = this.data.picsList[i][index];\n            const res = await WXAPI.uploadFileV2(wx.getStorageSync('token'), pic.url)\n            if (res.code == 0) {\n              reputations_json.pics.push(res.data.url)\n            }\n          }\n        }\n        reputations.push(reputations_json);\n        i++;\n      }\n      postJsonString.reputations = reputations;\n      WXAPI.orderReputation({\n        postJsonString: JSON.stringify(postJsonString)\n      }).then(function (res) {\n        if (res.code == 0) {\n          that.orderDetail()\n        }\n      })\n    },\n    afterPicRead(e) {\n      const idx = e.currentTarget.dataset.idx\n      let picsList = this.data.picsList\n      if (!picsList) {\n        picsList = []\n        for (let index = 0; index < this.data.orderDetail.goods.length; index++) {\n          picsList[index] = []\n        }\n      }\n      picsList[idx] = picsList[idx].concat(e.detail.file)\n      this.setData({\n        picsList\n      })\n    },\n    afterPicDel(e) {\n      const idx = e.currentTarget.dataset.idx\n      let picsList = this.data.picsList\n      picsList[idx].splice(e.detail.index, 1)\n      this.setData({\n        picsList\n      })\n    },\n    async wxaQrcode(hxNumber) {\n      // https://www.yuque.com/apifm/nu0f75/ak40es\n      const accountInfo = wx.getAccountInfoSync()\n      const envVersion = accountInfo.miniProgram.envVersion\n      const res = await WXAPI.wxaQrcode({\n        scene: hxNumber,\n        page: 'pages/order-details/scan-result',\n        autoColor: true,\n        expireHours: 1,\n        env_version: envVersion,\n        check_path: envVersion == 'release' ? true : false,\n      })\n      if (res.code != 0) {\n        wx.showModal({\n          content: res.msg,\n          showCancel: false\n        })\n        return\n      }\n      this.setData({\n        hxNumberQrcode: res.data\n      })\n    },\n    async _shopIotDevices() {\n      // https://www.yuque.com/apifm/nu0f75/ibg4icu15di25hfc\n      const res = await WXAPI.shopIotDevices({\n        token: wx.getStorageSync('token'),\n        orderId: this.data.orderId\n      })\n      if (res.code == 0) {\n        this.setData({\n          shopIotDevices: res.data\n        })\n      }\n    },\n    async shopIotCmds(e) {\n      const idx = e.target.dataset.idx\n      const item = this.data.shopIotDevices[idx]\n      // https://www.yuque.com/apifm/nu0f75/rek5dwng8b9cdoko\n      const res = await WXAPI.shopIotCmds({\n        token: wx.getStorageSync('token'),\n        orderId: this.data.orderId,\n        topic: item.topic\n      })\n      if (res.code != 0) {\n        wx.showModal({\n          content: res.msg\n        })\n        return\n      }\n      this.setData({\n        cmdList: res.data,\n        cmdListShow: true\n      })\n    },\n    cmdClose() {\n      this.setData({ cmdListShow: false });\n    },\n  \n    async cmdSelect(event) {\n      // https://www.yuque.com/apifm/nu0f75/uq495hlq3ho5kw4t\n      console.log(event.detail);\n      const res = await WXAPI.shopIotExecute({\n        token: wx.getStorageSync('token'),\n        orderId: this.data.orderId,\n        topic: event.detail.topic,\n        cmdId: event.detail.id,\n      })\n      if (res.code != 0) {\n        wx.showModal({\n          content: res.msg\n        })\n      } else {\n        wx.showToast({\n          title: '已发送',\n        })\n      }\n    },\n})"
  },
  {
    "path": "pages/order-details/index.json",
    "content": "{\n    \"navigationBarTitleText\": \"订单详情\"\n}"
  },
  {
    "path": "pages/order-details/index.wxml",
    "content": "<view class=\"container\">\n  <!-- 订单状态卡片 -->\n  <view class=\"status-card\">\n    <view class=\"status-header\">\n      <view class=\"status-icon-wrap\">\n        <image wx:if=\"{{orderDetail.orderInfo.status==-1}}\" class=\"status-icon\" src=\"/images/order-details/icon-ddgb.png\"></image>\n        <image wx:elif=\"{{orderDetail.orderInfo.status==0}}\" class=\"status-icon\" src=\"/images/order-details/icon-ddfk.png\"></image>\n        <image wx:elif=\"{{orderDetail.orderInfo.status==1}}\" class=\"status-icon\" src=\"/images/order-details/icon-ddfh.png\"></image>\n        <image wx:elif=\"{{orderDetail.orderInfo.status==2}}\" class=\"status-icon\" src=\"/images/order-details/icon-ddsh.png\"></image>\n        <image wx:elif=\"{{orderDetail.orderInfo.status==3 || orderDetail.orderInfo.status==4}}\" class=\"status-icon\" src=\"/images/order-details/icon-jycg.png\"></image>\n      </view>\n      <view class=\"status-info\">\n        <view class=\"status-title\">{{orderDetail.orderInfo.statusStr}}</view>\n        <view class=\"order-number-text\">订单编号：{{orderDetail.orderInfo.orderNumber}}</view>\n      </view>\n    </view>\n  </view>\n\n  <!-- 物流信息卡片 -->\n  <block wx:if=\"{{orderDetail.logistics}}\">\n    <view class=\"card-section\">\n      <view class=\"card-title\">\n        <view class=\"title-line\"></view>\n        <text>物流信息</text>\n      </view>\n      \n      <view wx:if=\"{{orderDetail.logisticsTraces}}\" class=\"logistics-card\" bindtap=\"wuliuDetailsTap\" data-id=\"{{orderDetail.orderInfo.id}}\">\n        <view class=\"logistics-header\">\n          <view class=\"logistics-icon\">\n            <image class=\"icon-img\" src=\"/images/order-details/icon-wuliu.png\"></image>\n          </view>\n          <view class=\"logistics-info\">\n            <view class=\"tracking-number\">{{orderDetail.logistics.trackingNumber}}</view>\n            <view class=\"logistics-status\">{{orderDetail.logisticsTraces[orderDetail.logisticsTraces.length-1].AcceptStation}}</view>\n            <view class=\"logistics-time\">{{orderDetail.logisticsTraces[orderDetail.logisticsTraces.length-1].AcceptTime}}</view>\n          </view>\n          <view class=\"arrow-icon\">\n            <van-icon name=\"arrow\" color=\"#999\" />\n          </view>\n        </view>\n      </view>\n      \n      <view wx:else class=\"logistics-card\">\n        <view class=\"logistics-header\">\n          <view class=\"logistics-icon\">\n            <image class=\"icon-img\" src=\"/images/order-details/icon-wuliu.png\"></image>\n          </view>\n          <view class=\"logistics-info\">\n            <view class=\"tracking-number\">{{orderDetail.logistics.trackingNumber}}</view>\n            <view class=\"logistics-status\">暂无物流信息</view>\n          </view>\n        </view>\n      </view>\n\n      <view wx:if=\"{{ orderDetail.orderLogisticsShippers && orderDetail.orderLogisticsShippers.length > 0 }}\" class=\"multi-logistics\">\n        <van-cell\n          wx:for=\"{{ orderDetail.orderLogisticsShippers }}\"\n          wx:key=\"id\"\n          title=\"{{ item.shipperName }}: {{ item.trackingNumber }}\"\n          label=\"{{ item.tracesLast }}\"\n          center\n          is-link\n          url=\"/pages/wuliu/index?id={{ item.orderId }}&trackingNumber={{ item.trackingNumber }}\"\n        />\n      </view>\n\n      <view class=\"address-card\">\n        <view class=\"address-icon\">\n          <image class=\"icon-img\" src=\"/images/order-details/icon-address.png\"></image>\n        </view>\n        <view class=\"address-info\">\n          <view class=\"address-name\">{{orderDetail.logistics.linkMan}} <text class=\"address-phone\">{{orderDetail.logistics.mobile}}</text></view>\n          <view class=\"address-detail\">\n            {{orderDetail.logistics.provinceStr}} {{orderDetail.logistics.cityStr}} {{orderDetail.logistics.areaStr}} {{orderDetail.logistics.address}}\n          </view>\n        </view>\n      </view>\n    </view>\n  </block>\n  <!-- 核销码卡片 -->\n  <view wx:if=\"{{ hxNumberQrcode }}\" class=\"card-section hx-section\">\n    <view class=\"card-title\">\n      <view class=\"title-line\"></view>\n      <text>核销二维码</text>\n    </view>\n    <view class=\"hx-card\">\n      <view class=\"hx-tip\">出示给店员扫码或长按保存</view>\n      <image class=\"hx-qrcode\" src=\"{{ hxNumberQrcode }}\" mode=\"widthFix\" show-menu-by-longpress></image>\n    </view>\n  </view>\n\n  <!-- 商品信息卡片 -->\n  <view class=\"card-section goods-section\">\n    <view class=\"card-title\">\n      <view class=\"title-line\"></view>\n      <text>商品信息</text>\n    </view>\n    <wxs module=\"goodsDetailPage\">\n    module.exports = {\n      url : function(item) {\n        if (item.supplyType == 'cps_jd') {\n          return '/packageCps/pages/goods-details/cps-jd?id=' + item.goodsId\n        } else if (item.supplyType == 'vop_jd') {\n          return '/pages/goods-details/vop?id=' + item.yyId + '&goodsId=' + item.id\n        } else if (item.supplyType == 'cps_pdd') {\n          return '/packageCps/pages/goods-details/cps-pdd?id=' + item.goodsId\n        } else if (item.supplyType == 'cps_taobao') {\n          return '/packageCps/pages/goods-details/cps-taobao?id=' + item.goodsId\n        } else {\n          return '/pages/goods-details/index?id=' + item.goodsId\n        }\n      }\n    }\n    </wxs>\n    <form bindsubmit=\"submitReputation\">\n      <view class=\"goods-card\">\n        <block wx:for=\"{{orderDetail.goods}}\" wx:key=\"id\">\n          <van-card\n            num=\"{{item.number}}\"\n            price=\"{{item.amount}}\"\n            desc=\"{{item.property}}\"\n            title=\"{{item.goodsName}}\"\n            thumb=\"{{item.pic}}\"\n            thumb-link=\"{{ goodsDetailPage.url(item) }}\"\n            centered\n            lazy-load\n          />\n          <van-cell-group wx:if=\"{{orderDetail.orderInfo.status==3}}\" title=\"评价\" class=\"reputation-group\">\n            <input name=\"orderGoodsId{{index}}\" value=\"{{item.id}}\" style=\"display:none;\" />\n            <van-cell title=\"满意度\">\n              <van-rate name=\"goodReputation{{index}}\" value=\"{{ 5 }}\" />\n            </van-cell>\n            <van-field\n              name=\"goodReputationRemark{{index}}\"\n              value=\"{{ message }}\"\n              type=\"textarea\"\n              placeholder=\"从多个角度评价宝贝，可以帮助更多想买的人\"\n              autosize\n            />\n            <view style=\"margin-top:16rpx;padding-left:16rpx;\">\n              <van-uploader\n                accept=\"image\"\n                multiple\n                upload-text=\"买家秀\"\n                image-fit=\"aspectFill\"\n                file-list=\"{{ picsList[index] }}\"\n                data-idx=\"{{ index }}\"\n                bind:after-read=\"afterPicRead\"\n                bind:delete=\"afterPicDel\"\n              />\n            </view>\n          </van-cell-group>\n        </block>\n      </view>\n      <view class=\"action-btn-wrap\" wx:if=\"{{orderDetail.orderInfo.status==3}}\">\n        <button class=\"action-btn primary-btn\" formType=\"submit\">提交评价</button>\n      </view>\n    </form>\n    <view class=\"action-btn-wrap\" wx:if=\"{{orderDetail.orderInfo.status==2}}\">\n      <button class=\"action-btn primary-btn\" bind:tap=\"confirmBtnTap\">确认收货</button>\n    </view>\n  </view>\n  <!-- 日期详情 -->\n  <view wx:if=\"{{ orderStores && orderStores.length > 0 }}\" class=\"card-section\">\n    <view class=\"card-title\">\n      <view class=\"title-line\"></view>\n      <text>日期详情</text>\n    </view>\n    <view class=\"info-card\">\n      <view class=\"info-row\" wx:for=\"{{ orderStores }}\" wx:key=\"id\">\n        <view class=\"info-label\">{{ item.remark }} ×{{ item.stores }}</view>\n        <view class=\"info-value\">{{ item.day }}</view>\n      </view>\n    </view>\n  </view>\n\n  <!-- 优惠券信息 -->\n  <view wx:if=\"{{orderDetail.goodsCoupons}}\" class=\"card-section\">\n    <view class=\"card-title\">\n      <view class=\"title-line\"></view>\n      <text>优惠券</text>\n    </view>\n    <view class=\"coupon-card\">\n      <block wx:for=\"{{orderDetail.goodsCoupons}}\" wx:key=\"{{item.id}}\">\n        <view wx:if=\"{{item.type == 0}}\" class=\"coupon-item\">\n          <view class=\"coupon-label\">优惠券</view>\n          <view class=\"coupon-value\">{{item.coupon}}</view>\n        </view>\n        <image mode=\"widthFix\" wx:if=\"{{item.type == 1}}\" src=\"{{item.coupon}}\" class=\"coupon-image\"></image>\n      </block>\n    </view>\n  </view>\n\n  <!-- 其他信息 (extJson) -->\n  <view wx:if=\"{{ orderDetail.extJson }}\" class=\"card-section ext-json-section\">\n    <view class=\"card-title\">\n      <view class=\"title-line\"></view>\n      <text>其他信息</text>\n    </view>\n    <view class=\"info-card ext-info-card\">\n      <block wx:for=\"{{ orderDetail.extJson }}\" wx:key=\"key\" wx:for-index=\"key\">\n        <view class=\"info-row ext-info-row\">\n          <view class=\"info-label ext-label\">\n            <view class=\"label-icon\">✦</view>\n            <text>{{ key }}</text>\n          </view>\n          <view class=\"info-value ext-value\">{{ item }}</view>\n        </view>\n      </block>\n    </view>\n  </view>\n\n  <!-- 订单金额 -->\n  <view class=\"card-section amount-section\">\n    <view class=\"card-title\">\n      <view class=\"title-line\"></view>\n      <text>订单金额</text>\n    </view>\n    <view class=\"amount-card\">\n      <view class=\"amount-row\">\n        <view class=\"amount-label\">商品金额</view>\n        <view class=\"amount-value\">¥ {{orderDetail.orderInfo.amount}}</view>\n      </view>\n      <view class=\"amount-row\">\n        <view class=\"amount-label\">运费</view>\n        <view class=\"amount-value\">¥ {{orderDetail.orderInfo.amountLogistics}}</view>\n      </view>\n      <block wx:if=\"{{ orderDetail.orderAdditionalPrices }}\">\n        <view class=\"amount-row\" wx:for=\"{{ orderDetail.orderAdditionalPrices }}\" wx:key=\"id\">\n          <view class=\"amount-label\">{{ item.name }}</view>\n          <view class=\"amount-value\">¥ {{ item.amount }}</view>\n        </view>\n      </block>\n      <view class=\"amount-row total-row\">\n        <view class=\"amount-label total-label\">应付总额</view>\n        <view class=\"amount-value total-value\">¥ {{orderDetail.orderInfo.amountReal}}</view>\n      </view>\n    </view>\n  </view>\n\n  <!-- 订单记录 -->\n  <view wx:if=\"{{ orderDetail.logs && orderDetail.logs.length > 0 }}\" class=\"card-section\">\n    <view class=\"card-title\">\n      <view class=\"title-line\"></view>\n      <text>订单记录</text>\n    </view>\n    <view class=\"logs-card\">\n      <view class=\"timeline\">\n        <view class=\"timeline-item\" wx:for=\"{{ orderDetail.logs }}\" wx:key=\"id\">\n          <view class=\"timeline-dot\"></view>\n          <view class=\"timeline-line\" wx:if=\"{{ index < orderDetail.logs.length - 1 }}\"></view>\n          <view class=\"timeline-content\">\n            <view class=\"log-operation\">{{ item.typeStr }}</view>\n            <view class=\"log-time\">{{ item.dateAdd }}</view>\n          </view>\n        </view>\n      </view>\n    </view>\n  </view>\n\n  <!-- 设备控制 -->\n  <view wx:if=\"{{ shopIotDevices && shopIotDevices.length > 0 }}\" class=\"card-section\">\n    <view class=\"card-title\">\n      <view class=\"title-line\"></view>\n      <text>设备控制</text>\n    </view>\n    <view class=\"iot-card\">\n      <view class=\"iot-item\" wx:for=\"{{ shopIotDevices }}\" wx:key=\"id\" data-idx=\"{{ index }}\" bind:tap=\"shopIotCmds\">\n        <view class=\"iot-name\">{{ item.name }}</view>\n        <view class=\"iot-control\">\n          <text>控制</text>\n          <van-icon name=\"arrow\" />\n        </view>\n      </view>\n    </view>\n  </view>\n  \n  <view class=\"bottom-safe-area\"></view>\n</view>\n<van-action-sheet\n  show=\"{{ cmdListShow }}\"\n  actions=\"{{ cmdList }}\"\n  cancel-text=\"取消\"\n  bind:close=\"cmdClose\"\n  bind:cancel=\"cmdClose\"\n  bind:select=\"cmdSelect\"\n/>"
  },
  {
    "path": "pages/order-details/index.wxss",
    "content": "/* 全局样式 */\npage {\n  min-height: 100%;\n  background: linear-gradient(to bottom, #f5f7fa 0%, #e8ecf1 100%);\n}\n\n.container {\n  min-height: 100%;\n  padding: 20rpx 24rpx;\n  padding-bottom: 40rpx;\n}\n\n/* 卡片通用样式 */\n.card-section {\n  width: 100%;\n  margin-bottom: 24rpx;\n  background: #ffffff;\n  border-radius: 24rpx;\n  overflow: hidden;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04);\n}\n\n.card-title {\n  display: flex;\n  align-items: center;\n  padding: 32rpx 32rpx 24rpx;\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #1a1a1a;\n}\n\n.title-line {\n  width: 6rpx;\n  height: 32rpx;\n  background: linear-gradient(to bottom, #ff6b6b, #ee5a52);\n  border-radius: 3rpx;\n  margin-right: 16rpx;\n}\n\n/* 订单状态卡片 */\n.status-card {\n  width: 90%;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 24rpx;\n  padding: 40rpx 32rpx;\n  margin-bottom: 24rpx;\n  box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.3);\n}\n\n.status-header {\n  display: flex;\n  align-items: center;\n}\n\n.status-icon-wrap {\n  width: 96rpx;\n  height: 96rpx;\n  background: rgba(255, 255, 255, 0.2);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-right: 24rpx;\n  backdrop-filter: blur(10rpx);\n}\n\n.status-icon {\n  width: 64rpx;\n  height: 64rpx;\n}\n\n.status-info {\n  flex: 1;\n}\n\n.status-title {\n  font-size: 36rpx;\n  font-weight: 600;\n  color: #ffffff;\n  margin-bottom: 12rpx;\n  text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);\n}\n\n.order-number-text {\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.85);\n  letter-spacing: 0.5rpx;\n}\n\n/* 物流信息卡片 */\n.logistics-card {\n  margin: 0 32rpx 24rpx;\n  padding: 28rpx;\n  background: linear-gradient(135deg, #f6f8fc 0%, #fafbfd 100%);\n  border-radius: 16rpx;\n  border: 1rpx solid #e8ecf1;\n}\n\n.logistics-header {\n  display: flex;\n  align-items: flex-start;\n}\n\n.logistics-icon {\n  width: 48rpx;\n  height: 48rpx;\n  margin-right: 20rpx;\n  flex-shrink: 0;\n}\n\n.icon-img {\n  width: 100%;\n  height: 100%;\n}\n\n.logistics-info {\n  flex: 1;\n  min-width: 0;\n}\n\n.tracking-number {\n  font-size: 28rpx;\n  font-weight: 500;\n  color: #2c3e50;\n  margin-bottom: 12rpx;\n}\n\n.logistics-status {\n  font-size: 26rpx;\n  color: #5a6c7d;\n  line-height: 40rpx;\n  margin-bottom: 8rpx;\n}\n\n.logistics-time {\n  font-size: 24rpx;\n  color: #95a5a6;\n}\n\n.arrow-icon {\n  width: 32rpx;\n  height: 32rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-left: 16rpx;\n  flex-shrink: 0;\n}\n\n.multi-logistics {\n  margin: 0 32rpx 24rpx;\n  border-radius: 16rpx;\n  overflow: hidden;\n}\n\n/* 收货地址卡片 */\n.address-card {\n  margin: 0 32rpx 32rpx;\n  padding: 28rpx;\n  background: #fff;\n  border-radius: 16rpx;\n  border: 2rpx dashed #e8ecf1;\n  display: flex;\n  align-items: flex-start;\n}\n\n.address-icon {\n  width: 40rpx;\n  height: 40rpx;\n  margin-right: 20rpx;\n  flex-shrink: 0;\n}\n\n.address-info {\n  flex: 1;\n  min-width: 0;\n}\n\n.address-name {\n  font-size: 30rpx;\n  font-weight: 600;\n  color: #2c3e50;\n  margin-bottom: 16rpx;\n}\n\n.address-phone {\n  font-weight: 400;\n  color: #667eea;\n  margin-left: 16rpx;\n}\n\n.address-detail {\n  font-size: 26rpx;\n  color: #5a6c7d;\n  line-height: 40rpx;\n}\n\n/* 核销码卡片 */\n.hx-section {\n  background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);\n}\n\n.hx-card {\n  padding: 32rpx;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n\n.hx-tip {\n  font-size: 28rpx;\n  color: #2d3436;\n  margin-bottom: 24rpx;\n  font-weight: 500;\n}\n\n.hx-qrcode {\n  width: 400rpx;\n  height: 400rpx;\n  border-radius: 16rpx;\n  background: #fff;\n  padding: 24rpx;\n  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.1);\n}\n\n/* 商品信息卡片 */\n.goods-section {\n  padding-bottom: 0;\n}\n\n.goods-card {\n  padding: 0 32rpx;\n}\n\n.reputation-group {\n  margin-top: 24rpx;\n  border-radius: 16rpx;\n  overflow: hidden;\n}\n\n.action-btn-wrap {\n  padding: 32rpx;\n  display: flex;\n  justify-content: flex-end;\n}\n\n.action-btn {\n  border: none;\n  border-radius: 48rpx;\n  font-size: 28rpx;\n  font-weight: 500;\n  padding: 0 56rpx;\n  height: 80rpx;\n  line-height: 80rpx;\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);\n}\n\n.primary-btn {\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  color: #ffffff;\n}\n\n/* 信息卡片通用样式 */\n.info-card {\n  padding: 16rpx 0 24rpx;\n  width: 100%;\n  box-sizing: border-box;\n}\n\n.info-row {\n  display: flex;\n  justify-content: space-between;\n  align-items: flex-start;\n  padding: 24rpx 32rpx;\n  border-bottom: 1rpx solid #f0f2f5;\n  min-height: 60rpx;\n}\n\n.info-row:last-child {\n  border-bottom: none;\n}\n\n.info-label {\n  font-size: 28rpx;\n  color: #7f8c8d;\n  font-weight: 400;\n  flex-shrink: 0;\n  margin-right: 32rpx;\n  line-height: 40rpx;\n  max-width: 240rpx;\n}\n\n.info-value {\n  font-size: 28rpx;\n  color: #2c3e50;\n  font-weight: 500;\n  text-align: right;\n  word-break: break-all;\n  flex: 1;\n  line-height: 40rpx;\n}\n\n/* 其他信息特殊样式 */\n.ext-json-section {\n  background: linear-gradient(135deg, #fff9f5 0%, #ffffff 100%);\n  border-left: 4rpx solid #ff6b6b;\n}\n\n.ext-info-card {\n  background: #fff;\n  border-radius: 0;\n  margin: 0;\n  padding: 8rpx 0 24rpx;\n  width: 100%;\n}\n\n.ext-info-row {\n  border-bottom: none !important;\n  background: #fff;\n  margin: 0 32rpx;\n  padding: 20rpx 24rpx;\n  border-radius: 12rpx;\n  margin-bottom: 16rpx;\n  box-shadow: 0 2rpx 12rpx rgba(255, 107, 107, 0.08);\n  border: 1rpx solid #ffe8e8;\n  display: flex;\n  justify-content: left;\n  align-items: center;\n  gap: 16rpx;\n}\n\n.ext-info-row:last-child {\n  margin-bottom: 0;\n}\n\n.ext-label {\n  color: #e74c3c;\n  font-weight: 600;\n  font-size: 24rpx;\n  padding: 8rpx 16rpx;\n  background: linear-gradient(135deg, #ffe0e0 0%, #fff0f0 100%);\n  border-radius: 8rpx;\n  max-width: fit-content;\n  line-height: 32rpx;\n  display: flex;\n  align-items: center;\n  gap: 8rpx;\n  margin-right: 0 !important;\n  text-align: left;\n}\n\n.label-icon {\n  font-size: 20rpx;\n  color: #ff6b6b;\n  line-height: 1;\n}\n\n.ext-value {\n  color: #2c3e50;\n  font-weight: 600;\n  font-size: 30rpx;\n  padding: 12rpx 20rpx;\n  border-radius: 8rpx;\n  line-height: 44rpx;\n  text-align: left;\n  word-break: break-all;\n  margin-right: 0 !important;\n  flex: none;\n  width: auto;\n}\n\n/* 优惠券卡片 */\n.coupon-card {\n  padding: 24rpx 32rpx 32rpx;\n}\n\n.coupon-item {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 24rpx;\n  background: linear-gradient(135deg, #fff3e0 0%, #ffe8cc 100%);\n  border-radius: 12rpx;\n  margin-bottom: 16rpx;\n}\n\n.coupon-item:last-child {\n  margin-bottom: 0;\n}\n\n.coupon-label {\n  font-size: 28rpx;\n  color: #e67e22;\n  font-weight: 500;\n}\n\n.coupon-value {\n  font-size: 28rpx;\n  color: #d35400;\n  font-weight: 600;\n}\n\n.coupon-image {\n  width: 100%;\n  border-radius: 12rpx;\n  margin-bottom: 16rpx;\n}\n\n.coupon-image:last-child {\n  margin-bottom: 0;\n}\n\n/* 订单金额卡片 */\n.amount-section {\n  background: #ffffff;\n}\n\n.amount-card {\n  padding: 16rpx 0 24rpx;\n  width: 100%;\n  box-sizing: border-box;\n}\n\n.amount-row {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 24rpx 32rpx;\n  border-bottom: 1rpx solid #f5f7fa;\n  min-height: 60rpx;\n}\n\n.amount-row:last-child {\n  border-bottom: none;\n}\n\n.amount-label {\n  font-size: 28rpx;\n  color: #7f8c8d;\n  font-weight: 400;\n  line-height: 40rpx;\n}\n\n.amount-value {\n  font-size: 30rpx;\n  color: #2c3e50;\n  font-weight: 600;\n  line-height: 40rpx;\n}\n\n.total-row {\n  margin: 16rpx 32rpx 0;\n  padding: 28rpx 32rpx;\n  background: linear-gradient(135deg, #fff4f4 0%, #ffe8e8 100%);\n  border-radius: 16rpx;\n  border-bottom: none;\n  box-shadow: 0 4rpx 12rpx rgba(231, 76, 60, 0.1);\n}\n\n.total-label {\n  font-size: 32rpx;\n  font-weight: 700;\n  color: #e74c3c;\n  letter-spacing: 1rpx;\n}\n\n.total-value {\n  font-size: 40rpx;\n  font-weight: 700;\n  color: #e74c3c;\n  letter-spacing: 1rpx;\n}\n\n/* 订单记录卡片 */\n.logs-card {\n  padding: 24rpx 32rpx 32rpx;\n}\n\n.timeline {\n  position: relative;\n  padding-left: 40rpx;\n}\n\n.timeline-item {\n  position: relative;\n  padding-bottom: 48rpx;\n}\n\n.timeline-item:last-child {\n  padding-bottom: 0;\n}\n\n.timeline-dot {\n  position: absolute;\n  left: -40rpx;\n  top: 8rpx;\n  width: 24rpx;\n  height: 24rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 50%;\n  border: 4rpx solid #ffffff;\n  box-shadow: 0 0 0 4rpx #f0f2f5;\n  z-index: 2;\n}\n\n.timeline-line {\n  position: absolute;\n  left: -28rpx;\n  top: 32rpx;\n  bottom: -32rpx;\n  width: 2rpx;\n  background: linear-gradient(to bottom, #e8ecf1 0%, #f5f7fa 100%);\n  z-index: 1;\n}\n\n.timeline-content {\n  background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);\n  border-radius: 12rpx;\n  padding: 24rpx;\n  border: 1rpx solid #e8ecf1;\n  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);\n  transition: all 0.3s ease;\n}\n\n.log-operation {\n  font-size: 30rpx;\n  font-weight: 600;\n  color: #2c3e50;\n  margin-bottom: 12rpx;\n  line-height: 42rpx;\n}\n\n.log-time {\n  font-size: 24rpx;\n  color: #95a5a6;\n  line-height: 36rpx;\n  display: flex;\n  align-items: center;\n}\n\n.log-time::before {\n  content: '🕐';\n  margin-right: 8rpx;\n  font-size: 22rpx;\n}\n\n/* 设备控制卡片 */\n.iot-card {\n  padding: 16rpx 32rpx 32rpx;\n}\n\n.iot-item {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 28rpx 24rpx;\n  background: linear-gradient(135deg, #e3f2fd 0%, #e1f5fe 100%);\n  border-radius: 12rpx;\n  margin-bottom: 16rpx;\n}\n\n.iot-item:last-child {\n  margin-bottom: 0;\n}\n\n.iot-name {\n  font-size: 28rpx;\n  color: #1976d2;\n  font-weight: 500;\n}\n\n.iot-control {\n  display: flex;\n  align-items: center;\n  font-size: 26rpx;\n  color: #1565c0;\n}\n\n.iot-control text {\n  margin-right: 8rpx;\n}\n\n/* 底部安全区域 */\n.bottom-safe-area {\n  height: 40rpx;\n}\n\n/* 适配暗色模式 */\n@media (prefers-color-scheme: dark) {\n  page {\n    background: linear-gradient(to bottom, #1a1a1a 0%, #2d2d2d 100%);\n  }\n  \n  .card-section {\n    background: #2d2d2d;\n    box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.3);\n  }\n  \n  .card-title {\n    color: #f0f0f0;\n  }\n}\n\n/* 动画效果 */\n.card-section {\n  animation: fadeInUp 0.4s ease-out;\n}\n\n@keyframes fadeInUp {\n  from {\n    opacity: 0;\n    transform: translateY(20rpx);\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n\n/* 确保按钮样式正确 */\nbutton::after {\n  border: none;\n}\n"
  },
  {
    "path": "pages/order-details/scan-result.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nPage({\n  data: {\n    apiOK: false,\n  },\n  onLoad: function (e) {\n    // e.hxNumber = '2307150981053363'\n    // 读取小程序码中的核销码\n    console.log('e', e);\n    if (e && e.scene) {\n      const scene = decodeURIComponent(e.scene)\n      if (scene) {\n        e.hxNumber = scene\n      }\n    }\n    this.setData({\n      hxNumber: e.hxNumber\n    })\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.orderDetail()\n      } else {\n        getApp().loginOK = () => {\n          this.orderDetail()\n        }\n      }\n    })\n  },\n  onShow() {\n  },\n  async orderDetail() {\n    wx.showLoading({\n      title: '',\n    })\n    // https://www.yuque.com/apifm/nu0f75/qlzy3q\n    const resConfig = await WXAPI.queryConfigValue('order_hx_uids')\n    const res = await WXAPI.orderDetail(wx.getStorageSync('token'), '', this.data.hxNumber)\n    wx.hideLoading()\n    if (resConfig.code != 0) {\n      wx.showModal({\n        content: resConfig.msg,\n        showCancel: false\n      })\n      return;\n    }\n    if (res.code != 0) {\n      wx.showModal({\n        content: res.msg,\n        showCancel: false\n      })\n      return;\n    }\n    const order_hx_uids = resConfig.data\n    const uid = wx.getStorageSync('uid')\n    if (order_hx_uids.indexOf(uid) != -1) {\n      this.setData({\n        apiOK: true,\n        canHX: true,\n        orderDetail: res.data\n      })\n    } else {\n      this.setData({\n        apiOK: true,\n        orderDetail: res.data\n      })\n    }\n  },\n  wuliuDetailsTap: function (e) {\n    var orderId = e.currentTarget.dataset.id;\n    wx.navigateTo({\n      url: \"/pages/wuliu/index?id=\" + orderId\n    })\n  },\n  async doneHx(){\n    wx.showLoading({\n      title: '处理中...',\n    })\n    const res = await WXAPI.orderHXV2({\n      token: wx.getStorageSync('token'),\n      hxNumber: this.data.hxNumber\n    })\n    wx.hideLoading()\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    } else {\n      wx.showToast({\n        title: '核销完成',\n        icon: 'none'\n      })\n      this.orderDetail()\n    }\n  },\n})"
  },
  {
    "path": "pages/order-details/scan-result.json",
    "content": "{\n  \"navigationBarTitleText\": \"订单详情\"\n}"
  },
  {
    "path": "pages/order-details/scan-result.wxml",
    "content": "<view class=\"container\">\n  <view class=\"sec-wrap\">\n    <view class=\"order-status\">\n      <view class=\"icon-box\">\n        <image wx:if=\"{{orderDetail.orderInfo.status==-1}}\" class=\"icon\" src=\"/images/order-details/icon-ddgb.png\"></image>\n        <image wx:elif=\"{{orderDetail.orderInfo.status==0}}\" class=\"icon\" src=\"/images/order-details/icon-ddfk.png\"></image>\n        <image wx:elif=\"{{orderDetail.orderInfo.status==1}}\" class=\"icon\" src=\"/images/order-details/icon-ddfh.png\"></image>\n        <image wx:elif=\"{{orderDetail.orderInfo.status==2}}\" class=\"icon\" src=\"/images/order-details/icon-ddsh.png\"></image>\n        <image wx:elif=\"{{orderDetail.orderInfo.status==3 || orderDetail.orderInfo.status==4}}\" class=\"icon\" src=\"/images/order-details/icon-jycg.png\"></image>\n      </view>\n      <view class=\"right-text\">\n        <view class=\"status red\">{{orderDetail.orderInfo.statusStr}}</view>\n        <view class=\"des\" hidden=\"true\">请于11时59分59秒内付款，超时订单将自动关闭</view>\n      </view>\n    </view>\n    <block wx:if=\"{{orderDetail.logistics}}\">\n      <view wx:if=\"{{orderDetail.logisticsTraces}}\" class=\"wuliu-box\">\n        <view class=\"icon-box\">\n          <image class=\"icon\" src=\"/images/order-details/icon-wuliu.png\"></image>\n        </view>\n        <view class=\"right-text\" bindtap=\"wuliuDetailsTap\" data-id=\"{{orderDetail.orderInfo.id}}\">\n          <view class=\"order-number\">快递单号：{{orderDetail.logistics.trackingNumber}}</view>\n          <block wx:if=\"{{orderDetail.logisticsTraces}}\">\n            <view class=\"wuliu-text\">{{orderDetail.logisticsTraces[orderDetail.logisticsTraces.length-1].AcceptStation}}</view>\n            <view class=\"wuliu-date\">{{orderDetail.logisticsTraces[orderDetail.logisticsTraces.length-1].AcceptTime}}</view>\n          </block>\n        </view>\n        <view class=\"arrow-right\">\n          <van-icon name=\"arrow\" />\n        </view>\n      </view>\n      <view wx:else class=\"wuliu-box\">\n        <view class=\"icon-box\">\n          <image class=\"icon\" src=\"/images/order-details/icon-wuliu.png\"></image>\n        </view>\n        <view class=\"right-text\">\n          <view class=\"order-number\">快递单号：{{orderDetail.logistics.trackingNumber}}</view>\n          <view class=\"wuliu-text\">暂无物流信息</view>\n        </view>\n      </view>\n      <view class=\"address-sec\">\n        <view class=\"icon-box\">\n          <image class=\"icon\" src=\"/images/order-details/icon-address.png\"></image>\n        </view>\n        <view class=\"right-box\">\n          <view class=\"name-tel\">{{orderDetail.logistics.linkMan}} {{orderDetail.logistics.mobile}}</view>\n          <view class=\"text\">\n            {{orderDetail.logistics.provinceStr}} {{orderDetail.logistics.cityStr}} {{orderDetail.logistics.areaStr}} {{orderDetail.logistics.address}}\n          </view>\n        </view>\n      </view>\n    </block>\n  </view>\n  <view class=\"goods-list\">\n    <view class=\"list-title\">商品信息</view>\n    <wxs module=\"goodsDetailPage\">\n    module.exports = {\n      url : function(item) {\n        if (item.supplyType == 'cps_jd') {\n          return '/packageCps/pages/goods-details/cps-jd?id=' + item.goodsId\n        } else if (item.supplyType == 'vop_jd') {\n          return '/pages/goods-details/vop?id=' + item.yyId + '&goodsId=' + item.id\n        } else if (item.supplyType == 'cps_pdd') {\n          return '/packageCps/pages/goods-details/cps-pdd?id=' + item.goodsId\n        } else if (item.supplyType == 'cps_taobao') {\n          return '/packageCps/pages/goods-details/cps-taobao?id=' + item.goodsId\n        } else {\n          return '/pages/goods-details/index?id=' + item.goodsId\n        }\n      }\n    }\n    </wxs>\n    <block wx:for=\"{{orderDetail.goods}}\" wx:key=\"{{index}}\">\n      <navigator url=\"{{ goodsDetailPage.url(item) }}\">\n        <view class=\"a-goods\">\n          <view class=\"img-box\">\n            <image src=\"{{item.pic}}\" class=\"img\" />\n          </view>\n          <view class=\"text-box\">\n            <view class=\"arow arow01\">\n              <view class=\"goods-name\">{{item.goodsName}}</view>\n              <view class=\"goods-price\">¥ {{item.amount}}</view>\n            </view>\n            <view class=\"arow\">\n              <view class=\"goods-label\">{{item.property}}</view>\n              <view class=\"goods-num\">x {{item.number}}</view>\n            </view>\n          </view>\n        </view>\n      </navigator>\n    </block>\n  </view>\n  <view wx:if=\"{{orderDetail.goodsCoupons}}\" class=\"goods-info\" style=\"margin-bottom:32rpx;\">\n    <view wx:for=\"{{orderDetail.goodsCoupons}}\" wx:key=\"{{item.id}}\" class=\"row-box\">\n      <view wx:if=\"{{item.type == 0}}\" class=\"row-label\">优惠券</view>\n      <view wx:if=\"{{item.type == 0}}\" class=\"right-text\">{{item.coupon}}</view>\n      <image mode=\"widthFix\" wx:if=\"{{item.type == 1}}\" src=\"{{item.coupon}}\" style=\"max-width:100%;\"></image>\n    </view>\n  </view>\n  <view style=\"width: 100vw;\">\n    <van-cell-group title=\"订单金额\">\n      <van-cell\n        title=\"商品金额\"\n        value=\"¥ {{orderDetail.orderInfo.amount}}\"\n      />\n      <van-cell\n        title=\"运费\"\n        value=\"¥ {{orderDetail.orderInfo.amountLogistics}}\"\n      />\n      <block wx:if=\"{{ orderDetail.orderAdditionalPrices }}\">\n        <van-cell\n          wx:for=\"{{ orderDetail.orderAdditionalPrices }}\" wx:key=\"id\"\n          title=\"{{ item.name }}\"\n          value=\"{{ '￥' + item.amount }}\"\n        />\n      </block>\n      <van-cell\n        title=\"应付总额\"\n        value=\"¥ {{orderDetail.orderInfo.amountReal}}\"\n      />\n    </van-cell-group>\n  </view>\n</view>\n\n<view wx:if=\"{{ apiOK }}\">\n  <view wx:if=\"{{ !canHX }}\" class=\"btn\">\n    <van-button type=\"danger\" block disabled>暂无核销权限</van-button>\n  </view>\n  <view wx:elif=\"{{ orderDetail.orderInfo.status < 1 || orderDetail.orderInfo.status > 2 }}\" class=\"btn\">\n    <van-button type=\"default\" block disabled>{{ orderDetail.orderInfo.statusStr }}</van-button>\n  </view>\n  <view wx:elif=\"{{ orderDetail.orderInfo }}\" class=\"btn\">\n    <van-button type=\"danger\" block bind:click=\"doneHx\">确认核销</van-button>\n  </view>\n</view>"
  },
  {
    "path": "pages/order-details/scan-result.wxss",
    "content": "page{\n  min-height: 100%;\n  background-color: #F2f2f2;\n}\n.container{\n  min-height: 100%;\n  overflow: hidden;\n  overflow-y: hidden;\n}\n.sec-wrap{\n    background-color: #fff;\n    margin-top: 20rpx;\n}\n.bottom-fiexd{\n  position: fixed;\n  bottom: 0;\n  left: 0;\n}\n.sec-wrap .order-status{\n    width: 720rpx;\n    margin-left: 30rpx;\n    border-bottom: 1rpx solid #eee;\n    height: 140rpx;\n    display: flex;\n    align-items: center;\n}\n.order-status .icon-box{\n    width: 80rpx;\n    height: 80rpx;\n    overflow: hidden;\n    margin-right: 30rpx;\n}\n.order-status .icon-box .icon{\n    width: 80rpx;\n    height: 80rpx;\n}\n.order-status .right-text{\n    width: 580rpx;\n    overflow: hidden;\n}\n.order-status .right-text .status{\n    font-size:28rpx;\n    color:#000; \n    margin-bottom: 10rpx;\n}\n.order-status .right-text .red{\n    color:#e64340;\n}\n.order-status .right-text .des{\n    font-size:24rpx;\n    color:#999; \n}\n.address-sec{\n    width: 720rpx;\n    margin-left: 30rpx;\n    display: flex;\n    align-items: center;\n    padding: 30rpx 0;\n}\n.address-sec .icon-box{\n    width: 30rpx;\n    align-self: flex-start;\n    overflow: hidden;\n    margin-right: 35rpx;\n}\n.address-sec .icon-box .icon{\n    width: 30rpx;\n    height: 30rpx;\n}\n.address-sec  .right-box{\n    width: 620rpx;\n}\n.address-sec  .right-box .name-tel{\n    font-size:28rpx;\n    color:#000000;\n    margin-bottom: 20rpx;\n}\n.address-sec  .right-box .text{\n    font-size:24rpx;\n    color:#888888;\n    line-height:36rpx;\n    height: 72rpx;\n    overflow: hidden;\n}\n.wuliu-box{\n    width: 720rpx;\n    margin-left: 30rpx;\n    border-bottom: 1rpx solid #eee;\n    display: flex;\n    align-items: center;\n    padding: 30rpx 0;\n}\n.wuliu-box .icon-box {\n    width: 40rpx;\n    height: 40rpx;\n    overflow: hidden;\n    margin-right: 31rpx;\n    align-self: flex-start;\n}\n.wuliu-box .icon-box .icon{\n    width: 40rpx;\n    height: 40rpx;\n}\n.wuliu-box .arrow-right{\n    width: 15rpx;\n    height: 24rpx;\n}\n.wuliu-box .arrow-right .arrow{\n    width: 15rpx;\n    height: 24rpx;\n}\n.wuliu-box .right-text{\n    width: 575rpx;\n    margin-right: 30rpx;\n}\n.wuliu-box .right-text .order-number{\n    font-size:28rpx;\n    color:#000;\n    margin-bottom: 14rpx;\n}\n.wuliu-box .right-text .wuliu-text,\n.wuliu-box .right-text .wuliu-date{\n    font-size:24rpx;\n    color:#888888;\n    line-height:36rpx;\n}\n\n.goods-list{\n    width:100%;\n    background-color: #fff;\n    margin-bottom: 20rpx;\n    margin-top: 20rpx;\n}\n.goods-list .list-title{\n    font-size: 28rpx;\n    color: #000;\n    padding: 30rpx 0 25rpx 30rpx;\n}\n.goods-list  .a-goods{\n    width: 720rpx;\n    margin-left: 30rpx;\n    display: flex;\n    /*justify-content: space-between;*/\n    border-top: 1px solid #eee;\n    padding: 30rpx 30rpx 30rpx 0;\n}\n.goods-list  .a-goods .img-box{\n    width: 160rpx;\n    height:160rpx;\n    overflow: hidden;\n    margin-right: 20rpx;\n    background-color: #d8d8d8;\n}\n\n.goods-list .img-box .img{\n    width: 160rpx;\n    height:160rpx;\n}\n.goods-list  .a-goods .text-box{\n    width: 510rpx;\n    box-sizing: border-box;\n    padding-top: 10rpx;\n}\n.goods-list  .btn-row{\n    width: 720rpx;\n    margin-left: 30rpx;\n    border-top: 1rpx solid #eee;\n}\n.confirm-btn{\n    background:#ffffff;\n    border:1rpx solid #e64340;\n    border-radius:6rpx;\n    width:164rpx;\n    height:60rpx;\n    line-height: 60rpx;\n    margin: 20rpx 30rpx 20rpx auto;\n    font-size:26rpx;\n    color:#e64340;\n    text-align:center;\n}\n.a-goods .text-box .arow{\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n }\n.a-goods .text-box .arow .goods-name{\n     width: 360rpx;\n     font-size:26rpx;\n     height: 74rpx;\n     color:#000000;\n     line-height: 1.6;\n     overflow: hidden;\n }\n.a-goods .text-box .arow01{\n    margin-bottom: 30rpx;\n}\n.a-goods .text-box .arow .goods-price{\n    font-size:26rpx;\n    color:#000000;\n    align-self: flex-start;\n}\n.a-goods .text-box .arow .goods-label{\n    font-size: 26rpx;\n    color: #999;\n}\n.a-goods .text-box .arow .goods-num{\n    font-size: 26rpx;\n    color: #999;\n}\n.peisong-way{\n    width: 100%;\n    background-color: #fff;\n    margin-bottom: 20rpx;\n}\n.peisong-way .row-box{\n    width: 720rpx;\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    box-sizing: border-box;\n    padding: 24rpx 0;\n    border-bottom: 1rpx solid #eee;\n    margin-left: 30rpx;\n}\n.peisong-way .row-label{\n    font-size: 28rpx;\n    color: #000;\n}\n.peisong-way .right-text{\n    font-size: 28rpx;\n    color: #666;\n    padding-right: 30rpx;\n}\n.peisong-way .liuyan{\n    width: 510rpx;\n    font-size: 28rpx;\n}\n.goods-info{\n    width: 100%;\n    background-color: #fff;\n    margin-bottom: 120rpx;\n    padding-bottom: 24rpx;\n}\n.goods-info .row-box{\n    width: 100%;\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    box-sizing: border-box;\n    padding: 24rpx 30rpx 12rpx 30rpx;\n    font-size: 28rpx;\n    color: #000;\n}\n.goods-info .row-box .right-text{\n    text-align: right;\n}\n.jiesuan-box{\n    display: flex;\n    justify-content: space-between;\n    width: 100%;\n    height: 100rpx;\n    position: fixed;\n    bottom: 0;\n    left: 0;\n    border-top:1px solid #eee; \n    background-color: #fff;\n    z-index: 4;\n}\n.jiesuan-box .to-pay-btn{\n    width:250rpx;\n    text-align: center;\n    height: 100%;\n    line-height: 100rpx;\n    background-color: #e64340;\n    font-size:32rpx;\n    color:#ffffff;\n    border-radius: 0;\n}\n\n.jiesuan-box  .left-price{\n    display: flex;\n    width: 500rpx;\n    justify-content:flex-end;\n    line-height: 100rpx;\n    padding: 0 30rpx 0 0;\n    font-size:28rpx;\n    box-sizing: border-box;\n}\n\n.jiesuan-box .total{\n    color: #e64340;\n    text-align: right;\n}\n\n.hx-title {\n  text-align: center;\n}\n.hx-canvas {\n  width: 650rpx;\n  height: 650rpx;\n  margin-left: 50rpx;\n}\n\n.btn {\n  padding: 32rpx;\n}"
  },
  {
    "path": "pages/order-list/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\n\nPage({\n  data: {\n    page: 1,\n    tabIndex: 0,\n    statusType: [\n      {\n        status: 9999,\n        label: '全部'\n      },\n      {\n        status: 0,\n        label: '待付款'\n      },\n      {\n        status: 1,\n        label: '待发货'\n      },\n      {\n        status: 2,\n        label: '待收货'\n      },\n      {\n        status: 3,\n        label: '待评价'\n      },\n    ],\n    status: 9999,\n    hasRefund: false,\n    badges: [0, 0, 0, 0, 0]\n  },\n  statusTap: function(e) {\n    const index = e.detail.index\n    const status = this.data.statusType[index].status\n    this.setData({\n      page: 1,\n      status\n    });\n    this.orderList();\n  },\n  cancelOrderTap: function(e) {\n    const that = this;\n    const orderId = e.currentTarget.dataset.id;\n    wx.showModal({\n      title: '确定要取消该订单吗？',\n      content: '',\n      success: function(res) {\n        if (res.confirm) {\n          WXAPI.orderClose(wx.getStorageSync('token'), orderId).then(function(res) {\n            if (res.code == 0) {\n              that.data.page = 1\n              that.orderList()\n              that.getOrderStatistics()\n            }\n          })\n        }\n      }\n    })\n  },\n  async refundApply (e) {\n    // 申请售后 todo 判断是去申请页面还是去查看页面\n    const orderId = e.currentTarget.dataset.id;\n    const amount = e.currentTarget.dataset.amount;\n    wx.navigateTo({\n      url: \"/pages/order/refundApply?id=\" + orderId\n    })\n  },\n  toPayTap: function(e) {\n    // 防止连续点击--开始\n    if (this.data.payButtonClicked) {\n      wx.showToast({\n        title: '休息一下~',\n        icon: 'none'\n      })\n      return\n    }\n    this.data.payButtonClicked = true\n    setTimeout(() => {\n      this.data.payButtonClicked = false\n    }, 3000)  // 可自行修改时间间隔（目前是3秒内只能点击一次支付按钮）\n    // 防止连续点击--结束\n    const that = this;\n    const orderId = e.currentTarget.dataset.id;\n    let money = e.currentTarget.dataset.money;\n    const needScore = e.currentTarget.dataset.score;\n    WXAPI.userAmount(wx.getStorageSync('token')).then(function(res) {\n      if (res.code == 0) {\n        const order_pay_user_balance = wx.getStorageSync('order_pay_user_balance')\n        if (order_pay_user_balance != '1') {\n          res.data.balance = 0\n        }\n        // 增加提示框\n        if (res.data.score < needScore) {\n          wx.showToast({\n            title: '您的积分不足，无法支付',\n            icon: 'none'\n          })\n          return;\n        }\n        let _msg = '订单金额: ' + money +' 元'\n        if (res.data.balance > 0) {\n          _msg += ',可用余额为 ' + res.data.balance +' 元'\n          if (money - res.data.balance > 0) {\n            _msg += ',仍需微信支付 ' + (money - res.data.balance).toFixed(2) + ' 元'\n          }          \n        }\n        if (needScore > 0) {\n          _msg += ',并扣除 ' + needScore + ' 积分'\n        }\n        money = money - res.data.balance\n        wx.showModal({\n          title: '请确认支付',\n          content: _msg,\n          confirmText: \"确认支付\",\n          cancelText: \"取消支付\",\n          success: function (res) {\n            console.log(res);\n            if (res.confirm) {\n              that._toPayTap(orderId, money)\n            } else {\n              console.log('用户点击取消支付')\n            }\n          }\n        });\n      } else {\n        wx.showModal({\n          title: '错误',\n          content: '无法获取用户资金信息',\n          showCancel: false\n        })\n      }\n    })\n  },\n  async wxSphGetpaymentparams(e) {\n    const orderId = e.currentTarget.dataset.id\n    const res = await WXAPI.wxSphGetpaymentparams(wx.getStorageSync('token'), orderId)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return;\n    }\n    // 发起支付\n    wx.requestPayment({\n      timeStamp: res.data.timeStamp,\n      nonceStr: res.data.nonceStr,\n      package: res.data.package,\n      signType: res.data.signType,\n      paySign: res.data.paySign,\n      fail: aaa => {\n        console.error(aaa)\n        wx.showToast({\n          title: '支付失败:' + aaa\n        })\n      },\n      success: () => {\n        // 提示支付成功\n        wx.showToast({\n          title: '支付成功'\n        })\n        this.orderList()\n      }\n    })\n  },\n  _toPayTap: function (orderId, money){\n    const _this = this\n    if (money <= 0) {\n      // 直接使用余额支付\n      WXAPI.orderPay(wx.getStorageSync('token'), orderId).then(function (res) {\n        _this.data.page = 1\n        _this.orderList()\n        _this.getOrderStatistics()\n      })\n    } else {\n      this.setData({\n        orderId,\n        money,\n        paymentShow: true,\n        nextAction: {\n          type: 0,\n          id: orderId\n        }\n      })\n    }\n  },\n  onLoad: function(options) {\n    if (options && options.type) {\n      if (options.type == 99) {\n        this.setData({\n          hasRefund: true\n        });\n      } else {\n        const tabIndex = this.data.statusType.findIndex(ele => {\n          return ele.status == options.type\n        })\n        this.setData({\n          status: options.type,\n          tabIndex\n        });\n      }      \n    }\n    this.getOrderStatistics();\n    this.orderList();\n    this.setData({\n      sphpay_open: wx.getStorageSync('sphpay_open')\n    })\n  },\n  onReady: function() {\n    // 生命周期函数--监听页面初次渲染完成\n\n  },\n  getOrderStatistics() {\n    WXAPI.orderStatistics(wx.getStorageSync('token')).then(res => {\n      if (res.code == 0) {\n        const badges = this.data.badges;\n        badges[1] = res.data.count_id_no_pay\n        badges[2] = res.data.count_id_no_transfer\n        badges[3] = res.data.count_id_no_confirm\n        badges[4] = res.data.count_id_no_reputation\n        this.setData({\n          badges\n        })\n      }\n    })\n  },\n  onShow: function() {\n  },\n  onPullDownRefresh: function () {\n    this.data.page = 1\n    this.getOrderStatistics()\n    this.orderList()\n    wx.stopPullDownRefresh()\n  },\n  onReachBottom() {\n    this.setData({\n      page: this.data.page + 1\n    });\n    this.orderList()\n  },\n  async orderList(){\n    wx.showLoading({\n      title: '',\n    })\n    var postData = {\n      page: this.data.page,\n      pageSize: 20,\n      token: wx.getStorageSync('token')\n    };\n    if (this.data.hasRefund) {\n      postData.hasRefund = true\n    }\n    if (!postData.hasRefund) {\n      postData.status = this.data.status;\n    }\n    if (postData.status == 9999) {\n      postData.status = ''\n    }\n    const res = await WXAPI.orderList(postData)\n    wx.hideLoading()\n    if (res.code == 0) {\n      if (this.data.page == 1) {\n        this.setData({\n          orderList: res.data.orderList,\n          logisticsMap: res.data.logisticsMap,\n          goodsMap: res.data.goodsMap\n        })\n      } else {\n        this.setData({\n          orderList: this.data.orderList.concat(res.data.orderList),\n          logisticsMap: Object.assign(this.data.logisticsMap, res.data.logisticsMap),\n          goodsMap: Object.assign(this.data.goodsMap, res.data.goodsMap)\n        })\n      }\n    } else {\n      if (this.data.page == 1) {\n        this.setData({\n          orderList: null,\n          logisticsMap: {},\n          goodsMap: {}\n        })\n      } else {\n        wx.showToast({\n          title: '没有更多了',\n          icon: 'none'\n        })\n      }\n    }\n  },\n  paymentOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      paymentShow: false\n    })\n    wx.redirectTo({\n      url: '/pages/order-list/index',\n    })\n  },\n  paymentCancel() {\n    this.setData({\n      paymentShow: false\n    })\n  },\n  goOrderDetail(e) {\n    const item = e.currentTarget.dataset.item\n    wx.navigateTo({\n      url: '/pages/order-details/index?id=' + item.id,\n    })\n  },\n})"
  },
  {
    "path": "pages/order-list/index.json",
    "content": "{\n    \"navigationBarTitleText\":\"订单列表\",\n    \"enablePullDownRefresh\": true\n}"
  },
  {
    "path": "pages/order-list/index.wxml",
    "content": "<van-sticky>\n  <van-tabs wx:if='{{!hasRefund}}' active=\"{{ tabIndex }}\" bind:change=\"statusTap\" color=\"#E4393C\" title-active-color=\"#E4393C\" title-inactive-color=\"#666666\">\n    <van-tab wx:for=\"{{statusType}}\" wx:key=\"index\" title=\"{{item.label}}\" info=\"{{badges[index] ? badges[index] : ''}}\" />\n  </van-tabs>\n</van-sticky>\n\n<view class=\"container\">\n  <van-empty wx:if=\"{{ !orderList }}\" description=\"暂无订单\" />\n  \n  <view class=\"order-list\" hidden=\"{{orderList ? false : true}}\">\n    <view class=\"order-card\" wx:for=\"{{orderList}}\" wx:key=\"index\">\n      <!-- 订单头部 -->\n      <view class=\"order-header\" bind:tap=\"goOrderDetail\" data-item=\"{{ item }}\">\n        <view class=\"order-header-left\">\n          <view class=\"order-number\">订单号：{{item.orderNumber}}</view>\n          <view class=\"order-time\">{{item.dateAdd}}</view>\n        </view>\n        <view class=\"order-status\">{{item.statusStr}}</view>\n      </view>\n\n      <!-- 商品区域 -->\n      <wxs module=\"goodsDetailPage\">\n      module.exports = {\n        url : function(item) {\n          if (item.supplyType == 'cps_jd') {\n            return '/packageCps/pages/goods-details/cps-jd?id=' + item.goodsId\n          } else if (item.supplyType == 'vop_jd') {\n            return '/pages/goods-details/vop?id=' + item.yyId + '&goodsId=' + item.id\n          } else if (item.supplyType == 'cps_pdd') {\n            return '/packageCps/pages/goods-details/cps-pdd?id=' + item.goodsId\n          } else if (item.supplyType == 'cps_taobao') {\n            return '/packageCps/pages/goods-details/cps-taobao?id=' + item.goodsId\n          } else {\n            return '/pages/goods-details/index?id=' + item.goodsId\n          }\n        }\n      }\n      </wxs>\n      \n      <!-- 只有1个商品：左侧图片，右侧商品信息 -->\n      <view wx:if=\"{{goodsMap[item.id].length == 1}}\" class=\"goods-content-single\" bind:tap=\"goOrderDetail\" data-item=\"{{ item }}\">\n        <navigator url=\"{{ goodsDetailPage.url(goodsMap[item.id][0]) }}\" hover-class=\"none\">\n          <image src=\"{{goodsMap[item.id][0].pic}}\" class=\"goods-image-single\" mode=\"aspectFill\"></image>\n        </navigator>\n        <view class=\"goods-info-single\">\n          <view class=\"goods-name\">{{goodsMap[item.id][0].goodsName}}</view>\n          <view class=\"goods-price-info\">\n            <text class=\"goods-price\">¥{{goodsMap[item.id][0].amountSingle}}</text>\n            <text class=\"goods-quantity\">x{{goodsMap[item.id][0].number}}</text>\n          </view>\n        </view>\n      </view>\n\n      <!-- 有2个商品：两个商品图片+右侧价格信息 -->\n      <view wx:elif=\"{{goodsMap[item.id].length == 2}}\" class=\"goods-content-double\">\n        <view class=\"goods-left\">\n          <view class=\"goods-item-double\" wx:for=\"{{goodsMap[item.id]}}\" wx:key=\"index\" wx:for-item=\"goods\">\n            <navigator url=\"{{ goodsDetailPage.url(goods) }}\" hover-class=\"goods-item-hover\">\n              <image src=\"{{goods.pic}}\" class=\"goods-image-double\" mode=\"aspectFill\"></image>\n            </navigator>\n          </view>\n        </view>\n        <view class=\"goods-right\" bind:tap=\"goOrderDetail\" data-item=\"{{ item }}\">\n          <view class=\"price-info-compact\">\n            <view class=\"goods-count-compact\">共{{item.goodsNumber}}件商品</view>\n            <view class=\"total-price-compact\">\n              <text class=\"label-compact\">订单金额</text>\n              <view class=\"price-amount\">\n                <text class=\"price-symbol-compact\">¥</text>\n                <text class=\"price-value-compact\">{{item.amountReal}}</text>\n              </view>\n              <text class=\"score-value-compact\" wx:if=\"{{item.score > 0}}\">+{{item.score}}积分</text>\n            </view>\n          </view>\n        </view>\n      </view>\n\n      <!-- 大于2个商品：网格布局 -->\n      <view wx:else class=\"goods-content\" bind:tap=\"goOrderDetail\" data-item=\"{{ item }}\">\n        <view class=\"goods-grid\">\n          <view class=\"goods-item\" wx:for=\"{{goodsMap[item.id]}}\" wx:key=\"index\" wx:for-item=\"goods\">\n            <navigator url=\"{{ goodsDetailPage.url(goods) }}\" hover-class=\"goods-item-hover\">\n              <image src=\"{{goods.pic}}\" class=\"goods-image\" mode=\"aspectFill\"></image>\n            </navigator>\n          </view>\n        </view>\n      </view>\n\n      <!-- 备注信息 -->\n      <view class=\"order-remark\" wx:if=\"{{item.remark && item.remark != ''}}\" bind:tap=\"goOrderDetail\" data-item=\"{{ item }}\">\n        <text class=\"remark-label\">备注：</text>\n        <text class=\"remark-text\">{{item.remark}}</text>\n      </view>\n\n      <!-- 订单底部 - 大于2个商品或单个商品时显示 -->\n      <view class=\"order-footer\" wx:if=\"{{goodsMap[item.id].length != 2}}\">\n        <view class=\"order-summary\" bind:tap=\"goOrderDetail\" data-item=\"{{ item }}\">\n          <text class=\"goods-count\">共{{item.goodsNumber}}件商品</text>\n          <view class=\"total-price\">\n            <text class=\"label\">订单金额：</text>\n            <text class=\"price-symbol\">¥</text>\n            <text class=\"price-value\">{{item.amountReal}}</text>\n            <text class=\"score-value\" wx:if=\"{{item.score > 0}}\">+{{item.score}}积分</text>\n          </view>\n        </view>\n\n        <!-- 操作按钮 -->\n        <view class=\"order-actions\">\n          <view class=\"action-btn btn-default\" hidden=\"{{item.status==0? false : true}}\" catch:tap=\"cancelOrderTap\" data-id=\"{{item.id}}\">取消订单</view>\n          <view class=\"action-btn btn-primary\" hidden=\"{{item.status==0? false : true}}\" catch:tap=\"toPayTap\" data-id=\"{{item.id}}\" data-money=\"{{item.amountReal}}\" data-score=\"{{item.score}}\">立即付款</view>\n          <view wx:if=\"{{ item.status == 0 && sphpay_open == '1' }}\" class=\"action-btn btn-primary\" catch:tap=\"wxSphGetpaymentparams\" data-id=\"{{item.id}}\" data-money=\"{{item.amountReal}}\" data-score=\"{{item.score}}\">视频号支付</view>\n          <view class=\"action-btn btn-default\" hidden=\"{{(item.status==0 || item.status==-1) ? true : false}}\" catch:tap=\"refundApply\" data-id=\"{{item.id}}\" data-amount='{{item.amountReal}}'>退换货</view>\n        </view>\n      </view>\n\n      <!-- 订单底部 - 2个商品时只显示按钮 -->\n      <view class=\"order-footer\" wx:else>\n        <view class=\"order-actions\">\n          <view class=\"action-btn btn-default\" hidden=\"{{item.status==0? false : true}}\" catch:tap=\"cancelOrderTap\" data-id=\"{{item.id}}\">取消订单</view>\n          <view class=\"action-btn btn-primary\" hidden=\"{{item.status==0? false : true}}\" catch:tap=\"toPayTap\" data-id=\"{{item.id}}\" data-money=\"{{item.amountReal}}\" data-score=\"{{item.score}}\">立即付款</view>\n          <view wx:if=\"{{ item.status == 0 && sphpay_open == '1' }}\" class=\"action-btn btn-primary\" catch:tap=\"wxSphGetpaymentparams\" data-id=\"{{item.id}}\" data-money=\"{{item.amountReal}}\" data-score=\"{{item.score}}\">视频号支付</view>\n          <view class=\"action-btn btn-default\" hidden=\"{{(item.status==0 || item.status==-1) ? true : false}}\" catch:tap=\"refundApply\" data-id=\"{{item.id}}\" data-amount='{{item.amountReal}}'>退换货</view>\n        </view>\n      </view>\n    </view>\n  </view>\n  \n  <view class=\"safeAreaOldMarginBttom safeAreaNewMarginBttom\"></view>\n</view>\n\n<payment\n  money=\"{{ money }}\"\n  remark=\"支付订单 ：{{ orderId }}\"\n  nextAction=\"{{ nextAction }}\"\n  show=\"{{ paymentShow }}\"\n  bind:cancel=\"paymentCancel\"\n  bind:ok=\"paymentOk\"\n/>"
  },
  {
    "path": "pages/order-list/index.wxss",
    "content": "/* 页面容器 - 京东风格 */\n.container {\n  min-height: 100vh;\n  background: #f5f5f5;\n  padding-bottom: 20rpx;\n}\n\n/* 订单列表 */\n.order-list {\n  width: 100%;\n  padding: 0 20rpx;\n  box-sizing: border-box;\n}\n\n/* 订单卡片 */\n.order-card {\n  background: #ffffff;\n  border-radius: 12rpx;\n  margin-top: 20rpx;\n  overflow: hidden;\n  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);\n}\n\n/* 订单头部 */\n.order-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 24rpx 28rpx;\n  background: #ffffff;\n  border-bottom: 1px solid #f0f0f0;\n}\n\n.order-header-left {\n  flex: 1;\n}\n\n.order-number {\n  font-size: 24rpx;\n  color: #666666;\n  margin-bottom: 8rpx;\n  font-weight: 400;\n}\n\n.order-time {\n  font-size: 22rpx;\n  color: #999999;\n}\n\n.order-status {\n  font-size: 26rpx;\n  font-weight: 500;\n  color: #E4393C;\n}\n\n/* ========== 1个商品布局：横向，左图右信息 ========== */\n.goods-content-single {\n  display: flex;\n  padding: 28rpx 28rpx 20rpx;\n  background: #ffffff;\n  gap: 24rpx;\n}\n\n.goods-image-single {\n  width: 200rpx;\n  height: 200rpx;\n  border-radius: 8rpx;\n  background: #f8f8f8;\n  border: 1px solid #eeeeee;\n  flex-shrink: 0;\n}\n\n.goods-info-single {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  padding: 8rpx 0;\n}\n\n.goods-name {\n  font-size: 28rpx;\n  color: #333333;\n  line-height: 1.5;\n  display: -webkit-box;\n  -webkit-line-clamp: 3;\n  -webkit-box-orient: vertical;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n\n.goods-price-info {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-top: 16rpx;\n}\n\n.goods-price {\n  font-size: 32rpx;\n  color: #E4393C;\n  font-weight: 700;\n  font-family: DIN, -apple-system, system-ui;\n}\n\n.goods-quantity {\n  font-size: 26rpx;\n  color: #999999;\n}\n\n/* ========== 2个商品布局：左两图+右价格信息 ========== */\n.goods-content-double {\n  display: flex;\n  padding: 28rpx 28rpx 20rpx;\n  background: #ffffff;\n  gap: 20rpx;\n}\n\n.goods-left {\n  display: flex;\n  gap: 16rpx;\n}\n\n.goods-item-double {\n  position: relative;\n}\n\n.goods-image-double {\n  width: 200rpx;\n  height: 200rpx;\n  border-radius: 8rpx;\n  background: #f8f8f8;\n  border: 1px solid #eeeeee;\n}\n\n.goods-right {\n  flex: 1;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.price-info-compact {\n  text-align: center;\n}\n\n.goods-count-compact {\n  font-size: 24rpx;\n  color: #999999;\n  margin-bottom: 20rpx;\n}\n\n.total-price-compact {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 12rpx;\n}\n\n.label-compact {\n  font-size: 24rpx;\n  color: #666666;\n  font-weight: 500;\n}\n\n.price-amount {\n  display: flex;\n  align-items: baseline;\n}\n\n.price-symbol-compact {\n  font-size: 24rpx;\n  color: #E4393C;\n  font-weight: 600;\n}\n\n.price-value-compact {\n  font-size: 40rpx;\n  color: #E4393C;\n  font-weight: 700;\n  font-family: DIN, -apple-system, system-ui;\n}\n\n.score-value-compact {\n  font-size: 20rpx;\n  color: #E4393C;\n  margin-top: 4rpx;\n}\n\n/* ========== 多个商品布局：网格 ========== */\n.goods-content {\n  padding: 28rpx 28rpx 20rpx;\n  background: #ffffff;\n}\n\n.goods-grid {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 16rpx;\n}\n\n.goods-item {\n  width: 200rpx;\n  position: relative;\n}\n\n.goods-item-hover {\n  opacity: 0.85;\n}\n\n.goods-image {\n  width: 200rpx;\n  height: 200rpx;\n  border-radius: 8rpx;\n  background: #f8f8f8;\n  border: 1px solid #eeeeee;\n}\n\n/* 备注信息 */\n.order-remark {\n  display: flex;\n  align-items: flex-start;\n  padding: 20rpx 28rpx;\n  background: #fff9f0;\n  border-top: 1px solid #f0f0f0;\n  border-bottom: 1px solid #f0f0f0;\n}\n\n.remark-label {\n  font-size: 24rpx;\n  color: #E4393C;\n  margin-right: 8rpx;\n  font-weight: 500;\n  flex-shrink: 0;\n}\n\n.remark-text {\n  flex: 1;\n  font-size: 24rpx;\n  color: #666666;\n  line-height: 1.6;\n  word-break: break-all;\n}\n\n/* 订单底部 */\n.order-footer {\n  padding: 20rpx 28rpx 24rpx;\n  background: #ffffff;\n}\n\n.order-summary {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 20rpx;\n}\n\n.goods-count {\n  font-size: 24rpx;\n  color: #999999;\n}\n\n.total-price {\n  display: flex;\n  align-items: baseline;\n}\n\n.total-price .label {\n  font-size: 24rpx;\n  color: #333333;\n  margin-right: 8rpx;\n  font-weight: 500;\n}\n\n.total-price .price-symbol {\n  font-size: 22rpx;\n  color: #E4393C;\n  font-weight: 600;\n}\n\n.total-price .price-value {\n  font-size: 32rpx;\n  color: #E4393C;\n  font-weight: 700;\n  font-family: DIN, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui;\n}\n\n.total-price .score-value {\n  font-size: 20rpx;\n  color: #E4393C;\n  margin-left: 8rpx;\n  font-weight: 400;\n}\n\n/* 操作按钮 */\n.order-actions {\n  display: flex;\n  justify-content: flex-end;\n  gap: 16rpx;\n  flex-wrap: wrap;\n}\n\n.action-btn {\n  padding: 14rpx 28rpx;\n  border-radius: 4rpx;\n  font-size: 26rpx;\n  font-weight: 400;\n  text-align: center;\n  transition: all 0.2s ease;\n  min-width: 160rpx;\n}\n\n.btn-default {\n  background: #ffffff;\n  color: #666666;\n  border: 1px solid #cccccc;\n}\n\n.btn-default:active {\n  background: #f5f5f5;\n  border-color: #999999;\n}\n\n.btn-primary {\n  background: #E4393C;\n  color: #ffffff;\n  border: 1px solid #E4393C;\n}\n\n.btn-primary:active {\n  background: #c7302f;\n  border-color: #c7302f;\n}\n\n/* 底部安全区域 */\n.safeAreaOldMarginBttom,\n.safeAreaNewMarginBttom {\n  height: 40rpx;\n}"
  },
  {
    "path": "pages/peisong/detail.js",
    "content": "const app = getApp();\nconst CONFIG = require('../../config.js')\nconst WXAPI = require('apifm-wxapi')\nimport wxbarcode from 'wxbarcode'\n\nPage({\n    data:{\n      orderId:0,\n      goodsList:[],\n      fileList: [],\n      membersSelectIndex: -1,\n      membersSelectStr: '请选择分配配送员',\n    },\n    onLoad:function(e){\n      // e.peisongOrderId = 54\n      var peisongOrderId = e.peisongOrderId;\n      this.setData({\n        peisongOrderId\n      });\n      this.peisongOrderDetail()\n      this.peisongMemberInfo()\n    },\n    async peisongOrderDetail() {\n      const res = await WXAPI.peisongOrderDetail(wx.getStorageSync('token'), this.data.peisongOrderId)\n      if (res.code == 0) {\n        this.setData({\n          peisongOrderDetail: res.data\n        })\n      }\n    },\n    async peisongMemberInfo() {\n      const res = await WXAPI.peisongMemberInfo(wx.getStorageSync('token'))\n      if (res.code == 0) {\n        this.setData({\n          peisongMemberInfo: res.data\n        })\n        if (res.data.type == 2) {\n          this.peisongMembers()\n        }\n      }\n    },\n    async peisongMembers() {\n      const res = await WXAPI.peisongMembers({\n        token: wx.getStorageSync('token')\n      })\n      if (res.code == 0) {\n        res.data.result.forEach(ele => {\n          ele.showStr = ele.name + ' ' + ele.mobile + ' ' + ele.statusStr\n        })\n        this.setData({\n          peisongMembers: res.data.result\n        })\n      }\n    },\n    onShow : function () {\n      var that = this;\n      WXAPI.orderDetail(wx.getStorageSync('token'), 0, '', that.data.peisongOrderId).then(function (res) {\n        if (res.code != 0) {\n          wx.showModal({\n            title: '错误',\n            content: res.msg,\n            showCancel: false\n          })\n          return;\n        }\n        // 绘制核销码\n        if (res.data.orderInfo.hxNumber && res.data.orderInfo.status > 0) {\n          wxbarcode.qrcode('qrcode', res.data.orderInfo.hxNumber, 650, 650);\n        }        \n        that.setData({\n          orderDetail: res.data\n        });\n      })\n    },\n    wuliuDetailsTap:function(e){\n      var orderId = e.currentTarget.dataset.id;\n      wx.navigateTo({\n        url: \"/pages/wuliu/index?id=\" + orderId\n      })\n    },\n    confirmBtnTap:function(e){\n      let that = this;\n      let orderId = this.data.orderId;\n      wx.showModal({\n          title: '确认服务已完成？',\n          content: '',\n          success: function(res) {\n            if (res.confirm) {\n              WXAPI.orderDelivery(wx.getStorageSync('token'), orderId).then(function (res) {\n                if (res.code == 0) {\n                  that.onShow();                  \n                }\n              })\n            }\n          }\n      })\n    },\n    submitReputation: function (e) {\n      let that = this;\n      let postJsonString = {};\n      postJsonString.token = wx.getStorageSync('token');\n      postJsonString.orderId = this.data.orderId;\n      let reputations = [];\n      let i = 0;\n      while (e.detail.value[\"orderGoodsId\" + i]) {\n        let orderGoodsId = e.detail.value[\"orderGoodsId\" + i];\n        let goodReputation = e.detail.value[\"goodReputation\" + i];\n        let goodReputationRemark = e.detail.value[\"goodReputationRemark\" + i];\n\n        let reputations_json = {};\n        reputations_json.id = orderGoodsId;\n        reputations_json.reputation = goodReputation;\n        reputations_json.remark = goodReputationRemark;\n\n        reputations.push(reputations_json);\n        i++;\n      }\n      postJsonString.reputations = reputations;\n      WXAPI.orderReputation({\n        postJsonString: JSON.stringify(postJsonString)\n      }).then(function (res) {\n        if (res.code == 0) {\n          that.onShow();\n        }\n      })\n    },\n    afterRead(event) {\n      console.log(event.detail);\n      const fileList = this.data.fileList\n      event.detail.file.forEach(ele => {\n        fileList.push({\n          url: ele.path,\n          name: '图片'\n        })\n      })\n      this.setData({\n        fileList\n      });      \n    },\n    deletePic(event) {\n      const fileList = this.data.fileList\n      fileList.splice(event.detail.index, 1)\n      this.setData({\n        fileList\n      });\n    },\n    async startService() {\n      const extJsonStr = {}\n      wx.showLoading({\n        title: '提交中',\n      })\n      const res = await WXAPI.peisongStartService({\n        token: wx.getStorageSync('token'),\n        id: this.data.peisongOrderId,\n        extJsonStr: JSON.stringify(extJsonStr)\n      })\n      wx.hideLoading({\n        complete: (res) => {},\n      })\n      if (res.code != 0) {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n      } else {\n        wx.showToast({\n          title: '提交成功',\n          icon: 'success'\n        })\n        this.peisongOrderDetail()\n        this.onShow()\n      }\n    },\n    async endService() {\n      const extJsonStr = {}\n      let picNumber = 0\n      wx.showLoading({\n        title: '提交中',\n      })\n      const res = await WXAPI.peisongEndService({\n        token: wx.getStorageSync('token'),\n        id: this.data.peisongOrderId,\n        extJsonStr: JSON.stringify(extJsonStr)\n      })\n      wx.hideLoading({\n        complete: (res) => {},\n      })\n      if (res.code != 0) {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n      } else {\n        wx.showToast({\n          title: '提交成功',\n          icon: 'success'\n        })\n        this.setData({\n          fileList: []\n        })\n        this.peisongOrderDetail()\n        this.onShow()\n      }\n    },\n    previewImage(e) {\n      const logid = e.currentTarget.dataset.logid\n      const current = e.currentTarget.dataset.current\n      const urls = []\n      this.data.peisongOrderDetail.logs.forEach(ele => {\n        if (ele.id == logid) {\n          Object.values(ele.extJson).forEach(_ele => {\n            urls.push(_ele)\n          })\n        }\n      })\n      wx.previewImage({\n        urls,\n        current\n      })\n    },\n    bindPickerChange: function(e) {\n      const obj = this.data.peisongMembers[e.detail.value]\n      this.setData({\n        membersSelectIndex: e.detail.value,\n        membersSelectStr: obj.name + ' ' + obj.mobile\n      })\n    },\n    async paidan() {\n      if (this.data.membersSelectIndex == -1) {\n        wx.showToast({\n          title: '请选择洗车工',\n          icon: 'none'\n        })\n        return\n      }\n      const member = this.data.peisongMembers[this.data.membersSelectIndex]\n      const res = await WXAPI.peisongOrderAllocation(wx.getStorageSync('token'), this.data.peisongOrderId, member.id)\n      if (res.code != 0) {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n      } else {\n        wx.showToast({\n          title: '派单成功',\n          icon: 'success'\n        })\n        wx.navigateBack({\n          complete: (res) => {},\n        })\n      }\n    },\n    callMobile() {\n      wx.makePhoneCall({\n        phoneNumber: this.data.orderDetail.peisongMember.mobile,\n      })\n    },\n    callMobile2() {\n      wx.makePhoneCall({\n        phoneNumber: this.data.orderDetail.logistics.mobile,\n      })\n    },\n    goMap() {\n      const _this = this\n      const latitude = this.data.orderDetail.logistics.latitude\n      const longitude = this.data.orderDetail.logistics.longitude\n      wx.openLocation({\n        latitude,\n        longitude,\n        scale: 18\n      })\n    },\n    estimatedCompletionTimeChange(value) {\n      this.data.estimatedCompletionTimeChange = value.detail      \n    },\n    async estimatedCompletionTime(){\n      if (!this.data.estimatedCompletionTimeChange) {\n        wx.showToast({\n          title: '填写预计完成时间',\n          icon: 'none'\n        })\n        return;\n      }\n      const res = await WXAPI.peisongOrderEstimatedCompletionTime({\n        token: wx.getStorageSync('token'),\n        id: this.data.peisongOrderId,\n        estimatedCompletionTime: this.data.estimatedCompletionTimeChange\n      })\n      if (res.code == 0) {\n        wx.showToast({\n          title: '设置成功',\n          icon: 'success'\n        })\n        this.peisongOrderDetail()\n        this.onShow()\n      } else {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n      }\n    },\n    async peisongOrderGrab(){\n      if (!this.data.estimatedCompletionTimeChange) {\n        wx.showToast({\n          title: '填写预计完成时间',\n          icon: 'none'\n        })\n        return;\n      }\n      const res = await WXAPI.peisongOrderGrab({\n        token: wx.getStorageSync('token'),\n        id: this.data.peisongOrderId,\n        estimatedCompletionTime: this.data.estimatedCompletionTimeChange\n      })\n      if (res.code == 0) {\n        wx.showToast({\n          title: '抢单成功',\n          icon: 'success'\n        })\n        this.peisongOrderDetail()\n        this.onShow()\n      } else {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n      }\n    },\n})"
  },
  {
    "path": "pages/peisong/detail.json",
    "content": "{\n    \"navigationBarTitleText\": \"订单详情\"\n}"
  },
  {
    "path": "pages/peisong/detail.wxml",
    "content": "<view wx:if=\"{{orderDetail.orderInfo.refundStatus == 1}}\" class=\"refundStatus\">客户已申请退款</view>\n<van-cell-group title=\"订单信息\">\n  <van-cell title=\"客户订单号\" value=\"{{ orderDetail.orderInfo.orderNumber }}\" />\n  <van-cell title=\"配送单号\" value=\"{{ orderDetail.peisongOrderInfo.orderNumber }}\" />\n  <van-cell wx:if=\"{{ orderDetail.logistics }}\" title=\"客户姓名\" value=\"{{orderDetail.logistics.linkMan}}\" />      \n  <van-cell wx:if=\"{{ orderDetail.logistics }}\" title=\"客户手机\" value=\"{{orderDetail.logistics.mobile}}\" is-link bindtap=\"callMobile2\" />\n  <van-cell wx:if=\"{{ orderDetail.logistics }}\" title=\"客户地址\" value=\"{{ orderDetail.logistics.address }}\" />\n</van-cell-group>\n<van-cell-group title=\"商品信息\">\n  <van-card\n    wx:for=\"{{ orderDetail.goods }}\" wx:key=\"id\"\n    num=\"{{ item.number }}\"\n    price=\"{{ item.amount }}\"\n    desc=\"配送时间：{{ item.day }} {{ item.time }}\"\n    title=\"{{ item.goodsName }}\"\n    thumb=\"{{ item.pic }}\"\n    thumb-mode=\"aspectFill\"\n    centered\n  />\n</van-cell-group>\n<van-cell-group wx:if=\"{{orderDetail.peisongMember}}\" title=\"配送员信息\">\n  <van-cell title=\"姓名\" value=\"{{orderDetail.peisongMember.name}}\" />      \n  <van-cell title=\"手机\" value=\"{{orderDetail.peisongMember.mobile}}\" is-link bindtap=\"callMobile\" />         \n  <van-cell wx:if=\"{{orderDetail.peisongOrderInfo.estimatedCompletionTime}}\" title=\"预计完成时间\" value=\"{{orderDetail.peisongOrderInfo.estimatedCompletionTime}}\" /> \n</van-cell-group>\n<view class=\"container\">\n  <view class=\"goods-list\">\n    <block wx:if=\"{{orderDetail.orderInfo.refundStatus != 1}}\">\n      <view class=\"list-title\">操作台</view>\n      <view class=\"btn-row\" wx:if=\"{{!peisongOrderDetail}}\">\n        <van-field\n          type=\"text\"\n          clearable\n          required\n          placeholder=\"填写预计完成时间，如: 12:30\"\n          bind:change=\"estimatedCompletionTimeChange\"\n        />\n        <van-button type=\"primary\" block bind:click=\"peisongOrderGrab\">抢单</van-button>\n      </view>\n      <view class=\"btn-row\" wx:if=\"{{peisongOrderDetail.orderInfo.status==1}}\">\n        <picker bindchange=\"bindPickerChange\" value=\"{{membersSelectIndex}}\" range=\"{{peisongMembers}}\" range-key=\"showStr\">\n          <van-cell title=\"选择配送员\" is-link value=\"{{membersSelectStr}}\" custom-class=\"select-peisong-member\" />\n        </picker>\n        <van-button type=\"danger\" block bind:click=\"paidan\">派单</van-button>\n      </view>\n      <view class=\"btn-row\" wx:if=\"{{peisongOrderDetail.orderInfo.status==2 && peisongOrderDetail.orderInfo.uid == peisongMemberInfo.id && !peisongOrderDetail.orderInfo.estimatedCompletionTime}}\">\n        <van-field\n          type=\"text\"\n          clearable\n          required\n          placeholder=\"填写预计完成时间，如: 12:30\"\n          bind:change=\"estimatedCompletionTimeChange\"\n        />\n        <van-button type=\"primary\" block bind:click=\"estimatedCompletionTime\">设置预计完成时间</van-button>\n      </view>\n      <view class=\"btn-row\" wx:if=\"{{peisongOrderDetail.orderInfo.status==2 && peisongOrderDetail.orderInfo.uid == peisongMemberInfo.id && peisongOrderDetail.orderInfo.estimatedCompletionTime}}\">\n        <!-- <van-uploader multiple file-list=\"{{ fileList }}\" bind:after-read=\"afterRead\" bind:delete=\"deletePic\" /> -->\n        <van-button type=\"primary\" block bind:click=\"startService\">开始配送</van-button>\n      </view>\n      <view class=\"btn-row\" wx:if=\"{{peisongOrderDetail.orderInfo.status==3 && peisongOrderDetail.orderInfo.uid == peisongMemberInfo.id}}\">\n        <van-uploader multiple file-list=\"{{ fileList }}\" bind:after-read=\"afterRead\" bind:delete=\"deletePic\" />\n        <van-button type=\"danger\" block bind:click=\"endService\">配送完成</van-button>\n      </view>\n    </block>\n  </view>\n  <view wx:if=\"{{orderDetail.goodsCoupons}}\" class=\"goods-info\" style=\"margin-bottom:32rpx;\">\n    <view wx:for=\"{{orderDetail.goodsCoupons}}\" wx:key=\"{{item.id}}\" class=\"row-box\">\n      <view wx:if=\"{{item.type == 0}}\" class=\"row-label\">优惠券</view>\n      <view wx:if=\"{{item.type == 0}}\" class=\"right-text\">{{item.coupon}}</view>\n      <image mode=\"widthFix\" wx:if=\"{{item.type == 1}}\" src=\"{{item.coupon}}\" style=\"max-width:100%;\"></image>\n    </view>\n  </view>\n  <view class=\"goods-info\">\n    <view class=\"row-box\">\n      <view class=\"row-label\">商品金额</view>\n      <view class=\"right-text\">¥ {{orderDetail.orderInfo.amount}}</view>\n    </view>\n    <view class=\"row-box\">\n      <view class=\"row-label\">配送费</view>\n      <!-- 运费 -->\n      <view class=\"right-text\">¥ {{orderDetail.orderInfo.amountLogistics}}</view>\n    </view>\n    <view class=\"row-box\">\n      <view class=\"row-label\">应付总额</view>\n      <view class=\"right-text\">¥ {{orderDetail.orderInfo.amountReal}}</view>\n    </view>\n  </view>\n  <view class=\"vant-contaner\">\n    <van-cell-group title=\"服务记录\">\n      <block wx:for=\"{{peisongOrderDetail.logs}}\" wx:key=\"id\">\n        <van-cell title=\"{{item.typeStr}}\" value=\"{{item.dateAdd}}\" />\n        <van-grid wx:if=\"{{item.type == 3 || item.type == 4}}\">\n          <van-grid-item wx:for=\"{{item.extJson}}\" wx:for-item=\"picpic\" wx:for-index='key' wx:key=\"*this\" use-slot>\n            <image\n              style=\"width: 100%; height: 90px;\"\n              src=\"{{picpic}}\"\n              mode=\"aspectFill\"\n              bindtap=\"previewImage\"\n              data-logid=\"{{item.id}}\"\n              data-current=\"{{picpic}}\"\n            />\n          </van-grid-item>\n        </van-grid>\n      </block>\n    </van-cell-group>\n  </view>\n</view>"
  },
  {
    "path": "pages/peisong/detail.wxss",
    "content": "page{\n  min-height: 100%;\n  background-color: #F2f2f2;\n}\n.container{\n  min-height: 100%;\n  overflow: hidden;\n  overflow-y: hidden;\n}\n.sec-wrap{\n    background-color: #fff;\n    margin-top: 20rpx;\n}\n.bottom-fiexd{\n  position: fixed;\n  bottom: 0;\n  left: 0;\n}\n.sec-wrap .order-status{\n    width: 720rpx;\n    margin-left: 30rpx;\n    border-bottom: 1rpx solid #eee;\n    height: 140rpx;\n    display: flex;\n    align-items: center;\n}\n.order-status .icon-box{\n    width: 80rpx;\n    height: 80rpx;\n    overflow: hidden;\n    margin-right: 30rpx;\n}\n.order-status .icon-box .icon{\n    width: 80rpx;\n    height: 80rpx;\n}\n.order-status .right-text{\n    width: 580rpx;\n    overflow: hidden;\n}\n.order-status .right-text .status{\n    font-size:28rpx;\n    color:#000; \n    margin-bottom: 10rpx;\n}\n.order-status .right-text .red{\n    color:#e64340;\n}\n.order-status .right-text .des{\n    font-size:24rpx;\n    color:#999; \n}\n.address-sec{\n    width: 720rpx;\n    margin-left: 30rpx;\n    display: flex;\n    align-items: center;\n    padding: 30rpx 0;\n}\n.address-sec .icon-box{\n    width: 30rpx;\n    align-self: flex-start;\n    overflow: hidden;\n    margin-right: 35rpx;\n}\n.address-sec .icon-box .icon{\n    width: 30rpx;\n    height: 30rpx;\n}\n.address-sec  .right-box{\n    width: 620rpx;\n}\n.address-sec  .right-box .name-tel{\n    font-size:28rpx;\n    color:#000000;\n    margin-bottom: 20rpx;\n}\n.address-sec  .right-box .text{\n    font-size:24rpx;\n    color:#888888;\n    overflow: hidden;\n}\n.wuliu-box{\n    width: 720rpx;\n    margin-left: 30rpx;\n    border-bottom: 1rpx solid #eee;\n    display: flex;\n    align-items: center;\n    padding: 30rpx 0;\n}\n.wuliu-box .icon-box {\n    width: 40rpx;\n    height: 40rpx;\n    overflow: hidden;\n    margin-right: 31rpx;\n    align-self: flex-start;\n}\n.wuliu-box .icon-box .icon{\n    width: 40rpx;\n    height: 40rpx;\n}\n.wuliu-box .arrow-right{\n    width: 15rpx;\n    height: 24rpx;\n}\n.wuliu-box .arrow-right .arrow{\n    width: 15rpx;\n    height: 24rpx;\n}\n.wuliu-box .right-text{\n    width: 575rpx;\n    margin-right: 30rpx;\n}\n.wuliu-box .right-text .order-number{\n    font-size:28rpx;\n    color:#000;\n    margin-bottom: 14rpx;\n}\n.wuliu-box .right-text .wuliu-text,\n.wuliu-box .right-text .wuliu-date{\n    font-size:24rpx;\n    color:#888888;\n    line-height:36rpx;\n}\n\n.goods-list{\n    width:100%;\n    background-color: #fff;\n    margin-bottom: 20rpx;\n    margin-top: 20rpx;\n}\n.goods-list .list-title{\n    font-size: 28rpx;\n    color: #000;\n    padding: 30rpx 0 25rpx 30rpx;\n}\n.goods-list  .a-goods{\n    width: 720rpx;\n    margin-left: 30rpx;\n    display: flex;\n    /*justify-content: space-between;*/\n    border-top: 1px solid #eee;\n    padding: 30rpx 30rpx 30rpx 0;\n}\n.goods-list  .a-goods .img-box{\n    width: 160rpx;\n    height:160rpx;\n    overflow: hidden;\n    margin-right: 20rpx;\n    background-color: #d8d8d8;\n}\n\n.goods-list .img-box .img{\n    width: 160rpx;\n    height:160rpx;\n}\n.goods-list  .a-goods .text-box{\n    width: 510rpx;\n    box-sizing: border-box;\n    padding-top: 10rpx;\n}\n.goods-list  .btn-row{\n    box-sizing: border-box;\n    width: 750rpx;\n    padding: 32rpx;\n    border-top: 1rpx solid #eee;\n}\n.confirm-btn{\n    background:#ffffff;\n    border:1rpx solid #e64340;\n    border-radius:6rpx;\n    width:164rpx;\n    height:60rpx;\n    line-height: 60rpx;\n    margin: 20rpx 30rpx 20rpx auto;\n    font-size:26rpx;\n    color:#e64340;\n    text-align:center;\n}\n.a-goods .text-box .arow{\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n }\n.a-goods .text-box .arow .goods-name{\n     width: 360rpx;\n     font-size:26rpx;\n     height: 74rpx;\n     color:#000000;\n     line-height: 1.6;\n     overflow: hidden;\n }\n.a-goods .text-box .arow01{\n    margin-bottom: 30rpx;\n}\n.a-goods .text-box .arow .goods-price{\n    font-size:26rpx;\n    color:#000000;\n    align-self: flex-start;\n}\n.a-goods .text-box .arow .goods-label{\n    font-size: 26rpx;\n    color: #999;\n}\n.a-goods .text-box .arow .goods-num{\n    font-size: 26rpx;\n    color: #999;\n}\n.peisong-way{\n    width: 100%;\n    background-color: #fff;\n    margin-bottom: 20rpx;\n}\n.peisong-way .row-box{\n    width: 720rpx;\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    box-sizing: border-box;\n    padding: 24rpx 0;\n    border-bottom: 1rpx solid #eee;\n    margin-left: 30rpx;\n}\n.peisong-way .row-label{\n    font-size: 28rpx;\n    color: #000;\n}\n.peisong-way .right-text{\n    font-size: 28rpx;\n    color: #666;\n    padding-right: 30rpx;\n}\n.peisong-way .liuyan{\n    width: 510rpx;\n    font-size: 28rpx;\n}\n.goods-info{\n    width: 100%;\n    background-color: #fff;\n    padding-bottom: 24rpx;\n}\n.goods-info .row-box{\n    width: 100%;\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    box-sizing: border-box;\n    padding: 24rpx 30rpx 12rpx 30rpx;\n    font-size: 28rpx;\n    color: #000;\n}\n.goods-info .row-box .right-text{\n    text-align: right;\n}\n.jiesuan-box{\n    display: flex;\n    justify-content: space-between;\n    width: 100%;\n    height: 100rpx;\n    position: fixed;\n    bottom: 0;\n    left: 0;\n    border-top:1px solid #eee; \n    background-color: #fff;\n    z-index: 4;\n}\n.jiesuan-box .to-pay-btn{\n    width:250rpx;\n    text-align: center;\n    height: 100%;\n    line-height: 100rpx;\n    background-color: #e64340;\n    font-size:32rpx;\n    color:#ffffff;\n    border-radius: 0;\n}\n\n.jiesuan-box  .left-price{\n    display: flex;\n    width: 500rpx;\n    justify-content:flex-end;\n    line-height: 100rpx;\n    padding: 0 30rpx 0 0;\n    font-size:28rpx;\n    box-sizing: border-box;\n}\n\n.jiesuan-box .total{\n    color: #e64340;\n    text-align: right;\n}\n\n.hx-title {\n  text-align: center;\n}\n.hx-canvas {\n  width: 650rpx;\n  height: 650rpx;\n  margin-left: 50rpx;\n}\n.vant-contaner {\n    box-sizing: border-box;\n    width: 100vw;\n}\n.select-peisong-member {\n    padding-left: 0 !important;\n    padding-right: 0 !important;\n}\n.pic-box {\n  display: flex;\n  flex-wrap: wrap;\n}\n.pic-box .pic {\n  margin: 16rpx 0 0 16rpx;\n  width: 228rpx;\n  height: 228rpx;\n}\n.refundStatus {\n  background: #ee0a24;\n  color: #ffffff;\n  padding: 16rpx;\n  text-align: center;\n}"
  },
  {
    "path": "pages/peisong/orders.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst APP = getApp()\n// fixed首次打开不显示标题的bug\nAPP.configLoadOK = () => {\n  \n}\nvar timer\nPage({\n  data: {\n    active: 0,\n    tabs: ['已接单', '服务中', '全部'],\n  },\n  onLoad: function (options) {\n    this.data.status = options.status // -1 待接单订单 ； 1 待分配订单 ； 其他状态： 我的维修单\n    this.setData({\n      status: options.status\n    })\n    if (options.status == -1) {\n      wx.setNavigationBarTitle({\n        title: '抢单任务大厅',\n      })\n    } else if (options.status == 1) {\n      wx.setNavigationBarTitle({\n        title: '管理员派单管理',\n      })\n    } else {\n      wx.setNavigationBarTitle({\n        title: '我的配送单',\n      })\n    }\n    if (this.data.status == -1) {\n      timer =setInterval(() => {\n        this.peisongOrdersGrabbing()\n      }, 1000)\n    }\n  },\n  onShow: function () {\n    if (this.data.status != -1) {\n      this.orders()\n    }\n  },\n  onUnload() {\n    if (timer) {\n      clearTimeout(timer)\n    }\n  },\n  async orders() {\n    wx.showLoading({\n      title: '',\n    })\n    const _data = {\n      token: wx.getStorageSync('token'),\n    }\n    if(this.data.status) {\n      // 管理员派单\n      _data.statusBatch = this.data.status\n      _data.refundStatusBatch = '0,2'\n    } else {\n      // 我的配送单\n      _data.uid = wx.getStorageSync('uid')\n      if (this.data.active == 0) {\n        _data.status = 2\n      } else if (this.data.active == 1) {\n        _data.status = 3\n      }\n    }\n    const res = await WXAPI.peisongOrders(_data)\n    wx.hideLoading()\n    if (res.code != 0) {\n      this.setData({\n        orderList: null\n      })\n    } else {\n      res.data.result.forEach(ele => {\n        if (ele.status == 2) {\n          ele.statusStr = '已接单'\n        }\n        if (ele.status == 3) {\n          ele.statusStr = '配送中'\n        }\n      })\n      this.setData({\n        orderList: res.data.result\n      })\n    }\n  },\n  async peisongOrdersGrabbing() {\n    // wx.showLoading({\n    //   title: '',\n    // })    \n    const res = await WXAPI.peisongOrdersGrabbing(wx.getStorageSync('token'))\n    // wx.hideLoading({\n    //   complete: (res) => {},\n    // })\n    if (res.code != 0) {\n      // wx.showToast({\n      //   title: res.msg,\n      //   icon: 'none'\n      // })\n      this.setData({\n        orderList: null\n      })\n    } else {\n      res.data.forEach(ele => {\n        if (ele.status == 2) {\n          ele.statusStr = '已接单'\n        }\n        if (ele.status == 3) {\n          ele.statusStr = '服务中'\n        }\n      })\n      this.setData({\n        orderList: res.data\n      })\n    }    \n  },\n  tabClick(e) {\n    this.setData({\n      active: e.detail.index\n    })\n    this.orders()\n  },\n})"
  },
  {
    "path": "pages/peisong/orders.json",
    "content": "{\n  \"navigationBarTitleText\": \"\"\n}"
  },
  {
    "path": "pages/peisong/orders.wxml",
    "content": "<van-tabs wx:if=\"{{ status != -1 && status != 1 }}\" active=\"{{ active }}\" bind:change=\"tabClick\">\n  <van-tab wx:for=\"{{ tabs }}\" wx:key=\"*this\" title=\"{{ item }}\"></van-tab>\n</van-tabs>\n<van-empty wx:if=\"{{ !orderList }}\" description=\"暂无订单\" />\n<van-cell title-width=\"520rpx;\" wx:for=\"{{orderList}}\" wx:key=\"index\" title=\"{{item.orderNumber}}\" label=\"下单时间: {{item.dateAdd}}\" value=\"{{item.statusStr}}\" is-link\turl=\"/pages/peisong/detail?peisongOrderId={{item.id}}\" />"
  },
  {
    "path": "pages/peisong/orders.wxss",
    "content": ""
  },
  {
    "path": "pages/peisong/statistics.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst dayjs = require(\"dayjs\")\nPage({\n  data: {\n    active: 0,\n    tabs: ['本月', '今天', '昨天'],\n    page: 1,\n    month: undefined,\n    today: undefined,\n    yesday: undefined,\n  },\n  onLoad(options) {\n    this.setData({\n      month: dayjs().format('YYYYMM'),\n      today: dayjs().format('YYYYMMDD'),\n      yesday: dayjs().add(-1, 'day').format('YYYYMMDD'),\n    })\n    this.peisongMemberStatistics()\n  },\n  onShow() {\n\n  },\n  onReachBottom() {\n    this.data.page++\n    this.peisongMemberStatistics()\n  },\n  tabClick(e) {\n    this.data.page = 1\n    this.setData({\n      active: e.detail.index\n    })\n    this.peisongMemberStatistics()\n  },\n  async peisongMemberStatistics() {\n    wx.showLoading({\n      title: ''\n    })\n    const data = {\n      token: wx.getStorageSync('token'),\n      page: this.data.page,\n    }\n    if (this.data.active == 0) {\n      data.day = this.data.month\n    } else if (this.data.active == 1) {\n      data.day = this.data.today\n    } else if (this.data.active == 2) {\n      data.day = this.data.yesday\n    }\n    const res = await WXAPI.peisongMemberStatistics(data)\n    wx.hideLoading()\n    if (res.code == 0) {\n      if (this.data.page == 1) {\n        this.setData({\n          list: res.data.result\n        })\n      } else {\n        this.setData({\n          list: this.data.list.concat(res.data.result)\n        })\n      }\n    } else {\n      if (this.data.page > 1) {\n        wx.showToast({\n          title: '没有更多了~',\n          icon: 'none'\n        })\n      } else {\n        this.setData({\n          list: null\n        })\n      }\n    }\n  },\n})"
  },
  {
    "path": "pages/peisong/statistics.json",
    "content": "{\n  \"usingComponents\": {},\n  \"navigationBarTitleText\": \"业绩统计\"\n}"
  },
  {
    "path": "pages/peisong/statistics.wxml",
    "content": "<van-tabs active=\"{{ active }}\" bind:change=\"tabClick\">\n  <van-tab wx:for=\"{{ tabs }}\" wx:key=\"*this\" title=\"{{ item }}\"></van-tab>\n</van-tabs>\n<van-empty wx:if=\"{{ !list }}\" description=\"暂无统计\" />\n<van-cell wx:for=\"{{ list }}\" wx:key=\"*this\" title=\"{{ item.day }}\" value=\"共 {{ item.orders }} 单\" label=\"累计销售额 ￥{{ item.amountOrders }}\" />"
  },
  {
    "path": "pages/peisong/statistics.wxss",
    "content": ""
  },
  {
    "path": "pages/pwd-pay/modify.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nPage({\n  data: {\n\n  },\n  onLoad: function (options) {\n\n  },\n  onShow: function () {\n\n  },\n  async submit() {\n    if (!this.data.pwdOld) {\n      wx.showToast({\n        title: '请输入原来的交易密码',\n        icon: 'none'\n      })\n      return\n    }\n    if (!this.data.pwd) {\n      wx.showToast({\n        title: '请输入新的交易密码',\n        icon: 'none'\n      })\n      return\n    }\n    if (!this.data.pwd2) {\n      wx.showToast({\n        title: '请再次输入新的交易密码',\n        icon: 'none'\n      })\n      return\n    }\n    if (this.data.pwd != this.data.pwd2) {\n      wx.showToast({\n        title: '两次输入不一致',\n        icon: 'none'\n      })\n      return\n    }\n    const res = await WXAPI.modifyPayPassword(wx.getStorageSync('token'), this.data.pwdOld, this.data.pwd)\n    if (res.code == 2000) {\n      AUTH.login(this)\n      return\n    }\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.showToast({\n      title: '修改成功'\n    })\n    setTimeout(() => {\n      wx.navigateBack({\n        delta: 0,\n      })\n    }, 1000);\n  },\n})"
  },
  {
    "path": "pages/pwd-pay/modify.json",
    "content": "{\n  \"navigationBarTitleText\": \"修改交易密码\"\n}"
  },
  {
    "path": "pages/pwd-pay/modify.wxml",
    "content": "<van-field\n  label=\"原密码\"\n  password\n  model:value=\"{{ pwdOld }}\"\n  placeholder=\"请输入原来的交易密码\"\n  clearable\n/>\n<van-field\n  label=\"新密码\"\n  password\n  model:value=\"{{ pwd }}\"\n  placeholder=\"请输入新的交易密码\"\n  clearable\n/>\n<van-field\n  label=\"再次输入\"\n  password\n  model:value=\"{{ pwd2 }}\"\n  placeholder=\"请再次输入新的交易密码\"\n  clearable\n/>\n<van-cell icon=\"info-o\" title=\"温馨提示\" label=\"为了保障您的资金安全，余额支付、优惠买单、申请提现的时候可能会需要交易密码\" />\n<view class=\"block-btn btn\">\n  <van-button type=\"primary\" block bind:click=\"submit\">修改交易密码</van-button>\n  <van-cell icon=\"question-o\" title=\"忘记交易密码？\" value=\"重置\" is-link url=\"/pages/pwd-pay/reset\" />\n</view>\n"
  },
  {
    "path": "pages/pwd-pay/modify.wxss",
    "content": ".btn {\n  margin-top: 32rpx;\n}"
  },
  {
    "path": "pages/pwd-pay/reset.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nPage({\n  data: {\n\n  },\n  onLoad: function (options) {\n\n  },\n  onShow: function () {\n    this.getUserApiInfo()\n  },\n  async getUserApiInfo() {\n    const res = await WXAPI.userDetail(wx.getStorageSync('token'))\n    if (res.code == 2000) {\n      AUTH.login(this)\n      return\n    }\n    if (res.code == 0) {\n      this.setData({\n        mobile: res.data.base.mobile\n      })\n    }\n  },\n  async sendSms() {\n    const res = await WXAPI.smsValidateCodeByToken(wx.getStorageSync('token'))\n    if (res.code == 2000) {\n      AUTH.login(this)\n      return\n    }\n    if (res.code == 0) {\n      this.setData({\n        smsloading: true,\n        smsloadingSecond: 60\n      })\n      wx.showToast({\n        title: '短信已发送',\n      })\n      this.countDown()\n    } else {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    }\n  },\n  countDown() {\n    const smsloadingSecond = this.data.smsloadingSecond\n    if (smsloadingSecond) {\n      this.setData({\n        smsloadingSecond: smsloadingSecond-1\n      })\n      setTimeout(() => {\n        this.countDown()\n      }, 1000);\n    } else {\n      this.setData({\n        smsloading: false\n      })\n    }\n  },\n  async submit() {\n    if (!this.data.mobile) {\n      wx.showToast({\n        title: '请先绑定手机号码',\n        icon: 'none'\n      })\n      return\n    }\n    if (!this.data.code) {\n      wx.showToast({\n        title: '请输入短信验证码',\n        icon: 'none'\n      })\n      return\n    }\n    if (!this.data.pwd) {\n      wx.showToast({\n        title: '请输入交易密码',\n        icon: 'none'\n      })\n      return\n    }\n    if (!this.data.pwd2) {\n      wx.showToast({\n        title: '请再次输入交易密码',\n        icon: 'none'\n      })\n      return\n    }\n    if (this.data.pwd != this.data.pwd2) {\n      wx.showToast({\n        title: '两次输入不一致',\n        icon: 'none'\n      })\n      return\n    }\n    const res = await WXAPI.resetPayPassword(this.data.mobile, this.data.code, this.data.pwd)\n    if (res.code == 2000) {\n      AUTH.login(this)\n      return\n    }\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.showToast({\n      title: '设置成功'\n    })\n    setTimeout(() => {\n      wx.navigateBack({\n        delta: 0,\n      })\n    }, 1000);\n  },\n  bindMobile() {\n    this.setData({\n      bindMobileShow: true\n    })\n  },\n  bindMobileOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      bindMobileShow: false\n    })\n    this.getUserApiInfo()\n  },\n  bindMobileCancel() {\n    this.setData({\n      bindMobileShow: false\n    })\n  },\n})"
  },
  {
    "path": "pages/pwd-pay/reset.json",
    "content": "{\n  \"navigationBarTitleText\": \"重置交易密码\"\n}"
  },
  {
    "path": "pages/pwd-pay/reset.wxml",
    "content": "<van-field\n  wx:if=\"{{ mobile }}\"\n  model:value=\"{{ mobile }}\"\n  center\n  readonly\n  clearable\n  label=\"手机号码\"\n  placeholder=\"请输入短信验证码\"\n  use-button-slot\n>\n  <van-button slot=\"button\" size=\"small\" type=\"primary\" bind:click=\"sendSms\" disabled=\"{{ smsloading }}\">{{ smsloading ? smsloadingSecond + '秒后重新获取' : '发送验证码' }}</van-button>\n</van-field>\n<van-field\n  wx:else\n  center\n  readonly\n  clearable\n  label=\"手机号码\"\n  placeholder=\"绑定后才可以重置\"\n  use-button-slot\n>\n  <van-button slot=\"button\" type=\"primary\" size=\"small\" bind:tap=\"bindMobile\">立即绑定</van-button>\n</van-field>\n<van-field\n  wx:if=\"{{ mobile }}\"\n  label=\"短信验证码\"\n  type=\"number\"\n  model:value=\"{{ code }}\"\n  placeholder=\"请输入短信验证码\"\n  clearable\n/>\n<van-field\n  wx:if=\"{{ mobile }}\"\n  label=\"交易密码\"\n  password\n  model:value=\"{{ pwd }}\"\n  placeholder=\"请输入交易密码\"\n  clearable\n/>\n<van-field\n  wx:if=\"{{ mobile }}\"\n  label=\"再次输入\"\n  password\n  model:value=\"{{ pwd2 }}\"\n  placeholder=\"请再次输入交易密码\"\n  clearable\n/>\n<van-cell icon=\"info-o\" title=\"温馨提示\" label=\"为了保障您的资金安全，余额支付、优惠买单、申请提现的时候可能会需要交易密码\" />\n<view class=\"block-btn btn\">\n  <van-button type=\"primary\" block bind:click=\"submit\">重置交易密码</van-button>\n</view>\n\n<bind-mobile\n  title=\"绑定手机号码\"\n  alarmText=\"为保障您的资金安全，请先绑定手机号码\"\n  show=\"{{ bindMobileShow }}\"\n  bind:cancel=\"bindMobileCancel\"\n  bind:ok=\"bindMobileOk\"\n/>"
  },
  {
    "path": "pages/pwd-pay/reset.wxss",
    "content": ".btn {\n  margin-top: 32rpx;\n}"
  },
  {
    "path": "pages/pwd-pay/set.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nPage({\n  data: {\n\n  },\n  onLoad: function (options) {\n\n  },\n  onShow: function () {\n\n  },\n  async submit() {\n    if (!this.data.pwd) {\n      wx.showToast({\n        title: '请输入交易密码',\n        icon: 'none'\n      })\n      return\n    }\n    if (!this.data.pwd2) {\n      wx.showToast({\n        title: '请再次输入交易密码',\n        icon: 'none'\n      })\n      return\n    }\n    if (this.data.pwd != this.data.pwd2) {\n      wx.showToast({\n        title: '两次输入不一致',\n        icon: 'none'\n      })\n      return\n    }\n    const res = await WXAPI.setPayPassword(wx.getStorageSync('token'), this.data.pwd)\n    if (res.code == 2000) {\n      AUTH.login(this)\n      return\n    }\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.showToast({\n      title: '设置成功'\n    })\n    setTimeout(() => {\n      wx.navigateBack({\n        delta: 0,\n      })\n    }, 1000);\n  },\n})"
  },
  {
    "path": "pages/pwd-pay/set.json",
    "content": "{\n  \"navigationBarTitleText\": \"设置交易密码\"\n}"
  },
  {
    "path": "pages/pwd-pay/set.wxml",
    "content": "<van-field\n  label=\"交易密码\"\n  password\n  model:value=\"{{ pwd }}\"\n  placeholder=\"请输入交易密码\"\n  clearable\n/>\n<van-field\n  label=\"再次输入\"\n  password\n  model:value=\"{{ pwd2 }}\"\n  placeholder=\"请再次输入交易密码\"\n  clearable\n/>\n<van-cell icon=\"info-o\" title=\"温馨提示\" label=\"为了保障您的资金安全，余额支付、优惠买单、申请提现的时候可能会需要交易密码\" />\n<view class=\"block-btn btn\">\n  <van-button type=\"primary\" block bind:click=\"submit\">设置交易密码</van-button>\n</view>\n"
  },
  {
    "path": "pages/pwd-pay/set.wxss",
    "content": ".btn {\n  margin-top: 32rpx;\n}"
  },
  {
    "path": "pages/raffle/index.js",
    "content": "const WXAPI = require('apifm-wxapi');\nconst {\n  unix\n} = require('dayjs');\n//计数器\nvar interval = null;\n//值越大旋转时间越长  即旋转速度\nvar intime = 50;\nPage({\n  data: {\n    id: undefined,\n    border: ['border:none', 'border:none', 'border:none', 'border:none', 'border:none', 'border:none', 'border:none', 'border:none'],\n    btnconfirm: 'https://dcdn.it120.cc/2024/04/12/21578e4c-575a-48dd-9825-072d92f7a3e8.png',\n    clickLuck: 'clickLuck',\n    luckPosition: 0,\n  },\n  onLoad(e) {\n    this.data.id = e.id\n    this.loadAnimation(); // 进入页面时缓慢切换\n    this.luckyInfo()\n  },\n  onShow() {},\n  onShareAppMessage() {\n\n  },\n  async luckyInfo() {\n    wx.showLoading({\n      title: ''\n    })\n    const res = await WXAPI.luckyInfo(this.data.id)\n    wx.hideLoading()\n    if (res.code == 0) {\n      let timesPerUser = res.data.info.timesPerUser\n      let luckyGoods = res.data.luckyGoods\n      if (!luckyGoods) {\n        luckyGoods = []\n      }\n      // 补全9个\n      for (let index = 0; index < 9; index++) {\n        luckyGoods.push({\n          goodsId: -2, // 补全\n          pic: \"https://dcdn.it120.cc/2024/04/12/b5fa1fa4-66f2-4ac0-9261-480e6df1df9b.jpg\",\n          title: \"谢谢参与\"\n        })\n      }\n      const uid = wx.getStorageSync('uid')\n      let logs\n      if (uid) {\n        const res2 = await WXAPI.luckyInfoJoinLogs({\n          lid: this.data.id,\n          uid\n        })\n        if (res2.code == 0) {\n          timesPerUser -= res2.data.totalRow\n          logs = res2.data.result\n        }\n      } else {\n        logs = null\n      }\n      this.setData({\n        timesPerUser,\n        logs,\n        luckyGoods\n      })\n    }\n  },\n  loadAnimation() {\n    var e = this;\n    var index = 0;\n    // if (interval == null){\n    interval = setInterval(function () {\n      if (index > 7) {\n        index = 0;\n        e.data.border[7] = 'border:none'\n      } else if (index != 0) {\n        e.data.border[index - 1] = 'border:none'\n      }\n      e.data.border[index] = 'border:6rpx solid #9077c4;border-radius:40rpx;width:168rpx;height:168rpx'\n      e.setData({\n        border: e.data.border,\n      })\n      index++;\n    }, 1000);\n    // }  \n  },\n  async getLuckyInfoJoin() { // 点击抽奖\n    if (this.data.clickLuck == '') {\n      return;\n    }\n    if (this.data.timesPerUser <= 0) {\n      wx.showToast({\n        title: '抽奖次数已用完',\n        icon: 'none'\n      })\n      return\n    }\n    const token = wx.getStorageSync('token')\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.luckyInfoJoin(this.data.id, token)\n    wx.hideLoading()\n    if (res.code == 2000) {\n      wx.navigateTo({\n          url: '/pages/login/index',\n      })\n      return\n    }\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    const prizeName = res.data.prizeName\n    const luckPosition = this.data.luckyGoods.findIndex(ele => ele.title == prizeName) // 服务器返回的中奖的是哪个商品\n    this.setData({\n      luckPosition\n    })\n    this.clickLuck()\n  },\n  clickLuck() {\n    var e = this;\n    if (this.data.clickLuck == '') {\n      return;\n    }\n    //设置按钮不可点击\n    this.setData({\n      btnconfirm: 'https://dcdn.it120.cc/2024/04/12/816d31c4-cb18-4107-8934-00999356a682.png',\n      clickLuck: '',\n    })\n    //清空计时器\n    clearInterval(interval);\n    var index = 0;\n    //循环设置每一项的透明度\n    interval = setInterval(function () {\n      if (index > 7) {\n        index = 0;\n        e.data.border[7] = 'border:none'\n      } else if (index != 0) {\n        e.data.border[index - 1] = 'border:none'\n      }\n      e.data.border[index] = 'border:6rpx solid #9077c4;border-radius:40rpx;width:168rpx;height:168rpx'\n      e.setData({\n        border: e.data.border\n      })\n      index++;\n    }, intime);\n\n    //模拟网络请求时间  设为两秒\n    var stoptime = 2000;\n    setTimeout(function () {\n      e.stop(e.data.luckPosition);\n    }, stoptime)\n\n  },\n  stop(which) {\n    var e = this;\n    //清空计数器\n    clearInterval(interval);\n    //初始化当前位置\n    var current = -1;\n    var border = e.data.border;\n\n    for (var i = 0; i < border.length; i++) {\n      if (border[i] == 'border:6rpx solid #ee6916;border-radius:40rpx;width:168rpx;height:168rpx') {\n        current = i;\n      }\n    }\n    //下标从1开始\n    var index = current + 1;\n    this.stopLuck(which, index, intime, 10);\n  },\n  /**\n   * which:中奖位置\n   * index:当前位置\n   * time：时间标记\n   * splittime：每次增加的时间 值越大减速越快\n   */\n  stopLuck(which, index, time, splittime) {\n    var e = this;\n    //值越大出现中奖结果后减速时间越长\n    var border = e.data.border;\n    setTimeout(function () {\n      //重置前一个位置\n      if (index > 7) {\n        index = 0;\n        border[7] = 'border:none;'\n      } else if (index != 0) {\n        border[index - 1] = 'border:none;'\n      }\n      //当前位置为选中状态\n      e.data.border[index] = 'border:6rpx solid #ee6916;border-radius:40rpx;width:168rpx;height:168rpx'\n      e.setData({\n        border: e.data.border\n      })\n      //如果旋转时间过短或者当前位置不等于中奖位置则递归执行\n      //直到旋转至中奖位置\n      if (time < 400 || index != which) {\n        //越来越慢\n        splittime++;\n        time += splittime;\n        //当前位置+1\n        index++;\n        e.stopLuck(which, index, time, splittime);\n      } else {\n\n        //抽奖后是否可以再次抽奖，可以的再次抽奖设为:'clickLuck',不能再次抽奖设为''\n        e.setData({\n          clickLuck: 'clickLuck'\n        })\n\n        //1秒后显示弹窗\n        setTimeout(function () {\n          wx.showModal({\n            title: '中奖提示',\n            content: e.data.luckPosition == 6 ? '非常遗憾，您没有中奖，谢谢您的参与。' : '恭喜抽中: ' + e.data.luckyGoods[e.data.luckPosition].title,\n            showCancel: false,\n            success: function (res) {\n              if (res.confirm) {\n                //设置按钮可以点击\n                e.setData({\n                  btnconfirm: 'https://dcdn.it120.cc/2024/04/12/21578e4c-575a-48dd-9825-072d92f7a3e8.png',\n                  clickLuck: 'clickLuck',\n                })\n                e.loadAnimation();\n                e.luckyInfo()\n              }\n            }\n          })\n        }, 600);\n      }\n    }, time);\n    console.log(time);\n  },\n})"
  },
  {
    "path": "pages/raffle/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"抽奖\"\n}"
  },
  {
    "path": "pages/raffle/index.wxml",
    "content": "<view class=\"container\">\n\n  <view class='frame_view'>\n    <view class='frame_row'>\n      <image class='frame_item' style='{{border[0]}}' src='{{luckyGoods[0].pic}}' mode=\"aspectFill\"></image>\n      <image class='frame_item' style='{{border[1]}}' src='{{luckyGoods[1].pic}}' mode=\"aspectFill\"></image>\n      <image class='frame_item' style='{{border[2]}}' src='{{luckyGoods[2].pic}}' mode=\"aspectFill\"></image>\n    </view>\n\n    <view class='frame_row'>\n      <image class='frame_item' style='{{border[7]}}' src='{{luckyGoods[7].pic}}' mode=\"aspectFill\"></image>\n      <image class='frame_item' src='{{btnconfirm}}' bindtap='getLuckyInfoJoin' mode=\"aspectFill\"></image>\n      <image class='frame_item' style='{{border[3]}}' src='{{luckyGoods[3].pic}}' mode=\"aspectFill\"></image>\n    </view>\n\n    <view class='frame_row'>\n      <image class='frame_item' style='{{border[6]}}' src='{{luckyGoods[6].pic}}' mode=\"aspectFill\"></image>\n      <image class='frame_item' style='{{border[5]}}' src='{{luckyGoods[5].pic}}' mode=\"aspectFill\"></image>\n      <image class='frame_item' style='{{border[4]}}' src='{{luckyGoods[4].pic}}' mode=\"aspectFill\"></image>\n    </view>\n  </view>\n</view>\n\n<view class=\"number\">剩余抽奖次数: {{ timesPerUser }}</view>\n<view wx:if=\"{{ logs }}\" class=\"logs\">\n  <van-cell-group title=\"抽奖记录\">\n    <van-cell wx:for=\"{{ logs }}\" wx:key=\"id\" title=\"{{ item.prizeName }}\" value=\"{{ item.dateAdd }}\"></van-cell>\n  </van-cell-group>\n</view>\n"
  },
  {
    "path": "pages/raffle/index.wxss",
    "content": "\npage {\n  min-height: 100vh;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n}\n.frame_view{\n  bottom: 160rpx;\n  left: 60rpx;\n  right: 60rpx;\n  width:590rpx;\n  height:590rpx;\n  padding: 20rpx;\n  background: #6339b5;\n  z-index: 3;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  align-items: center;\n  border-radius: 30rpx;\n}\n.frame_row{\n  width:580rpx;\n  height:180rpx;\n  display: flex;\n  flex-direction: row;\n  justify-content: space-between;\n  align-items: center;\n} \n.frame_item{\n  width:180rpx;\n  height:180rpx;\n}\n\n.top_img_button {\n  box-shadow: 6rpx 6rpx #e85c33;\n  box-sizing: border-box;\n  display: inline-block;\n  height: 42px;\n  line-height: 42px;\n  border-radius: 20px;\n  padding: 0 14px;\n  color:#fe7520;\n  font-size: 14px;\n  background: white;\n  text-align: center;\n}\n\n\nbutton:after{\n  border: none;\n}\n\n.number {\n  margin: 64rpx 0;\n  padding: 8rpx 16rpx;\n  color: #ffffff;\n  background: #9077c4;\n  border-radius: 16rpx;\n  font-size: 30rpx;\n}\n\n.logs {\n  width: 90vw;\n  background: #fff;\n}"
  },
  {
    "path": "pages/recharge/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst CONFIG = require('../../config.js')\nPage({\n  data: {\n\n  },\n  onLoad(e) {\n    // 读取系统参数\n    this.readConfigVal()\n    getApp().configLoadOK = () => {\n      this.readConfigVal()\n    }\n    this.rechargeSendRules()\n  },\n  onShow: function () {\n\n  },\n  readConfigVal() {\n    let recharge_amount_min = wx.getStorageSync('recharge_amount_min')\n    if (!recharge_amount_min) {\n      recharge_amount_min = 0;\n    }\n    this.setData({\n      recharge_amount_min: recharge_amount_min,\n      needBindMobile: wx.getStorageSync('needBindMobile'),\n    })\n  },\n  async rechargeSendRules() {\n    const res = await WXAPI.rechargeSendRules()\n    if (res.code == 0) {\n      this.setData({\n        rechargeSendRules: res.data\n      })\n    }\n  },\n  /**\n     * 点击充值优惠的充值送\n     */\n  async rechargeAmount(e) {\n    // 判断是否需要绑定手机号码\n    // https://www.yuque.com/apifm/nu0f75/zgf8pu\n    if (this.data.needBindMobile == 1) {\n      const resUserDetail = await WXAPI.userDetail(wx.getStorageSync('token'))\n      if (resUserDetail.code == 0 && !resUserDetail.data.base.mobile) {\n        this.setData({\n          bindMobileShow: true\n        })\n        return\n      }\n    }\n    var confine = e.currentTarget.dataset.confine;\n    var amount = confine;\n    this.setData({\n      amount,\n      paymentShow: true\n    })\n  },\n  async bindSave() {\n    const amount = this.data.amount;\n    if (!amount || amount * 1 < 0) {\n      wx.showModal({\n        title: '错误',\n        content: '请填写正确的充值金额',\n        showCancel: false\n      })\n      return\n    }\n    if (amount * 1 < this.data.recharge_amount_min * 1) {\n      wx.showModal({\n        title: '错误',\n        content: '单次充值金额至少' + this.data.recharge_amount_min + '元',\n        showCancel: false\n      })\n      return\n    }\n    // 判断是否需要绑定手机号码\n    // https://www.yuque.com/apifm/nu0f75/zgf8pu\n    if (this.data.needBindMobile == 1) {\n      console.log(123);\n      const resUserDetail = await WXAPI.userDetail(wx.getStorageSync('token'))\n      if (resUserDetail.code == 0 && !resUserDetail.data.base.mobile) {\n        this.setData({\n          bindMobileShow: true\n        })\n        return\n      }\n    }\n    this.setData({\n      paymentShow: true\n    })\n  },\n  bindMobileOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      bindMobileShow: false\n    })\n  },\n  bindMobileCancel() {\n    this.setData({\n      bindMobileShow: false\n    })\n  },\n  paymentOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      paymentShow: false\n    })\n    wx.switchTab({\n      url: '/pages/my/index',\n    })\n  },\n  paymentCancel() {\n    this.setData({\n      paymentShow: false\n    })\n  },\n})\n"
  },
  {
    "path": "pages/recharge/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"在线充值\"\n}"
  },
  {
    "path": "pages/recharge/index.wxml",
    "content": "<!-- 顶部背景装饰 -->\n<view class=\"page-container\">\n  <!-- 头部区域 -->\n  <view class=\"header-section\">\n    <view class=\"header-bg\"></view>\n    <view class=\"header-content\">\n      <view class=\"header-title\">余额充值</view>\n      <view class=\"header-subtitle\">安全便捷 · 即时到账</view>\n    </view>\n  </view>\n\n  <!-- 充值金额输入卡片 -->\n  <view class=\"amount-card\">\n    <view class=\"card-title\">\n      <view class=\"title-icon\">💰</view>\n      <view class=\"title-text\">充值金额</view>\n    </view>\n    <view class=\"amount-input-wrapper\">\n      <view class=\"amount-symbol\">¥</view>\n      <van-field\n        custom-class=\"amount-input\"\n        model:value=\"{{ amount }}\"\n        type=\"digit\"\n        focus\n        clearable\n        placeholder=\"请输入充值金额\"\n        placeholder-class=\"amount-placeholder\"\n      />\n    </view>\n  </view>\n\n  <!-- 快速充值金额选择 -->\n  <view class=\"quick-amount-section\" wx:if=\"{{ rechargeSendRules }}\">\n    <view class=\"section-title\">\n      <view class=\"title-line\"></view>\n      <view class=\"title-text\">快速选择</view>\n      <view class=\"title-line\"></view>\n    </view>\n    <view class=\"amount-options\">\n      <view \n        class=\"amount-option\" \n        wx:for=\"{{ rechargeSendRules }}\" \n        wx:key=\"index\"\n        bind:tap=\"rechargeAmount\"\n        data-confine=\"{{item.confine}}\"\n        data-send=\"{{item.send}}\"\n      >\n        <view class=\"option-amount\">¥{{item.confine}}</view>\n        <view class=\"option-gift\" wx:if=\"{{item.send}}\">\n          <view class=\"gift-tag\">送¥{{item.send}}</view>\n        </view>\n      </view>\n    </view>\n  </view>\n\n  <!-- 温馨提示 -->\n  <view class=\"tips-section\">\n    <view class=\"tips-title\">\n      <view class=\"tips-icon\">ℹ️</view>\n      <text>温馨提示</text>\n    </view>\n    <view class=\"tips-content\">\n      <view class=\"tip-item\">• 充值金额实时到账，可随时使用</view>\n      <view class=\"tip-item\">• 支持微信支付，安全可靠</view>\n      <view class=\"tip-item\">• 充值记录可在\"我的\"页面查看</view>\n    </view>\n  </view>\n\n  <!-- 充值按钮 -->\n  <view class=\"submit-section\">\n    <view class=\"submit-btn\" bind:tap=\"bindSave\">\n      <view class=\"btn-text\">立即充值</view>\n      <view class=\"btn-icon\">→</view>\n    </view>\n  </view>\n</view>\n\n<bind-mobile\n  title=\"绑定手机号码\"\n  alarmText=\"为保障您的资金安全，请先绑定手机号码\"\n  show=\"{{ bindMobileShow }}\"\n  bind:cancel=\"bindMobileCancel\"\n  bind:ok=\"bindMobileOk\"\n/>\n\n<payment\n  money=\"{{ amount }}\"\n  remark=\"在线充值{{ amount }}\"\n  show=\"{{ paymentShow }}\"\n  bind:cancel=\"paymentCancel\"\n  bind:ok=\"paymentOk\"\n/>"
  },
  {
    "path": "pages/recharge/index.wxss",
    "content": "/* 页面容器 */\npage {\n  background: linear-gradient(180deg, #FF4D4F 0%, #FF7A7C 30%, #F5F5F5 30%, #F5F5F5 100%);\n  min-height: 100vh;\n}\n\n.page-container {\n  min-height: 100vh;\n  padding-bottom: 40rpx;\n}\n\n/* 头部区域 */\n.header-section {\n  position: relative;\n  height: 280rpx;\n  overflow: hidden;\n}\n\n.header-bg {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  height: 100%;\n  background: linear-gradient(135deg, #E4393C 0%, #FF6B6B 100%);\n}\n\n.header-bg::after {\n  content: '';\n  position: absolute;\n  bottom: -2rpx;\n  left: 0;\n  right: 0;\n  height: 80rpx;\n  background: #F5F5F5;\n  border-radius: 50% 50% 0 0 / 100% 100% 0 0;\n}\n\n.header-content {\n  position: relative;\n  z-index: 2;\n  padding-top: 80rpx;\n  text-align: center;\n}\n\n.header-title {\n  font-size: 44rpx;\n  font-weight: bold;\n  color: #FFFFFF;\n  letter-spacing: 2rpx;\n  margin-bottom: 16rpx;\n}\n\n.header-subtitle {\n  font-size: 26rpx;\n  color: rgba(255, 255, 255, 0.9);\n  letter-spacing: 1rpx;\n}\n\n/* 充值金额卡片 */\n.amount-card {\n  margin: -60rpx 30rpx 30rpx;\n  background: #FFFFFF;\n  border-radius: 24rpx;\n  padding: 40rpx 30rpx;\n  box-shadow: 0 8rpx 32rpx rgba(228, 57, 60, 0.15);\n  position: relative;\n  z-index: 10;\n}\n\n.card-title {\n  display: flex;\n  align-items: center;\n  margin-bottom: 30rpx;\n}\n\n.title-icon {\n  font-size: 40rpx;\n  margin-right: 12rpx;\n}\n\n.title-text {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333333;\n}\n\n.amount-input-wrapper {\n  display: flex;\n  align-items: center;\n  padding: 30rpx 24rpx;\n  background: #F8F8F8;\n  border-radius: 16rpx;\n  border: 2rpx solid #E8E8E8;\n  transition: all 0.3s;\n}\n\n.amount-input-wrapper:focus-within {\n  background: #FFF;\n  border-color: #E4393C;\n  box-shadow: 0 0 0 4rpx rgba(228, 57, 60, 0.1);\n}\n\n.amount-symbol {\n  font-size: 48rpx;\n  font-weight: bold;\n  color: #E4393C;\n  margin-right: 12rpx;\n}\n\n.amount-input {\n  flex: 1;\n  font-size: 48rpx;\n  font-weight: bold;\n  color: #333333;\n}\n\n.amount-placeholder {\n  color: #BBBBBB;\n  font-size: 28rpx;\n  font-weight: normal;\n}\n\n/* 快速充值选择区域 */\n.quick-amount-section {\n  margin: 0 30rpx 30rpx;\n  background: #FFFFFF;\n  border-radius: 24rpx;\n  padding: 30rpx;\n  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);\n}\n\n.section-title {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-bottom: 30rpx;\n}\n\n.title-line {\n  flex: 1;\n  height: 2rpx;\n  background: linear-gradient(to right, transparent, #E8E8E8, transparent);\n}\n\n.section-title .title-text {\n  padding: 0 24rpx;\n  font-size: 28rpx;\n  font-weight: 500;\n  color: #666666;\n}\n\n.amount-options {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 20rpx;\n}\n\n.amount-option {\n  width: calc(50% - 15rpx);\n  background: linear-gradient(135deg, #FFF8F8 0%, #FFFFFF 100%);\n  border: 2rpx solid #FFE5E5;\n  border-radius: 16rpx;\n  padding: 32rpx 20rpx;\n  text-align: center;\n  position: relative;\n  transition: all 0.3s;\n  overflow: hidden;\n  box-sizing: border-box;\n}\n\n.amount-option::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: linear-gradient(135deg, #E4393C 0%, #FF6B6B 100%);\n  opacity: 0;\n  transition: opacity 0.3s;\n}\n\n.amount-option:active {\n  transform: scale(0.95);\n}\n\n.amount-option:active::before {\n  opacity: 1;\n}\n\n.option-amount {\n  font-size: 36rpx;\n  font-weight: bold;\n  color: #E4393C;\n  position: relative;\n  z-index: 1;\n  transition: color 0.3s;\n}\n\n.amount-option:active .option-amount {\n  color: #FFFFFF;\n}\n\n.option-gift {\n  margin-top: 12rpx;\n  position: relative;\n  z-index: 1;\n}\n\n.gift-tag {\n  display: inline-block;\n  background: linear-gradient(135deg, #FF4D4F 0%, #FF6B6B 100%);\n  color: #FFFFFF;\n  font-size: 20rpx;\n  padding: 4rpx 12rpx;\n  border-radius: 20rpx;\n  font-weight: 500;\n  box-shadow: 0 2rpx 8rpx rgba(228, 57, 60, 0.3);\n  transition: all 0.3s;\n}\n\n.amount-option:active .gift-tag {\n  background: #FFFFFF;\n  color: #E4393C;\n}\n\n/* 温馨提示 */\n.tips-section {\n  margin: 0 30rpx 30rpx;\n  background: linear-gradient(135deg, #FFF9F0 0%, #FFFFFF 100%);\n  border-radius: 20rpx;\n  padding: 30rpx;\n  border-left: 6rpx solid #FFA940;\n}\n\n.tips-title {\n  display: flex;\n  align-items: center;\n  margin-bottom: 20rpx;\n  font-size: 28rpx;\n  font-weight: 600;\n  color: #333333;\n}\n\n.tips-icon {\n  font-size: 32rpx;\n  margin-right: 8rpx;\n}\n\n.tips-content {\n  padding-left: 8rpx;\n}\n\n.tip-item {\n  font-size: 24rpx;\n  color: #666666;\n  line-height: 40rpx;\n  margin-bottom: 8rpx;\n}\n\n.tip-item:last-child {\n  margin-bottom: 0;\n}\n\n/* 提交按钮区域 */\n.submit-section {\n  margin: 60rpx 30rpx 30rpx;\n}\n\n.submit-btn {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 96rpx;\n  background: linear-gradient(135deg, #E4393C 0%, #FF6B6B 100%);\n  border-radius: 48rpx;\n  box-shadow: 0 8rpx 24rpx rgba(228, 57, 60, 0.4);\n  position: relative;\n  overflow: hidden;\n  transition: all 0.3s;\n}\n\n.submit-btn::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: -100%;\n  width: 100%;\n  height: 100%;\n  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);\n  transition: left 0.5s;\n}\n\n.submit-btn:active {\n  transform: scale(0.98);\n  box-shadow: 0 4rpx 16rpx rgba(228, 57, 60, 0.3);\n}\n\n.submit-btn:active::before {\n  left: 100%;\n}\n\n.btn-text {\n  font-size: 34rpx;\n  font-weight: bold;\n  color: #FFFFFF;\n  letter-spacing: 2rpx;\n}\n\n.btn-icon {\n  font-size: 32rpx;\n  color: #FFFFFF;\n  margin-left: 8rpx;\n  font-weight: bold;\n}\n\n/* 兼容vant组件样式 */\n.amount-input .van-field__control {\n  font-size: 48rpx !important;\n  font-weight: bold;\n  color: #333333;\n}"
  },
  {
    "path": "pages/recycle/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nPage({\n  data: {\n    logisticsType: '0', // 0 自己送货 1 快递\n    shopIndex: -1\n  },\n  onLoad(e) {\n    // e.type = 1\n    // e.orderId = 3\n    // e.platform = 'jd'\n    \n    this.setData({\n      type: e.type,\n      orderId: e.orderId,\n      platform: e.platform\n    })\n\n    wx.getLocation({\n      type: 'gcj02', // 返回 gps 坐标，gcj02 返回可用于 wx.openLocation 的坐标\n      success: res => {\n        this.data.latitude = res.latitude\n        this.data.longitude = res.longitude\n        this.initData()\n      },\n      fail: err => {\n        console.error(err)\n        this.initData()\n        AUTH.checkAndAuthorize('scope.userLocation')\n      }\n    })\n  },\n  onShow() {\n\n  },\n  async initData() {\n    this.fetchShops()\n    if (this.data.type == 1 && this.data.platform == 'jd') {\n      this.cpsJdOrderDetail()\n    }\n    if (this.data.type == 1 && this.data.platform == 'pdd') {\n      this.cpsPddOrderDetail()\n    }  \n  },\n  async fetchShops(){\n    const p = {}\n    if (this.data.latitude) {\n      p.curlatitude = this.data.latitude\n    }\n    if (this.data.longitude) {\n      p.curlongitude = this.data.longitude\n    }\n    const res = await WXAPI.fetchShops(p)\n    if (res.code == 0) {\n      res.data.forEach(ele => {\n        if (ele.distance) {\n          ele.distance = ele.distance.toFixed(3) // 距离保留3位小数\n        }\n      })\n      this.setData({\n        shops: res.data\n      })\n    }\n  },\n  async cpsJdOrderDetail() {\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.cpsJdOrderDetail(wx.getStorageSync('token'), this.data.orderId)\n    wx.hideLoading()\n    if (res.code == 0) {\n      const orderInfo = res.data.orderInfo\n      if (orderInfo.validCode != 17) {\n        wx.showModal({\n          title: '错误',\n          content: '已完成订单才可以申请回收',\n          showCancel: false,\n          success: res => {\n            wx.navigateBack()\n          }\n        })\n      }\n      if (orderInfo.recycleOrderId) {\n        wx.showModal({\n          title: '错误',\n          content: '请勿重复申请回收',\n          showCancel: false,\n          success: res => {\n            wx.navigateBack()\n          }\n        })\n      }\n      this.setData({\n        orderInfo,\n        amountRecycle: orderInfo.estimateCosPrice,\n        name: orderInfo.skuName,\n        pic: orderInfo.imageUrl,\n        amount: orderInfo.actualCosPrice,\n      })\n    } else {\n      wx.showModal({\n        title: '错误',\n        content: res.msg,\n        showCancel: false,\n        success: res => {\n          wx.navigateBack()\n        }\n      })\n    }\n  },\n  async cpsPddOrderDetail() {\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.cpsPddOrderDetail(wx.getStorageSync('token'), this.data.orderId)\n    wx.hideLoading()\n    if (res.code == 0) {\n      const orderInfo = res.data.orderInfo\n      if (orderInfo.status != 2 && orderInfo.status != 3 && orderInfo.status != 5) {\n        wx.showModal({\n          title: '错误',\n          content: '已完成订单才可以申请回收',\n          showCancel: false,\n          success: res => {\n            wx.navigateBack()\n          }\n        })\n      }\n      if (orderInfo.recycleOrderId) {\n        wx.showModal({\n          title: '错误',\n          content: '请勿重复申请回收',\n          showCancel: false,\n          success: res => {\n            wx.navigateBack()\n          }\n        })\n      }\n      this.setData({\n        orderInfo,\n        amountRecycle: orderInfo.orderAmount,\n        name: orderInfo.goodsName,\n        pic: orderInfo.imageUrl,\n        amount: orderInfo.orderAmount,\n      })\n    } else {\n      wx.showModal({\n        title: '错误',\n        content: res.msg,\n        showCancel: false,\n        success: res => {\n          wx.navigateBack()\n        }\n      })\n    }\n  },\n  logisticsTypeChange(e) {\n    this.setData({\n      logisticsType: e.detail\n    })\n  },\n  logisticsTypeClick(e) {\n    this.setData({\n      logisticsType: e.currentTarget.dataset.name\n    })\n  },\n  shopSelect(e) {\n    this.setData({\n      shopIndex: e.detail.value\n    })\n  },\n  callMobile() {\n    const shop = this.data.shops[this.data.shopIndex]\n    wx.makePhoneCall({\n      phoneNumber: shop.linkPhone,\n    })\n  },\n  goMap() {\n    const shop = this.data.shops[this.data.shopIndex]\n    const latitude = shop.latitude\n    const longitude = shop.longitude\n    wx.openLocation({\n      latitude,\n      longitude,\n      scale: 18\n    })\n  },\n  async submit() {\n    if (!this.data.amountRecycle) {\n      wx.showToast({\n        title: '填写回收价格',\n        icon: 'none'\n      })\n      return\n    }\n    if (this.data.shopIndex == -1) {\n      wx.showToast({\n        title: '请选择回收点',\n        icon: 'none'\n      })\n      return\n    }\n    const res = await WXAPI.recycleOrderApply({\n      token: wx.getStorageSync('token'),\n      type: this.data.type,\n      platform: this.data.platform,\n      buyOrderId: this.data.orderId,\n      name: this.data.name,\n      pic: this.data.pic,\n      amount: this.data.amount,\n      amountRecycle: this.data.amountRecycle,\n      logisticsType: this.data.logisticsType,\n      shopId: this.data.shops[this.data.shopIndex].id,\n      remark: this.data.remark ? this.data.remark : '',\n    })\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.showModal({\n      title: '成功',\n      content: '提交成功，耐心等待审核',\n      showCancel: false,\n      success: res => {\n        wx.redirectTo({\n          url: '/pages/recycle/orders',\n        })\n      }\n    })\n  }\n})"
  },
  {
    "path": "pages/recycle/index.json",
    "content": "{\n  \"navigationBarTitleText\":\"申请回收\"\n}"
  },
  {
    "path": "pages/recycle/index.wxml",
    "content": "<van-card\n  wx:if=\"{{ platform == 'jd' }}\"\n  num=\"{{ orderInfo.skuNum }}\"\n  price=\"{{ orderInfo.actualCosPrice }}\"\n  title=\"{{ orderInfo.skuName }}\"\n  thumb=\"{{ orderInfo.imageUrl }}\"\n  centered\n/>\n<van-card\n  wx:if=\"{{ platform == 'pdd' }}\"\n  num=\"{{ orderInfo.goodsNum }}\"\n  price=\"{{ orderInfo.orderAmount }}\"\n  title=\"{{ orderInfo.goodsName }}\"\n  thumb=\"{{ orderInfo.imageUrl }}\"\n  centered\n/>\n<van-field\n  model:value=\"{{ amountRecycle }}\"\n  label=\"回收价格\"\n  type=\"digit\"\n  clearable\n  required\n  input-align=\"right\"\n  placeholder=\"填写你预期的回收价格\"\n/>\n<van-field\n  model:value=\"{{ remark }}\"\n  label=\"备注\"\n  clearable\n  input-align=\"right\"\n  placeholder=\"填写备注信息\"\n/>\n<van-cell-group title=\"回收点\">\n  <picker bindchange=\"shopSelect\" value=\"{{shopIndex}}\" range=\"{{shops}}\" range-key=\"name\">\n    <van-cell title=\"选择回收点\" value=\"{{shopIndex == -1 ? '请选择':shops[shopIndex].name}}\" required is-link />\n  </picker>\n  <van-cell wx:if=\"{{shopIndex != -1 && shops[shopIndex].distance}}\" title=\"距你\" value=\"{{shops[shopIndex].distance}}km\" />\n  <van-cell wx:if=\"{{shopIndex != -1 && shops[shopIndex].linkMan}}\" title=\"联系人\" value=\"{{shops[shopIndex].linkMan}}\" />\n  <van-cell wx:if=\"{{shopIndex != -1}}\" title=\"电话\" value=\"{{shops[shopIndex].linkPhone}}\" is-link bind:click=\"callMobile\" />\n  <van-cell wx:if=\"{{shopIndex != -1}}\" title=\"地址\" title-width=\"64rpx\" value=\"{{shops[shopIndex].address}}\" is-link bind:click=\"goMap\" />\n</van-cell-group>\n\n<van-radio-group value=\"{{ logisticsType }}\" bind:change=\"logisticsTypeChange\">\n  <van-cell-group title=\"回收方式\">\n    <van-cell title=\"自己送到回收点\" clickable data-name=\"0\" bind:click=\"logisticsTypeClick\">\n      <van-radio slot=\"right-icon\" name=\"0\" />\n    </van-cell>\n    <van-cell title=\"快递至回收点\" clickable data-name=\"1\" bind:click=\"logisticsTypeClick\">\n      <van-radio slot=\"right-icon\" name=\"1\" />\n    </van-cell>\n  </van-cell-group>\n</van-radio-group>\n<view class=\"btn\">\n  <van-button type=\"primary\" block bind:click=\"submit\">申请回收</van-button>\n</view>"
  },
  {
    "path": "pages/recycle/index.wxss",
    "content": ".btn {\n  padding: 32rpx;\n}"
  },
  {
    "path": "pages/recycle/order-detail.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nimport wxbarcode from 'wxbarcode'\n\nPage({\n  data: {\n    logisticsType: '0', // 0 自己送货 1 快递\n    shopIndex: -1\n  },\n  onLoad(e) {\n    // e.id = 3\n    this.data.id = e.id\n    this.recycleOrderDetail()\n  },\n  onShow() {\n\n  },\n  async recycleOrderDetail() {\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.recycleOrderDetail(wx.getStorageSync('token'), this.data.id)\n    wx.hideLoading()\n    if (res.code == 0) {\n      const orderInfo = res.data.orderInfo\n      if (orderInfo.shopId) {\n        this.shopSubdetail(orderInfo.shopId)\n      }\n      if (orderInfo.logisticsType == 0) {\n        wxbarcode.qrcode('qrcode', orderInfo.hxNumber, 650, 650);\n      }\n      this.setData({\n        orderInfo,\n        shipperName: orderInfo.shipperName,\n        trackingNumber: orderInfo.trackingNumber\n      })\n    } else {\n      wx.showModal({\n        title: '错误',\n        content: res.msg,\n        showCancel: false,\n        success: res => {\n          wx.navigateBack()\n        }\n      })\n    }\n  },\n  async shopSubdetail(shopId) {\n    const res = await WXAPI.shopSubdetail(shopId)\n    if (res.code == 0) {\n      this.setData({\n        shopInfodetail: res.data\n      })\n    }\n  },\n  callMobile() {\n    wx.makePhoneCall({\n      phoneNumber: this.data.shopInfodetail.info.linkPhone,\n    })\n  },\n  goMap() {\n    const shop = this.data.shopInfodetail.info\n    const latitude = shop.latitude\n    const longitude = shop.longitude\n    wx.openLocation({\n      latitude,\n      longitude,\n      scale: 18\n    })\n  },\n  fahuo() {\n    this.setData({\n      popupShow: true\n    })\n  },\n  popupClose() {\n    this.setData({\n      popupShow: false\n    })\n  },\n  trackingNumberScan() {\n    wx.scanCode({\n      success: res => {\n        this.setData({\n          trackingNumber: res.result\n        })\n      }\n    })\n  },\n  async submit() {\n    if (!this.data.shipperName) {\n      wx.showToast({\n        title: '填写回快递公司',\n        icon: 'none'\n      })\n      return\n    }\n    if (!this.data.trackingNumber) {\n      wx.showToast({\n        title: '填写回快递单号',\n        icon: 'none'\n      })\n      return\n    }\n    this.setData({\n      submitButtonLoading: true\n    })\n    const res = await WXAPI.recycleOrderFahuo({\n      token: wx.getStorageSync('token'),\n      id: this.data.id,\n      shipperName: this.data.shipperName,\n      trackingNumber: this.data.trackingNumber,\n    })\n    this.setData({\n      submitButtonLoading: false\n    })\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.showToast({\n      title: '提交成功',\n    })\n    this.popupClose()\n    this.recycleOrderDetail()\n  }\n})"
  },
  {
    "path": "pages/recycle/order-detail.json",
    "content": "{\n  \"navigationBarTitleText\":\"回收订单详情\"\n}"
  },
  {
    "path": "pages/recycle/order-detail.wxml",
    "content": "<van-card\n  price=\"{{ orderInfo.amount }}\"\n  title=\"{{ orderInfo.name }}\"\n  thumb=\"{{ orderInfo.pic }}\"\n  centered\n/>\n<van-cell title=\"订单号\" value=\"{{ orderInfo.orderNumber }}\" />\n<van-cell title=\"回收价格\" value=\"{{ orderInfo.amountRecycle }}\" />\n<van-cell wx:if=\"{{ orderInfo.score }}\" title=\"回收积分\" value=\"{{ orderInfo.score }}\" />\n<van-cell wx:if=\"{{ orderInfo.remark }}\" title=\"备注\" value=\"{{ orderInfo.remark }}\" />\n<van-cell title=\"状态\" value=\"{{ orderInfo.statusStr }}\" value-class=\"statusStr\" />\n<van-cell title=\"申请时间\" value=\"{{ orderInfo.dateAdd }}\" />\n<van-cell wx:if=\"{{ orderInfo.dateUpdate }}\" title=\"更新时间\" value=\"{{ orderInfo.dateUpdate }}\" />\n\n<van-cell-group title=\"回收点\">\n  <van-cell title=\"回收方式\" value=\"{{ orderInfo.logisticsType == 0 ? '自己货物送至回收点' : '快递至回收点' }}\" />\n  <van-cell wx:if=\"{{shopInfodetail}}\" title=\"联系人\" value=\"{{shopInfodetail.info.linkMan}}\" />\n  <van-cell wx:if=\"{{shopInfodetail}}\" title=\"电话\" value=\"{{shopInfodetail.info.linkPhone}}\" is-link bind:click=\"callMobile\" />\n  <van-cell wx:if=\"{{shopInfodetail}}\" title=\"地址\" title-width=\"64rpx\" value=\"{{shopInfodetail.info.address}}\" is-link bind:click=\"goMap\" />\n</van-cell-group>\n\n<van-cell-group wx:if=\"{{ orderInfo.logisticsType == 1 && (orderInfo.status == 2 || orderInfo.status == 3) }}\" title=\"快递信息\">\n  <van-cell title=\"快递公司\" value=\"{{orderInfo.shipperName}}\" />\n  <van-cell title=\"快递单号\" value=\"{{orderInfo.trackingNumber}}\" />\n</van-cell-group>\n\n<view wx:if=\"{{ orderInfo.logisticsType == 0}}\" class=\"hx-qrcode\">\n  <view class=\"t\">核销码</view>\n  <view class=\"t2\">工作人员扫描该码完成回收</view>\n  <canvas class=\"hx-canvas\" canvas-id=\"qrcode\" />\n</view>\n\n<view wx:if=\"{{ orderInfo.logisticsType == 1 && (orderInfo.status == 1 || orderInfo.status == 2) }}\" class=\"btn\">\n  <van-button type=\"primary\" block bind:click=\"fahuo\">填写快递信息</van-button>\n</view>\n\n<van-popup show=\"{{ popupShow }}\" position=\"bottom\" round bind:close=\"popupClose\" custom-style=\"padding-top:32rpx;\">\n  <van-field label=\"快递公司\" model:value=\"{{ shipperName }}\" placeholder=\"填写快递公司\" clearable />\n  <van-field label=\"快递单号\" model:value=\"{{ trackingNumber }}\" placeholder=\"填写快递单号\" clearable use-button-slot>\n    <van-icon slot=\"button\" name=\"scan\" size=\"48rpx\" color=\"green\" bind:click=\"trackingNumberScan\" />\n  </van-field>\n  <view class=\"submit-btn-box\">\n    <van-button type=\"primary\" block loading=\"{{submitButtonLoading}}\" bind:click=\"submit\">确认</van-button>\n  </view>\n</van-popup>"
  },
  {
    "path": "pages/recycle/order-detail.wxss",
    "content": ".btn {\n  padding: 32rpx;\n}\n.hx-qrcode {\n  padding: 32rpx;\n  text-align: center;\n  color: #333;\n}\n.hx-qrcode .t {\n  font-weight: bold;\n}\n.hx-qrcode .t2 {\n  font-size: 26rpx;\n  color: #666;\n}\n.hx-qrcode .hx-canvas {\n  width: 650rpx;\n  height: 650rpx;\n}\n.statusStr {\n  color: #e64340 !important;\n  font-weight: bold;\n}"
  },
  {
    "path": "pages/recycle/orders.js",
    "content": "const WXAPI = require('apifm-wxapi')\n\nPage({\n  data: {\n    \n  },\n  onLoad(e) {\n    this.recycleOrders()\n  },\n  onShow() {\n\n  },\n  async recycleOrders() {\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.recycleOrders({\n      token: wx.getStorageSync('token')\n    })\n    wx.hideLoading()\n    if (res.code == 0) {\n      this.setData({\n        list: res.data.result\n      })\n    }\n  },\n  onPullDownRefresh() {\n    this.recycleOrders()\n    wx.stopPullDownRefresh()\n  },\n  detail(e) {\n    const id = e.currentTarget.dataset.id\n    wx.navigateTo({\n      url: `/pages/recycle/order-detail?id=${id}`,\n    })\n  },\n  async recycleOrderClose(e) {\n    wx.showModal({\n      title: '提示',\n      content: '确认要取消该订单吗？',\n      success: res => {\n        if (res.confirm) {\n          this._recycleOrderClose(e)\n        }\n      }\n    })\n  },\n  async _recycleOrderClose(e) {\n    const id = e.currentTarget.dataset.id\n    const res = await WXAPI.recycleOrderClose(wx.getStorageSync('token'), id)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.showToast({\n      title: '已取消',\n    })\n    this.recycleOrders()\n  },\n  async recycleOrderDelete(e) {\n    wx.showModal({\n      title: '提示',\n      content: '确认要删除该订单吗？',\n      success: res => {\n        if (res.confirm) {\n          this._recycleOrderDelete(e)\n        }\n      }\n    })\n  },\n  async _recycleOrderDelete(e) {\n    const id = e.currentTarget.dataset.id\n    const res = await WXAPI.recycleOrderDelete(wx.getStorageSync('token'), id)\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n      return\n    }\n    wx.showToast({\n      title: '删除成功',\n    })\n    this.recycleOrders()\n  }\n})"
  },
  {
    "path": "pages/recycle/orders.json",
    "content": "{\n  \"navigationBarTitleText\":\"回收订单\",\n  \"enablePullDownRefresh\": true\n}"
  },
  {
    "path": "pages/recycle/orders.wxml",
    "content": "<van-empty wx:if=\"{{ !list }}\" description=\"暂无订单\" />\n<van-card\n  wx:for=\"{{list}}\" wx:key=\"id\"\n  origin-price=\"{{ item.amount }}\"\n  price=\"{{ item.amountRecycle }}\"\n  title=\"{{ item.name }}\"\n  thumb=\"{{ item.pic }}\"\n  tag=\"{{ item.statusStr }}\"\n  centered\n>\n  <view slot=\"desc\">\n    <view>订单号 {{ item.orderNumber }}</view>\n    <view>回收时间 {{ item.dateAdd }}</view>\n  </view>\n  <view slot=\"footer\">\n    <van-button type=\"primary\" size=\"mini\" data-id=\"{{ item.id }}\" bind:click=\"detail\">详情</van-button>\n    <van-button wx:if=\"{{ item.status == 0 }}\" custom-class=\"btn\" type=\"warning\" size=\"mini\" data-id=\"{{ item.id }}\" bind:click=\"recycleOrderClose\">取消</van-button>\n    <van-button wx:if=\"{{ item.status < 1 }}\" custom-class=\"btn\" type=\"danger\" size=\"mini\" data-id=\"{{ item.id }}\" bind:click=\"recycleOrderDelete\">删除</van-button>\n  </view>\n</van-card>"
  },
  {
    "path": "pages/recycle/orders.wxss",
    "content": ".btn {\n  margin-left: 16rpx;\n}"
  },
  {
    "path": "pages/score/growth.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    growth: 0.00,\n    page: 1\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad(e) {\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.userAmountV2()\n        this.growthLogsV2()\n      } else {\n        getApp().loginOK = () => {\n          this.userAmountV2()\n          this.growthLogsV2()\n        }\n      }\n    })\n  },\n  onShow: function () {\n  },\n  onReachBottom() {\n    this.data.page++\n    this.growthLogsV2()\n  },\n  async userAmountV2() {\n    // https://www.yuque.com/apifm/nu0f75/wrqkcb\n    const res = await WXAPI.userAmountV2(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      this.setData({\n        growth: res.data.growth\n      })\n    }\n  },\n  async growthLogsV2() {\n    wx.showLoading({\n      title: '',\n    })\n    // https://www.yuque.com/apifm/nu0f75/gpb15y\n    const res = await WXAPI.growthLogsV2({\n      token: wx.getStorageSync('token'),\n      page: this.data.page,\n    })\n    wx.hideLoading()\n    if (res.code == 0) {\n      if (this.data.page == 1) {\n        this.setData({\n          cashlogs: res.data.result\n        })\n      } else {\n        this.setData({\n          cashlogs: this.data.cashlogs.concat(res.data.result)\n        })\n      }\n    } else {\n      if (this.data.page == 1) {\n        this.setData({\n          cashlogs: null\n        })\n      }\n    }\n  },\n  exchangeGrowth: function (e) {\n    wx.navigateTo({\n      url: '/pages/score-excharge/growth',\n    })\n  }\n})"
  },
  {
    "path": "pages/score/growth.json",
    "content": "{\n  \"navigationBarTitleText\": \"成长值明细\"\n}"
  },
  {
    "path": "pages/score/growth.wxml",
    "content": "<view class=\"score\">\n  <view>当前成长值</view>\n  <view>{{growth}}</view>\n</view>\n\n<!-- 积分兑换成长值入口 -->\n<view class=\"exchange-entry\" bind:tap=\"exchangeGrowth\">\n  <view class=\"exchange-icon\">🎁</view>\n  <view class=\"exchange-content\">\n    <view class=\"exchange-title\">用积分兑换成长值</view>\n    <view class=\"exchange-desc\">积分越多，成长越快</view>\n  </view>\n  <view class=\"exchange-arrow\">›</view>\n</view>\n\n<view class='no-data' wx:if=\"{{!cashlogs}}\">暂无成长值明细~</view>\n<view class='cashlogs' wx:if=\"{{cashlogs}}\" wx:for=\"{{cashlogs}}\" wx:key=\"{{index}}\">\n  <view class='profile'>\n    <view class='typeStr'>{{ item.typeStr }} {{ item.remark? '('+ item.remark +')' : '' }}</view>\n    <view class='dateAdd'>{{ item.dateAdd }}</view>\n    <view class='growthLeft' wx:if=\"{{item.growthLeft !== undefined}}\">剩余成长值: {{ item.growthLeft }}</view>\n  </view>\n  <view class='amount' style=\"color: {{ (item.behavior ==0 ) ? 'red' : 'green' }}\"> {{ (item.behavior ==0 ) ? '+' : '' }} {{ item.growth }} </view>\n</view>\n"
  },
  {
    "path": "pages/score/growth.wxss",
    "content": "/* 页面整体背景 */\npage {\n  background: #f5f5f5;\n}\n\n/* 顶部成长值展示区 - 京东风格渐变红 */\n.score {\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  width: 750rpx;\n  padding: 60rpx 0 80rpx;\n  background: linear-gradient(135deg, #e93b3d 0%, #e4393c 50%, #d42727 100%);\n  box-shadow: 0 4rpx 20rpx rgba(228, 57, 60, 0.3);\n  overflow: hidden;\n}\n\n/* 顶部装饰圆 */\n.score::before {\n  content: '';\n  position: absolute;\n  width: 400rpx;\n  height: 400rpx;\n  background: rgba(255, 255, 255, 0.1);\n  border-radius: 50%;\n  top: -200rpx;\n  right: -100rpx;\n}\n\n.score::after {\n  content: '';\n  position: absolute;\n  width: 300rpx;\n  height: 300rpx;\n  background: rgba(255, 255, 255, 0.08);\n  border-radius: 50%;\n  bottom: -150rpx;\n  left: -80rpx;\n}\n\n.score view:first-child {\n  position: relative;\n  z-index: 1;\n  font-size: 28rpx;\n  color: rgba(255, 255, 255, 0.9);\n  margin-bottom: 16rpx;\n  letter-spacing: 1rpx;\n}\n\n.score view:last-child {\n  position: relative;\n  z-index: 1;\n  font-size: 80rpx;\n  font-weight: bold;\n  color: #fff;\n  line-height: 90rpx;\n  text-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);\n}\n\n/* 空数据提示 */\n.no-data {\n  margin-top: 200rpx;\n  text-align: center;\n  font-size: 28rpx;\n  color: #999;\n}\n\n/* 明细列表容器 */\n.cashlogs {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin: 20rpx 30rpx;\n  padding: 30rpx;\n  background: #fff;\n  border-radius: 16rpx;\n  box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06);\n  transition: all 0.3s ease;\n  position: relative;\n  overflow: hidden;\n}\n\n/* 列表项左侧装饰条 */\n.cashlogs::before {\n  content: '';\n  position: absolute;\n  left: 0;\n  top: 50%;\n  transform: translateY(-50%);\n  width: 6rpx;\n  height: 60%;\n  background: linear-gradient(180deg, #e93b3d 0%, #e4393c 100%);\n  border-radius: 0 4rpx 4rpx 0;\n}\n\n/* 明细信息区域 */\n.cashlogs .profile {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  padding-left: 24rpx;\n}\n\n/* 类型描述文字 */\n.cashlogs .profile .typeStr {\n  font-size: 30rpx;\n  color: #333;\n  font-weight: 500;\n  margin-bottom: 12rpx;\n  line-height: 40rpx;\n}\n\n/* 日期时间 */\n.cashlogs .profile .dateAdd {\n  font-size: 24rpx;\n  color: #999;\n  line-height: 32rpx;\n}\n\n/* 剩余成长值 */\n.cashlogs .profile .growthLeft {\n  font-size: 24rpx;\n  color: #666;\n  line-height: 32rpx;\n  margin-top: 4rpx;\n}\n\n/* 成长值金额 */\n.cashlogs .amount {\n  flex-shrink: 0;\n  min-width: 120rpx;\n  text-align: right;\n  font-size: 36rpx;\n  font-weight: bold;\n  padding-right: 8rpx;\n}\n\n/* 积分兑换成长值入口 */\n.exchange-entry {\n  display: flex;\n  align-items: center;\n  margin: 30rpx 30rpx 20rpx;\n  padding: 32rpx 30rpx;\n  background: linear-gradient(135deg, #fff 0%, #fafafa 100%);\n  border-radius: 20rpx;\n  box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.08);\n  border: 1rpx solid rgba(233, 59, 61, 0.1);\n  transition: all 0.3s ease;\n  position: relative;\n  overflow: hidden;\n}\n\n.exchange-entry::before {\n  content: '';\n  position: absolute;\n  left: 0;\n  top: 0;\n  bottom: 0;\n  width: 6rpx;\n  background: linear-gradient(180deg, #e93b3d 0%, #e4393c 100%);\n  border-radius: 0 4rpx 4rpx 0;\n}\n\n.exchange-entry:active {\n  transform: translateY(2rpx);\n  box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.12);\n}\n\n.exchange-icon {\n  font-size: 48rpx;\n  margin-right: 24rpx;\n  flex-shrink: 0;\n}\n\n.exchange-content {\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n}\n\n.exchange-title {\n  font-size: 32rpx;\n  font-weight: 500;\n  color: #333;\n  line-height: 44rpx;\n  margin-bottom: 8rpx;\n}\n\n.exchange-desc {\n  font-size: 26rpx;\n  color: #999;\n  line-height: 36rpx;\n}\n\n.exchange-arrow {\n  font-size: 32rpx;\n  color: #ccc;\n  margin-left: 16rpx;\n  flex-shrink: 0;\n}"
  },
  {
    "path": "pages/score/index.js",
    "content": "const app = getApp()\nconst WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    balance: 0.00,\n    freeze: 0,\n    score: 0,\n    score_sign_continuous: 0,\n    cashlogs: undefined\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function (options) {\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.initData()\n      } else {\n        getApp().loginOK = () => {\n          this.initData()\n        }\n      }\n    })\n  },\n  onShow: function () {\n  },\n  initData() {\n    const _this = this\n    const token = wx.getStorageSync('token')\n    WXAPI.userAmount(token).then(function (res) {\n      if (res.code == 0) {\n        _this.setData({\n          balance: res.data.balance.toFixed(2),\n          freeze: res.data.freeze.toFixed(2),\n          totleConsumed: res.data.totleConsumed.toFixed(2),\n          score: res.data.score\n        });\n      } else {\n        wx.showToast({\n          title: res.msg,\n          icon: 'none'\n        })\n      }\n    })\n    // 读取积分明细\n    WXAPI.scoreLogs({\n      token: token,\n      page:1,\n      pageSize:50\n    }).then(res => {\n      if (res.code == 0) {\n        _this.setData({\n          cashlogs: res.data.result\n        })\n      }\n    })\n  },\n\n  recharge: function (e) {\n    wx.navigateTo({\n      url: \"/pages/recharge/index\"\n    })\n  },\n  withdraw: function (e) {\n    wx.navigateTo({\n      url: \"/pages/withdraw/index\"\n    })\n  },\n  sign() {\n    wx.navigateTo({\n      url: '/pages/sign/index',\n    })\n  },\n  exchange() {\n    wx.navigateTo({\n      url: '/pages/score-excharge/index',\n    })\n  },\n})"
  },
  {
    "path": "pages/score/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"积分明细\"\n}"
  },
  {
    "path": "pages/score/index.wxml",
    "content": "<view class=\"page-container\">\n  <!-- 顶部积分卡片 -->\n  <view class=\"score-header\">\n    <view class=\"score-bg\">\n      <view class=\"score-title\">我的积分</view>\n      <view class=\"score-value\">{{score}}</view>\n      <view class=\"score-desc\">积分可兑换精美礼品</view>\n    </view>\n  </view>\n\n  <!-- 获取积分途径 -->\n  <view class=\"score-ways\">\n    <view class=\"section-title\">\n      <view class=\"title-text\">获取积分</view>\n      <view class=\"title-line\"></view>\n    </view>\n    <view class=\"ways-grid\">\n      <view class=\"way-item\" bindtap=\"sign\">\n        <view class=\"way-icon sign-icon\">\n          <text class=\"icon-text\">签</text>\n        </view>\n        <view class=\"way-title\">每日签到</view>\n        <view class=\"way-desc\">签到得积分</view>\n      </view>\n      <view class=\"way-item\" bindtap=\"exchange\">\n        <view class=\"way-icon coupon-icon\">\n          <text class=\"icon-text\">券</text>\n        </view>\n        <view class=\"way-title\">积分券兑换</view>\n        <view class=\"way-desc\">券兑积分</view>\n      </view>\n    </view>\n  </view>\n\n  <!-- 积分明细 -->\n  <view class=\"score-logs\">\n    <view class=\"section-title\">\n      <view class=\"title-text\">积分明细</view>\n      <view class=\"title-line\"></view>\n    </view>\n    \n    <view class='no-data' wx:if=\"{{!cashlogs}}\">\n      <view class=\"no-data-icon\">📋</view>\n      <view class=\"no-data-text\">暂无积分明细</view>\n    </view>\n    \n    <view class='log-list' wx:if=\"{{cashlogs}}\">\n      <view class='log-item' wx:for=\"{{cashlogs}}\" wx:key=\"{{index}}\">\n        <view class='log-left'>\n          <view class=\"log-icon\" style=\"background: {{ (item.behavior ==0 ) ? 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)' : 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)' }}\">\n            <text class=\"log-icon-text\">{{ (item.behavior ==0 ) ? '得' : '用' }}</text>\n          </view>\n          <view class='log-info'>\n            <view class='log-title'>{{ item.typeStr }}</view>\n            <view class='log-remark' wx:if=\"{{item.remark}}\">{{ item.remark }}</view>\n            <view class='log-time'>{{ item.dateAdd }}</view>\n          </view>\n        </view>\n        <view class='log-amount' style=\"color: {{ (item.behavior ==0 ) ? '#FF6B6B' : '#51C873' }}\">\n          <text class=\"amount-symbol\">{{ (item.behavior ==0 ) ? '+' : '-' }}</text>\n          <text class=\"amount-value\">{{ item.score }}</text>\n        </view>\n      </view>\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "pages/score/index.wxss",
    "content": "/* 页面容器 */\n.page-container {\n  min-height: 100vh;\n  background: #f5f5f5;\n  padding-bottom: 40rpx;\n}\n\n/* 顶部积分卡片 - 京东红色渐变 */\n.score-header {\n  padding: 40rpx 30rpx 60rpx;\n  background: linear-gradient(135deg, #E4393C 0%, #FF6B6B 100%);\n  position: relative;\n}\n\n.score-bg {\n  text-align: center;\n  color: #fff;\n  position: relative;\n  z-index: 1;\n}\n\n.score-title {\n  font-size: 28rpx;\n  opacity: 0.95;\n  margin-bottom: 20rpx;\n  font-weight: 400;\n  letter-spacing: 2rpx;\n}\n\n.score-value {\n  font-size: 88rpx;\n  font-weight: bold;\n  line-height: 1.2;\n  margin-bottom: 10rpx;\n  text-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);\n  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;\n}\n\n.score-desc {\n  font-size: 24rpx;\n  opacity: 0.9;\n  margin-top: 10rpx;\n}\n\n/* 获取积分途径区域 */\n.score-ways {\n  margin: -30rpx 30rpx 30rpx;\n  background: #fff;\n  border-radius: 20rpx;\n  padding: 30rpx;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);\n  position: relative;\n  z-index: 2;\n}\n\n.section-title {\n  display: flex;\n  align-items: center;\n  margin-bottom: 30rpx;\n}\n\n.title-text {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333;\n  position: relative;\n  padding-left: 20rpx;\n}\n\n.title-text::before {\n  content: '';\n  position: absolute;\n  left: 0;\n  top: 50%;\n  transform: translateY(-50%);\n  width: 6rpx;\n  height: 28rpx;\n  background: linear-gradient(180deg, #E4393C 0%, #FF6B6B 100%);\n  border-radius: 3rpx;\n}\n\n.title-line {\n  flex: 1;\n  height: 1rpx;\n  background: linear-gradient(to right, #eee 0%, transparent 100%);\n  margin-left: 20rpx;\n}\n\n.ways-grid {\n  display: flex;\n  justify-content: space-between;\n  gap: 20rpx;\n}\n\n.way-item {\n  flex: 1;\n  background: linear-gradient(135deg, #fff 0%, #fafafa 100%);\n  border-radius: 16rpx;\n  padding: 40rpx 20rpx 30rpx;\n  text-align: center;\n  border: 2rpx solid #f0f0f0;\n  transition: all 0.3s;\n  position: relative;\n  overflow: hidden;\n}\n\n.way-item::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: linear-gradient(135deg, rgba(228, 57, 60, 0.05) 0%, rgba(255, 107, 107, 0.05) 100%);\n  opacity: 0;\n  transition: opacity 0.3s;\n}\n\n.way-item:active::before {\n  opacity: 1;\n}\n\n.way-icon {\n  width: 96rpx;\n  height: 96rpx;\n  border-radius: 50%;\n  margin: 0 auto 20rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  position: relative;\n}\n\n.sign-icon {\n  background: linear-gradient(135deg, #FF6B6B 0%, #E4393C 100%);\n  box-shadow: 0 8rpx 20rpx rgba(228, 57, 60, 0.3);\n}\n\n.coupon-icon {\n  background: linear-gradient(135deg, #FFA726 0%, #FF6F00 100%);\n  box-shadow: 0 8rpx 20rpx rgba(255, 167, 38, 0.3);\n}\n\n.icon-text {\n  font-size: 40rpx;\n  font-weight: bold;\n  color: #fff;\n  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);\n}\n\n.way-title {\n  font-size: 28rpx;\n  font-weight: 600;\n  color: #333;\n  margin-bottom: 10rpx;\n}\n\n.way-desc {\n  font-size: 22rpx;\n  color: #999;\n}\n\n/* 积分明细区域 */\n.score-logs {\n  margin: 0 30rpx;\n  background: #fff;\n  border-radius: 20rpx;\n  padding: 30rpx;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);\n}\n\n/* 空数据样式 */\n.no-data {\n  text-align: center;\n  padding: 80rpx 0;\n}\n\n.no-data-icon {\n  font-size: 80rpx;\n  margin-bottom: 20rpx;\n  opacity: 0.3;\n}\n\n.no-data-text {\n  font-size: 28rpx;\n  color: #ccc;\n}\n\n/* 积分明细列表 */\n.log-list {\n  margin-top: 10rpx;\n}\n\n.log-item {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 30rpx 0;\n  border-bottom: 1rpx solid #f5f5f5;\n  position: relative;\n}\n\n.log-item:last-child {\n  border-bottom: none;\n}\n\n.log-left {\n  display: flex;\n  align-items: center;\n  flex: 1;\n  min-width: 0;\n}\n\n.log-icon {\n  width: 80rpx;\n  height: 80rpx;\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  flex-shrink: 0;\n  margin-right: 24rpx;\n  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);\n}\n\n.log-icon-text {\n  font-size: 32rpx;\n  font-weight: bold;\n  color: #fff;\n}\n\n.log-info {\n  flex: 1;\n  min-width: 0;\n  display: flex;\n  flex-direction: column;\n  gap: 8rpx;\n}\n\n.log-title {\n  font-size: 28rpx;\n  font-weight: 500;\n  color: #333;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.log-remark {\n  font-size: 24rpx;\n  color: #999;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.log-time {\n  font-size: 22rpx;\n  color: #bbb;\n}\n\n.log-amount {\n  font-size: 32rpx;\n  font-weight: 600;\n  flex-shrink: 0;\n  margin-left: 20rpx;\n  display: flex;\n  align-items: baseline;\n  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;\n}\n\n.amount-symbol {\n  font-size: 24rpx;\n  margin-right: 2rpx;\n}\n\n.amount-value {\n  font-size: 36rpx;\n}"
  },
  {
    "path": "pages/score-excharge/growth.js",
    "content": "const app = getApp()\nconst WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    score: 0,\n    growth: 0,\n    uid: undefined\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function (options) {\n    AUTH.checkHasLogined().then(isLogined => {\n      if (isLogined) {\n        this.initData()\n      } else {\n        getApp().loginOK = () => {\n          this.initData()\n        }\n      }\n    })\n  },\n  onShow: function () {\n  },\n  async initData(){\n    const token = wx.getStorageSync('token')\n    const res1 = await WXAPI.userAmount(token)\n    if (res1.code == 0) {\n      this.data.score = res1.data.score\n      this.data.growth = res1.data.growth\n    }\n    const res2 = await WXAPI.scoreDeductionRules(1);\n    if (res2.code == 0) {\n      this.data.deductionRules = res2.data\n    }\n    this.setData({\n      score: this.data.score,\n      growth: this.data.growth,\n      deductionRules: this.data.deductionRules,\n    })\n  },\n  async bindSave() {\n    if (!this.data.score2) {\n      wx.showToast({\n        title: '请输入积分数量',\n        icon: 'none'\n      })\n      return\n    }\n    // https://www.yuque.com/apifm/nu0f75/sq3tzp\n    const res = await WXAPI.exchangeScoreToGrowthV2({\n      token: wx.getStorageSync('token'),\n      deductionScore: this.data.score2\n    })\n    if (res.code == 0) {\n      wx.showModal({\n        content: '恭喜您，成功兑换'+ res.data +'成长值',\n        showCancel: false\n      })\n      this.initData()\n    } else {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    }\n  },\n})"
  },
  {
    "path": "pages/score-excharge/growth.json",
    "content": "{\n  \"navigationBarTitleText\": \"积分兑换成长值\"\n}"
  },
  {
    "path": "pages/score-excharge/growth.wxml",
    "content": "<!-- 顶部渐变背景区 -->\n<view class=\"top-header\">\n  <!-- 资产展示卡片 -->\n  <view class=\"assets-card\">\n    <view class=\"asset-item\">\n      <view class=\"asset-label\">当前积分</view>\n      <view class=\"asset-value\">{{score}}</view>\n      <view class=\"asset-unit\">分</view>\n    </view>\n    <view class=\"divider-line\"></view>\n    <view class=\"asset-item\">\n      <view class=\"asset-label\">当前成长值</view>\n      <view class=\"asset-value\">{{ growth }}</view>\n      <view class=\"asset-unit\">值</view>\n    </view>\n  </view>\n</view>\n\n<view class=\"container\">\n  <!-- 兑换卡片 -->\n  <view class=\"exchange-card\">\n    <view class=\"card-title\">\n      <view class=\"title-icon\">💎</view>\n      <view class=\"title-text\">积分兑换成长值</view>\n    </view>\n    <view class=\"input-wrapper\">\n      <view class=\"input-label\">兑换积分</view>\n      <view class=\"input-box\">\n        <input model:value=\"{{score2}}\" class=\"input\" type=\"number\" placeholder=\"请输入兑换积分数量\" placeholder-class=\"placeholder-style\" />\n      </view>\n    </view>\n    <view class=\"exchange-hint\">\n      <text class=\"hint-icon\">ℹ️</text>\n      <text class=\"hint-text\">积分可兑换成长值，助您快速升级</text>\n    </view>\n  </view>\n  <!-- 兑换按钮 -->\n  <button class=\"exchange-btn\" bind:tap=\"bindSave\">\n    <text class=\"btn-text\">立即兑换</text>\n  </button>\n</view>\n<van-cell-group wx:if=\"{{deductionRules}}\" title=\"兑换规则：\">\n  <van-cell wx:for=\"{{deductionRules}}\" wx:key=\"id\" title=\"获得 {{ item.money }} 成长值\" value=\"{{ item.loop? '每满': '满' }} {{ item.score }} 积分即可兑换\" />\n</van-cell-group>"
  },
  {
    "path": "pages/score-excharge/growth.wxss",
    "content": "/* 页面整体样式 */\npage {\n  height: 100%;\n  background: linear-gradient(180deg, #f5f5f5 0%, #ffffff 100%);\n}\n\n/* 顶部渐变背景区 - 京东红 */\n.top-header {\n  background: linear-gradient(135deg, #E3393C 0%, #F44336 100%);\n  padding: 40rpx 30rpx 80rpx;\n  position: relative;\n  overflow: hidden;\n}\n\n.top-header::before {\n  content: '';\n  position: absolute;\n  top: -50%;\n  right: -20%;\n  width: 400rpx;\n  height: 400rpx;\n  background: rgba(255, 255, 255, 0.1);\n  border-radius: 50%;\n}\n\n.top-header::after {\n  content: '';\n  position: absolute;\n  bottom: -30%;\n  left: -10%;\n  width: 300rpx;\n  height: 300rpx;\n  background: rgba(255, 255, 255, 0.08);\n  border-radius: 50%;\n}\n\n/* 资产展示卡片 */\n.assets-card {\n  background: rgba(255, 255, 255, 0.95);\n  border-radius: 24rpx;\n  padding: 50rpx 40rpx;\n  display: flex;\n  justify-content: space-around;\n  align-items: center;\n  box-shadow: 0 8rpx 32rpx rgba(227, 57, 60, 0.2);\n  backdrop-filter: blur(10rpx);\n  position: relative;\n  z-index: 2;\n}\n\n.asset-item {\n  flex: 1;\n  text-align: center;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n\n.asset-label {\n  font-size: 26rpx;\n  color: #999999;\n  margin-bottom: 16rpx;\n  font-weight: 400;\n}\n\n.asset-value {\n  font-size: 68rpx;\n  color: #E3393C;\n  font-weight: bold;\n  line-height: 1.2;\n  background: linear-gradient(135deg, #E3393C 0%, #F44336 100%);\n  -webkit-background-clip: text;\n  -webkit-text-fill-color: transparent;\n  background-clip: text;\n}\n\n.asset-unit {\n  font-size: 24rpx;\n  color: #666666;\n  margin-top: 8rpx;\n}\n\n.divider-line {\n  width: 2rpx;\n  height: 100rpx;\n  background: linear-gradient(180deg, \n    rgba(227, 57, 60, 0) 0%, \n    rgba(227, 57, 60, 0.3) 50%, \n    rgba(227, 57, 60, 0) 100%\n  );\n  margin: 0 20rpx;\n}\n\n/* 主容器 */\n.container {\n  background-color: transparent;\n  justify-content: initial;\n  padding: 0 30rpx;\n  margin-top: -50rpx;\n  position: relative;\n  z-index: 3;\n}\n\n/* 兑换卡片 */\n.exchange-card {\n  background: #ffffff;\n  border-radius: 24rpx;\n  padding: 40rpx 30rpx;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);\n  margin-bottom: 30rpx;\n  width: 90%;\n}\n\n.card-title {\n  display: flex;\n  align-items: center;\n  margin-bottom: 40rpx;\n  padding-bottom: 30rpx;\n  border-bottom: 2rpx solid #f5f5f5;\n}\n\n.title-icon {\n  font-size: 40rpx;\n  margin-right: 16rpx;\n}\n\n.title-text {\n  font-size: 32rpx;\n  color: #333333;\n  font-weight: bold;\n}\n\n/* 输入区域 */\n.input-wrapper {\n  margin-bottom: 30rpx;\n}\n\n.input-label {\n  font-size: 28rpx;\n  color: #666666;\n  margin-bottom: 20rpx;\n  font-weight: 500;\n}\n\n.input-box {\n  background: #f8f8f8;\n  border-radius: 16rpx;\n  padding: 0 24rpx;\n  border: 2rpx solid #f0f0f0;\n  transition: all 0.3s ease;\n}\n\n.input-box .input {\n  height: 88rpx;\n  line-height: 88rpx;\n  font-size: 30rpx;\n  color: #333333;\n}\n\n.placeholder-style {\n  color: #bbbbbb;\n  font-size: 28rpx;\n}\n\n/* 提示信息 */\n.exchange-hint {\n  display: flex;\n  align-items: center;\n  background: linear-gradient(135deg, #FFF3F3 0%, #FFE8E8 100%);\n  padding: 20rpx 24rpx;\n  border-radius: 12rpx;\n  border-left: 6rpx solid #E3393C;\n}\n\n.hint-icon {\n  font-size: 28rpx;\n  margin-right: 12rpx;\n}\n\n.hint-text {\n  font-size: 24rpx;\n  color: #E3393C;\n  line-height: 1.6;\n}\n\n/* 兑换按钮 - 京东风格 */\n.exchange-btn {\n  width: 690rpx;\n  height: 96rpx;\n  background: linear-gradient(135deg, #E3393C 0%, #F44336 100%);\n  border-radius: 48rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 8rpx 24rpx rgba(227, 57, 60, 0.35);\n  border: none;\n  margin: 0 auto;\n  position: relative;\n  overflow: hidden;\n  transition: all 0.3s ease;\n}\n\n.exchange-btn::before {\n  content: '';\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  width: 0;\n  height: 0;\n  border-radius: 50%;\n  background: rgba(255, 255, 255, 0.3);\n  transform: translate(-50%, -50%);\n  transition: width 0.6s, height 0.6s;\n}\n\n.exchange-btn:active {\n  transform: scale(0.98);\n  box-shadow: 0 4rpx 16rpx rgba(227, 57, 60, 0.3);\n}\n\n.exchange-btn:active::before {\n  width: 200%;\n  height: 200%;\n}\n\n.btn-text {\n  font-size: 32rpx;\n  color: #ffffff;\n  font-weight: bold;\n  letter-spacing: 2rpx;\n  position: relative;\n  z-index: 1;\n}\n\n/* 兑换规则样式优化 */\n.van-cell-group {\n  margin-top: 30rpx;\n  border-radius: 24rpx;\n  overflow: hidden;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);\n}\n\n/* 移除旧样式 */\n.form-box,\n.row-wrap,\n.save-btn,\n.cancel-btn,\n.addr-details {\n  display: none;\n}\n\n/* 保留的通用样式 */\npicker {\n  min-width: 20rpx;\n  height: 100%;\n  margin-right: 20rpx;\n}\n\n.hui {\n  color: #777;\n}"
  },
  {
    "path": "pages/score-excharge/index.js",
    "content": "const app = getApp()\nconst WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    uid: undefined\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function(options) {\n  },\n  onShow: function() {\n  },\n  bindSave(e) {\n    var that = this;\n    var amount = this.data.amount;\n\n    if (amount == \"\") {\n      wx.showModal({\n        title: '错误',\n        content: '请填写正确的券号',\n        showCancel: false\n      })\n      return\n    }\n    WXAPI.scoreExchange(wx.getStorageSync('token'), amount).then(function(res) {\n      if (res.code == 700) {\n        wx.showModal({\n          title: '错误',\n          content: '券号不正确',\n          showCancel: false\n        })\n        return\n      }\n      if (res.code == 0) {\n        wx.showModal({\n          title: '成功',\n          content: '恭喜您，成功兑换 ' + res.data.score + ' 积分',\n          showCancel: false,\n          success: function(res) {\n            if (res.confirm) {\n              that.bindCancel();\n            }\n          }\n        })\n      } else {\n        wx.showModal({\n          title: '错误',\n          content: res.data.msg,\n          showCancel: false\n        })\n      }\n    })\n  }\n})"
  },
  {
    "path": "pages/score-excharge/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"积分券兑换积分\"\n}"
  },
  {
    "path": "pages/score-excharge/index.wxml",
    "content": "<view class=\"exchange-page\">\n  <!-- 头部装饰区域 -->\n  <view class=\"header-decoration\">\n    <view class=\"decoration-circle circle1\"></view>\n    <view class=\"decoration-circle circle2\"></view>\n    <view class=\"decoration-circle circle3\"></view>\n  </view>\n  \n  <!-- 主要内容区域 -->\n  <view class=\"exchange-content\">\n    <!-- 标题区域 -->\n    <view class=\"title-section\">\n      <view class=\"icon-wrapper\">\n        <image class=\"gift-icon\" src=\"/images/gift.png\" mode=\"aspectFit\"></image>\n      </view>\n      <text class=\"main-title\">积分券兑换</text>\n      <text class=\"sub-title\">输入积分券号码，立即获得积分奖励</text>\n    </view>\n    \n    <!-- 兑换表单 -->\n    <view class=\"exchange-form\">\n      <view class=\"form-item\">\n        <text class=\"form-label\">积分券号码</text>\n        <view class=\"input-wrapper\">\n          <input \n            model:value=\"{{amount}}\" \n            class=\"coupon-input\" \n            type=\"text\" \n            placeholder=\"请输入积分券号码\"\n            placeholder-class=\"input-placeholder\"\n            maxlength=\"50\"\n          />\n        </view>\n      </view>\n      \n      <!-- 兑换按钮 -->\n      <button class=\"exchange-btn\" bind:tap=\"bindSave\">\n        <text class=\"btn-text\">立即兑换</text>\n      </button>\n    </view>\n    \n    <!-- 使用说明 -->\n    <view class=\"tips-section\">\n      <view class=\"tips-header\">\n        <view class=\"info-icon\">i</view>\n        <text class=\"tips-title\">使用说明</text>\n      </view>\n      <view class=\"tips-list\">\n        <view class=\"tips-item\">\n          <text class=\"tips-dot\">•</text>\n          <text class=\"tips-text\">积分券仅限本平台使用，不可转让</text>\n        </view>\n        <view class=\"tips-item\">\n          <text class=\"tips-dot\">•</text>\n          <text class=\"tips-text\">每个积分券仅可使用一次</text>\n        </view>\n        <view class=\"tips-item\">\n          <text class=\"tips-dot\">•</text>\n          <text class=\"tips-text\">兑换成功后积分将立即到账</text>\n        </view>\n        <view class=\"tips-item\">\n          <text class=\"tips-dot\">•</text>\n          <text class=\"tips-text\">如有疑问请联系客服</text>\n        </view>\n      </view>\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "pages/score-excharge/index.wxss",
    "content": "/* 页面整体样式 - 京东风格 */\npage {\n  height: 100%;\n  background: linear-gradient(180deg, #FFF1F0 0%, #FFFFFF 50%);\n}\n\n.exchange-page {\n  min-height: 100vh;\n  position: relative;\n  overflow: hidden;\n}\n\n/* 头部装饰区域 - 京东红色系 */\n.header-decoration {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  height: 400rpx;\n  pointer-events: none;\n  overflow: hidden;\n}\n\n.decoration-circle {\n  position: absolute;\n  border-radius: 50%;\n  opacity: 0.08;\n}\n\n.decoration-circle.circle1 {\n  width: 260rpx;\n  height: 260rpx;\n  background: linear-gradient(135deg, #E1251B, #FF4747);\n  top: -130rpx;\n  right: -80rpx;\n}\n\n.decoration-circle.circle2 {\n  width: 180rpx;\n  height: 180rpx;\n  background: linear-gradient(135deg, #E1251B, #FF6B6B);\n  top: 100rpx;\n  left: -60rpx;\n}\n\n.decoration-circle.circle3 {\n  width: 140rpx;\n  height: 140rpx;\n  background: linear-gradient(135deg, #FF4747, #FF8989);\n  top: 260rpx;\n  right: 120rpx;\n}\n\n/* 主要内容区域 */\n.exchange-content {\n  padding: 80rpx 32rpx 40rpx;\n  position: relative;\n  z-index: 1;\n}\n\n/* 标题区域 - 京东风格 */\n.title-section {\n  text-align: center;\n  margin-bottom: 60rpx;\n}\n\n.icon-wrapper {\n  width: 120rpx;\n  height: 120rpx;\n  background: linear-gradient(135deg, #E1251B 0%, #FF4747 100%);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin: 0 auto 32rpx;\n  box-shadow: 0 12rpx 32rpx rgba(225, 37, 27, 0.35);\n  position: relative;\n}\n\n.icon-wrapper::after {\n  content: '';\n  position: absolute;\n  width: 140rpx;\n  height: 140rpx;\n  border: 2rpx solid rgba(225, 37, 27, 0.2);\n  border-radius: 50%;\n  animation: pulse 2s infinite;\n}\n\n@keyframes pulse {\n  0%, 100% {\n    transform: scale(1);\n    opacity: 1;\n  }\n  50% {\n    transform: scale(1.15);\n    opacity: 0.5;\n  }\n}\n\n.gift-icon {\n  width: 60rpx;\n  height: 60rpx;\n  filter: brightness(0) invert(1);\n}\n\n.main-title {\n  display: block;\n  font-weight: 700;\n  font-size: 52rpx;\n  color: #333333;\n  margin-bottom: 16rpx;\n  letter-spacing: 2rpx;\n}\n\n.sub-title {\n  display: block;\n  font-size: 28rpx;\n  color: #999999;\n  line-height: 40rpx;\n}\n\n/* 兑换表单 - 京东卡片风格 */\n.exchange-form {\n  background: #FFFFFF;\n  border-radius: 24rpx;\n  padding: 48rpx 40rpx;\n  margin-bottom: 40rpx;\n  box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.06);\n  position: relative;\n}\n\n.exchange-form::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  height: 8rpx;\n  background: linear-gradient(90deg, #E1251B 0%, #FF4747 100%);\n  border-radius: 24rpx 24rpx 0 0;\n}\n\n.form-item {\n  margin-bottom: 48rpx;\n}\n\n.form-label {\n  display: block;\n  font-weight: 600;\n  font-size: 30rpx;\n  color: #333333;\n  margin-bottom: 24rpx;\n  position: relative;\n  padding-left: 20rpx;\n}\n\n.form-label::before {\n  content: '';\n  position: absolute;\n  left: 0;\n  top: 50%;\n  transform: translateY(-50%);\n  width: 6rpx;\n  height: 28rpx;\n  background: linear-gradient(180deg, #E1251B, #FF4747);\n  border-radius: 3rpx;\n}\n\n.input-wrapper {\n  position: relative;\n  background: #F8F9FA;\n  border-radius: 16rpx;\n  border: 2rpx solid #E9ECEF;\n  transition: all 0.3s ease;\n  overflow: hidden;\n}\n\n.input-wrapper::after {\n  content: '';\n  position: absolute;\n  left: 0;\n  bottom: 0;\n  width: 0;\n  height: 4rpx;\n  background: linear-gradient(90deg, #E1251B, #FF4747);\n  transition: width 0.3s ease;\n}\n\n/* 聚焦状态 */\n.coupon-input:focus {\n  background: #FFFFFF;\n}\n\n.input-wrapper:focus-within {\n  border-color: #E1251B;\n  background: #FFFFFF;\n  box-shadow: 0 0 0 6rpx rgba(225, 37, 27, 0.08);\n}\n\n.input-wrapper:focus-within::after {\n  width: 100%;\n}\n\n.coupon-input {\n  width: 100%;\n  height: 96rpx;\n  padding: 0 32rpx;\n  font-size: 32rpx;\n  color: #333333;\n  background: transparent;\n  border: none;\n  line-height: 96rpx;\n}\n\n.input-placeholder {\n  color: #BBBBBB;\n  font-size: 28rpx;\n}\n\n/* 兑换按钮 - 京东红 */\n.exchange-btn {\n  width: 100%;\n  height: 96rpx;\n  background: linear-gradient(135deg, #E1251B 0%, #FF4747 100%);\n  border-radius: 48rpx;\n  border: none;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 8rpx 24rpx rgba(225, 37, 27, 0.35);\n  transition: all 0.3s ease;\n  position: relative;\n  overflow: hidden;\n}\n\n.exchange-btn::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: -100%;\n  width: 100%;\n  height: 100%;\n  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);\n  transition: left 0.5s ease;\n}\n\n.exchange-btn:active::before {\n  left: 100%;\n}\n\n.exchange-btn:active {\n  transform: translateY(2rpx);\n  box-shadow: 0 4rpx 16rpx rgba(225, 37, 27, 0.3);\n}\n\n.exchange-btn::after {\n  border: none;\n}\n\n.btn-text {\n  font-weight: 600;\n  font-size: 34rpx;\n  color: #FFFFFF;\n  letter-spacing: 4rpx;\n  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);\n}\n\n/* 使用说明 - 京东风格 */\n.tips-section {\n  background: #FFFFFF;\n  border-radius: 24rpx;\n  padding: 40rpx;\n  box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.06);\n}\n\n.tips-header {\n  display: flex;\n  align-items: center;\n  margin-bottom: 32rpx;\n  padding-bottom: 20rpx;\n  border-bottom: 2rpx solid #F5F5F5;\n}\n\n.info-icon {\n  width: 40rpx;\n  height: 40rpx;\n  border-radius: 50%;\n  background: linear-gradient(135deg, #E1251B, #FF4747);\n  color: #FFFFFF;\n  font-size: 24rpx;\n  font-weight: bold;\n  font-style: italic;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-right: 16rpx;\n}\n\n.tips-title {\n  font-weight: 600;\n  font-size: 30rpx;\n  color: #333333;\n}\n\n.tips-list {\n  padding-left: 8rpx;\n}\n\n.tips-item {\n  display: flex;\n  align-items: flex-start;\n  margin-bottom: 20rpx;\n  padding-left: 12rpx;\n}\n\n.tips-item:last-child {\n  margin-bottom: 0;\n}\n\n.tips-dot {\n  font-weight: 700;\n  font-size: 32rpx;\n  color: #E1251B;\n  margin-right: 16rpx;\n  line-height: 40rpx;\n  flex-shrink: 0;\n}\n\n.tips-text {\n  flex: 1;\n  font-size: 26rpx;\n  color: #666666;\n  line-height: 40rpx;\n}"
  },
  {
    "path": "pages/search/index.js",
    "content": "Page({\n  data: {\n\n  },\n  onLoad: function (options) {\n    const hot_search_words = wx.getStorageSync('hot_search_words')\n    this.setData({\n      list: wx.getStorageSync('searchHis'),\n      hot_search_words: hot_search_words ? hot_search_words.split(',') : null\n    })\n  },\n  onShow: function () {\n\n  },\n  search(e) {\n    this.setData({\n      inputVal: e.detail\n    })\n    if (e.detail) {\n      let searchHis = wx.getStorageSync('searchHis')\n      if (!searchHis) {\n        searchHis = [e.detail]\n      }\n      if (!searchHis.includes(e.detail)) {\n        searchHis.push(e.detail)\n      }\n      wx.setStorageSync('searchHis', searchHis)\n      this.setData({\n        list: searchHis\n      })\n    }\n    wx.navigateTo({\n      url: '/pages/goods/list?name=' + this.data.inputVal,\n    })\n  },\n  onClose(e) {\n    const idx = e.currentTarget.dataset.idx\n    const searchHis = this.data.list\n    searchHis.splice(idx, 1)\n    wx.setStorageSync('searchHis', searchHis)\n    this.setData({\n      list: searchHis\n    })\n  },\n  go(e) {\n    const idx = e.currentTarget.dataset.idx\n    const keywords = this.data.list[idx]\n    wx.navigateTo({\n      url: '/pages/goods/list?name=' + keywords,\n    })\n  },\n  go2(e) {\n    const idx = e.currentTarget.dataset.idx\n    const keywords = this.data.hot_search_words[idx]\n    wx.navigateTo({\n      url: '/pages/goods/list?name=' + keywords,\n    })\n  },\n  searchscan() {\n    wx.scanCode({\n      scanType: ['barCode', 'qrCode', 'datamatrix', 'pdf417'],\n      success: res => {\n        wx.navigateTo({\n          url: '/pages/goods/list?name=' + res.result,\n        })\n      }\n    })\n  }\n})"
  },
  {
    "path": "pages/search/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"搜索\"\n}"
  },
  {
    "path": "pages/search/index.wxml",
    "content": "<view class=\"search-page\">\n  <!-- 搜索栏 -->\n  <view class=\"search-header\">\n    <view class=\"search-container\">\n      <van-search \n        placeholder=\"请输入搜索关键词\" \n        focus \n        bind:search=\"search\" \n        use-right-icon-slot\n        shape=\"round\"\n        background=\"#E4393C\"\n        input-align=\"left\"\n      >\n        <view slot=\"right-icon\" class=\"scan-icon\" bind:tap=\"searchscan\">\n          <van-icon name=\"scan\" size=\"20px\" color=\"#fff\" />\n        </view>\n      </van-search>\n    </view>\n  </view>\n\n  <!-- 内容区域 -->\n  <view class=\"search-content\">\n    <!-- 历史搜索 -->\n    <view class=\"search-section\" wx:if=\"{{ list && list.length > 0 }}\">\n      <view class=\"section-header\">\n        <view class=\"header-left\">\n          <view class=\"icon-wrapper\">\n            <van-icon name=\"clock-o\" size=\"18px\" color=\"#E4393C\" />\n          </view>\n          <text class=\"section-title\">历史搜索</text>\n        </view>\n      </view>\n      <view class=\"tag-container\">\n        <view \n          class=\"tag-item\" \n          wx:for=\"{{list}}\" \n          wx:key=\"*this\"\n          data-idx=\"{{ index }}\" \n          bindtap=\"go\"\n        >\n          <text class=\"tag-text\">{{ item }}</text>\n          <view \n            class=\"tag-close\" \n            data-idx=\"{{ index }}\"\n            catchtap=\"onClose\"\n          >\n            <van-icon name=\"cross\" size=\"12px\" color=\"#999\" />\n          </view>\n        </view>\n      </view>\n    </view>\n\n    <!-- 热门搜索 -->\n    <view class=\"search-section\" wx:if=\"{{ hot_search_words && hot_search_words.length > 0 }}\">\n      <view class=\"section-header\">\n        <view class=\"header-left\">\n          <view class=\"icon-wrapper\">\n            <van-icon name=\"fire-o\" size=\"18px\" color=\"#E4393C\" />\n          </view>\n          <text class=\"section-title\">热门搜索</text>\n        </view>\n      </view>\n      <view class=\"tag-container\">\n        <view \n          class=\"tag-item hot-tag\" \n          wx:for=\"{{ hot_search_words }}\" \n          wx:key=\"*this\"\n          data-idx=\"{{ index }}\" \n          bindtap=\"go2\"\n        >\n          <view class=\"hot-badge\" wx:if=\"{{ index < 3 }}\">{{ index + 1 }}</view>\n          <text class=\"tag-text\">{{ item }}</text>\n        </view>\n      </view>\n    </view>\n\n    <!-- 空状态 -->\n    <view class=\"empty-state\" wx:if=\"{{ (!list || list.length == 0) && (!hot_search_words || hot_search_words.length == 0) }}\">\n      <view class=\"empty-icon\">\n        <van-icon name=\"search\" size=\"80px\" color=\"#ddd\" />\n      </view>\n      <text class=\"empty-text\">暂无搜索记录</text>\n      <text class=\"empty-tip\">快去搜索你想要的商品吧~</text>\n    </view>\n  </view>\n</view>"
  },
  {
    "path": "pages/search/index.wxss",
    "content": "/* pages/search/index.wxss - 京东风格搜索页面 */\n\n/* 页面整体 */\n.search-page {\n  min-height: 100vh;\n  background: linear-gradient(180deg, #E4393C 0%, #E4393C 120rpx, #f5f5f5 120rpx);\n}\n\n/* ==================== 搜索头部区域 ==================== */\n.search-header {\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  z-index: 999;\n  background: #E4393C;\n  padding: 16rpx 24rpx;\n  box-shadow: 0 4rpx 12rpx rgba(228, 57, 60, 0.15);\n}\n\n.search-container {\n  position: relative;\n}\n\n/* 覆盖van-search默认样式 */\n.search-header .van-search {\n  padding: 0;\n}\n\n.search-header .van-search__content {\n  background: rgba(255, 255, 255, 0.95);\n  border-radius: 48rpx;\n  padding-left: 32rpx;\n  padding-right: 32rpx;\n  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);\n}\n\n.search-header .van-field__control {\n  font-size: 28rpx;\n  color: #333;\n}\n\n.scan-icon {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 56rpx;\n  height: 56rpx;\n  background: linear-gradient(135deg, #FF6B6B 0%, #E4393C 100%);\n  border-radius: 50%;\n  margin-left: 16rpx;\n  box-shadow: 0 4rpx 12rpx rgba(228, 57, 60, 0.3);\n}\n\n/* ==================== 内容区域 ==================== */\n.search-content {\n  padding-top: 120rpx;\n  padding-bottom: 40rpx;\n}\n\n/* ==================== 搜索区块 ==================== */\n.search-section {\n  margin: 32rpx 24rpx;\n  background: #fff;\n  border-radius: 24rpx;\n  padding: 32rpx;\n  box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.06);\n}\n\n/* 区块头部 */\n.section-header {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-bottom: 24rpx;\n}\n\n.header-left {\n  display: flex;\n  align-items: center;\n}\n\n.icon-wrapper {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 48rpx;\n  height: 48rpx;\n  background: linear-gradient(135deg, #FFE5E5 0%, #FFD5D5 100%);\n  border-radius: 12rpx;\n  margin-right: 16rpx;\n}\n\n.section-title {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333;\n  letter-spacing: 0.5rpx;\n}\n\n/* ==================== 标签容器 ==================== */\n.tag-container {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 20rpx;\n}\n\n.tag-item {\n  position: relative;\n  display: flex;\n  align-items: center;\n  padding: 16rpx 32rpx;\n  background: #f8f8f8;\n  border-radius: 48rpx;\n  font-size: 28rpx;\n  color: #666;\n  transition: all 0.3s ease;\n  border: 2rpx solid transparent;\n}\n\n.tag-item:active {\n  background: #fff;\n  border-color: #E4393C;\n  transform: translateY(-2rpx);\n  box-shadow: 0 4rpx 12rpx rgba(228, 57, 60, 0.15);\n}\n\n.tag-text {\n  max-width: 400rpx;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n/* 关闭按钮 */\n.tag-close {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 32rpx;\n  height: 32rpx;\n  margin-left: 12rpx;\n  background: #e8e8e8;\n  border-radius: 50%;\n  transition: all 0.2s ease;\n}\n\n.tag-close:active {\n  background: #E4393C;\n}\n\n.tag-close:active .van-icon {\n  color: #fff !important;\n}\n\n/* ==================== 热门标签特殊样式 ==================== */\n.hot-tag {\n  background: linear-gradient(135deg, #FFF5F5 0%, #FFE8E8 100%);\n  color: #E4393C;\n  font-weight: 500;\n  border: 2rpx solid #FFD5D5;\n  padding-left: 24rpx;\n}\n\n.hot-tag:active {\n  background: linear-gradient(135deg, #FFE8E8 0%, #FFD5D5 100%);\n  border-color: #E4393C;\n  box-shadow: 0 4rpx 16rpx rgba(228, 57, 60, 0.2);\n}\n\n.hot-badge {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 32rpx;\n  height: 32rpx;\n  background: linear-gradient(135deg, #FF6B6B 0%, #E4393C 100%);\n  color: #fff;\n  font-size: 20rpx;\n  font-weight: 600;\n  border-radius: 50%;\n  margin-right: 12rpx;\n  box-shadow: 0 2rpx 8rpx rgba(228, 57, 60, 0.3);\n}\n\n/* ==================== 空状态 ==================== */\n.empty-state {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: 120rpx 48rpx;\n  margin: 80rpx 24rpx;\n  background: #fff;\n  border-radius: 24rpx;\n  box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.06);\n}\n\n.empty-icon {\n  width: 160rpx;\n  height: 160rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);\n  border-radius: 50%;\n  margin-bottom: 32rpx;\n}\n\n.empty-text {\n  font-size: 32rpx;\n  color: #999;\n  margin-bottom: 16rpx;\n  font-weight: 500;\n}\n\n.empty-tip {\n  font-size: 26rpx;\n  color: #ccc;\n}\n\n/* ==================== 动画效果 ==================== */\n@keyframes slideInUp {\n  from {\n    opacity: 0;\n    transform: translateY(30rpx);\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n\n.search-section {\n  animation: slideInUp 0.4s ease-out;\n}\n\n/* ==================== 响应式优化 ==================== */\n@media (max-width: 375px) {\n  .tag-item {\n    padding: 14rpx 28rpx;\n    font-size: 26rpx;\n  }\n  \n  .section-title {\n    font-size: 30rpx;\n  }\n}"
  },
  {
    "path": "pages/select-address/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nconst app = getApp()\nPage({\n  data: {\n    page: 1\n  },\n  selectTap: function(e) {\n    console.log(e);\n    var id = e.currentTarget.dataset.id;\n    WXAPI.updateAddress({\n      token: wx.getStorageSync('token'),\n      id: id,\n      isDefault: 'true'\n    }).then(function(res) {\n      wx.navigateBack({})\n    })\n  },\n\n  addAddess: function() {\n    wx.navigateTo({\n      url: \"/pages/address-add/index\"\n    })\n  },\n\n  editAddess: function(e) {\n    console.log(e);\n    \n    wx.navigateTo({\n      url: \"/pages/address-add/index?id=\" + e.currentTarget.dataset.id\n    })\n  },\n\n  onLoad() {\n    \n  },\n  onShow: function() {\n    this.initShippingAddress();\n  },\n  async initShippingAddress() {\n    wx.showLoading({\n      title: '',\n    })\n    const res = await WXAPI.queryAddressV2({\n      token: wx.getStorageSync('token')\n    })\n    wx.hideLoading({\n      success: (res) => {},\n    })\n    if (res.code == 0) {\n      this.setData({\n        addressList: res.data.result\n      });\n    } else if (res.code == 700) {\n      this.setData({\n        addressList: null\n      });\n    } else {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    }\n  },\n  onPullDownRefresh() {\n    this.data.page = 1\n    this.initShippingAddress()\n    wx.stopPullDownRefresh()\n  },\n  deleteAddress(e) {\n    const id = e.currentTarget.dataset.id\n    const index = e.currentTarget.dataset.index\n    wx.showModal({\n      content: '确定要删除该收货地址吗？',\n      success: async (res) => {\n        if (res.confirm) {\n          // https://www.yuque.com/apifm/nu0f75/gb0a2k\n          wx.showLoading({\n            title: '',\n          })\n          const res = await WXAPI.deleteAddress(wx.getStorageSync('token'), id)\n          wx.hideLoading()\n          if (res.code != 0) {\n            wx.showToast({\n              title: res.msg,\n              icon: 'none'\n            })\n          } else {\n            wx.showToast({\n              title: '删除成功',\n              icon: 'none'\n            })\n            this.data.addressList.splice(index, 1)\n            this.setData({\n              addressList: this.data.addressList\n            })\n          }\n        }\n      }\n    })\n  },\n})"
  },
  {
    "path": "pages/select-address/index.json",
    "content": "{\n   \"navigationBarTitleText\": \"选择收货地址\",\n   \"enablePullDownRefresh\": true\n}"
  },
  {
    "path": "pages/select-address/index.wxml",
    "content": "<view class=\"address-container\">\n  <van-empty wx:if=\"{{ !addressList }}\" description=\"暂无收货地址\" />\n\n  <view class=\"address-list\">\n    <view class=\"address-item\" wx:for=\"{{addressList}}\" wx:key=\"id\">\n      <view class=\"address-content\" bind:tap=\"selectTap\" data-id=\"{{item.id}}\">\n        <view class=\"address-header\">\n          <view class=\"user-info\">\n            <text class=\"user-name\">{{item.linkMan}}</text>\n            <text class=\"user-phone\">{{item.mobile}}</text>\n          </view>\n          <view class=\"default-tag\" wx:if=\"{{item.isDefault}}\">默认</view>\n        </view>\n        <view class=\"address-detail\">\n          <text class=\"address-text\">{{item.address}}</text>\n        </view>\n      </view>\n      \n      <view class=\"address-actions\">\n        <view class=\"action-btn edit-btn\" bind:tap=\"editAddess\" data-id=\"{{item.id}}\">\n          <van-icon name=\"edit\" size=\"32rpx\" />\n          <text>编辑</text>\n        </view>\n        <view class=\"action-divider\"></view>\n        <view class=\"action-btn delete-btn\" bind:tap=\"deleteAddress\" data-index=\"{{ index }}\" data-id=\"{{item.id}}\">\n          <van-icon name=\"delete-o\" size=\"32rpx\" />\n          <text>删除</text>\n        </view>\n      </view>\n    </view>\n  </view>\n\n  <view class=\"safe-bottom-box\">\n    <view class=\"add-btn\" bind:tap=\"addAddess\">\n      <van-icon name=\"add-o\" size=\"36rpx\" color=\"#fff\" />\n      <text>新增收货地址</text>\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "pages/select-address/index.wxss",
    "content": "/* 容器样式 */\n.address-container {\n  min-height: 100vh;\n  background-color: #f5f5f5;\n  padding: 20rpx;\n  box-sizing: border-box;\n}\n\n/* 地址列表 */\n.address-list {\n  margin-bottom: 120rpx;\n}\n\n/* 地址卡片 */\n.address-item {\n  background: #ffffff;\n  border-radius: 16rpx;\n  margin-bottom: 20rpx;\n  overflow: hidden;\n  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);\n  transition: all 0.3s ease;\n}\n\n.address-item:active {\n  transform: scale(0.98);\n  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.12);\n}\n\n/* 地址内容区域 */\n.address-content {\n  padding: 32rpx 28rpx 24rpx;\n  position: relative;\n}\n\n/* 地址头部 */\n.address-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 20rpx;\n}\n\n/* 用户信息 */\n.user-info {\n  display: flex;\n  align-items: center;\n  gap: 20rpx;\n}\n\n.user-name {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333333;\n  letter-spacing: 1rpx;\n}\n\n.user-phone {\n  font-size: 30rpx;\n  color: #666666;\n  font-weight: 500;\n}\n\n/* 默认地址标签 */\n.default-tag {\n  background: linear-gradient(135deg, #ff6a00 0%, #ee0a24 100%);\n  color: #ffffff;\n  font-size: 22rpx;\n  padding: 6rpx 16rpx;\n  border-radius: 24rpx;\n  font-weight: 500;\n  letter-spacing: 1rpx;\n  box-shadow: 0 2rpx 8rpx rgba(238, 10, 36, 0.25);\n}\n\n/* 地址详情 */\n.address-detail {\n  display: flex;\n  align-items: flex-start;\n  line-height: 1.6;\n}\n\n.address-text {\n  font-size: 28rpx;\n  color: #666666;\n  line-height: 42rpx;\n  word-break: break-all;\n}\n\n/* 操作按钮区域 */\n.address-actions {\n  display: flex;\n  align-items: center;\n  border-top: 1rpx solid #f0f0f0;\n  background: #fafafa;\n}\n\n.action-btn {\n  flex: 1;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 12rpx;\n  padding: 24rpx 0;\n  font-size: 28rpx;\n  color: #666666;\n  transition: all 0.2s ease;\n}\n\n.action-btn:active {\n  background: #f0f0f0;\n}\n\n.action-btn text {\n  font-weight: 500;\n}\n\n.edit-btn {\n  color: #333333;\n}\n\n.delete-btn {\n  color: #ee0a24;\n}\n\n.action-divider {\n  width: 1rpx;\n  height: 32rpx;\n  background: #e5e5e5;\n}\n\n/* 底部操作区 */\n.safe-bottom-box {\n  position: fixed;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  padding: 20rpx 30rpx;\n  padding-bottom: calc(20rpx + env(safe-area-inset-bottom));\n  background: linear-gradient(to top, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.95) 100%);\n  backdrop-filter: blur(10rpx);\n  box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.06);\n  z-index: 100;\n  box-sizing: border-box;\n}\n\n.add-btn {\n  width: 100%;\n  height: 88rpx;\n  background: linear-gradient(135deg, #ff6a00 0%, #ee0a24 100%);\n  border-radius: 44rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 12rpx;\n  color: #ffffff;\n  font-size: 32rpx;\n  font-weight: 600;\n  letter-spacing: 2rpx;\n  box-shadow: 0 8rpx 20rpx rgba(238, 10, 36, 0.3);\n  transition: all 0.3s ease;\n  box-sizing: border-box;\n}\n\n.add-btn:active {\n  transform: scale(0.96);\n  box-shadow: 0 4rpx 12rpx rgba(238, 10, 36, 0.4);\n}"
  },
  {
    "path": "pages/shop/select.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\nconst APP = getApp()\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function (options) {\n\n  },\n\n  /**\n   * 生命周期函数--监听页面初次渲染完成\n   */\n  onReady: function () {\n\n  },\n\n  /**\n   * 生命周期函数--监听页面显示\n   */\n  onShow: function () {\n    wx.getLocation({\n      type: 'gcj02', //wgs84 返回 gps 坐标，gcj02 返回可用于 wx.openLocation 的坐标\n      success: (res) => {\n        this.data.latitude = res.latitude\n        this.data.longitude = res.longitude\n        this.fetchShops(res.latitude, res.longitude, '')\n      },\n      fail(e){\n        console.error(e)\n        AUTH.checkAndAuthorize('scope.userLocation')\n      }\n    })    \n  },\n  async fetchShops(latitude, longitude, kw){\n    const res = await WXAPI.fetchShops({\n      curlatitude: latitude,\n      curlongitude: longitude,\n      nameLike: kw\n    })\n    if (res.code == 0) {\n      res.data.forEach(ele => {\n        ele.distance = ele.distance.toFixed(3) // 距离保留3位小数\n      })\n      this.setData({\n        shops: res.data\n      })\n    } else {\n      this.setData({\n        shops: null\n      })\n    }\n  },\n  /**\n   * 生命周期函数--监听页面隐藏\n   */\n  onHide: function () {\n\n  },\n\n  /**\n   * 生命周期函数--监听页面卸载\n   */\n  onUnload: function () {\n\n  },\n\n  /**\n   * 页面相关事件处理函数--监听用户下拉动作\n   */\n  onPullDownRefresh: function () {\n\n  },\n\n  /**\n   * 页面上拉触底事件的处理函数\n   */\n  onReachBottom: function () {\n\n  },\n  searchChange(event){\n    this.setData({\n      searchValue: event.detail.value\n    })\n  },\n  search(event){\n    console.log('search')\n    this.setData({\n      searchValue: event.detail.value\n    })\n    this.fetchShops(this.data.latitude, this.data.longitude, event.detail.value)\n  },\n  goShop(e){\n    const idx = e.currentTarget.dataset.idx\n    wx.setStorageSync('shopInfo', this.data.shops[idx])\n    wx.setStorageSync('shopIds', this.data.shops[idx].id)\n    wx.setStorageSync('refreshIndex', 1)\n    wx.switchTab({\n      url: '/pages/index/index'\n    })\n  }\n})"
  },
  {
    "path": "pages/shop/select.json",
    "content": "{\n  \"usingComponents\": {},\n  \"navigationBarTitleText\": \"选择门店\"\n}"
  },
  {
    "path": "pages/shop/select.wxml",
    "content": "<view class=\"page-container\">\n  <!-- 搜索栏 -->\n  <view class=\"search-wrapper\">\n    <view class=\"search-box\">\n      <image class=\"search-icon\" src=\"/images/icon/search.svg\"></image>\n      <input class=\"search-input\" placeholder=\"搜索门店名称、地址\" placeholder-class=\"search-placeholder\" bindinput=\"searchChange\" bindconfirm=\"search\"/>\n    </view>\n  </view>\n\n  <!-- 门店列表 -->\n  <view class=\"shops-container\">\n    <view class=\"shop-card {{ index == 0 ? 'shop-card-nearest' : '' }}\" wx:for=\"{{shops}}\" wx:key=\"id\">\n      <!-- 门店头部 -->\n      <view class=\"shop-header\">\n        <view class=\"shop-name-wrapper\">\n          <image class=\"shop-icon\" src=\"/images/icon/{{ index == 0?'shop-on':'shop' }}.svg\"></image>\n          <text class=\"shop-name {{ index == 0 ? 'shop-name-active' : '' }}\">{{ item.name }}</text>\n        </view>\n        <view class=\"distance-wrapper {{ index == 0 ? 'distance-active' : '' }}\">\n          <text class=\"distance-num\">{{ item.distance }}</text>\n          <text class=\"distance-unit\">km</text>\n        </view>\n      </view>\n\n      <!-- 门店信息 -->\n      <view class=\"shop-info\">\n        <view class=\"info-item\">\n          <image class=\"info-icon\" src=\"/images/icon/pos-gray.svg\"></image>\n          <text class=\"info-text\">{{ item.address }}</text>\n        </view>\n        <view class=\"info-item\">\n          <image class=\"info-icon\" src=\"/images/icon/time-gray.svg\"></image>\n          <text class=\"info-text\">{{ item.openingHours }}</text>\n        </view>\n        <view class=\"info-item\">\n          <image class=\"info-icon\" src=\"/images/icon/tel-gray.svg\"></image>\n          <text class=\"info-text\">{{ item.linkPhone }}</text>\n        </view>\n      </view>\n\n      <!-- 操作按钮 -->\n      <view class=\"shop-action\">\n        <button wx:if=\"{{index == 0}}\" class=\"btn-enter-shop\" bindtap=\"goShop\" data-idx=\"{{ index }}\">\n          <text class=\"btn-text\">进入门店</text>\n        </button>\n        <view wx:else class=\"btn-select-shop\" bindtap=\"goShop\" data-idx=\"{{ index }}\">\n          <text class=\"btn-select-text\">选择门店</text>\n          <image class=\"btn-arrow\" src=\"/images/icon/next.svg\"></image>\n        </view>\n      </view>\n    </view>\n  </view>\n</view>"
  },
  {
    "path": "pages/shop/select.wxss",
    "content": "/* 页面容器 */\n.page-container {\n  min-height: 100vh;\n  background: linear-gradient(to bottom, #f5f5f5 0%, #ffffff 300rpx);\n}\n\n/* ==================== 搜索栏样式 ==================== */\n.search-wrapper {\n  padding: 24rpx 24rpx 20rpx;\n  background: #ffffff;\n}\n\n.search-box {\n  position: relative;\n  background: #f5f5f5;\n  border-radius: 36rpx;\n  height: 72rpx;\n  display: flex;\n  align-items: center;\n  overflow: hidden;\n  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);\n}\n\n.search-icon {\n  position: absolute;\n  width: 32rpx;\n  height: 32rpx;\n  left: 28rpx;\n  z-index: 2;\n}\n\n.search-input {\n  flex: 1;\n  height: 72rpx;\n  padding-left: 72rpx;\n  padding-right: 28rpx;\n  font-size: 28rpx;\n  color: #333;\n}\n\n.search-placeholder {\n  color: #999;\n  font-size: 28rpx;\n}\n\n/* ==================== 门店列表容器 ==================== */\n.shops-container {\n  padding: 0 24rpx 24rpx;\n}\n\n/* ==================== 门店卡片样式 ==================== */\n.shop-card {\n  position: relative;\n  background: #ffffff;\n  border-radius: 16rpx;\n  margin-top: 24rpx;\n  padding: 32rpx 28rpx 28rpx;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);\n  transition: all 0.3s ease;\n  overflow: hidden;\n}\n\n/* 最近门店卡片特殊样式 */\n.shop-card-nearest {\n  border: 2rpx solid #E93B3D;\n  box-shadow: 0 8rpx 24rpx rgba(233, 59, 61, 0.15);\n}\n\n/* ==================== 门店头部 ==================== */\n.shop-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 24rpx;\n  padding-right: 12rpx;\n}\n\n.shop-name-wrapper {\n  display: flex;\n  align-items: center;\n  flex: 1;\n}\n\n.shop-icon {\n  width: 32rpx;\n  height: 38rpx;\n  margin-right: 16rpx;\n}\n\n.shop-name {\n  font-size: 32rpx;\n  color: #333333;\n  font-weight: 600;\n  letter-spacing: 0.5rpx;\n  line-height: 44rpx;\n}\n\n.shop-name-active {\n  color: #E93B3D;\n}\n\n/* 距离显示 */\n.distance-wrapper {\n  display: flex;\n  align-items: baseline;\n  padding: 8rpx 16rpx;\n  background: #f5f5f5;\n  border-radius: 24rpx;\n  margin-left: 16rpx;\n}\n\n.distance-active {\n  background: linear-gradient(135deg, #FFE8E8 0%, #FFE0E0 100%);\n}\n\n.distance-num {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333333;\n  letter-spacing: 0.5rpx;\n}\n\n.distance-active .distance-num {\n  color: #E93B3D;\n}\n\n.distance-unit {\n  font-size: 24rpx;\n  color: #666666;\n  margin-left: 4rpx;\n}\n\n.distance-active .distance-unit {\n  color: #E93B3D;\n}\n\n/* ==================== 门店信息 ==================== */\n.shop-info {\n  background: #f9f9f9;\n  border-radius: 12rpx;\n  padding: 24rpx 20rpx;\n  margin-bottom: 24rpx;\n}\n\n.info-item {\n  display: flex;\n  align-items: flex-start;\n  margin-bottom: 20rpx;\n}\n\n.info-item:last-child {\n  margin-bottom: 0;\n}\n\n.info-icon {\n  width: 28rpx;\n  height: 28rpx;\n  margin-right: 16rpx;\n  margin-top: 2rpx;\n  flex-shrink: 0;\n}\n\n.info-text {\n  flex: 1;\n  font-size: 26rpx;\n  color: #666666;\n  line-height: 38rpx;\n  letter-spacing: 0.3rpx;\n}\n\n/* ==================== 操作按钮 ==================== */\n.shop-action {\n  margin-top: 8rpx;\n}\n\n/* 进入门店按钮 */\n.btn-enter-shop {\n  width: 100%;\n  height: 80rpx;\n  background: linear-gradient(135deg, #E93B3D 0%, #F54749 100%);\n  border-radius: 40rpx;\n  border: none;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 8rpx 20rpx rgba(233, 59, 61, 0.25);\n  transition: all 0.3s ease;\n}\n\n.btn-enter-shop::after {\n  border: none;\n}\n\n.btn-text {\n  font-size: 30rpx;\n  color: #ffffff;\n  font-weight: 600;\n  letter-spacing: 2rpx;\n}\n\n/* 选择门店按钮 */\n.btn-select-shop {\n  width: 100%;\n  height: 80rpx;\n  background: #ffffff;\n  border: 2rpx solid #E93B3D;\n  border-radius: 40rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  position: relative;\n  transition: all 0.3s ease;\n}\n\n.btn-select-text {\n  font-size: 30rpx;\n  color: #E93B3D;\n  font-weight: 500;\n  letter-spacing: 1rpx;\n}\n\n.btn-arrow {\n  width: 20rpx;\n  height: 20rpx;\n  margin-left: 12rpx;\n}\n\n/* ==================== 响应式优化 ==================== */\n@media (max-width: 375px) {\n  .shop-name {\n    font-size: 30rpx;\n  }\n  \n  .distance-num {\n    font-size: 28rpx;\n  }\n  \n  .info-text {\n    font-size: 24rpx;\n  }\n}\n\n/* ==================== 动画效果 ==================== */\n@keyframes fadeIn {\n  from {\n    opacity: 0;\n    transform: translateY(20rpx);\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n\n.shop-card {\n  animation: fadeIn 0.4s ease-out;\n}\n"
  },
  {
    "path": "pages/shop-cart/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst TOOLS = require('../../utils/tools.js')\nconst AUTH = require('../../utils/auth')\n\nconst app = getApp()\n\nPage({\n  data: {\n    shopCarType: 0, //0自营 1云货架\n    saveHidden: true,\n    allSelect: true,\n    delBtnWidth: 120, //删除按钮宽度单位（rpx）\n  },\n\n  //获取元素自适应后的实际宽度\n  getEleWidth: function (w) {\n    var real = 0;\n    try {\n      var res = wx.getSystemInfoSync().windowWidth\n      var scale = (750 / 2) / (w / 2)\n      // console.log(scale);\n      real = Math.floor(res / scale);\n      return real;\n    } catch (e) {\n      return false;\n      // Do something when catch error\n    }\n  },\n  initEleWidth: function () {\n    var delBtnWidth = this.getEleWidth(this.data.delBtnWidth);\n    this.setData({\n      delBtnWidth: delBtnWidth\n    });\n  },\n  onLoad: function () {\n    this.initEleWidth();\n    this.onShow();\n    this.setData({\n      shopping_cart_vop_open: wx.getStorageSync('shopping_cart_vop_open')\n    })\n  },\n  onShow: function () {\n    this.shippingCarInfo()\n  },\n  async shippingCarInfo() {\n    const token = wx.getStorageSync('token')\n    if (!token) {\n      return\n    }\n    if (this.data.shopCarType == 0) { //自营购物车\n      var res = await WXAPI.shippingCarInfo(token)\n    } else if (this.data.shopCarType == 1) { //云货架购物车\n      var res = await WXAPI.jdvopCartInfoV2(token)\n    }\n    if (res.code == 0) {\n      if (this.data.shopCarType == 0) //自营商品\n      {\n        res.data.items.forEach(ele => {\n          if (!ele.stores || ele.status == 1) {\n            ele.selected = false\n          }\n        })\n      }\n      this.setData({\n        shippingCarInfo: res.data\n      })\n    } else {\n      this.setData({\n        shippingCarInfo: null\n      })\n    }\n  },\n  toIndexPage: function () {\n    wx.switchTab({\n      url: \"/pages/index/index\"\n    });\n  },\n\n  touchS: function (e) {\n    if (e.touches.length == 1) {\n      this.setData({\n        startX: e.touches[0].clientX\n      });\n    }\n  },\n  touchM: function (e) {\n    const index = e.currentTarget.dataset.index;\n    if (e.touches.length == 1) {\n      var moveX = e.touches[0].clientX;\n      var disX = this.data.startX - moveX;\n      var delBtnWidth = this.data.delBtnWidth;\n      var left = \"\";\n      if (disX == 0 || disX < 0) { //如果移动距离小于等于0，container位置不变\n        left = \"margin-left:0px\";\n      } else if (disX > 0) { //移动距离大于0，container left值等于手指移动距离\n        left = \"margin-left:-\" + disX + \"px\";\n        if (disX >= delBtnWidth) {\n          left = \"left:-\" + delBtnWidth + \"px\";\n        }\n      }\n      this.data.shippingCarInfo.items[index].left = left\n      this.setData({\n        shippingCarInfo: this.data.shippingCarInfo\n      })\n    }\n  },\n\n  touchE: function (e) {\n    var index = e.currentTarget.dataset.index;\n    if (e.changedTouches.length == 1) {\n      var endX = e.changedTouches[0].clientX;\n      var disX = this.data.startX - endX;\n      var delBtnWidth = this.data.delBtnWidth;\n      //如果距离小于删除按钮的1/2，不显示删除按钮\n      var left = disX > delBtnWidth / 2 ? \"margin-left:-\" + delBtnWidth + \"px\" : \"margin-left:0px\";\n      this.data.shippingCarInfo.items[index].left = left\n      this.setData({\n        shippingCarInfo: this.data.shippingCarInfo\n      })\n    }\n  },\n  async delItem(e) {\n    const key = e.currentTarget.dataset.key\n    this.delItemDone(key)\n  },\n  async delItemDone(key) {\n    const token = wx.getStorageSync('token')\n    if(this.data.shopCarType == 0){\n      var res = await WXAPI.shippingCarInfoRemoveItem(token, key)\n    }\n    if(this.data.shopCarType == 1){\n      var res = await WXAPI.jdvopCartRemoveV2(token, key)\n    }\n    if (res.code != 0 && res.code != 700) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    } else {\n      this.shippingCarInfo()\n      TOOLS.showTabBarBadge()\n    }\n  },\n  async jiaBtnTap(e) {\n    const index = e.currentTarget.dataset.index;\n    const item = this.data.shippingCarInfo.items[index]\n    const number = item.number + 1\n    const token = wx.getStorageSync('token')\n    if(this.data.shopCarType == 0){\n      var res = await WXAPI.shippingCarInfoModifyNumber(token, item.key, number)\n    }\n    else if(this.data.shopCarType == 1){\n      var res = await WXAPI.jdvopCartModifyNumberV2(token, item.key, number)\n    }    \n    this.shippingCarInfo()\n  },\n  async jianBtnTap(e) {\n    const index = e.currentTarget.dataset.index;\n    const item = this.data.shippingCarInfo.items[index]\n    const number = item.number - 1\n    if (number <= 0) {\n      // 弹出删除确认\n      wx.showModal({\n        content: '确定要删除该商品吗？',\n        success: (res) => {\n          if (res.confirm) {\n            this.delItemDone(item.key)\n          }\n        }\n      })\n      return\n    }\n    const token = wx.getStorageSync('token')\n    if(this.data.shopCarType == 0)\n    {\n      var res = await WXAPI.shippingCarInfoModifyNumber(token, item.key, number)  \n    }\n    if(this.data.shopCarType == 1)\n    {\n      var res = await WXAPI.jdvopCartModifyNumberV2(token, item.key, number)  \n    }\n    this.shippingCarInfo()\n  },\n  changeCarNumber(e) {\n    const key = e.currentTarget.dataset.key\n    const num = e.detail.value\n    const token = wx.getStorageSync('token')\n    if(this.data.shopCarType == 0){\n    WXAPI.shippingCarInfoModifyNumber(token, key, num).then(res => {\n      this.shippingCarInfo()\n    })}\n    else if(this.data.shopCarType == 1){\n      WXAPI.jdvopCartModifyNumberV2(token, key, num).then(res => {\n        this.shippingCarInfo()\n      })\n    }\n  },\n  async radioClick(e) {\n    var index = e.currentTarget.dataset.index;\n    var item = this.data.shippingCarInfo.items[index]\n    const token = wx.getStorageSync('token')\n    if (this.data.shopCarType == 0) { //自营购物车\n      if (!item.stores || item.status == 1) {\n        return\n      }\n      var res = await WXAPI.shippingCartSelected(token, item.key, !item.selected)\n    } else if (this.data.shopCarType == 1) { //云货架购物车\n      var res = await WXAPI.jdvopCartSelectV2(token, item.key, !item.selected)\n    }\n    this.shippingCarInfo()\n  },\n  onChange(event) {\n    this.setData({\n      shopCarType: event.detail.name\n    })\n    this.shippingCarInfo()\n  },\n  goDetail(e) {\n    const item = e.currentTarget.dataset.item\n    wx.navigateTo({\n      url: '/pages/goods-details/index?id=' + item.goodsId,\n    })\n  },\n})"
  },
  {
    "path": "pages/shop-cart/index.json",
    "content": "{\n   \"navigationBarTitleText\": \"购物车\"\n}\n"
  },
  {
    "path": "pages/shop-cart/index.wxml",
    "content": "<!--index.wxml-->\n<import src=\"../template-cart/template-cart.wxml\" />\n\n<view class=\"container\">\n  <van-tabs wx:if=\"{{ shopping_cart_vop_open == 1 }}\" custom-class=\"vtabs\" shopCarType=\"{{ shopCarType }}\" bind:change=\"onChange\">\n    <van-tab title=\"自营商品\">\n      <template is=\"{{shippingCarInfo.items.length > 0 ? 'cart-goods-list' : 'no-goods'}}\"\n  data=\"{{...shippingCarInfo, saveHidden, allSelect, noSelect,shopCarType}}\"></template>\n    </van-tab>\n    <van-tab title=\"云货架\">\n      <template is=\"{{shippingCarInfo.items.length > 0 ? 'cart-goods-list' : 'no-goods'}}\"\n  data=\"{{...shippingCarInfo, saveHidden, allSelect, noSelect,shopCarType}}\"></template>\n    </van-tab>\n  </van-tabs>\n  <template wx:else is=\"{{shippingCarInfo.items.length > 0 ? 'cart-goods-list' : 'no-goods'}}\"\n  data=\"{{...shippingCarInfo, saveHidden, allSelect, noSelect,shopCarType}}\"></template>\n\n  \n</view>"
  },
  {
    "path": "pages/shop-cart/index.wxss",
    "content": "@import \"../template-cart/template-cart.wxss\";\npage{\n  min-height: 100%;\n  background-color: #F2f2f2;\n}\n.container {\n  background-color: #F2f2f2;\n  min-height: 100%;\n}\n.pos-fiexd{\n  position: fixed;\n  bottom: 0;\n  left: 0;\n}\n.vtabs{\n  width: 100vw;\n}"
  },
  {
    "path": "pages/sign/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nPage({\n  data: {\n    minDate: new Date().getTime(),\n    maxDate: new Date().getTime(),\n    formatter(day) {\n      return day;\n    },\n    useFingerprintEmoji: false   // 默认用图片，支持Unicode 16及以上的操作系统才用指纹emoji（🫆）\n  },\n  onLoad: function(options) {\n    this.scoreSignLogs()\n    this.setData({ useFingerprintEmoji: this.shouldUseFingerprintEmoji() });\n  },\n  onShow: function() {\n    AUTH.checkHasLogined().then(isLogined => {\n      if (!isLogined) {\n        AUTH.login(this)\n      }\n    })\n  },\n  async scoreSignLogs() {\n    const res = await WXAPI.scoreSignLogs({\n      token: wx.getStorageSync('token')\n    })\n    if (res.code == 0) {\n      this.setData({\n        scoreSignLogs: res.data.result,\n        formatter(day) {\n          const _log = res.data.result.find(ele => {\n            const year = day.date.getYear() + 1900\n            let month = day.date.getMonth() + 1\n            month = month + ''\n            if (month.length == 1) {\n              month = '0' + month\n            }\n            let date = day.date.getDate() + ''\n            if (date.length == 1) {\n              date = '0' + date\n            }\n            return ele.dateAdd.indexOf(`${year}-${month}-${date}`) == 0\n          })\n          if (_log) {\n            day.bottomInfo = '已签到'\n          }\n          return day;\n        }\n      })\n    }\n  },\n  async sign() {\n    const res = await WXAPI.scoreSign(wx.getStorageSync('token'))\n    if (res.code == 10000) {\n      wx.showToast({\n        title: '签到成功',\n        icon: 'success'\n      })\n      this.scoreSignLogs()\n      return\n    }\n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    } else {\n      wx.showToast({\n        title: '签到成功',\n        icon: 'success'\n      })\n      this.scoreSignLogs()\n    }\n  },\n  /* 简单版判断：满足 Win11-25H2 及以上 / Android16+ / iOS18.4+ 返回 true */\n  shouldUseFingerprintEmoji() {\n    try {\n      const info = wx.getDeviceInfo ? wx.getDeviceInfo() : wx.getSystemInfoSync();\n      const plat = (info.platform || '').toLowerCase();\n      const sys  = info.system || '';\n\n      if (plat === 'android') {\n        const m = sys.match(/Android\\s+(\\d+)/);\n        return m ? (parseInt(m[1]) >= 16) : false;\n      }\n      if (plat === 'ios') {\n        const m = sys.match(/iOS\\s+(\\d+)\\.(\\d+)/);\n        if (!m) return false;\n        const major = parseInt(m[1]);\n        const minor = parseInt(m[2]);\n        return major > 18 || (major === 18 && minor >= 4);\n      }\n      if (plat === 'windows' || plat === 'win32') {   // 开发者工具里 platform 可能是 windows\n        const m = sys.match(/Windows\\s+(\\d+)\\s*H(\\d+)/);\n        if (!m) return false;\n        const build = parseInt(m[1]);\n        const h     = parseInt(m[2]);\n        return build >= 25 && h >= 2;   // 25H2 及以上\n      }\n    } catch (e) { /* 忽略错误，统一走图片 */ }\n    return false;   // 其余系统或解析失败都用 png\n  }\n})"
  },
  {
    "path": "pages/sign/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"每日签到\"\n}"
  },
  {
    "path": "pages/sign/index.wxml",
    "content": "<van-calendar\n  show-title=\"{{ false }}\"\n  poppable=\"{{ false }}\"\n  min-date=\"{{ minDate }}\"\n  max-date=\"{{ maxDate }}\"\n  show-confirm=\"{{ false }}\"\n  formatter=\"{{ formatter }}\"\n/>\n<view class=\"zwqd-box\">\n  <!-- 高版本系统：显示指纹 emoji -->\n  <text wx:if=\"{{useFingerprintEmoji}}\"\n    class=\"emoji-icon\"\n    bindtap=\"sign\">🫆</text>\n  <!-- 低版本或未知系统：继续用原图片 -->\n  <image wx:else\n    src=\"/images/zw.png\"\n    bindtap=\"sign\"></image>\n  <view>点击签到</view>\n</view>\n"
  },
  {
    "path": "pages/sign/index.wxss",
    "content": ".todo-dot-bottom {\n  color: red !important;\n}\n.zwqd-box {\n  text-align: center;\n  margin: auto;\n  margin-top: 32rpx;\n}\n.zwqd-box image {\n  width: 140rpx;\n  height: 140rpx;\n  margin: auto;\n}\n.zwqd-box view {\n  margin-top: 16rpx;\n  color: #999;\n  font-size: 26rpx;\n}\n.emoji-icon {\n  display: block;          /* 同 image 默认 block */\n  width: 140rpx;\n  height: 140rpx;\n  margin: auto;\n  font-size: 110rpx;       /* 视觉上与 140rpx 图片接近，可自行微调 */\n  line-height: 140rpx;\n  text-align: center;\n  cursor: pointer;\n}"
  },
  {
    "path": "pages/start/start.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst CONFIG = require('../../config.js')\nPage({\n  data: {\n    swiperMaxNumber: 0,\n    swiperCurrent: 0\n  },\n  onLoad(e){\n    // e.shopId = 6040 // 测试，测试完了注释掉\n    this.data.shopId = e.shopId\n    this.readConfigVal()\n    // 补偿写法\n    getApp().configLoadOK = () => {\n      this.readConfigVal()\n    }\n  },\n  onShow:function(){\n    \n  },\n  async readConfigVal() {\n    const mallName = wx.getStorageSync('mallName')\n    if (!mallName) {\n      return\n    }\n    wx.setNavigationBarTitle({\n      title: wx.getStorageSync('mallName')\n    })\n    let shopMod = wx.getStorageSync('shopMod')\n    if (!shopMod) {\n      shopMod = 0\n    }\n    const app_show_pic_version = wx.getStorageSync('app_show_pic_version')\n    if (app_show_pic_version && app_show_pic_version == CONFIG.version) {\n      if (shopMod==1) {\n        this.goShopSelectPage()\n      } else {\n        wx.switchTab({\n          url: '/pages/index/index',\n        })\n      }\n    } else {\n      // 展示启动页\n      const res = await WXAPI.banners({\n        type: 'app'\n      })\n      if (res.code == 700) {\n        if (shopMod==1) {\n          this.goShopSelectPage()\n        } else {\n          wx.switchTab({\n            url: '/pages/index/index',\n          })\n        }\n      } else {\n        this.setData({\n          banners: res.data,\n          swiperMaxNumber: res.data.length\n        });\n      }\n    }\n  },\n  swiperchange: function (e) {\n    //console.log(e.detail.current)\n    this.setData({\n      swiperCurrent: e.detail.current\n    })\n  },\n  goLeft() {\n    if (this.data.swiperCurrent == 0) {\n      this.setData({\n        swiperCurrent: this.data.swiperMaxNumber - 1\n      })\n    } else {\n      this.setData({\n        swiperCurrent: this.data.swiperCurrent - 1\n      })\n    }\n  },\n  goRight() {\n    if (this.data.swiperCurrent == this.data.swiperMaxNumber - 1) {\n      this.setData({\n        swiperCurrent: 0\n      })\n    } else {\n      this.setData({\n        swiperCurrent: this.data.swiperCurrent + 1\n      })\n    }\n  },\n  goToIndex: function (e) {\n    let shopMod = wx.getStorageSync('shopMod')\n    if (!shopMod) {\n      shopMod = 0\n    }\n    if (getApp().globalData.isConnected) {\n      wx.setStorage({\n        key: 'app_show_pic_version',\n        data: CONFIG.version\n      })\n      if (shopMod == 1) {\n        this.goShopSelectPage()\n      } else {\n        wx.switchTab({\n          url: '/pages/index/index',\n        });\n      }\n    } else {\n      wx.showToast({\n        title: '当前无网络',\n        icon: 'none',\n      })\n    }\n  },\n  async goShopSelectPage() {\n    if (!this.data.shopId) {\n      wx.redirectTo({\n        url: '/pages/shop/select'\n      })\n      return\n    }\n    // 有传入门店ID\n    const res = await WXAPI.shopSubdetail(this.data.shopId)\n    if (res.code != 0) {\n      wx.redirectTo({\n        url: '/pages/shop/select'\n      })\n      return\n    }\n    wx.setStorageSync('shopInfo', res.data.info)\n    wx.setStorageSync('shopIds', res.data.info.id)\n    wx.switchTab({\n      url: '/pages/index/index'\n    })\n  }\n});"
  },
  {
    "path": "pages/start/start.json",
    "content": "{\n  \"navigationBarTitleText\": \"\",\n  \"enablePullDownRefresh\": false,\n  \"disableScroll\": true,\n  \"navigationStyle\": \"custom\"\n}"
  },
  {
    "path": "pages/start/start.wxml",
    "content": "<!-- 启动页容器 -->\n<view wx:if=\"{{ banners }}\" class=\"start-container\">\n  <!-- 轮播图区域 -->\n  <swiper class=\"swiper_box\" current=\"{{ swiperCurrent }}\" bindchange=\"swiperchange\" circular=\"{{true}}\" autoplay=\"{{false}}\" interval=\"5000\" duration=\"500\">\n    <swiper-item wx:for=\"{{banners}}\" wx:key=\"id\">\n      <view class=\"swiper-item-wrapper\">\n        <image class=\"banner-image\" mode=\"aspectFill\" src=\"{{item.picUrl}}\" />\n        <!-- 渐变遮罩 -->\n        <view class=\"image-mask\"></view>\n      </view>\n    </swiper-item>\n  </swiper>\n\n  <!-- 左右切换按钮 -->\n  <view wx:if=\"{{ swiperMaxNumber > 1 }}\" class=\"swiper-icon left-icon\" bind:tap=\"goLeft\">\n    <image src=\"/images/start-left.png\" mode=\"widthFix\"></image>\n  </view>\n  <view wx:if=\"{{ swiperMaxNumber > 1 }}\" class=\"swiper-icon right-icon\" bind:tap=\"goRight\">\n    <image src=\"/images/start-right.png\" mode=\"widthFix\"></image>\n  </view>\n\n  <!-- 指示器 -->\n  <view wx:if=\"{{ swiperMaxNumber > 1 }}\" class=\"dots-wrapper\">\n    <view class=\"dots-container\">\n      <view wx:for=\"{{banners}}\" wx:key=\"id\" class=\"dot {{index == swiperCurrent ? 'dot-active' : ''}}\"></view>\n    </view>\n  </view>\n\n  <!-- 底部进入按钮区域 -->\n  <view class=\"jump-btn-box\">\n    <view class=\"jump-btn\" bind:tap=\"goToIndex\">\n      <text class=\"btn-text\">立即进入</text>\n      <view class=\"btn-shine\"></view>\n    </view>\n    <view class=\"skip-hint\">精彩内容等你探索</view>\n  </view>\n</view>\n<view wx:else class=\"loading-container\">\n  <!-- 加载动画容器 -->\n  <view class=\"loading-spinner-wrapper\">\n    <view class=\"loading-spinner\"></view>\n  </view>\n\n  <!-- 加载文字 -->\n  <view class=\"loading-text\">加载中...</view>\n</view>"
  },
  {
    "path": "pages/start/start.wxss",
    "content": "/* 京东风格 - 启动页样式 */\n\n/* 页面容器 */\npage {\n  width: 100vw;\n  height: 100vh;\n  overflow: hidden;\n  background: #000;\n}\n\n/* 启动页主容器 */\n.start-container {\n  width: 100vw;\n  height: 100vh;\n  position: relative;\n  overflow: hidden;\n}\n\n/* 轮播图容器 */\n.swiper_box {\n  width: 100vw;\n  height: 100vh;\n}\n\nswiper-item {\n  width: 100vw;\n  height: 100vh;\n}\n\n/* 轮播项包装器 */\n.swiper-item-wrapper {\n  width: 100%;\n  height: 100%;\n  position: relative;\n}\n\n/* 轮播图片 */\n.banner-image {\n  width: 100vw;\n  height: 100vh;\n  display: block;\n}\n\n/* 图片渐变遮罩 - 京东风格 */\n.image-mask {\n  position: absolute;\n  left: 0;\n  bottom: 0;\n  width: 100%;\n  height: 50%;\n  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75));\n  z-index: 1;\n  pointer-events: none;\n}\n\n/* 左右切换按钮样式 - 优雅半透明风格 */\n.swiper-icon {\n  position: absolute;\n  top: 50%;\n  transform: translateY(-50%);\n  width: 80rpx;\n  height: 80rpx;\n  background: rgba(255, 255, 255, 0.15);\n  border: 2rpx solid rgba(255, 255, 255, 0.3);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.15);\n  backdrop-filter: blur(20rpx);\n  z-index: 10;\n  transition: all 0.3s ease;\n}\n\n.swiper-icon.left-icon {\n  left: 40rpx;\n}\n\n.swiper-icon.right-icon {\n  right: 40rpx;\n}\n\n.swiper-icon:active {\n  transform: translateY(-50%) scale(0.9);\n  background: rgba(255, 255, 255, 0.25);\n  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.2);\n}\n\n.swiper-icon image {\n  width: 32rpx;\n  height: 32rpx;\n  filter: brightness(0) invert(1);\n}\n\n/* 指示器容器 */\n.dots-wrapper {\n  position: absolute;\n  bottom: 260rpx;\n  left: 0;\n  width: 100%;\n  display: flex;\n  justify-content: center;\n  z-index: 10;\n}\n\n.dots-container {\n  display: flex;\n  align-items: center;\n  gap: 12rpx;\n  padding: 12rpx 24rpx;\n  background: rgba(0, 0, 0, 0.25);\n  backdrop-filter: blur(10rpx);\n  border-radius: 40rpx;\n}\n\n/* 指示器小点 */\n.dot {\n  width: 16rpx;\n  height: 16rpx;\n  border-radius: 50%;\n  background: rgba(255, 255, 255, 0.4);\n  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n/* 指示器激活状态 - 京东红色 */\n.dot-active {\n  width: 48rpx;\n  height: 16rpx;\n  border-radius: 8rpx;\n  background: linear-gradient(90deg, #E93B3D, #FF6B6B);\n  box-shadow: 0 4rpx 12rpx rgba(233, 59, 61, 0.4);\n}\n\n/* 底部按钮区域 */\n.jump-btn-box {\n  position: absolute;\n  left: 0;\n  bottom: calc(env(safe-area-inset-bottom) + 80rpx);\n  width: 100vw;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  z-index: 10;\n  gap: 24rpx;\n}\n\n/* 进入按钮 - 京东风格 */\n.jump-btn {\n  position: relative;\n  padding: 28rpx 120rpx;\n  background: linear-gradient(135deg, #E93B3D 0%, #E61717 100%);\n  border-radius: 60rpx;\n  box-shadow: 0 12rpx 40rpx rgba(233, 59, 61, 0.45), \n              0 4rpx 12rpx rgba(0, 0, 0, 0.2);\n  overflow: hidden;\n  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.jump-btn:active {\n  transform: scale(0.96);\n  box-shadow: 0 8rpx 28rpx rgba(233, 59, 61, 0.4), \n              0 2rpx 8rpx rgba(0, 0, 0, 0.2);\n}\n\n/* 按钮文字 */\n.btn-text {\n  position: relative;\n  color: #FFFFFF;\n  font-size: 32rpx;\n  font-weight: 600;\n  letter-spacing: 2rpx;\n  z-index: 2;\n  text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2);\n}\n\n/* 按钮光泽效果 */\n.btn-shine {\n  position: absolute;\n  top: -50%;\n  left: -100%;\n  width: 100%;\n  height: 200%;\n  background: linear-gradient(90deg, \n    transparent, \n    rgba(255, 255, 255, 0.3), \n    transparent);\n  transform: skewX(-25deg);\n  animation: shine 3s infinite;\n}\n\n@keyframes shine {\n  0% {\n    left: -100%;\n  }\n  20% {\n    left: 100%;\n  }\n  100% {\n    left: 100%;\n  }\n}\n\n/* 提示文字 */\n.skip-hint {\n  color: rgba(255, 255, 255, 0.75);\n  font-size: 24rpx;\n  letter-spacing: 1rpx;\n  text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.3);\n  animation: breath 2s ease-in-out infinite;\n}\n\n@keyframes breath {\n  0%, 100% {\n    opacity: 0.75;\n  }\n  50% {\n    opacity: 1;\n  }\n}\n\n/* 全屏加载效果样式 */\n.loading-container {\n  width: 100vw;\n  height: 100vh;\n  background: #000;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  position: relative;\n}\n\n/* 加载动画容器 */\n.loading-spinner-wrapper {\n  width: 120rpx;\n  height: 120rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-bottom: 60rpx;\n}\n\n/* 旋转加载图标 */\n.loading-spinner {\n  width: 80rpx;\n  height: 80rpx;\n  border: 6rpx solid rgba(255, 255, 255, 0.1);\n  border-top: 6rpx solid #E93B3D;\n  border-radius: 50%;\n  animation: loading-spin 1.5s linear infinite;\n}\n\n/* 加载文字 */\n.loading-text {\n  color: rgba(255, 255, 255, 0.8);\n  font-size: 28rpx;\n  font-weight: 400;\n  letter-spacing: 2rpx;\n  text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.3);\n  animation: loading-text-fade 2s ease-in-out infinite;\n}\n\n/* 加载图标旋转动画 */\n@keyframes loading-spin {\n  0% {\n    transform: rotate(0deg);\n  }\n  100% {\n    transform: rotate(360deg);\n  }\n}\n\n/* 加载文字淡化动画 */\n@keyframes loading-text-fade {\n  0%, 100% {\n    opacity: 0.6;\n  }\n  50% {\n    opacity: 1;\n  }\n}"
  },
  {
    "path": "pages/template-cart/template-cart.js",
    "content": ""
  },
  {
    "path": "pages/template-cart/template-cart.wxml",
    "content": "<template name=\"no-goods\">\n  <van-empty description=\"购物车空空如也～\" image=\"https://dcdn.it120.cc/2021/03/02/11544ab7-38ca-4570-a876-cbfd39720367.png\">\n    <van-button round type=\"danger\" size=\"small\" class=\"bottom-button\" bind:click=\"toIndexPage\">\n      去逛逛\n    </van-button>\n  </van-empty>\n</template>\n\n<template name=\"cart-goods-list\">\n  <view wx:if=\"{{ shopCarType == 0 }}\" class=\"goodsList\"> <!-- 自营 -->\n    <van-cell-group wx:for=\"{{shopList}}\" wx:for-item=\"shop\" wx:for-index=\"shopIndex\" wx:key=\"id\" title=\"{{ shop.name }}\">\n      <view class=\"a-gooods\" wx:for=\"{{items}}\" wx:key=\"key\" wx:if=\"{{ item.shopId == shop.id }}\">\n        <view class=\"a-goods-conts {{item.active? 'active':''}}\" bindtouchstart=\"touchS\" bindtouchmove=\"touchM\"\n          bindtouchend=\"touchE\" data-index=\"{{index}}\" style=\"{{item.left}}\">\n          <view class=\"goods-info\">\n            <view class=\"radio-box\">\n              <radio checked=\"{{ item.selected }}\" bindtap=\"radioClick\" data-index=\"{{index}}\" />\n            </view>\n            <view class=\"img-box\">\n              <image mode=\"aspectFill\" src=\"{{item.pic}}\" class=\"img\" bind:tap=\"goDetail\" data-item=\"{{ item }}\" />\n            </view>\n            <view class=\"text-box\">\n              <view class=\"goods-title\" bind:tap=\"goDetail\" data-item=\"{{ item }}\">{{item.name}}</view>\n              <view wx:show=\"{{item.sku}}\" class=\"goods-label\">\n                <block wx:for=\"{{item.sku}}\" wx:for-item=\"option\" wx:key=\"index\">\n                  {{option.optionName}}:{{option.optionValueName}}\n                </block>\n                <block wx:for=\"{{item.additions}}\" wx:for-item=\"option\" wx:key=\"index\">\n                  {{option.pname}}:{{option.name}}\n                </block>\n              </view>\n              <view class=\"goods-price\">¥ {{item.price}}</view>\n              <view class=\"buy-num\">\n                <view class=\"jian-btn\" catchtap=\"jianBtnTap\" data-index=\"{{index}}\">-</view>\n                <input type=\"number\" value=\"{{item.number}}\" data-key=\"{{item.key}}\" bindinput=\"changeCarNumber\" />\n                <view class=\"jia-btn {{item.number==curTouchGoodStore? 'disabled' : ''}}\" catchtap=\"jiaBtnTap\"\n                  data-index=\"{{index}}\">+</view>\n              </view>\n            </view>\n          </view>\n          <view class=\"delete-btn\" data-key=\"{{item.key}}\" catchtap=\"delItem\">\n            删除\n          </view>\n          <!-- <view class=\"del-icon\">\n            <van-icon name=\"close\" size=\"32rpx\" color=\"#000\" data-key=\"{{item.key}}\" catchtap=\"delItem\" />\n          </view> -->\n        </view>\n      </view>\n    </van-cell-group>\n    \n  </view>\n  <view wx:if=\"{{ shopCarType == 1 }}\" class=\"goodsList\"> <!-- vop -->\n    <view class=\"a-gooods\" wx:for=\"{{items}}\" wx:key=\"key\">\n      <view class=\"a-goods-conts {{item.active? 'active':''}}\" bindtouchstart=\"touchS\" bindtouchmove=\"touchM\"\n        bindtouchend=\"touchE\" data-index=\"{{index}}\" style=\"{{item.left}}\">\n        <view class=\"goods-info\">\n          <view class=\"radio-box\">\n            <radio checked=\"{{ item.selected }}\" bindtap=\"radioClick\" data-index=\"{{index}}\" />\n          </view>\n          <view class=\"img-box\">\n            <image mode=\"aspectFill\" src=\"{{item.pic}}\" class=\"img\" />\n          </view>\n          <view class=\"text-box\">\n            <view class=\"goods-title\">{{item.name}}</view>\n            <view wx:show=\"{{item.sku}}\" class=\"goods-label\">\n              <block wx:for=\"{{item.sku}}\" wx:for-item=\"option\" wx:key=\"index\">\n                {{option.optionName}}:{{option.optionValueName}}\n              </block>\n              <block wx:for=\"{{item.additions}}\" wx:for-item=\"option\" wx:key=\"index\">\n                {{option.pname}}:{{option.name}}\n              </block>\n            </view>\n            <view class=\"goods-price\">¥ {{item.price}}</view>\n            <view class=\"buy-num\">\n              <view class=\"jian-btn\" catchtap=\"jianBtnTap\" data-index=\"{{index}}\">-</view>\n              <input type=\"number\" value=\"{{item.number}}\" data-key=\"{{item.key}}\" bindinput=\"changeCarNumber\" />\n              <view class=\"jia-btn {{item.number==curTouchGoodStore? 'disabled' : ''}}\" catchtap=\"jiaBtnTap\"\n                data-index=\"{{index}}\">+</view>\n            </view>\n          </view>\n        </view>\n        <view class=\"delete-btn\" data-key=\"{{item.key}}\" catchtap=\"delItem\">\n          删除\n        </view>\n        <!-- <view class=\"del-icon\">\n          <van-icon name=\"close\" size=\"32rpx\" color=\"#000\" data-key=\"{{item.key}}\" catchtap=\"delItem\" />\n        </view> -->\n      </view>\n    </view>\n  </view>\n  <view class=\"jiesuan-box\">\n    <view class=\"left-price\">\n      <view wx:if=\"{{ score }}\" class=\"total\">合计：¥ {{price}} + {{score}} 积分</view>\n      <view wx:else class=\"total\">合计：¥ {{price}}</view>\n    </view>\n    <view class=\"to-pay-btn\">\n      <navigator url=\"/pages/to-pay-order/index?shopCarType={{shopCarType}}\">去结算</navigator>\n    </view>\n  </view>\n</template>"
  },
  {
    "path": "pages/template-cart/template-cart.wxss",
    "content": ".container {\n  justify-content: initial;\n}\n\n.no-goods-icon {\n  width: 382rpx;\n  height: 323rpx;\n  margin-top: 109rpx;\n}\n\n.title-box {\n  width: 100vw;\n  margin-top: 30rpx;\n  text-align: center;\n  font-size: 28rpx;\n  color: #999;\n  margin-bottom: 50rpx;\n}\n\n.to-index-btn {\n\n  line-height: 60rpx;\n  text-align: center;\n  font-size: 28rpx;\n\n  width: 140rpx;\n  height: 60rpx;\n  background: #FFD43E;\n  border-radius: 30px;\n  border: 2px solid #393640;\n\n}\n\n.list-top {\n  width: 100%;\n  height: 88rpx;\n  line-height: 88rpx;\n  box-sizing: border-box;\n  display: flex;\n  justify-content: space-between;\n  padding: 0 30rpx;\n  font-size: 28rpx;\n  align-items: center;\n}\n\n.list-top .label {\n  color: #000;\n}\n\n.list-top .edit-btn {\n  color: #999;\n  height: 100%;\n}\n\n.goodsList {\n  width: 100%;\n  padding-bottom: 110rpx;\n}\n\n.a-gooods {\n  width: 725rpx;\n  overflow: hidden;\n  position: relative;\n  margin-left: 18rpx;\n  background-color: white;\n  border-radius: 10rpx;\n  margin-top: 10rpx;\n}\n\n.a-goods-conts {\n  display: flex;\n  justify-content: space-between;\n  padding-left: 30rpx;\n  width: 850rpx;\n  box-sizing: border-box;\n  transition: margin-left 0.2s ease-in-out;\n}\n\n.goods-info {\n  display: flex;\n  padding: 30rpx 0 30rpx 0;\n  width: 720rpx;\n  box-sizing: border-box;\n}\n\n.goods-info .img-box {\n  width: 160rpx;\n  height: 160rpx;\n  overflow: hidden;\n  margin-right: 20rpx;\n  background-color: #d8d8d8;\n  flex-shrink: 0;\n  border-radius: 16rpx;\n}\n\n.goods-info .text-box {\n  width: 440rpx;\n  position: relative;\n}\n\n.goods-info .text-box .goods-title {\n  width: 450rpx;\n  font-size: 28rpx;\n  color: #000;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  overflow: hidden;\n  padding: 10rpx 20rpx 5rpx 0;\n}\n\n.goods-info .text-box .goods-label {\n  font-size: 26rpx;\n  color: #999;\n  height: 38rpx;\n  line-height: 38rpx;\n  margin: 8rpx 0 25rpx 0;\n  text-overflow: ellipsis;\n    white-space: nowrap;\n    overflow: hidden;\n}\n\n.goods-info .text-box .goods-price {\n  font-size: 26rpx;\n  color: #e64340;\n}\n\n.goods-info .text-box .buy-num {\n  width: 164rpx;\n  height: 48rpx;\n  line-height: 48rpx;\n  position: absolute;\n  right: 30rpx;\n  bottom: 0;\n  display: flex;\n  /*justify-content: space-between;*/\n  font-size: 24rpx;\n  text-align: center;\n}\n\n.goods-info .text-box .buy-num .jian-btn {\n  width: 48rpx;\n  height: 100%;\n  background-color: #F2F3F5;\n  border-radius: 6rpx;\n  line-height: 46rpx;\n  font-size: 18px;\n  color: #323233;\n}\n\n.goods-info .text-box .buy-num .jian-btn.disabled {\n  background-color: #f5f5f9;\n  border-left: 1rpx solid #eee;\n  border-bottom: 1rpx solid #eee;\n  border-top: 1rpx solid #eee;\n  color: #ccc;\n  border-radius: 6rpx;\n  line-height: 48rpx;\n  font-size: 16px;\n  color: #323233;\n}\n\n.goods-info .text-box .buy-num .jia-btn {\n  width: 48rpx;\n  height: 100%;\n  border-radius: 6rpx;\n  background-color: #F2F3F5;\n  line-height: 48rpx;\n  font-size: 16px;\n  color: #323233;\n}\n.goods-info .text-box .buy-num .jia-btn.disabled {\n  background-color: #f5f5f9;\n  color: #ccc;\n  border-radius: 6rpx;\n  line-height: 48rpx;\n  font-size: 16px;\n  color: #323233;\n}\n.goods-info .text-box .buy-num input {\n  width: 68rpx;\n  height: 48rpx;\n  min-height: 48rpx;\n  text-align: center;\n  font-size: 24rpx;\n}\n.goods-info .img-box .img {\n  width: 160rpx;\n  height: 160rpx;\n  border-radius: 16rpx;\n}\n.a-goods-conts .delete-btn {\n  width: 120rpx;\n  line-height: 220rpx;\n  text-align: center;\n  background: #e64340;\n  font-size: 24rpx;\n  color: #fff;\n}\n.jiesuan-box {\n  display: flex;\n  justify-content: space-between;\n  width: 100%;\n  height: 100rpx;\n  position: fixed;\n  bottom: 0;\n  left: 0;\n  background-color: #FAFAFA;\n  z-index: 999;\n}\n.jiesuan-box .to-pay-btn {\n  text-align: center;\n  line-height: 76rpx;\n  width: 200rpx;\n  height: 76rpx;\n  background: linear-gradient(270deg, #FF972A 0%, #FF444A 100%);\n  border-radius: 38rpx;\n  margin-top: 12rpx;\n  margin-right: 20rpx;\n  color: white;\n}\n.jiesuan-box .to-pay-btn.no-select {\n  background-color: #ccc;\n}\n.jiesuan-box .left-price {\n  display: flex;\n  width: 510rpx;\n  justify-content: space-between;\n  line-height: 100rpx;\n  padding: 0 30rpx 0 32rpx;\n  font-size: 28rpx;\n  box-sizing: border-box;\n}\n.jiesuan-box .total {\n  color: #e64340;\n}\n\n.trip {\n  background: #e64340;\n  padding: 8rpx 32rpx;\n  color: #fff;\n  width: 686rpx;\n  font-size: 24rpx;\n}\n\n.del-icon {\n  position: absolute;\n  right: 0rpx;\n  top: 12rpx;\n  width: 50rpx;\n  height: 50rpx;\n}\n.vw100 {\n  width: 700rpx !important;\n  font-size: 24rpx !important;\n}\n.radio-box {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  padding: 8rpx;\n}"
  },
  {
    "path": "pages/test/wifi.js",
    "content": "Page({\n  data: {\n    test: '<p><strong>1893年</strong><br />奥斯曼大街上诞生了一间70平米的商铺。在128年间，它发展成为一家7万平方米的大型百货商场。它就是巴黎老佛爷奥斯曼旗舰店。</p>'\n  },\n  onLoad(options) {\n  },\n  onShow() {\n\n  },\n})"
  },
  {
    "path": "pages/test/wifi.json",
    "content": "{\n  \"usingComponents\": {}\n}"
  },
  {
    "path": "pages/test/wifi.wxml",
    "content": "<mp-html content=\"{{ test }}\" />"
  },
  {
    "path": "pages/test/wifi.wxss",
    "content": "/* pages/test/wifi.wxss */"
  },
  {
    "path": "pages/to-pay-order/index.js",
    "content": "const CONFIG = require('../../config.js')\nconst WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nDate.prototype.format = function(format) {\n  var date = {\n         \"M+\": this.getMonth() + 1,\n         \"d+\": this.getDate(),\n         \"h+\": this.getHours(),\n         \"m+\": this.getMinutes(),\n         \"s+\": this.getSeconds(),\n         \"q+\": Math.floor((this.getMonth() + 3) / 3),\n         \"S+\": this.getMilliseconds()\n  };\n  if (/(y+)/i.test(format)) {\n         format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));\n  }\n  for (var k in date) {\n         if (new RegExp(\"(\" + k + \")\").test(format)) {\n                format = format.replace(RegExp.$1, RegExp.$1.length == 1\n                       ? date[k] : (\"00\" + date[k]).substr((\"\" + date[k]).length));\n         }\n  }\n  return format;\n}\n\nPage({\n  data: {\n    totalScoreToPay: 0,\n    goodsList: [],\n    isNeedLogistics: 0, // 是否需要物流信息\n    yunPrice: 0,\n    amountLogistics2: 0,\n    allGoodsAndYunPrice: 0,\n    goodsJsonStr: \"\",\n    orderType: \"\", //订单类型，购物车下单或立即支付下单，默认是购物车， buyNow 说明是立即购买 \n    pingtuanOpenId: undefined, //拼团的话记录团号\n\n    hasNoCoupons: true,\n    coupons: [],\n    couponAmount: 0, //优惠券金额\n    curCoupon: null, // 当前选择使用的优惠券\n    curCouponShowText: '请选择使用优惠券', // 当前选择使用的优惠券\n    peisongType: 'kd', // 配送方式 kd,zq 分别表示快递/到店自取\n    remark: '',\n    shopIndex: -1,\n    pageIsEnd: false,\n\n\n    bindMobileStatus: 0, // 0 未判断 1 已绑定手机号码 2 未绑定手机号码\n    userScore: 0, // 用户可用积分\n    deductionScore: '-1', // 本次交易抵扣的积分数， -1 为不抵扣，0 为自动抵扣，其他金额为抵扣多少积分\n    shopCarType: 0, //0自营购物车，1云货架购物车\n    dyopen: 0, // 是否开启订阅\n    dyunit: 0, // 按天\n    dyduration: 1, // 订阅间隔\n    dytimes: 1, // 订阅次数\n    dateStart: undefined, // 订阅首次扣费时间\n    minDate: new Date().getTime(),\n    maxDate: new Date(2030, 10, 1).getTime(),\n    currentDate: new Date().getTime(),\n    formatter: (type, value) => {\n      if (type === 'year') {\n        return `${value}年`;\n      } \n      if (type === 'month') {\n        return `${value}月`;\n      }\n      if (type === 'day') {\n        return `${value}日`;\n      }\n      if (type === 'hour') {\n        return `${value}点`;\n      }\n      if (type === 'minute') {\n        return `${value}分`;\n      }\n      return value;\n    },\n    cardId: '0', // 使用的次卡ID\n    \n    // 优惠券选择弹窗相关\n    couponPickerShow: false,\n    couponPickerShopShow: false,\n    currentShopIndex: -1,\n    currentShopCoupons: [],\n    currentShopSelectedCoupon: null,\n    \n    // 口令兑换相关\n    exchangeCouponShow: false,\n    exchangeNumber: '',\n    exchangePwd: ''\n  },\n  onShow() {\n    if (this.data.pageIsEnd) {\n      return\n    }\n    this.doneShow()\n  },\n  async doneShow() {\n    let goodsList = []\n    let shopList = []\n    const token = wx.getStorageSync('token')\n    //立即购买下单\n    if (\"buyNow\" == this.data.orderType) {\n      var buyNowInfoMem = wx.getStorageSync('buyNowInfo');\n      this.data.kjId = buyNowInfoMem.kjId;\n      if (buyNowInfoMem && buyNowInfoMem.shopList) {\n        goodsList = buyNowInfoMem.shopList\n      }\n    } else {\n      //购物车下单\n      if (this.data.shopCarType == 0) {//自营购物车\n        var res = await WXAPI.shippingCarInfo(token)\n        shopList = res.data.shopList\n      } else if (this.data.shopCarType == 1) {//云货架购物车\n        var res = await WXAPI.jdvopCartInfoV2(token)\n        shopList = [{\n          id: 0,\n          name: '其他',\n          hasNoCoupons: true,\n          serviceDistance: 99999999\n        }]\n      }\n      if (res.code == 0) {\n        goodsList = res.data.items.filter(ele => {\n          return ele.selected\n        })\n        const shopIds = []\n        goodsList.forEach(ele => {\n          if (this.data.shopCarType == 1) {\n            ele.shopId = 0\n          }\n          shopIds.push(ele.shopId)\n        })\n        shopList = shopList.filter(ele => {\n          return shopIds.includes(ele.id)\n        })\n      }\n    }\n    shopList.forEach(ele => {\n      ele.hasNoCoupons = true\n    })\n    const extRequired = []; // 必填项\n    if (this.data.create_order_ext) {\n      const _create_order_ext = JSON.parse(this.data.create_order_ext)\n      goodsList.forEach(g => {\n        Object.keys(_create_order_ext).forEach(k => {\n          if (k.split(',').includes(g.goodsId + '')) {\n            console.log(1212, _create_order_ext[k]);\n            _create_order_ext[k].split(',').forEach(v => {\n              if (!extRequired.includes(v)) {\n                extRequired.push(v)\n              }\n            })\n          }\n        })\n      })\n    }\n    this.setData({\n      shopList,\n      goodsList,\n      peisongType: this.data.peisongType,\n      extRequired\n    });\n    this.initShippingAddress()\n    this.userAmount()\n  },\n\n  onLoad(e) {\n    const nowDate = new Date();\n    let _data = {\n      isNeedLogistics: 1,\n      dateStart: nowDate.format('yyyy-MM-dd h:m:s'),\n      orderPeriod_open: wx.getStorageSync('orderPeriod_open'),\n      order_pay_user_balance: wx.getStorageSync('order_pay_user_balance'),\n      zt_open_hx: wx.getStorageSync('zt_open_hx'),\n      create_order_ext: wx.getStorageSync('create_order_ext'),\n      needBindMobile: wx.getStorageSync('needBindMobile'),\n    }\n    if (e.orderType) {\n      _data.orderType = e.orderType\n    }\n    if (e.pingtuanOpenId) {\n      _data.pingtuanOpenId = e.pingtuanOpenId\n    }\n    if (e.shopCarType) {\n      _data.shopCarType = e.shopCarType\n    }\n    this.setData(_data)\n    this.getUserApiInfo()\n    this.cardMyList()\n  },\n  async userAmount() {\n    const res = await WXAPI.userAmount(wx.getStorageSync('token'))\n    const order_pay_user_balance = wx.getStorageSync('order_pay_user_balance')\n    if (res.code == 0) {\n      this.setData({\n        balance: order_pay_user_balance == '1' ? res.data.balance : 0,\n        userScore: res.data.score\n      })\n    }\n  },\n  getDistrictId: function (obj, aaa) {\n    if (!obj) {\n      return \"\";\n    }\n    if (!aaa) {\n      return \"\";\n    }\n    return aaa;\n  },\n  remarkChange(e) {\n    this.data.remark = e.detail.value\n  },\n  async goCreateOrder() {\n    this.setData({\n      btnLoading: true\n    })\n    // 检测实名认证状态\n    if (wx.getStorageSync('needIdCheck') == 1) {\n      const res = await WXAPI.userDetail(wx.getStorageSync('token'))\n      if (res.code == 0 && !res.data.base.isIdcardCheck) {\n        wx.navigateTo({\n          url: '/pages/idCheck/index',\n        })\n        this.setData({\n          btnLoading: false\n        })\n        return\n      }\n    }\n    const subscribe_ids = wx.getStorageSync('subscribe_ids')\n    if (subscribe_ids) {\n      wx.requestSubscribeMessage({\n        tmplIds: subscribe_ids.split(','),\n        success(res) {\n          console.log(res)\n        },\n        fail(e) {\n          console.error(e)\n        },\n        complete: (e) => {\n          this.createOrder(true)\n        },\n      })\n    } else {\n      this.createOrder(true)\n    }\n  },\n  async createOrder(e) {\n    // shopCarType: 0 //0自营购物车，1云货架购物车\n    const loginToken = wx.getStorageSync('token') // 用户登录 token\n    const postData = {\n      token: loginToken,\n      goodsJsonStr: this.data.goodsJsonStr,\n      remark: this.data.remark,\n      peisongType: this.data.peisongType,\n      goodsType: this.data.shopCarType,\n      cardId: this.data.cardId,\n    }\n    if (this.data.deductionScore != '-1') {\n      postData.deductionScore = this.data.deductionScore\n    }\n    if (this.data.cardId == '0') {\n      postData.cardId = ''\n    }\n    if (this.data.dyopen == 1) {\n      const orderPeriod = {\n        unit: this.data.dyunit,\n        duration: this.data.dyduration,\n        dateStart: this.data.dateStart,\n        times: this.data.dytimes,\n        autoPay: true\n      }\n      postData.orderPeriod = JSON.stringify(orderPeriod)\n    }\n    if (this.data.kjId) {\n      postData.kjid = this.data.kjId\n    }\n    if (this.data.pingtuanOpenId) {\n      postData.pingtuanOpenId = this.data.pingtuanOpenId\n    }\n    if (postData.peisongType == 'kd' && this.data.curAddressData && this.data.curAddressData.provinceId) {\n      postData.provinceId = this.data.curAddressData.provinceId;\n    }\n    if (postData.peisongType == 'kd' && this.data.curAddressData && this.data.curAddressData.cityId) {\n      postData.cityId = this.data.curAddressData.cityId;\n    }\n    if (postData.peisongType == 'kd' && this.data.curAddressData && this.data.curAddressData.districtId) {\n      postData.districtId = this.data.curAddressData.districtId;\n    }\n    if (postData.peisongType == 'kd' && this.data.curAddressData && this.data.curAddressData.streetId) {\n      postData.streetId = this.data.curAddressData.streetId;\n    }\n    if (this.data.shopCarType == 1) {\n      // vop 需要地址来计算运费\n      postData.address = this.data.curAddressData.address;\n      postData.linkMan = this.data.curAddressData.linkMan;\n      postData.mobile = this.data.curAddressData.mobile;\n      postData.code = this.data.curAddressData.code;\n    }\n    if (e && this.data.isNeedLogistics > 0 && postData.peisongType == 'kd') {\n      if (!this.data.curAddressData) {\n        wx.hideLoading();\n        wx.showToast({\n          title: '请设置收货地址',\n          icon: 'none'\n        })\n        this.setData({\n          btnLoading: false\n        })\n        return;\n      }\n      if (postData.peisongType == 'kd') {\n        postData.address = this.data.curAddressData.address;\n        postData.linkMan = this.data.curAddressData.linkMan;\n        postData.mobile = this.data.curAddressData.mobile;\n        postData.code = this.data.curAddressData.code;\n      }\n    }\n    if (this.data.curCoupon) {\n      postData.couponId = this.data.curCoupon.id;\n    }\n    if (!e) {\n      postData.calculate = \"true\";\n    } else {\n      if (postData.peisongType == 'zq' && this.data.shops && this.data.shopIndex == -1) {\n        wx.showToast({\n          title: '请选择自提门店',\n          icon: 'none'\n        })\n        this.setData({\n          btnLoading: false\n        })\n        return;\n      }\n      const extJsonStr = {}\n      if (this.data.extRequired && this.data.extRequired.length > 0) {\n        const extRequiredMap = this.data.extRequiredMap\n        if (!extRequiredMap) {\n          wx.showToast({\n            title: '请填写必填项',\n            icon: 'none'\n          })\n          this.setData({\n            btnLoading: false\n          })\n          return;\n        }\n        this.data.extRequired.forEach(k => {\n          if (!extRequiredMap[k]) {\n            wx.showToast({\n              title: '请填写' + k,\n              icon: 'none'\n            })\n            this.setData({\n              btnLoading: false\n            })\n            return;\n          }\n          extJsonStr[k] = extRequiredMap[k]\n        })\n      }\n      if (postData.peisongType == 'zq') {\n        if (!this.data.name) {\n          wx.showToast({\n            title: '请填写联系人',\n            icon: 'none'\n          })\n          this.setData({\n            btnLoading: false\n          })\n          return;\n        }\n        if (!this.data.mobile) {\n          wx.showToast({\n            title: '请填写联系电话',\n            icon: 'none'\n          })\n          this.setData({\n            btnLoading: false\n          })\n          return;\n        }\n        extJsonStr['联系人'] = this.data.name\n        extJsonStr['联系电话'] = this.data.mobile\n        postData.isCanHx = this.data.zt_open_hx == '1' ? true : false\n      }\n      if (postData.peisongType == 'zq' && this.data.shops) {\n        postData.shopIdZt = this.data.shops[this.data.shopIndex].id\n        postData.shopNameZt = this.data.shops[this.data.shopIndex].name\n      }\n      postData.extJsonStr = JSON.stringify(extJsonStr)\n    }\n    const shopList = this.data.shopList\n    let totalRes = {\n      code: 0,\n      msg: 'success',\n      data: {\n        score: 0,\n        amountReal: 0,\n        orderIds: []\n      }\n    }\n    if (shopList && shopList.length > 1) {\n      // 多门店的商品下单\n      let totalScoreToPay = 0\n      let isNeedLogistics = false\n      let allGoodsAndYunPrice = 0\n      let yunPrice = 0\n      let amountLogistics2 = 0\n      let deductionMoney = 0\n      let couponAmount = 0\n      let goodsAdditionalPriceMap = {}\n      for (let index = 0; index < shopList.length; index++) {\n        const curShop = shopList[index]\n        console.log(curShop);\n        postData.filterShopId = curShop.id\n        if (curShop.curCoupon) {\n          postData.couponId = curShop.curCoupon.id\n        } else {\n          postData.couponId = ''\n        }\n        const res = await WXAPI.orderCreate(postData)\n        this.data.pageIsEnd = true\n        if (res.code != 0) {\n          this.data.pageIsEnd = false\n          wx.showModal({\n            title: '错误',\n            content: res.msg,\n            showCancel: false\n          })\n          this.setData({\n            btnLoading: false\n          })\n          return;\n        }\n        totalRes.data.score += res.data.score\n        totalRes.data.amountReal += res.data.amountReal\n        totalRes.data.orderIds.push(res.data.id)\n        console.log('e:', e);\n        if (!e) {\n          curShop.hasNoCoupons = true\n          console.log(curShop);\n          if (res.data.couponUserList) {\n            curShop.hasNoCoupons = false\n            res.data.couponUserList.forEach(ele => {\n              let moneyUnit = '元'\n              if (ele.moneyType == 1) {\n                moneyUnit = '%'\n              }\n              if (ele.moneyHreshold) {\n                ele.nameExt = ele.name + ' [面值' + ele.money + moneyUnit + '，满' + ele.moneyHreshold + '元可用]'\n              } else {\n                ele.nameExt = ele.name + ' [面值' + ele.money + moneyUnit + ']'\n              }\n            })\n            curShop.curCouponShowText = '请选择使用优惠券'\n            curShop.coupons = res.data.couponUserList\n            if (res.data.couponId && res.data.couponId.length > 0) {\n              curShop.curCoupon = curShop.coupons.find(ele => { return ele.id == res.data.couponId[0] })\n              curShop.curCouponShowText = curShop.curCoupon.nameExt\n            }\n          }\n          shopList.splice(index, 1, curShop)\n          // 计算积分抵扣规则 userScore\n          let scoreDeductionRules = res.data.scoreDeductionRules\n          if (scoreDeductionRules) {\n            // 如果可叠加，计算可抵扣的最大积分数\n            scoreDeductionRules.forEach(ele => {\n              if (ele.loop) {\n                let loopTimes = Math.floor(this.data.userScore / ele.score) // 按剩余积分取最大\n                let loopTimesMax = Math.floor((res.data.amountTotle + res.data.deductionMoney) / ele.money) // 按金额取最大\n                if (loopTimes > loopTimesMax) {\n                  loopTimes = loopTimesMax\n                }\n                ele.score = ele.score * loopTimes\n                ele.money = ele.money * loopTimes\n              }\n            })\n            // 剔除积分数为0的情况\n            scoreDeductionRules = scoreDeductionRules.filter(ele => {\n              return ele.score > 0\n            })\n            curShop.scoreDeductionRules = scoreDeductionRules\n            shopList.splice(index, 1, curShop)\n          }\n          totalScoreToPay += res.data.score\n          if (res.data.isNeedLogistics) {\n            isNeedLogistics = true\n          }\n          allGoodsAndYunPrice += res.data.amountReal\n          yunPrice += res.data.amountLogistics\n          amountLogistics2 += res.data.amountLogistics2 || 0\n          deductionMoney += res.data.deductionMoney\n          couponAmount += res.data.couponAmount\n          goodsAdditionalPriceMap = Object.assign(goodsAdditionalPriceMap, res.data.goodsAdditionalPriceMap)\n        }\n      }\n      this.setData({\n        shopList,\n        totalScoreToPay,\n        isNeedLogistics,\n        allGoodsAndYunPrice,\n        goodsAdditionalPriceMap,\n        yunPrice,\n        amountLogistics2,\n        hasNoCoupons: true,\n        deductionMoney,\n        couponAmount\n      });\n    } else {\n      // 单门店单商品下单\n      if (shopList && shopList.length == 1) {\n        if (shopList[0].curCoupon) {\n          postData.couponId = shopList[0].curCoupon.id\n        } else {\n          postData.couponId = ''\n        }\n      }\n      const res = await WXAPI.orderCreate(postData)\n      this.data.pageIsEnd = true\n      if (res.code != 0) {\n        this.data.pageIsEnd = false\n        wx.showModal({\n          title: '错误',\n          content: res.msg,\n          showCancel: false\n        })\n        this.setData({\n          btnLoading: false\n        })\n        return;\n      }\n      totalRes = res\n      if (!e) {\n        let hasNoCoupons = true\n        let coupons = null\n        if (res.data.couponUserList) {\n          hasNoCoupons = false\n          res.data.couponUserList.forEach(ele => {\n            let moneyUnit = '元'\n            if (ele.moneyType == 1) {\n              moneyUnit = '%'\n            }\n            if (ele.moneyHreshold) {\n              ele.nameExt = ele.name + ' [面值' + ele.money + moneyUnit + '，满' + ele.moneyHreshold + '元可用]'\n            } else {\n              ele.nameExt = ele.name + ' [面值' + ele.money + moneyUnit + ']'\n            }\n          })\n          coupons = res.data.couponUserList\n          if (shopList && shopList.length == 1 && !hasNoCoupons) {\n            hasNoCoupons = true\n            const curShop = shopList[0]\n            curShop.hasNoCoupons = false\n            curShop.curCouponShowText = '请选择使用优惠券'\n            curShop.coupons = res.data.couponUserList\n            if (res.data.couponId && res.data.couponId.length > 0) {\n              curShop.curCoupon = curShop.coupons.find(ele => { return ele.id == res.data.couponId[0] })\n              curShop.curCouponShowText = curShop.curCoupon.nameExt\n            }\n            shopList[0] = curShop\n          }\n        }\n        // 计算积分抵扣规则 userScore\n        let scoreDeductionRules = res.data.scoreDeductionRules\n        if (scoreDeductionRules) {\n          // 如果可叠加，计算可抵扣的最大积分数\n          scoreDeductionRules.forEach(ele => {\n            if (ele.loop) {\n              let loopTimes = Math.floor(this.data.userScore / ele.score) // 按剩余积分取最大\n              let loopTimesMax = Math.floor((res.data.amountTotle + res.data.deductionMoney) / ele.money) // 按金额取最大\n              if (loopTimes > loopTimesMax) {\n                loopTimes = loopTimesMax\n              }\n              ele.score = ele.score * loopTimes\n              ele.money = ele.money * loopTimes\n            }\n          })\n          // 剔除积分数为0的情况\n          scoreDeductionRules = scoreDeductionRules.filter(ele => {\n            return ele.score > 0\n          })\n        }\n        this.setData({\n          shopList,\n          totalScoreToPay: res.data.score,\n          isNeedLogistics: res.data.isNeedLogistics,\n          allGoodsAndYunPrice: res.data.amountReal,\n          goodsAdditionalPriceMap: res.data.goodsAdditionalPriceMap,\n          yunPrice: res.data.amountLogistics,\n          amountLogistics2: res.data.amountLogistics2,\n          hasNoCoupons,\n          coupons,\n          deductionMoney: res.data.deductionMoney,\n          couponAmount: res.data.couponAmount,\n          scoreDeductionRules\n        })\n      }\n    }\n    if (!e) {\n      this.data.pageIsEnd = false\n      return\n    }\n    if (e && \"buyNow\" != this.data.orderType) {\n      // 清空购物车数据\n      const keyArrays = []\n      this.data.goodsList.forEach(ele => {\n        keyArrays.push(ele.key)\n      })\n      if (this.data.shopCarType == 0) { //自营购物车\n        WXAPI.shippingCarInfoRemoveItem(loginToken, keyArrays.join())\n      } else if (this.data.shopCarType == 1) {//云货架购物车\n        WXAPI.jdvopCartRemoveV2(loginToken, keyArrays.join())\n      }\n    }\n    this.processAfterCreateOrder(totalRes)\n  },\n  async processAfterCreateOrder(res) {\n    this.setData({\n      btnLoading: false\n    })\n    if (res.data.status != 0) {\n      wx.redirectTo({\n        url: \"/pages/order-list/index\"\n      })\n      return\n    }\n    let orderId = ''\n    if (res.data.orderIds && res.data.orderIds.length > 0) {\n      orderId = res.data.orderIds.join()\n    } else {\n      orderId = res.data.id\n    }\n    // 直接弹出支付，取消支付的话，去订单列表\n    await this.userAmount()\n    const balance = this.data.balance\n    const userScore = this.data.userScore\n    if (userScore < res.data.score) {\n      wx.showModal({\n        title: '提示',\n        content: '您当前可用积分不足，请稍后前往订单管理进行支付',\n        showCancel: false,\n        success: res2 => {\n          wx.redirectTo({\n            url: \"/pages/order-list/index\"\n          })\n        }\n      })\n      return\n    }\n    if (balance || res.data.amountReal * 1 == 0) {\n      // 有余额\n      const money = (res.data.amountReal * 1 - balance * 1).toFixed(2)\n      if (money <= 0) {\n        // 余额足够\n        wx.showModal({\n          title: '请确认支付',\n          content: `您当前可用余额¥${balance}，使用余额支付¥${res.data.amountReal}？`,\n          confirmText: \"确认支付\",\n          cancelText: \"暂不付款\",\n          success: res2 => {\n            if (res2.confirm) {\n              // 使用余额支付\n              WXAPI.orderPay(wx.getStorageSync('token'), orderId).then(res3 => {\n                if (res3.code != 0) {\n                  wx.showToast({\n                    title: res3.msg,\n                    icon: 'none'\n                  })\n                  return\n                }\n                wx.redirectTo({\n                  url: \"/pages/order-list/index\"\n                })\n              })\n            } else {\n              wx.redirectTo({\n                url: \"/pages/order-list/index\"\n              })\n            }\n          }\n        })\n      } else {\n        // 余额不够\n        wx.showModal({\n          title: '请确认支付',\n          content: `您当前可用余额¥${balance}，仍需支付¥${money}`,\n          confirmText: \"确认支付\",\n          cancelText: \"暂不付款\",\n          success: res2 => {\n            if (res2.confirm) {\n              // 使用余额支付\n              this.setData({\n                orderId,\n                money,\n                paymentShow: true,\n                nextAction: {\n                  type: 0,\n                  id: orderId\n                }\n              })\n            } else {\n              wx.redirectTo({\n                url: \"/pages/order-list/index\"\n              })\n            }\n          }\n        })\n      }\n    } else {\n      // 没余额\n      this.setData({\n        orderId,\n        money: res.data.amountReal,\n        paymentShow: true,\n        nextAction: {\n          type: 0,\n          id: orderId\n        }\n      })\n    }\n  },\n  async initShippingAddress() {\n    const res = await WXAPI.defaultAddress(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      this.setData({\n        curAddressData: res.data.info\n      });\n    } else {\n      this.setData({\n        curAddressData: null\n      });\n    }\n    this.processYunfei();\n  },\n  processYunfei() {\n    var goodsList = this.data.goodsList\n    if (goodsList.length == 0) {\n      return\n    }\n    const goodsJsonStr = []\n    var isNeedLogistics = 0;\n\n    let inviter_id = 0;\n    let inviter_id_storge = wx.getStorageSync('referrer');\n    if (inviter_id_storge) {\n      inviter_id = inviter_id_storge;\n    }\n    for (let i = 0; i < goodsList.length; i++) {\n      let carShopBean = goodsList[i];\n      if (carShopBean.logistics || carShopBean.logisticsId) {\n        isNeedLogistics = 1;\n      }\n\n      const _goodsJsonStr = {\n        propertyChildIds: carShopBean.propertyChildIds\n      }\n      if (carShopBean.sku && carShopBean.sku.length > 0) {\n        let propertyChildIds = ''\n        carShopBean.sku.forEach(option => {\n          propertyChildIds = propertyChildIds + ',' + option.optionId + ':' + option.optionValueId\n        })\n        _goodsJsonStr.propertyChildIds = propertyChildIds\n      }\n      if (carShopBean.additions && carShopBean.additions.length > 0) {\n        let goodsAdditionList = []\n        carShopBean.additions.forEach(option => {\n          goodsAdditionList.push({\n            pid: option.pid,\n            id: option.id\n          })\n        })\n        _goodsJsonStr.goodsAdditionList = goodsAdditionList\n      }\n      _goodsJsonStr.goodsId = carShopBean.goodsId\n      _goodsJsonStr.number = carShopBean.number\n      _goodsJsonStr.logisticsType = 0\n      _goodsJsonStr.inviter_id = inviter_id\n      goodsJsonStr.push(_goodsJsonStr)\n\n    }\n    if (this.data.shopCarType == 1) {\n      // vop 商品必须快递\n      isNeedLogistics = 1\n    }\n    this.setData({\n      isNeedLogistics: isNeedLogistics,\n      goodsJsonStr: JSON.stringify(goodsJsonStr)\n    });\n    this.createOrder();\n  },\n  addAddress: function () {\n    wx.navigateTo({\n      url: \"/pages/address-add/index\"\n    })\n  },\n  selectAddress: function () {\n    wx.navigateTo({\n      url: \"/pages/select-address/index\"\n    })\n  },\n  bindChangeCoupon: function (e) {\n    const selIndex = e.detail.value;\n    this.setData({\n      curCoupon: this.data.coupons[selIndex],\n      curCouponShowText: this.data.coupons[selIndex].nameExt\n    });\n    this.processYunfei()\n  },\n  bindChangeCouponShop: function (e) {\n    const selIndex = e.detail.value;\n    const shopIndex = e.currentTarget.dataset.sidx\n    const shopList = this.data.shopList\n    const curshop = shopList[shopIndex]\n    curshop.curCoupon = curshop.coupons[selIndex]\n    curshop.curCouponShowText = curshop.coupons[selIndex].nameExt\n    shopList.splice(shopIndex, 1, curshop)\n    this.setData({\n      shopList\n    });\n    this.processYunfei()\n  },\n  radioChange(e) {\n    this.setData({\n      peisongType: e.detail.value\n    })\n    this.processYunfei()\n    if (e.detail.value == 'zq') {\n      this.fetchShops()\n    }\n  },\n  dyChange(e) {\n    this.setData({\n      dyopen: e.detail.value\n    })\n  },\n  dyunitChange(e) {\n    this.setData({\n      dyunit: e.detail.value\n    })\n  },\n  cancelLogin() {\n    wx.navigateBack()\n  },\n  async fetchShops() {\n    const res = await WXAPI.fetchShops()\n    if (res.code == 0) {\n      let shopIndex = this.data.shopIndex\n      const shopInfo = wx.getStorageSync('shopInfo')\n      if (shopInfo) {\n        shopIndex = res.data.findIndex(ele => {\n          return ele.id == shopInfo.id\n        })\n      }\n      this.setData({\n        shops: res.data,\n        shopIndex\n      })\n    }\n  },\n  shopSelect(e) {\n    this.setData({\n      shopIndex: e.detail.value\n    })\n  },\n  goMap() {\n    const _this = this\n    const shop = this.data.shops[this.data.shopIndex]\n    const latitude = shop.latitude\n    const longitude = shop.longitude\n    wx.openLocation({\n      latitude,\n      longitude,\n      scale: 18\n    })\n  },\n  callMobile() {\n    const shop = this.data.shops[this.data.shopIndex]\n    wx.makePhoneCall({\n      phoneNumber: shop.linkPhone,\n    })\n  },\n  async getUserApiInfo() {\n    const res = await WXAPI.userDetail(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      let bindMobileStatus = res.data.base.mobile ? 1 : 2 // 账户绑定的手机号码状态\n      if (this.data.needBindMobile != 1) {\n        bindMobileStatus = 1\n      }\n      this.setData({\n        bindMobileStatus,\n        mobile: res.data.base.mobile,\n        name: res.data.base.nick,\n      })\n    }\n  },\n  bindMobile() {\n    this.setData({\n      bindMobileShow: true\n    })\n  },\n  bindMobileOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      bindMobileShow: false,\n      mobile: e.detail.mobile,\n      bindMobileStatus: 1\n    })\n  },\n  bindMobileCancel() {\n    this.setData({\n      bindMobileShow: false\n    })\n  },\n  deductionScoreChange(event) {\n    this.setData({\n      deductionScore: event.detail,\n    })\n    this.processYunfei()\n  },\n  deductionScoreClick(event) {\n    const {\n      name\n    } = event.currentTarget.dataset;\n    this.setData({\n      deductionScore: name,\n    })\n    this.processYunfei()\n  },\n  cardChange(event) {\n    this.setData({\n      cardId: event.detail,\n    })\n    this.processYunfei()\n  },\n  cardClick(event) {\n    const {\n      name\n    } = event.currentTarget.dataset;\n    this.setData({\n      cardId: name,\n    })\n    this.processYunfei()\n  },\n  dateStartclick(e) {\n    this.setData({\n      dateStartpop: true\n    })\n  },\n  dateStartconfirm(e) {\n    const d = new Date(e.detail)\n    this.setData({\n      dateStart: d.format('yyyy-MM-dd h:m:s'),\n      dateStartpop: false\n    })\n    console.log(e);\n  },\n  dateStartcancel(e) {\n    this.setData({\n      dateStartpop: false\n    })\n  },\n  async cardMyList() {\n    const res = await WXAPI.cardMyList(wx.getStorageSync('token'))\n    if (res.code == 0) {\n      const myCards = res.data.filter(ele => { return ele.status == 0 && ele.amount > 0 && ele.cardInfo.refs })\n      if (myCards.length > 0) {\n        this.setData({\n          myCards: res.data\n        })\n      }\n    }\n  },\n  paymentOk(e) {\n    console.log(e.detail); // 这里是组件里data的数据\n    this.setData({\n      paymentShow: false\n    })\n    wx.redirectTo({\n      url: '/pages/order-list/index',\n    })\n  },\n  paymentCancel() {\n    this.setData({\n      paymentShow: false\n    })\n  },\n  extRequiredChange(e) {\n    let extRequiredMap = this.data.extRequiredMap\n    if (!extRequiredMap) {\n      extRequiredMap = {}\n    }\n    extRequiredMap[e.target.dataset.name] = e.detail\n    console.log(extRequiredMap);\n    this.setData({\n      extRequiredMap\n    })\n  },\n  \n  // 显示优惠券选择弹窗\n  showCouponPicker() {\n    this.setData({\n      couponPickerShow: true\n    })\n  },\n  \n  // 关闭优惠券选择弹窗\n  closeCouponPicker() {\n    this.setData({\n      couponPickerShow: false\n    })\n  },\n  \n  // 选择优惠券\n  selectCoupon(e) {\n    const index = e.currentTarget.dataset.index\n    const selectedCoupon = this.data.coupons[index]\n    this.setData({\n      curCoupon: selectedCoupon,\n      curCouponShowText: selectedCoupon.nameExt,\n      couponPickerShow: false\n    })\n    this.processYunfei()\n  },\n  \n  // 选择不使用优惠券\n  selectNoCoupon() {\n    this.setData({\n      curCoupon: null,\n      curCouponShowText: '请选择使用优惠券',\n      couponPickerShow: false\n    })\n    this.processYunfei()\n  },\n  \n  // 显示门店优惠券选择弹窗\n  showCouponPickerShop(e) {\n    const shopIndex = e.currentTarget.dataset.sidx\n    const shopList = this.data.shopList\n    const currentShop = shopList[shopIndex]\n    \n    this.setData({\n      currentShopIndex: shopIndex,\n      currentShopCoupons: currentShop.coupons || [],\n      currentShopSelectedCoupon: currentShop.curCoupon || null,\n      couponPickerShopShow: true\n    })\n  },\n  \n  // 关闭门店优惠券选择弹窗\n  closeCouponPickerShop() {\n    this.setData({\n      couponPickerShopShow: false\n    })\n  },\n  \n  // 选择门店优惠券\n  selectCouponShop(e) {\n    const index = e.currentTarget.dataset.index\n    const selectedCoupon = this.data.currentShopCoupons[index]\n    const shopIndex = this.data.currentShopIndex\n    const shopList = this.data.shopList\n    const curshop = shopList[shopIndex]\n    \n    curshop.curCoupon = selectedCoupon\n    curshop.curCouponShowText = selectedCoupon.nameExt\n    shopList.splice(shopIndex, 1, curshop)\n    \n    this.setData({\n      shopList,\n      couponPickerShopShow: false\n    })\n    this.processYunfei()\n  },\n  \n  // 选择不使用门店优惠券\n  selectNoCouponShop() {\n    const shopIndex = this.data.currentShopIndex\n    const shopList = this.data.shopList\n    const curshop = shopList[shopIndex]\n    \n    curshop.curCoupon = null\n    curshop.curCouponShowText = '请选择使用优惠券'\n    shopList.splice(shopIndex, 1, curshop)\n    \n    this.setData({\n      shopList,\n      couponPickerShopShow: false\n    })\n    this.processYunfei()\n  },\n  \n  // 显示口令兑换弹窗\n  showExchangeCoupon() {\n    this.setData({\n      exchangeCouponShow: true,\n      exchangeNumber: '',\n      exchangePwd: ''\n    })\n  },\n  \n  // 关闭口令兑换弹窗\n  closeExchangeCoupon() {\n    this.setData({\n      exchangeCouponShow: false\n    })\n  },\n  \n  // 确认兑换优惠券\n  async confirmExchangeCoupon() {\n    if (!this.data.exchangeNumber) {\n      wx.showToast({\n        title: '请输入券号',\n        icon: 'none'\n      })\n      return\n    }\n    if (!this.data.exchangePwd) {\n      wx.showToast({\n        title: '请输入密码',\n        icon: 'none'\n      })\n      return\n    }\n    \n    wx.showLoading({\n      title: '兑换中...',\n    })\n    \n    const res = await WXAPI.exchangeCoupons(\n      wx.getStorageSync('token'), \n      this.data.exchangeNumber, \n      this.data.exchangePwd\n    )\n    \n    wx.hideLoading()\n    \n    if (res.code != 0) {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    } else {\n      wx.showToast({\n        title: '兑换成功',\n        icon: 'success'\n      })\n      this.setData({\n        exchangeCouponShow: false\n      })\n      // 重新加载优惠券列表\n      this.processYunfei()\n    }\n  },\n})"
  },
  {
    "path": "pages/to-pay-order/index.json",
    "content": "{\n    \"navigationBarTitleText\":  \"确认订单\"\n}\n"
  },
  {
    "path": "pages/to-pay-order/index.wxml",
    "content": "<block wx:if=\"{{ bindMobileStatus == 2 }}\">\n  <view class=\"bind-mobile-container\">\n    <view class=\"bind-mobile-card\">\n      <view class=\"card-icon\">\n        <view class=\"icon-shield\">\n          <view class=\"shield-inner\"></view>\n        </view>\n      </view>\n      <view class=\"card-title\">请先登录</view>\n      <view class=\"card-subtitle\">为了保障您的交易安全和订单信息准确</view>\n      <view class=\"feature-list\">\n        <view class=\"feature-item\">\n          <view class=\"feature-dot\"></view>\n          <text class=\"feature-text\">接收订单物流信息</text>\n        </view>\n        <view class=\"feature-item\">\n          <view class=\"feature-dot\"></view>\n          <text class=\"feature-text\">保障账户资金安全</text>\n        </view>\n        <view class=\"feature-item\">\n          <view class=\"feature-dot\"></view>\n          <text class=\"feature-text\">提供专属售后服务</text>\n        </view>\n      </view>\n      <view class=\"bind-btn-wrapper\">\n        <button class=\"bind-btn\" bind:tap=\"bindMobile\">\n          <text class=\"bind-btn-text\">手机号快捷登录</text>\n        </button>\n      </view>\n      <view class=\"security-tips\">\n        <view class=\"tips-icon\">🔒</view>\n        <text class=\"tips-text\">您的信息将被加密保护，绝不泄露给第三方</text>\n      </view>\n    </view>\n  </view>\n</block>\n<block wx:if=\"{{ bindMobileStatus == 1 }}\">\n  <block wx:if=\"{{ orderType != 'buyNow' }}\"> <!-- 购物车 -->\n    <van-cell-group wx:for=\"{{shopList}}\" wx:for-item=\"shop\" wx:for-index=\"shopIndex\" wx:key=\"id\" title=\"{{ shop.name }}\">\n      <van-card\n        wx:for=\"{{goodsList}}\" wx:key=\"index\"\n        wx:if=\"{{ item.shopId == shop.id }}\"\n        num=\"{{item.number}}\"\n        price=\"{{item.price}}\"\n        title=\"{{item.name}}\"\n        thumb=\"{{ item.pic }}\"\n        centered\n        >\n        <view slot=\"desc\">\n          {{item.label}}\n          <block wx:for=\"{{item.sku}}\" wx:for-item=\"option\" wx:key=\"index\">\n            {{option.optionName}}:{{option.optionValueName}}\n          </block>\n          <block wx:for=\"{{item.additions}}\" wx:for-item=\"option\" wx:key=\"index\">\n            {{option.pname}}:{{option.name}}\n          </block>\n        </view>\n      </van-card>\n      <view class=\"peisong-way\" hidden=\"{{ shop.hasNoCoupons }}\">\n        <view class=\"coupon-selector\" bindtap=\"showCouponPickerShop\" data-sidx=\"{{ shopIndex }}\">\n          <view class=\"coupon-selector-left\">\n            <view class=\"coupon-icon\">🎫</view>\n            <view class=\"coupon-text-wrapper\">\n              <view class=\"coupon-label\">优惠券</view>\n              <view class=\"coupon-selected-text\">{{ shop.curCouponShowText }}</view>\n            </view>\n          </view>\n          <view class=\"coupon-selector-right\">\n            <view class=\"coupon-arrow\">›</view>\n          </view>\n        </view>\n      </view>\n    </van-cell-group>\n  </block>\n  <block wx:else> <!-- 立即购买 -->\n    <van-card\n      wx:for=\"{{goodsList}}\" wx:key=\"index\"\n      num=\"{{item.number}}\"\n      price=\"{{item.price}}\"\n      title=\"{{item.name}}\"\n      thumb=\"{{ item.pic }}\"\n      centered\n      >\n      <view slot=\"desc\">\n        {{item.label}}\n        <block wx:for=\"{{item.sku}}\" wx:for-item=\"option\" wx:key=\"index\">\n          {{option.optionName}}:{{option.optionValueName}}\n        </block>\n        <block wx:for=\"{{item.additions}}\" wx:for-item=\"option\" wx:key=\"index\">\n          {{option.pname}}:{{option.name}}\n        </block>\n      </view>\n    </van-card>\n  </block>\n  <view class=\"container-box cell-group\">\n    <view class=\"peisong-way\">\n      <van-cell wx:if=\"{{shopCarType == 0 && isNeedLogistics > 0}}\" title=\"配送方式\">\n        <view slot=\"\">\n          <radio-group bindchange=\"radioChange\">\n            <label class=\"radio\">\n              <radio value=\"kd\" checked=\"{{peisongType == 'kd'}}\" /> 快递\n            </label>\n            <label class=\"radio\">\n              <radio value=\"zq\" checked=\"{{peisongType == 'zq'}}\" /> 到店自取\n            </label>\n          </radio-group>\n        </view>\n      </van-cell>\n      <van-cell wx:if=\"{{shopCarType == 1}}\" title=\"配送地址\" />\n      <picker wx:if=\"{{peisongType == 'zq' && shops}}\" bindchange=\"shopSelect\" value=\"{{shopIndex}}\" range=\"{{shops}}\" range-key=\"name\">\n        <van-cell title=\"选择自提门店\" value=\"{{shopIndex == -1 ? '请选择':shops[shopIndex].name}}\" required is-link />\n      </picker>\n      <van-cell wx:if=\"{{peisongType == 'zq' && shopIndex != -1}}\" title=\"电话\" value=\"{{shops[shopIndex].linkPhone}}\" is-link bind:click=\"callMobile\" />\n      <van-cell wx:if=\"{{peisongType == 'zq' && shopIndex != -1}}\" title=\"地址\" title-width=\"64rpx\" value=\"{{shops[shopIndex].address}}\" is-link bind:click=\"goMap\" />\n      \n      <view class=\"address-box\" wx:if=\"{{peisongType == 'kd' && isNeedLogistics > 0}}\">\n        <van-cell wx:if=\"{{!curAddressData}}\" icon=\"add-o\" title=\"新增收货地址\" is-link bind:click=\"addAddress\" />\n        <view class=\"show-address\" hidden=\"{{!curAddressData}}\" bindtap=\"selectAddress\">\n          <view class=\"l\">\n            <view class=\"name-tel\">{{curAddressData.linkMan}} {{curAddressData.mobile}}</view>\n            <view class=\"addr-text\">{{curAddressData.address}}</view>\n          </view>\n          <view class=\"r\">\n            <image class=\"next\" src=\"/images/icon/next.png\"></image>\n          </view>\n        </view>\n      </view>\n      <van-field\n        wx:if=\"{{peisongType == 'zq'}}\"\n        size=\"large\"\n        model:value=\"{{ name }}\"\n        label=\"联系人\"\n        clearable\n        required\n        placeholder=\"请输入联系人\"\n      />\n      <van-field\n        wx:if=\"{{peisongType == 'zq'}}\"\n        size=\"large\"\n        model:value=\"{{ mobile }}\"\n        label=\"联系电话\"\n        type=\"number\"\n        clearable\n        required\n        placeholder=\"请输入手机号码\">\n        <van-button slot=\"button\" size=\"small\" type=\"danger\" bind:tap=\"bindMobile\">自动获取</van-button>\n      </van-field>\n      <block wx:if=\"{{ extRequired && extRequired.length > 0 }}\">\n        <van-field\n          wx:for=\"{{ extRequired }}\" wx:key=\"*this\"\n          size=\"large\"\n          label=\"{{ item }}\"\n          required\n          placeholder=\"请输入{{ item }}\"\n          data-name=\"{{ item }}\"\n          bind:change=\"extRequiredChange\"\n        />\n      </block>\n      <view wx:if=\"{{shopCarType == 0}}\" class=\"row-box\">\n        <view class=\"row-label\">备注</view>\n        <view class=\"right-text\">\n          <input bindinput=\"remarkChange\" type=\"text\" class=\"liuyan\" placeholder=\"如需备注请输入\" />\n        </view>\n      </view>\n      <van-cell wx:if=\"{{ orderPeriod_open == 1 }}\" title=\"订阅\">\n        <view slot=\"\">\n          <radio-group bindchange=\"dyChange\">\n            <label class=\"radio\">\n              <radio value=\"1\" checked=\"{{ dyopen == 1 }}\" /> 开启\n            </label>\n            <label class=\"radio\">\n              <radio value=\"0\" checked=\"{{ dyopen == 0 }}\" /> 关闭\n            </label>\n          </radio-group>\n        </view>\n      </van-cell>\n      <van-cell wx:if=\"{{ dyopen == 1 }}\" title=\"订阅周期\">\n        <view slot=\"\">\n          <radio-group bindchange=\"dyunitChange\">\n            <label class=\"radio\">\n              <radio value=\"0\" checked=\"{{ dyunit == 0 }}\" /> 天\n            </label>\n            <label class=\"radio\">\n              <radio value=\"1\" checked=\"{{ dyunit == 1 }}\" /> 月\n            </label>\n            <label class=\"radio\">\n              <radio value=\"2\" checked=\"{{ dyunit == 2 }}\" /> 年\n            </label>\n          </radio-group>\n        </view>\n      </van-cell>\n      <van-field\n        wx:if=\"{{ dyopen == 1 }}\"\n        label=\"订阅间隔\"\n        model:value=\"{{ dyduration }}\"\n        type=\"number\"\n        placeholder=\"请输入数字\"\n        input-align=\"right\"\n        use-button-slot\n      >\n        <view slot=\"button\">\n          {{ dyunit == 0 ? '天': '' }}\n          {{ dyunit == 1 ? '月': '' }}\n          {{ dyunit == 2 ? '年': '' }}\n        </view>\n      </van-field>\n      <van-field\n        wx:if=\"{{ dyopen == 1 }}\"\n        label=\"订阅次数\"\n        model:value=\"{{ dytimes }}\"\n        type=\"number\"\n        placeholder=\"请输入数字\"\n        input-align=\"right\"\n        use-button-slot\n      >\n        <view slot=\"button\">次</view>\n      </van-field>\n      <van-field\n        wx:if=\"{{ dyopen == 1 }}\"\n        label=\"首次扣费\"\n        is-link\n        readonly\n        value=\"{{ dateStart }}\"\n        type=\"number\"\n        placeholder=\"请输入数字\"\n        input-align=\"right\"\n        bind:click-input=\"dateStartclick\"\n      />\n    </view>\n    <view class=\"peisong-way\">\n      <view class=\"coupon-selector\" bindtap=\"showCouponPicker\" hidden=\"{{hasNoCoupons}}\">\n        <view class=\"coupon-selector-left\">\n          <view class=\"coupon-icon\">🎫</view>\n          <view class=\"coupon-text-wrapper\">\n            <view class=\"coupon-label\">优惠券</view>\n            <view class=\"coupon-selected-text\">{{curCouponShowText}}</view>\n          </view>\n        </view>\n        <view class=\"coupon-selector-right\">\n          <view class=\"coupon-arrow\">›</view>\n        </view>\n      </view>\n      <view class=\"coupon-exchange-tip\" bindtap=\"showExchangeCoupon\">\n        <view class=\"tip-icon\">💰</view>\n        <view class=\"tip-text\">没有优惠券？点击使用口令兑换</view>\n        <view class=\"tip-arrow\">›</view>\n      </view>\n    </view>\n  </view>\n\n  <!-- 选择积分抵扣 -->\n  <van-radio-group wx:if=\"{{ scoreDeductionRules && scoreDeductionRules.length > 0 }}\" value=\"{{ deductionScore }}\" bind:change=\"deductionScoreChange\">\n    <van-cell-group title=\"积分抵扣\">\n      <van-cell title=\"不使用积分\" clickable data-name=\"-1\" bind:click=\"deductionScoreClick\">\n        <van-radio slot=\"right-icon\" name=\"-1\" />\n      </van-cell>\n      <van-cell title=\"自动抵扣\" clickable data-name=\"0\" bind:click=\"deductionScoreClick\">\n        <van-radio slot=\"right-icon\" name=\"0\" />\n      </van-cell>\n      <van-cell wx:for=\"{{scoreDeductionRules}}\" wx:key=\"id\" title=\"使用{{ item.score }}积分抵扣¥{{ item.money }}\" clickable data-name=\"{{ item.score }}\" bind:click=\"deductionScoreClick\">\n        <van-radio slot=\"right-icon\" name=\"{{ item.score }}\" />\n      </van-cell>\n    </van-cell-group>\n  </van-radio-group>\n\n  <van-radio-group wx:if=\"{{ myCards }}\" value=\"{{ cardId }}\" bind:change=\"cardChange\">\n    <van-cell-group title=\"使用水卡支付\">\n      <van-cell title=\"不使用水卡\" clickable data-name=\"0\" bind:click=\"cardClick\">\n        <van-radio slot=\"right-icon\" name=\"0\" />\n      </van-cell>\n      <van-cell wx:for=\"{{ myCards }}\" wx:key=\"id\" title=\"{{ item.cardInfo.name }} - 剩余：{{ item.amount }}桶\" clickable data-name=\"{{ item.id }}\" bind:click=\"cardClick\">\n        <van-radio slot=\"right-icon\" name=\"{{ item.id }}\" />\n      </van-cell>\n    </van-cell-group>\n  </van-radio-group>\n\n  <van-cell-group wx:if=\"{{ yunPrice || deductionMoney || couponAmount || balance }}\" title=\"小计\">\n    <van-cell wx:if=\"{{ yunPrice }}\" title=\"运费\" value=\"¥{{yunPrice}}\" />\n    <van-cell wx:if=\"{{ amountLogistics2 }}\" title=\"附加运费\" value=\"¥{{ amountLogistics2 }}\" />\n    <block wx:if=\"{{ goodsAdditionalPriceMap }}\">\n      <van-cell\n        wx:for=\"{{ goodsAdditionalPriceMap }}\" wx:key=\"id\"\n        title=\"{{ index }}\"\n        value=\"¥{{ item }}\"\n      />\n    </block>\n    <van-cell wx:if=\"{{deductionMoney}}\" title=\"积分抵扣\" value=\"-¥{{deductionMoney}}\" />\n    <van-cell wx:if=\"{{couponAmount}}\" title=\"优惠金额\" value=\"-¥{{couponAmount}}\" />\n    <van-cell wx:if=\"{{order_pay_user_balance == '1' && balance}}\" title=\"账户余额\" value=\"¥{{balance}}\" />\n    <van-cell wx:if=\"{{order_pay_user_balance == '1' && userScore}}\" title=\"可用积分\" value=\"{{userScore}}\" />\n  </van-cell-group>\n  <view class=\"bottom-box\"></view>\n  <van-submit-bar\n    wx:if=\"{{ yunPrice >= 99999 }}\"\n    price=\"{{ (allGoodsAndYunPrice - yunPrice)*100 }}\"\n    suffix-label=\"{{ totalScoreToPay ? '+' + totalScoreToPay + ' 积分' : '' }}\"\n    button-text=\"该地区禁售\"\n    disabled\n  />\n  <van-submit-bar\n    wx:else\n    price=\"{{ allGoodsAndYunPrice*100 }}\"\n    suffix-label=\"{{ totalScoreToPay ? '+' + totalScoreToPay + ' 积分' : '' }}\"\n    button-text=\"提交订单\"\n    loading=\"{{ btnLoading }}\"\n    bind:submit=\"goCreateOrder\"\n  />\n</block>\n\n<van-popup\n  show=\"{{ dateStartpop }}\"\n  position=\"bottom\"\n>\n  <van-datetime-picker\n    type=\"datetime\"\n    value=\"{{ currentDate }}\"\n    min-date=\"{{ minDate }}\"\n    max-date=\"{{ maxDate }}\"\n    formatter=\"{{ formatter }}\"\n    bind:confirm=\"dateStartconfirm\"\n    bind:cancel=\"dateStartcancel\"\n  />\n</van-popup>\n\n<bind-mobile\n  title=\"绑定手机号码\"\n  alarmText=\"为保障您的资金安全，请先绑定手机号码\"\n  show=\"{{ bindMobileShow }}\"\n  bind:cancel=\"bindMobileCancel\"\n  bind:ok=\"bindMobileOk\"\n/>\n\n<payment\n  money=\"{{ money }}\"\n  remark=\"支付订单 ：{{ orderId }}\"\n  nextAction=\"{{ nextAction }}\"\n  show=\"{{ paymentShow }}\"\n  bind:cancel=\"paymentCancel\"\n  bind:ok=\"paymentOk\"\n/>\n\n<!-- 优惠券选择弹窗 -->\n<van-popup show=\"{{ couponPickerShow }}\" position=\"bottom\" round bind:close=\"closeCouponPicker\">\n  <view class=\"coupon-picker-container\">\n    <view class=\"coupon-picker-header\">\n      <view class=\"picker-title\">选择优惠券</view>\n      <view class=\"picker-close\" bindtap=\"closeCouponPicker\">✕</view>\n    </view>\n    <scroll-view class=\"coupon-picker-list\" scroll-y>\n      <view class=\"coupon-picker-item\" wx:for=\"{{coupons}}\" wx:key=\"id\" bindtap=\"selectCoupon\" data-index=\"{{index}}\">\n        <view class=\"picker-coupon-card {{ curCoupon && curCoupon.id == item.id ? 'selected' : '' }}\">\n          <view class=\"picker-coupon-left\">\n            <view class=\"picker-amount-wrapper\">\n              <text class=\"picker-currency\" wx:if=\"{{ item.moneyType == 0 }}\">¥</text>\n              <text class=\"picker-amount\">{{ item.moneyType == 0 ? item.money : item.money }}</text>\n              <text class=\"picker-percent\" wx:if=\"{{ item.moneyType == 1 }}\">折</text>\n            </view>\n            <view class=\"picker-threshold\">满{{item.moneyHreshold}}元</view>\n          </view>\n          <view class=\"picker-coupon-right\">\n            <view class=\"picker-coupon-name\">{{item.name}}</view>\n            <view class=\"picker-coupon-desc\">{{item.nameExt}}</view>\n          </view>\n          <view class=\"picker-check-icon\" wx:if=\"{{ curCoupon && curCoupon.id == item.id }}\">✓</view>\n        </view>\n      </view>\n      <view class=\"coupon-picker-item\" bindtap=\"selectNoCoupon\">\n        <view class=\"picker-coupon-card no-coupon {{ !curCoupon ? 'selected' : '' }}\">\n          <view class=\"no-coupon-text\">不使用优惠券</view>\n          <view class=\"picker-check-icon\" wx:if=\"{{ !curCoupon }}\">✓</view>\n        </view>\n      </view>\n    </scroll-view>\n  </view>\n</van-popup>\n\n<!-- 门店优惠券选择弹窗 -->\n<van-popup show=\"{{ couponPickerShopShow }}\" position=\"bottom\" round bind:close=\"closeCouponPickerShop\">\n  <view class=\"coupon-picker-container\">\n    <view class=\"coupon-picker-header\">\n      <view class=\"picker-title\">选择优惠券</view>\n      <view class=\"picker-close\" bindtap=\"closeCouponPickerShop\">✕</view>\n    </view>\n    <scroll-view class=\"coupon-picker-list\" scroll-y>\n      <view class=\"coupon-picker-item\" wx:for=\"{{currentShopCoupons}}\" wx:key=\"id\" bindtap=\"selectCouponShop\" data-index=\"{{index}}\">\n        <view class=\"picker-coupon-card {{ currentShopSelectedCoupon && currentShopSelectedCoupon.id == item.id ? 'selected' : '' }}\">\n          <view class=\"picker-coupon-left\">\n            <view class=\"picker-amount-wrapper\">\n              <text class=\"picker-currency\" wx:if=\"{{ item.moneyType == 0 }}\">¥</text>\n              <text class=\"picker-amount\">{{ item.moneyType == 0 ? item.money : item.money }}</text>\n              <text class=\"picker-percent\" wx:if=\"{{ item.moneyType == 1 }}\">折</text>\n            </view>\n            <view class=\"picker-threshold\">满{{item.moneyHreshold}}元</view>\n          </view>\n          <view class=\"picker-coupon-right\">\n            <view class=\"picker-coupon-name\">{{item.name}}</view>\n            <view class=\"picker-coupon-desc\">{{item.nameExt}}</view>\n          </view>\n          <view class=\"picker-check-icon\" wx:if=\"{{ currentShopSelectedCoupon && currentShopSelectedCoupon.id == item.id }}\">✓</view>\n        </view>\n      </view>\n      <view class=\"coupon-picker-item\" bindtap=\"selectNoCouponShop\">\n        <view class=\"picker-coupon-card no-coupon {{ !currentShopSelectedCoupon ? 'selected' : '' }}\">\n          <view class=\"no-coupon-text\">不使用优惠券</view>\n          <view class=\"picker-check-icon\" wx:if=\"{{ !currentShopSelectedCoupon }}\">✓</view>\n        </view>\n      </view>\n    </scroll-view>\n  </view>\n</van-popup>\n\n<!-- 口令兑换弹窗 -->\n<van-popup show=\"{{ exchangeCouponShow }}\" position=\"center\" round bind:close=\"closeExchangeCoupon\">\n  <view class=\"exchange-coupon-container\">\n    <view class=\"exchange-header\">\n      <view class=\"exchange-title\">口令兑换优惠券</view>\n      <view class=\"exchange-subtitle\">输入券号和密码即可兑换</view>\n    </view>\n    <view class=\"exchange-form\">\n      <van-field\n        label=\"券号\"\n        model:value=\"{{ exchangeNumber }}\"\n        clearable\n        placeholder=\"请输入券号\"\n        border=\"{{ false }}\"\n        custom-style=\"background: #F7F8FA; border-radius: 12rpx; margin-bottom: 24rpx;\"\n      />\n      <van-field\n        label=\"密码\"\n        model:value=\"{{ exchangePwd }}\"\n        clearable\n        placeholder=\"请输入密码\"\n        border=\"{{ false }}\"\n        custom-style=\"background: #F7F8FA; border-radius: 12rpx;\"\n      />\n    </view>\n    <view class=\"exchange-actions\">\n      <view class=\"exchange-btn cancel\" bindtap=\"closeExchangeCoupon\">取消</view>\n      <view class=\"exchange-btn confirm\" bindtap=\"confirmExchangeCoupon\">立即兑换</view>\n    </view>\n  </view>\n</van-popup>"
  },
  {
    "path": "pages/to-pay-order/index.wxss",
    "content": "page,view,image,input,textarea {\n  display: block;\n  box-sizing: border-box;\n}\n\npage {\n  background-color: #f2f2f2;\n  padding-bottom: 48rpx;\n}\n\n.address-box {\n  width: 100vw;\n  margin: 20rpx 0;\n  border-bottom: 1rpx solid #eee;\n}\n\n.add-address {\n  width: 100vw;\n  display: flex;\n  align-items: center;\n  padding-left: 32rpx;\n}\n.add-address image {\n  width: 40rpx;\n  height: 40rpx;\n}\n.add-address view {\n  margin-left: 16rpx;\n  font-size: 28rpx;\n  color: #000;\n  padding: 40rpx 0;\n}\n\n.show-address {\n  width: 750rpx;\n  box-sizing: border-box;\n  padding: 0 32rpx;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.show-address .name-tel {\n  font-size: 28rpx;\n  color: #000;\n  padding: 30rpx 0 20rpx 0;\n}\n\n.show-address .addr-text {\n  font-size: 24rpx;\n  color: #888;\n  padding-bottom: 34rpx;\n  line-height: 36rpx;\n}\n.show-address .next {\n  width: 40rpx;\n  height: 40rpx;\n}\n\nform {\n  width: 100%;\n}\n\n.goods-list {\n  width: 100%;\n  background-color: #fff;\n  margin-bottom: 20rpx;\n}\n\n.goods-list .list-title {\n  font-size: 28rpx;\n  color: #000;\n  padding: 30rpx 0 25rpx 30rpx;\n}\n\n.goods-list  .a-goods {\n  width: 720rpx;\n  margin-left: 30rpx;\n  display: flex;\n  /*justify-content: space-between;*/\n  border-top: 1px solid #eee;\n  padding: 30rpx 30rpx 30rpx 0;\n}\n\n.goods-list  .a-goods .img-box {\n  width: 160rpx;\n  height: 160rpx;\n  overflow: hidden;\n  margin-right: 20rpx;\n  background-color: #d8d8d8;\n}\n\n.goods-list .img-box .img {\n  width: 160rpx;\n  height: 160rpx;\n}\n\n.goods-list  .a-goods .text-box {\n  width: 510rpx;\n  box-sizing: border-box;\n  padding-top: 10rpx;\n}\n\n.a-goods .text-box .arow {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.a-goods .text-box .arow .goods-name {\n  width: 360rpx;\n  font-size: 26rpx;\n  height: 74rpx;\n  color: #000;\n  line-height: 1.6;\n  overflow: hidden;\n}\n\n.a-goods .text-box .arow01 {\n  margin-bottom: 30rpx;\n}\n\n.a-goods .text-box .arow .goods-price {\n  font-size: 26rpx;\n  color: #000;\n  align-self: flex-start;\n}\n\n.a-goods .text-box .arow .goods-label {\n  font-size: 26rpx;\n  color: #999;\n}\n\n.a-goods .text-box .arow .goods-num {\n  font-size: 26rpx;\n  color: #999;\n}\n\n.peisong-way {\n  width: 100%;\n  background-color: #fff;\n  margin-bottom: 20rpx;\n}\n\n.peisong-way .row-box {\n  width: 720rpx;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  box-sizing: border-box;\n  padding: 24rpx 0 24rpx 30rpx;\n  border-bottom: 1rpx solid #eee;\n}\n\n.peisong-way .row-label.t {\n  color: #333;\n}\n.peisong-way .row-label {\n  font-size: 28rpx;\n  color: #666;\n}\n\n.peisong-way .right-text {\n  font-size: 28rpx;\n  color: #666;\n  padding-right: 30rpx;\n}\n\n.peisong-way .liuyan {\n  width: 510rpx;\n  font-size: 28rpx;\n}\n\n.goods-info {\n  width: 100%;\n  background-color: #fff;\n  margin-bottom: 120rpx;\n  padding-bottom: 24rpx;\n}\n\n.goods-info .row-box {\n  width: 100%;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  box-sizing: border-box;\n  padding: 24rpx 30rpx 12rpx 30rpx;\n  font-size: 28rpx;\n  color: #000;\n}\n\n.goods-info .row-box .right-text {\n  text-align: right;\n}\n.row-box .next {\n  width: 40rpx;\n  height: 40rpx;\n}\n\n.jiesuan-box {\n  display: flex;\n  justify-content: space-between;\n  width: 100%;\n  height: 100rpx;\n  position: fixed;\n  bottom: calc(env(safe-area-inset-bottom) / 2);\n  left: 0;\n  border-top: 1px solid #eee;\n  background-color: #fff;\n  z-index: 999;\n}\n\n.jiesuan-box .to-pay-btn {\n  width: 250rpx;\n  text-align: center;\n  height: 100%;\n  line-height: 100rpx;\n  background-color: #e64340;\n  font-size: 32rpx;\n  color: #fff;\n  border-radius: 0;\n}\n\n.jiesuan-box  .left-price {\n  display: flex;\n  width: 500rpx;\n  justify-content: flex-end;\n  line-height: 100rpx;\n  padding: 0 30rpx 0 0;\n  font-size: 28rpx;\n  box-sizing: border-box;\n}\n\n.jiesuan-box .total {\n  color: #e64340;\n  text-align: right;\n}\n\n.box-v2 {\n  width: 100vw;\n}\n.bottom-box {\n  height: 120rpx;\n}\n.cell-group {\n  margin-top: 16rpx;\n}\n\n\n/* 绑定手机号容器 */\n.bind-mobile-container {\n  min-height: 100vh;\n  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: 40rpx;\n  box-sizing: border-box;\n}\n\n/* 卡片主体 */\n.bind-mobile-card {\n  width: 100%;\n  max-width: 670rpx;\n  background: #ffffff;\n  border-radius: 24rpx;\n  box-shadow: 0 8rpx 40rpx rgba(0, 0, 0, 0.08);\n  padding: 80rpx 48rpx 60rpx;\n  box-sizing: border-box;\n  position: relative;\n  overflow: hidden;\n}\n\n.bind-mobile-card::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  height: 6rpx;\n  background: linear-gradient(90deg, #e93b3d 0%, #e2231a 100%);\n}\n\n/* 图标区域 */\n.card-icon {\n  display: flex;\n  justify-content: center;\n  margin-bottom: 40rpx;\n}\n\n.icon-shield {\n  width: 120rpx;\n  height: 140rpx;\n  background: linear-gradient(135deg, #e93b3d 0%, #e2231a 100%);\n  border-radius: 60rpx 60rpx 20rpx 20rpx;\n  position: relative;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 8rpx 24rpx rgba(233, 59, 61, 0.3);\n}\n\n.shield-inner {\n  width: 56rpx;\n  height: 66rpx;\n  border: 6rpx solid #ffffff;\n  border-radius: 28rpx 28rpx 10rpx 10rpx;\n  position: relative;\n}\n\n.shield-inner::after {\n  content: '';\n  position: absolute;\n  top: 24rpx;\n  left: 50%;\n  transform: translateX(-50%);\n  width: 12rpx;\n  height: 24rpx;\n  border: 4rpx solid #ffffff;\n  border-top: none;\n  border-left: none;\n  transform: translateX(-50%) rotate(45deg);\n  margin-top: -8rpx;\n}\n\n/* 标题区域 */\n.card-title {\n  font-size: 44rpx;\n  font-weight: bold;\n  color: #333333;\n  text-align: center;\n  margin-bottom: 20rpx;\n  letter-spacing: 1rpx;\n}\n\n.card-subtitle {\n  font-size: 28rpx;\n  color: #666666;\n  text-align: center;\n  line-height: 44rpx;\n  margin-bottom: 60rpx;\n  padding: 0 20rpx;\n}\n\n/* 功能列表 */\n.feature-list {\n  background: #f8f8f8;\n  border-radius: 16rpx;\n  padding: 32rpx 40rpx;\n  margin-bottom: 60rpx;\n}\n\n.feature-item {\n  display: flex;\n  align-items: center;\n  margin-bottom: 24rpx;\n}\n\n.feature-item:last-child {\n  margin-bottom: 0;\n}\n\n.feature-dot {\n  width: 12rpx;\n  height: 12rpx;\n  background: linear-gradient(135deg, #e93b3d 0%, #e2231a 100%);\n  border-radius: 50%;\n  margin-right: 20rpx;\n  flex-shrink: 0;\n}\n\n.feature-text {\n  font-size: 28rpx;\n  color: #666666;\n  line-height: 40rpx;\n}\n\n/* 按钮区域 */\n.bind-btn-wrapper {\n  margin-bottom: 40rpx;\n}\n\n.bind-btn {\n  width: 100%;\n  height: 96rpx;\n  background: linear-gradient(90deg, #e93b3d 0%, #e2231a 100%);\n  border-radius: 48rpx;\n  border: none;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 8rpx 24rpx rgba(233, 59, 61, 0.3);\n  transition: all 0.3s;\n  position: relative;\n  overflow: hidden;\n}\n\n.bind-btn::after {\n  border: none;\n}\n\n.bind-btn::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: -100%;\n  width: 100%;\n  height: 100%;\n  background: rgba(255, 255, 255, 0.2);\n  transition: left 0.5s;\n}\n\n.bind-btn:active {\n  transform: scale(0.98);\n  box-shadow: 0 4rpx 16rpx rgba(233, 59, 61, 0.4);\n}\n\n.bind-btn-text {\n  font-size: 32rpx;\n  color: #ffffff;\n  font-weight: bold;\n  letter-spacing: 2rpx;\n}\n\n/* 安全提示 */\n.security-tips {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: 24rpx;\n  background: #fff9f0;\n  border-radius: 12rpx;\n  border: 1rpx solid #ffe5cc;\n}\n\n.tips-icon {\n  font-size: 28rpx;\n  margin-right: 12rpx;\n}\n\n.tips-text {\n  font-size: 24rpx;\n  color: #999999;\n  line-height: 34rpx;\n}\n\n/* 优惠券选择器 */\n.coupon-selector {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 32rpx;\n  background: linear-gradient(135deg, #FFF5F5 0%, #FFFFFF 100%);\n  border-radius: 16rpx;\n  margin: 24rpx 0;\n  box-shadow: 0 4rpx 20rpx rgba(228, 57, 60, 0.08);\n  transition: all 0.3s ease;\n  position: relative;\n  overflow: hidden;\n}\n\n.coupon-selector::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 6rpx;\n  height: 100%;\n  background: linear-gradient(180deg, #E4393C 0%, #F75050 100%);\n}\n\n.coupon-selector:active {\n  transform: scale(0.98);\n  box-shadow: 0 2rpx 12rpx rgba(228, 57, 60, 0.12);\n}\n\n.coupon-selector-left {\n  display: flex;\n  align-items: center;\n  flex: 1;\n}\n\n.coupon-icon {\n  font-size: 48rpx;\n  margin-right: 24rpx;\n}\n\n.coupon-text-wrapper {\n  flex: 1;\n}\n\n.coupon-label {\n  font-size: 24rpx;\n  color: #999999;\n  margin-bottom: 8rpx;\n}\n\n.coupon-selected-text {\n  font-size: 28rpx;\n  color: #333333;\n  font-weight: 600;\n}\n\n.coupon-selector-right {\n  display: flex;\n  align-items: center;\n}\n\n.coupon-arrow {\n  font-size: 48rpx;\n  color: #CCCCCC;\n  font-weight: 300;\n}\n\n/* 口令兑换提示 */\n.coupon-exchange-tip {\n  display: flex;\n  align-items: center;\n  padding: 24rpx 32rpx;\n  background: linear-gradient(135deg, #FFF9F0 0%, #FFFFFF 100%);\n  border-radius: 16rpx;\n  margin: 24rpx 0;\n  border: 2rpx dashed #FFD700;\n  transition: all 0.3s ease;\n}\n\n.coupon-exchange-tip:active {\n  transform: scale(0.98);\n  background: linear-gradient(135deg, #FFF4E0 0%, #FFFAF0 100%);\n}\n\n.tip-icon {\n  font-size: 40rpx;\n  margin-right: 20rpx;\n}\n\n.tip-text {\n  flex: 1;\n  font-size: 26rpx;\n  color: #FF9500;\n  font-weight: 500;\n}\n\n.tip-arrow {\n  font-size: 40rpx;\n  color: #FFD700;\n  font-weight: 300;\n}\n\n/* 优惠券选择弹窗 */\n.coupon-picker-container {\n  background: #FFFFFF;\n  border-radius: 24rpx 24rpx 0 0;\n  max-height: 80vh;\n  display: flex;\n  flex-direction: column;\n}\n\n.coupon-picker-header {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 32rpx 40rpx;\n  border-bottom: 1rpx solid #F0F0F0;\n  position: relative;\n}\n\n.coupon-picker-header::after {\n  content: '';\n  position: absolute;\n  bottom: 0;\n  left: 50%;\n  transform: translateX(-50%);\n  width: 80rpx;\n  height: 6rpx;\n  background: linear-gradient(90deg, #E4393C 0%, #F75050 100%);\n  border-radius: 3rpx;\n}\n\n.picker-title {\n  font-size: 36rpx;\n  font-weight: 700;\n  color: #333333;\n}\n\n.picker-close {\n  font-size: 48rpx;\n  color: #999999;\n  font-weight: 300;\n  width: 60rpx;\n  height: 60rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  border-radius: 50%;\n  transition: all 0.3s ease;\n}\n\n.picker-close:active {\n  background: #F5F5F5;\n}\n\n.coupon-picker-list {\n  box-sizing: border-box;\n  flex: 1;\n  padding: 24rpx;\n  max-height: 60vh;\n}\n\n.coupon-picker-item {\n  margin-bottom: 24rpx;\n}\n\n.picker-coupon-card {\n  position: relative;\n  display: flex;\n  align-items: center;\n  padding: 32rpx;\n  background: linear-gradient(135deg, #FFF5F5 0%, #FFFFFF 100%);\n  border-radius: 16rpx;\n  border: 2rpx solid #F0F0F0;\n  transition: all 0.3s ease;\n}\n\n.picker-coupon-card.selected {\n  border-color: #E4393C;\n  background: linear-gradient(135deg, #FFF0F0 0%, #FFFFFF 100%);\n  box-shadow: 0 8rpx 24rpx rgba(228, 57, 60, 0.15);\n}\n\n.picker-coupon-card:active {\n  transform: scale(0.98);\n}\n\n.picker-coupon-left {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  min-width: 160rpx;\n  padding-right: 32rpx;\n  border-right: 2rpx dashed #E5E5E5;\n}\n\n.picker-amount-wrapper {\n  display: flex;\n  align-items: baseline;\n  margin-bottom: 8rpx;\n}\n\n.picker-currency {\n  font-size: 28rpx;\n  color: #E4393C;\n  font-weight: 600;\n  margin-right: 4rpx;\n}\n\n.picker-amount {\n  font-size: 56rpx;\n  color: #E4393C;\n  font-weight: 700;\n  line-height: 1;\n}\n\n.picker-percent {\n  font-size: 32rpx;\n  color: #E4393C;\n  font-weight: 600;\n  margin-left: 4rpx;\n}\n\n.picker-threshold {\n  font-size: 22rpx;\n  color: #999999;\n}\n\n.picker-coupon-right {\n  flex: 1;\n  padding-left: 32rpx;\n}\n\n.picker-coupon-name {\n  font-size: 30rpx;\n  color: #333333;\n  font-weight: 600;\n  margin-bottom: 12rpx;\n  line-height: 1.4;\n}\n\n.picker-coupon-desc {\n  font-size: 24rpx;\n  color: #999999;\n  line-height: 1.5;\n}\n\n.picker-check-icon {\n  position: absolute;\n  top: 16rpx;\n  right: 16rpx;\n  width: 48rpx;\n  height: 48rpx;\n  background: linear-gradient(135deg, #E4393C 0%, #F75050 100%);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-size: 28rpx;\n  color: #FFFFFF;\n  font-weight: 700;\n}\n\n.picker-coupon-card.no-coupon {\n  justify-content: center;\n  background: #F7F8FA;\n  border: 2rpx dashed #E5E5E5;\n}\n\n.picker-coupon-card.no-coupon.selected {\n  background: linear-gradient(135deg, #FFF0F0 0%, #FFFFFF 100%);\n  border-color: #E4393C;\n}\n\n.no-coupon-text {\n  font-size: 28rpx;\n  color: #666666;\n  font-weight: 500;\n}\n\n/* 口令兑换弹窗 */\n.exchange-coupon-container {\n  width: 600rpx;\n  background: #FFFFFF;\n  border-radius: 24rpx;\n  overflow: hidden;\n}\n\n.exchange-header {\n  padding: 48rpx 40rpx 32rpx;\n  background: linear-gradient(180deg, #FFF5F5 0%, #FFFFFF 100%);\n  text-align: center;\n  position: relative;\n}\n\n.exchange-header::after {\n  content: '';\n  position: absolute;\n  bottom: 0;\n  left: 50%;\n  transform: translateX(-50%);\n  width: 80rpx;\n  height: 6rpx;\n  background: linear-gradient(90deg, #E4393C 0%, #F75050 100%);\n  border-radius: 3rpx;\n}\n\n.exchange-title {\n  font-size: 36rpx;\n  font-weight: 700;\n  color: #333333;\n  margin-bottom: 12rpx;\n}\n\n.exchange-subtitle {\n  font-size: 24rpx;\n  color: #999999;\n}\n\n.exchange-form {\n  padding: 40rpx 40rpx 24rpx;\n}\n\n.exchange-actions {\n  display: flex;\n  padding: 0 40rpx 40rpx;\n  gap: 24rpx;\n}\n\n.exchange-btn {\n  flex: 1;\n  height: 88rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  border-radius: 44rpx;\n  font-size: 32rpx;\n  font-weight: 600;\n  transition: all 0.3s ease;\n}\n\n.exchange-btn.cancel {\n  background: #F7F8FA;\n  color: #666666;\n}\n\n.exchange-btn.cancel:active {\n  background: #E5E5E5;\n}\n\n.exchange-btn.confirm {\n  background: linear-gradient(135deg, #E4393C 0%, #F75050 100%);\n  color: #FFFFFF;\n  box-shadow: 0 8rpx 20rpx rgba(228, 57, 60, 0.3);\n}\n\n.exchange-btn.confirm:active {\n  transform: scale(0.98);\n  box-shadow: 0 4rpx 12rpx rgba(228, 57, 60, 0.4);\n}"
  },
  {
    "path": "pages/vip/detail.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nPage({\n  data: {\n    levelId: 0,\n    levelDetail: null,\n    extJsonKeys: [],\n    priceList: [],\n    selectedPrice: null,\n    userBalance: 0,\n    paymentShow: false,\n    money: 0,\n    nextAction: null,\n    successShow: false,\n    successBenefits: []\n  },\n\n  onLoad(options) {\n    if (options.id) {\n      this.setData({ levelId: options.id })\n      this.loadData()\n    }\n  },\n\n  async loadData() {\n    wx.showLoading({ title: '加载中...' })\n    await Promise.all([\n      this.getLevelDetail(),\n      this.getPriceList(),\n      this.getUserBalance()\n    ])\n    wx.hideLoading()\n  },\n\n  async getLevelDetail() {\n    const res = await WXAPI.userLevelDetail(this.data.levelId)\n    if (res.code === 0) {\n      const extJsonKeys = []\n      if (res.data.extJson && typeof res.data.extJson === 'object') {\n        Object.keys(res.data.extJson).forEach(key => {\n          extJsonKeys.push({\n            key: key,\n            value: res.data.extJson[key]\n          })\n        })\n      }\n      this.setData({\n        levelDetail: res.data,\n        extJsonKeys\n      })\n    } else {\n      wx.showToast({\n        title: res.msg || '加载失败',\n        icon: 'none'\n      })\n      setTimeout(() => {\n        wx.navigateBack()\n      }, 1500)\n    }\n  },\n\n  async getPriceList() {\n    const res = await WXAPI.userLevelPrices(this.data.levelId)\n    if (res.code === 0) {\n      const list = res.data || []\n      if (list.length === 0) {\n        wx.showToast({\n          title: '该等级暂无可购买项目',\n          icon: 'none'\n        })\n      }\n      this.setData({\n        priceList: list,\n        selectedPrice: list.length > 0 ? list[0] : null\n      })\n    }\n  },\n\n  async getUserBalance() {\n    const res = await WXAPI.userAmountV2(wx.getStorageSync('token'))\n    if (res.code === 0) {\n      this.setData({\n        userBalance: res.data.balance || 0\n      })\n    }\n  },\n\n  selectPrice(e) {\n    const { item } = e.currentTarget.dataset\n    this.setData({\n      selectedPrice: item\n    })\n  },\n\n  async handleBuy() {\n    if (!this.data.selectedPrice) {\n      wx.showToast({\n        title: '请选择购买时长',\n        icon: 'none'\n      })\n      return\n    }\n\n    const price = this.data.selectedPrice.price\n    const balance = this.data.userBalance\n\n    if (balance >= price) {\n      // 余额充足，使用余额购买\n      this.buyWithBalance()\n    } else {\n      // 余额不足，使用在线支付\n      this.buyWithOnlinePay(price, balance)\n    }\n  },\n\n  buyWithBalance() {\n    const price = this.data.selectedPrice.price\n    const balance = this.data.userBalance\n\n    wx.showModal({\n      title: '确认购买',\n      content: `当前余额：¥${balance}\\n需支付：¥${price}\\n确认使用余额购买？`,\n      confirmText: '确认购买',\n      success: async (res) => {\n        if (res.confirm) {\n          wx.showLoading({ title: '购买中...' })\n          const result = await WXAPI.userLevelBuy(\n            wx.getStorageSync('token'),\n            this.data.selectedPrice.id,\n            false\n          )\n          wx.hideLoading()\n\n          if (result.code === 0) {\n            this.showSuccessModal()\n          } else {\n            wx.showToast({\n              title: result.msg || '购买失败',\n              icon: 'none'\n            })\n          }\n        }\n      }\n    })\n  },\n\n  buyWithOnlinePay(price, balance) {\n    const needPay = (price - balance).toFixed(2)\n    \n    wx.showModal({\n      title: '余额不足',\n      content: `当前余额：¥${balance}\\n需支付：¥${price}\\n还需支付：¥${needPay}\\n是否继续支付？`,\n      confirmText: '去支付',\n      success: (res) => {\n        if (res.confirm) {\n          // 拉起支付组件\n          this.setData({\n            money: needPay,\n            paymentShow: true,\n            nextAction: {\n              type: 6,\n              userLevelPriceId: this.data.selectedPrice.id,\n              isAutoRenew: false\n            }\n          })\n        }\n      }\n    })\n  },\n\n  showSuccessModal() {\n    const benefits = []\n    const info = this.data.levelDetail.info\n    \n    if (info.rebate < 10) {\n      benefits.push(`${info.rebate}折优惠`)\n    }\n    if (info.upgradeSendScore > 0) {\n      benefits.push(`赠送${info.upgradeSendScore}积分`)\n    }\n    if (info.sendPerMonthScore > 0) {\n      benefits.push(`每月${info.sendPerMonthScore}积分`)\n    }\n    if (info.sendPerMonthCoupons) {\n      benefits.push('专享优惠券')\n    }\n\n    this.setData({\n      successShow: true,\n      successBenefits: benefits\n    })\n  },\n\n  handleSuccessConfirm() {\n    this.setData({\n      successShow: false\n    })\n    wx.navigateBack()\n  },\n\n  paymentOk(e) {\n    console.log('支付成功', e.detail)\n    this.setData({\n      paymentShow: false\n    })\n    this.showSuccessModal()\n  },\n\n  paymentCancel() {\n    this.setData({\n      paymentShow: false\n    })\n  }\n})\n"
  },
  {
    "path": "pages/vip/detail.json",
    "content": "{\n  \"navigationBarTitleText\": \"会员等级详情\",\n  \"usingComponents\": {\n    \"vip-success\": \"/components/vip-success/index\"\n  }\n}\n"
  },
  {
    "path": "pages/vip/detail.wxml",
    "content": "<view class=\"detail-container\">\n  <!-- 顶部等级信息 -->\n  <view class=\"level-header\">\n    <view class=\"header-bg\"></view>\n    <view class=\"header-content\">\n      <view class=\"level-badge-large\">\n        <van-icon name=\"vip-card-o\" size=\"90rpx\" color=\"#eee\" />\n      </view>\n      <text class=\"level-name\">{{levelDetail.info.name}}</text>\n      <text class=\"level-desc\">LV{{levelDetail.info.level}}</text>\n    </view>\n  </view>\n\n  <!-- 权益列表 -->\n  <view class=\"benefits-section\">\n    <view class=\"section-title\">会员权益</view>\n    <view class=\"benefits-grid\">\n      <view class=\"benefit-card\" wx:if=\"{{levelDetail.info.rebate < 10}}\">\n        <view class=\"benefit-icon\">\n          <van-icon name=\"discount\" color=\"#667eea\" size=\"32px\" />\n        </view>\n        <text class=\"benefit-title\">购物折扣</text>\n        <text class=\"benefit-value\">{{levelDetail.info.rebate}}折</text>\n      </view>\n      \n      <view class=\"benefit-card\" wx:if=\"{{levelDetail.info.upgradeSendScore > 0}}\">\n        <view class=\"benefit-icon\">\n          <van-icon name=\"gift-o\" color=\"#667eea\" size=\"32px\" />\n        </view>\n        <text class=\"benefit-title\">升级赠送</text>\n        <text class=\"benefit-value\">{{levelDetail.info.upgradeSendScore}}积分</text>\n      </view>\n      \n      <view class=\"benefit-card\" wx:if=\"{{levelDetail.info.sendPerMonthScore > 0}}\">\n        <view class=\"benefit-icon\">\n          <van-icon name=\"gold-coin-o\" color=\"#667eea\" size=\"32px\" />\n        </view>\n        <text class=\"benefit-title\">每月赠送</text>\n        <text class=\"benefit-value\">{{levelDetail.info.sendPerMonthScore}}积分</text>\n      </view>\n      \n      <view class=\"benefit-card\" wx:if=\"{{levelDetail.info.sendPerMonthCoupons}}\">\n        <view class=\"benefit-icon\">\n          <van-icon name=\"coupon-o\" color=\"#667eea\" size=\"32px\" />\n        </view>\n        <text class=\"benefit-title\">专享优惠券</text>\n        <text class=\"benefit-value\">每月赠送</text>\n      </view>\n    </view>\n  </view>\n\n  <!-- 扩展信息 -->\n  <view class=\"ext-section\" wx:if=\"{{extJsonKeys.length > 0}}\">\n    <view class=\"section-title\">更多权益</view>\n    <view class=\"ext-list\">\n      <view class=\"ext-item\" wx:for=\"{{extJsonKeys}}\" wx:key=\"index\">\n        <text class=\"ext-label\">{{item.key}}</text>\n        <text class=\"ext-value\">{{item.value}}</text>\n      </view>\n    </view>\n  </view>\n\n  <!-- 购买选项 -->\n  <view class=\"price-section\">\n    <view class=\"section-title\">选择购买时长</view>\n    <view class=\"price-list\" wx:if=\"{{priceList.length > 0}}\">\n      <view \n        class=\"price-item {{selectedPrice && selectedPrice.id === item.id ? 'active' : ''}}\"\n        wx:for=\"{{priceList}}\"\n        wx:key=\"id\"\n        bindtap=\"selectPrice\"\n        data-item=\"{{item}}\"\n      >\n        <view class=\"price-duration\">\n          <text class=\"duration-num\">{{item.duration}}</text>\n          <text class=\"duration-unit\">{{item.unitStr}}</text>\n        </view>\n        <view class=\"price-amount\">\n          <text class=\"price-symbol\">¥</text>\n          <text class=\"price-num\">{{item.price}}</text>\n        </view>\n        <view class=\"price-check\" wx:if=\"{{selectedPrice && selectedPrice.id === item.id}}\">\n          <van-icon name=\"success\" color=\"#fff\" size=\"16px\" />\n        </view>\n      </view>\n    </view>\n    <view class=\"empty-price\" wx:else>\n      <van-icon name=\"info-o\" color=\"#999\" size=\"32px\" />\n      <text class=\"empty-text\">当前等级暂不开放升级</text>\n    </view>\n  </view>\n\n  <!-- 底部操作栏 -->\n  <view class=\"bottom-bar\">\n    <view class=\"price-info\">\n      <text class=\"price-label\">需支付</text>\n      <text class=\"price-total\">¥{{selectedPrice ? selectedPrice.price : 0}}</text>\n    </view>\n    <view class=\"buy-btn\" bindtap=\"handleBuy\">立即升级</view>\n  </view>\n  <!-- 成功弹窗 -->\n  <vip-success\n    show=\"{{successShow}}\"\n    levelName=\"{{levelDetail.info.name}}\"\n    benefits=\"{{successBenefits}}\"\n    bind:confirm=\"handleSuccessConfirm\"\n  />\n</view>\n<!-- 支付组件 -->\n<payment\n  money=\"{{ money }}\"\n  remark=\"升级会员 ：{{ money }}\"\n  nextAction=\"{{ nextAction }}\"\n  show=\"{{ paymentShow }}\"\n  bind:cancel=\"paymentCancel\"\n  bind:ok=\"paymentOk\"\n/>"
  },
  {
    "path": "pages/vip/detail.wxss",
    "content": ".detail-container {\n  min-height: 100vh;\n  background: #f8f9fa;\n  padding-bottom: 140rpx;\n}\n\n.level-header {\n  position: relative;\n  height: 500rpx;\n  overflow: hidden;\n}\n\n.header-bg {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  height: 100%;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n}\n\n.header-bg::before {\n  content: '';\n  position: absolute;\n  top: -30%;\n  left: -20%;\n  width: 600rpx;\n  height: 600rpx;\n  background: rgba(255, 255, 255, 0.1);\n  border-radius: 50%;\n}\n\n.header-bg::after {\n  content: '';\n  position: absolute;\n  bottom: -30%;\n  right: -20%;\n  width: 500rpx;\n  height: 500rpx;\n  background: rgba(255, 255, 255, 0.08);\n  border-radius: 50%;\n}\n\n.header-content {\n  position: relative;\n  z-index: 1;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  height: 100%;\n  gap: 20rpx;\n}\n\n.level-badge-large {\n  width: 160rpx;\n  height: 160rpx;\n  background: rgba(255, 255, 255, 0.2);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  backdrop-filter: blur(10rpx);\n  border: 6rpx solid rgba(255, 255, 255, 0.3);\n  box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);\n}\n\n.badge-icon {\n  width: 80rpx;\n  height: 80rpx;\n}\n\n.level-name {\n  font-size: 48rpx;\n  font-weight: bold;\n  color: #ffffff;\n  text-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.2);\n}\n\n.level-desc {\n  font-size: 28rpx;\n  color: rgba(255, 255, 255, 0.9);\n}\n\n.benefits-section,\n.ext-section,\n.price-section {\n  margin: 30rpx;\n  background: #ffffff;\n  border-radius: 24rpx;\n  padding: 32rpx;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);\n}\n\n.section-title {\n  font-size: 32rpx;\n  font-weight: bold;\n  color: #333;\n  margin-bottom: 24rpx;\n}\n\n.benefits-grid {\n  display: grid;\n  grid-template-columns: repeat(2, 1fr);\n  gap: 20rpx;\n}\n\n.benefit-card {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  padding: 32rpx 20rpx;\n  background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 100%);\n  border-radius: 16rpx;\n  border: 2rpx solid #e8ecff;\n}\n\n.benefit-icon {\n  margin-bottom: 16rpx;\n}\n\n.benefit-title {\n  font-size: 24rpx;\n  color: #999;\n  margin-bottom: 8rpx;\n}\n\n.benefit-value {\n  font-size: 28rpx;\n  font-weight: bold;\n  color: #667eea;\n}\n\n.ext-list {\n  display: flex;\n  flex-direction: column;\n  gap: 20rpx;\n}\n\n.ext-item {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 24rpx;\n  background: #f8f9fa;\n  border-radius: 12rpx;\n}\n\n.ext-label {\n  font-size: 28rpx;\n  color: #666;\n}\n\n.ext-value {\n  font-size: 28rpx;\n  color: #333;\n  font-weight: 500;\n}\n\n.price-list {\n  display: flex;\n  flex-direction: column;\n  gap: 20rpx;\n}\n\n.price-item {\n  position: relative;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 32rpx;\n  background: #f8f9fa;\n  border-radius: 16rpx;\n  border: 3rpx solid transparent;\n  transition: all 0.3s;\n}\n\n.price-item.active {\n  background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 100%);\n  border-color: #667eea;\n}\n\n.price-duration {\n  display: flex;\n  align-items: baseline;\n  gap: 8rpx;\n}\n\n.duration-num {\n  font-size: 40rpx;\n  font-weight: bold;\n  color: #333;\n}\n\n.duration-unit {\n  font-size: 24rpx;\n  color: #999;\n}\n\n.price-amount {\n  display: flex;\n  align-items: baseline;\n  gap: 4rpx;\n}\n\n.price-symbol {\n  font-size: 24rpx;\n  color: #ff6b35;\n}\n\n.price-num {\n  font-size: 40rpx;\n  font-weight: bold;\n  color: #ff6b35;\n  padding-right: 48rpx;\n}\n\n.price-check {\n  position: absolute;\n  top: 32rpx;\n  right: 16rpx;\n  width: 40rpx;\n  height: 40rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.bottom-bar {\n  position: fixed;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 20rpx 30rpx;\n  background: #ffffff;\n  box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.06);\n  z-index: 100;\n}\n\n.price-info {\n  display: flex;\n  flex-direction: column;\n  gap: 4rpx;\n}\n\n.price-label {\n  font-size: 24rpx;\n  color: #999;\n}\n\n.price-total {\n  font-size: 40rpx;\n  font-weight: bold;\n  color: #ff6b35;\n}\n\n.buy-btn {\n  padding: 24rpx 80rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  color: #ffffff;\n  font-size: 32rpx;\n  font-weight: bold;\n  border-radius: 48rpx;\n  box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.4);\n}\n\n.empty-price {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 16rpx;\n  padding: 60rpx 0;\n}\n\n.empty-price .empty-text {\n  font-size: 28rpx;\n  color: #999;\n}\n"
  },
  {
    "path": "pages/vip/history.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nPage({\n  data: {\n    recordList: [],\n    page: 1,\n    pageSize: 20,\n    totalPage: 0,\n    loading: false,\n    hasMore: true,\n    levelMap: {}\n  },\n\n  onLoad(options) {\n    this.loadData()\n  },\n\n  async loadData() {\n    this.setData({ \n      page: 1,\n      recordList: [],\n      hasMore: true\n    })\n    await this.loadLevelList()\n    await this.loadRecords()\n  },\n\n  async loadLevelList() {\n    const res = await WXAPI.userLevelList({ page: 1, pageSize: 100 })\n    if (res.code === 0) {\n      const levelMap = {}\n      const list = res.data.result || []\n      list.forEach(item => {\n        levelMap[item.id] = item.name\n      })\n      this.setData({ levelMap })\n    }\n  },\n\n  async loadRecords() {\n    if (this.data.loading) return\n    \n    this.setData({ loading: true })\n    \n    const res = await WXAPI.userLevelBuyLogs({\n      token: wx.getStorageSync('token'),\n      page: this.data.page,\n      pageSize: this.data.pageSize\n    })\n    \n    this.setData({ loading: false })\n\n    if (res.code === 0) {\n      const list = res.data.result || []\n      \n      // 添加等级名称\n      list.forEach(item => {\n        item.levelName = this.data.levelMap[item.levelId] || '未知等级'\n      })\n      const allRecords = [...this.data.recordList, ...list]\n\n      this.setData({\n        recordList: allRecords,\n        totalPage: res.data.totalPage || 0,\n        hasMore: this.data.page < res.data.totalPage\n      })\n    } else {\n      wx.showToast({\n        title: res.msg || '加载失败',\n        icon: 'none'\n      })\n    }\n  },\n\n  loadMore() {\n    if (!this.data.hasMore || this.data.loading) return\n    \n    this.setData({\n      page: this.data.page + 1\n    })\n    this.loadRecords()\n  },\n\n  onPullDownRefresh() {\n    this.data.page = 1\n    this.data.totalPage = 0\n    this.loadData().then(() => {\n      wx.stopPullDownRefresh()\n    })\n  },\n\n  onReachBottom() {\n    this.loadMore()\n  }\n})\n"
  },
  {
    "path": "pages/vip/history.json",
    "content": "{\n  \"navigationBarTitleText\": \"购买记录\",\n  \"enablePullDownRefresh\": true\n}\n"
  },
  {
    "path": "pages/vip/history.wxml",
    "content": "<view class=\"history-container\">\n  <!-- 购买记录列表 -->\n  <view class=\"record-list\">\n    <view class=\"record-item\" wx:for=\"{{recordList}}\" wx:key=\"id\">\n      <view class=\"record-header\">\n        <view class=\"level-info\">\n          <view class=\"level-icon\">\n            <van-icon name=\"vip-card-o\" color=\"#667eea\" size=\"20px\" />\n          </view>\n          <text class=\"level-name\">{{item.levelName}}</text>\n        </view>\n        <view class=\"record-amount\">\n          <text class=\"amount-symbol\">¥</text>\n          <text class=\"amount-num\">{{item.money}}</text>\n        </view>\n      </view>\n      \n      <view class=\"record-body\">\n        <view class=\"record-info-item\">\n          <text class=\"info-label\">订单号</text>\n          <text class=\"info-value\">{{item.orderNumber}}</text>\n        </view>\n        <view class=\"record-info-item\">\n          <text class=\"info-label\">购买时间</text>\n          <text class=\"info-value\">{{item.dateAdd}}</text>\n        </view>\n        <view class=\"record-info-item\" wx:if=\"{{item.remark}}\">\n          <text class=\"info-label\">备注</text>\n          <text class=\"info-value\">{{item.remark}}</text>\n        </view>\n      </view>\n    </view>\n  </view>\n\n  <!-- 空状态 -->\n  <view class='no-data' wx:if=\"{{ !recordList || recordList.length === 0 }}\">暂无购买记录~</view>\n\n  <!-- 加载状态 -->\n  <view class=\"loading-wrap\" wx:if=\"{{loading}}\">\n    <van-loading type=\"spinner\" size=\"24px\">加载中...</van-loading>\n  </view>\n\n  <!-- 加载更多 -->\n  <view class=\"loadmore-wrap\" wx:if=\"{{hasMore && !loading}}\">\n    <text class=\"loadmore-text\" bindtap=\"loadMore\">加载更多</text>\n  </view>\n\n  <view class=\"no-more\" wx:if=\"{{!hasMore && recordList.length > 0}}\">\n    <text>没有更多了</text>\n  </view>\n</view>\n"
  },
  {
    "path": "pages/vip/history.wxss",
    "content": ".history-container {\n  min-height: 100vh;\n  background: #f8f9fa;\n  padding-bottom: 40rpx;\n}\n\n.stats-card {\n  margin: 30rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 24rpx;\n  padding: 40rpx;\n  display: flex;\n  align-items: center;\n  justify-content: space-around;\n  box-shadow: 0 8rpx 32rpx rgba(102, 126, 234, 0.3);\n}\n\n.stats-item {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 12rpx;\n}\n\n.stats-label {\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.8);\n}\n\n.stats-value {\n  font-size: 40rpx;\n  font-weight: bold;\n  color: #ffffff;\n}\n\n.stats-divider {\n  width: 2rpx;\n  height: 60rpx;\n  background: rgba(255, 255, 255, 0.3);\n}\n\n.record-list {\n  padding: 30rpx;\n}\n\n.record-item {\n  background: #ffffff;\n  border-radius: 20rpx;\n  padding: 32rpx;\n  margin-bottom: 24rpx;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);\n}\n\n.record-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding-bottom: 24rpx;\n  border-bottom: 2rpx solid #f0f0f0;\n  margin-bottom: 24rpx;\n}\n\n.level-info {\n  display: flex;\n  align-items: center;\n  gap: 12rpx;\n}\n\n.level-icon {\n  width: 48rpx;\n  height: 48rpx;\n  background: linear-gradient(135deg, #f5f7ff 0%, #e8ecff 100%);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.level-name {\n  font-size: 32rpx;\n  font-weight: bold;\n  color: #333;\n}\n\n.record-amount {\n  display: flex;\n  align-items: baseline;\n  gap: 4rpx;\n}\n\n.amount-symbol {\n  font-size: 24rpx;\n  color: #ff6b35;\n}\n\n.amount-num {\n  font-size: 36rpx;\n  font-weight: bold;\n  color: #ff6b35;\n}\n\n.record-body {\n  display: flex;\n  flex-direction: column;\n  gap: 16rpx;\n}\n\n.record-info-item {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.info-label {\n  font-size: 26rpx;\n  color: #999;\n}\n\n.info-value {\n  font-size: 26rpx;\n  color: #666;\n  max-width: 400rpx;\n  text-align: right;\n  word-break: break-all;\n}\n\n.empty-wrap {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: 120rpx 0;\n}\n\n.empty-img {\n  width: 300rpx;\n  height: 300rpx;\n  margin-bottom: 32rpx;\n}\n\n.empty-text {\n  font-size: 28rpx;\n  color: #999;\n}\n\n.loading-wrap {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  padding: 60rpx 0;\n}\n\n.loadmore-wrap {\n  display: flex;\n  justify-content: center;\n  padding: 40rpx 0;\n}\n\n.loadmore-text {\n  font-size: 28rpx;\n  color: #667eea;\n  padding: 16rpx 48rpx;\n  background: #f5f7ff;\n  border-radius: 40rpx;\n}\n\n.no-more {\n  text-align: center;\n  padding: 40rpx 0;\n  font-size: 24rpx;\n  color: #999;\n}\n"
  },
  {
    "path": "pages/vip/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nPage({\n  data: {\n    userLevel: null,\n    levelList: [],\n    loading: true\n  },\n\n  onLoad(options) {\n    \n  },\n\n  onShow() {\n    AUTH.checkHasLogined().then(isLogined => {\n      if (!isLogined) {\n        AUTH.login(this)\n      } else {\n        this.loadData()\n      }\n    })\n  },\n\n  async loadData() {\n    this.setData({ loading: true })\n    await Promise.all([\n      this.getUserLevel(),\n      this.getLevelList()\n    ])\n    this.setData({ loading: false })\n  },\n\n  async getUserLevel() {\n    const res = await WXAPI.userDetail(wx.getStorageSync('token'))\n    if (res.code === 0) {\n      this.setData({\n        userLevel: res.data.userLevel\n      })\n    }\n  },\n\n  async getLevelList() {\n    const res = await WXAPI.userLevelList({ page: 1, pageSize: 50 })\n    if (res.code === 0) {\n      const list = res.data.result || []\n      // 按等级排序\n      list.sort((a, b) => b.level - a.level)\n      this.setData({\n        levelList: list\n      })\n    }\n  },\n\n  goLevelDetail(e) {\n    const { id } = e.currentTarget.dataset\n    wx.navigateTo({\n      url: `/pages/vip/detail?id=${id}`\n    })\n  },\n\n  goBuyHistory() {\n    wx.navigateTo({\n      url: '/pages/vip/history'\n    })\n  },\n\n  onPullDownRefresh() {\n    this.loadData().then(() => {\n      wx.stopPullDownRefresh()\n    })\n  }\n})"
  },
  {
    "path": "pages/vip/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"会员权益\",\n  \"enablePullDownRefresh\": true\n}"
  },
  {
    "path": "pages/vip/index.wxml",
    "content": "<view class=\"vip-container\">\n  <!-- 顶部背景 -->\n  <view class=\"vip-header\">\n    <view class=\"header-bg\"></view>\n    <view class=\"header-content\">\n      <view class=\"current-level\" wx:if=\"{{userLevel}}\">\n        <view class=\"level-badge\">\n          <van-icon name=\"vip-card-o\" size=\"72rpx\" color=\"#eee\" />\n        </view>\n        <view class=\"level-info\">\n          <text class=\"level-name\">{{userLevel.name}}</text>\n          <text class=\"level-desc\">当前等级</text>\n        </view>\n      </view>\n      <view class=\"current-level\" wx:else>\n        <view class=\"level-badge\">\n          <van-icon name=\"vip-card-o\" size=\"72rpx\" color=\"#eee\" />\n        </view>\n        <view class=\"level-info\">\n          <text class=\"level-name\">普通会员</text>\n          <text class=\"level-desc\">升级享更多权益</text>\n        </view>\n      </view>\n      \n      <view class=\"history-btn\" bindtap=\"goBuyHistory\">\n        <text>购买记录</text>\n        <van-icon name=\"arrow\" size=\"14px\" color=\"#fff\" />\n      </view>\n    </view>\n  </view>\n\n  <!-- 会员等级列表 -->\n  <view class=\"level-list\">\n    <view class=\"section-title\">\n      <text class=\"title-text\">会员等级</text>\n      <text class=\"title-desc\">选择适合您的会员等级</text>\n    </view>\n\n    <view class=\"level-cards\" wx:if=\"{{levelList.length > 0}}\">\n      <view \n        class=\"level-card {{userLevel && item.id === userLevel.id ? 'current' : ''}}\" \n        wx:for=\"{{levelList}}\" \n        wx:key=\"id\"\n        bindtap=\"goLevelDetail\"\n        data-id=\"{{item.id}}\"\n      >\n        <view class=\"card-header\">\n          <view class=\"level-title\">\n            <text class=\"name\">{{item.name}}</text>\n            <view class=\"current-tag\" wx:if=\"{{userLevel && item.id === userLevel.id}}\">当前</view>\n          </view>\n          <view class=\"level-badge-small\">\n            <text class=\"level-num\">LV{{item.level}}</text>\n          </view>\n        </view>\n\n        <view class=\"card-benefits\">\n          <view class=\"benefit-item\" wx:if=\"{{item.rebate < 10}}\">\n            <van-icon name=\"discount\" color=\"#ff6b35\" size=\"16px\" />\n            <text>{{item.rebate}}折优惠</text>\n          </view>\n          <view class=\"benefit-item\" wx:if=\"{{item.upgradeSendScore > 0}}\">\n            <van-icon name=\"gift-o\" color=\"#ff6b35\" size=\"16px\" />\n            <text>升级送{{item.upgradeSendScore}}积分</text>\n          </view>\n          <view class=\"benefit-item\" wx:if=\"{{item.sendPerMonthScore > 0}}\">\n            <van-icon name=\"gold-coin-o\" color=\"#ff6b35\" size=\"16px\" />\n            <text>每月送{{item.sendPerMonthScore}}积分</text>\n          </view>\n          <view class=\"benefit-item\" wx:if=\"{{item.sendPerMonthCoupons}}\">\n            <van-icon name=\"coupon-o\" color=\"#ff6b35\" size=\"16px\" />\n            <text>每月赠送专享优惠券</text>\n          </view>\n        </view>\n\n        <view class=\"card-footer\">\n          <text class=\"view-detail\">查看详情</text>\n          <van-icon name=\"arrow\" size=\"14px\" color=\"#999\" />\n        </view>\n      </view>\n    </view>\n\n    <!-- 空状态 -->\n    <view class=\"empty-wrap\" wx:if=\"{{!loading && levelList.length === 0}}\">\n      <text class=\"empty-text\">暂无会员等级</text>\n    </view>\n  </view>\n\n  <!-- 加载状态 -->\n  <view class=\"loading-wrap\" wx:if=\"{{loading}}\">\n    <van-loading type=\"spinner\" size=\"24px\">加载中...</van-loading>\n  </view>\n</view>"
  },
  {
    "path": "pages/vip/index.wxss",
    "content": ".vip-container {\n  min-height: 100vh;\n  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);\n  padding-bottom: 40rpx;\n}\n\n.vip-header {\n  position: relative;\n}\n\n.header-bg {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  height: 100%;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n}\n\n.header-bg::after {\n  content: '';\n  position: absolute;\n  top: -50%;\n  right: -20%;\n  width: 500rpx;\n  height: 500rpx;\n  background: rgba(255, 255, 255, 0.1);\n  border-radius: 50%;\n}\n\n.header-content {\n  position: relative;\n  z-index: 1;\n  padding: 60rpx 40rpx;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.current-level {\n  display: flex;\n  align-items: center;\n  gap: 24rpx;\n}\n\n.level-badge {\n  width: 120rpx;\n  height: 120rpx;\n  background: rgba(255, 255, 255, 0.2);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  backdrop-filter: blur(10rpx);\n  border: 4rpx solid rgba(255, 255, 255, 0.3);\n}\n\n.badge-icon {\n  width: 60rpx;\n  height: 60rpx;\n}\n\n.level-info {\n  display: flex;\n  flex-direction: column;\n  gap: 8rpx;\n}\n\n.level-name {\n  font-size: 40rpx;\n  font-weight: bold;\n  color: #ffffff;\n  text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);\n}\n\n.level-desc {\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.9);\n}\n\n.history-btn {\n  display: flex;\n  align-items: center;\n  gap: 8rpx;\n  padding: 16rpx 24rpx;\n  background: rgba(255, 255, 255, 0.2);\n  border-radius: 40rpx;\n  backdrop-filter: blur(10rpx);\n  border: 2rpx solid rgba(255, 255, 255, 0.3);\n  font-size: 24rpx;\n  color: #ffffff;\n}\n\n.level-list {\n  margin-top: 32rpx;\n  padding: 0 30rpx;\n}\n\n.section-title {\n  text-align: center;\n  margin-bottom: 40rpx;\n}\n\n.title-text {\n  display: block;\n  font-size: 36rpx;\n  font-weight: bold;\n  color: #333;\n  margin-bottom: 12rpx;\n}\n\n.title-desc {\n  font-size: 24rpx;\n  color: #999;\n}\n\n.level-cards {\n  display: flex;\n  flex-direction: column;\n  gap: 24rpx;\n}\n\n.level-card {\n  background: #ffffff;\n  border-radius: 24rpx;\n  padding: 32rpx;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);\n  transition: all 0.3s;\n  border: 2rpx solid transparent;\n}\n\n.level-card:active {\n  transform: scale(0.98);\n}\n\n.level-card.current {\n  border-color: #667eea;\n  background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 100%);\n  box-shadow: 0 8rpx 32rpx rgba(102, 126, 234, 0.2);\n}\n\n.card-header {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 24rpx;\n  padding-bottom: 24rpx;\n  border-bottom: 2rpx solid #f0f0f0;\n}\n\n.level-title {\n  display: flex;\n  align-items: center;\n  gap: 16rpx;\n}\n\n.level-title .name {\n  font-size: 32rpx;\n  font-weight: bold;\n  color: #333;\n}\n\n.current-tag {\n  padding: 4rpx 16rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  color: #ffffff;\n  font-size: 20rpx;\n  border-radius: 20rpx;\n}\n\n.level-badge-small {\n  width: 80rpx;\n  height: 80rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 50%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.level-num {\n  font-size: 24rpx;\n  font-weight: bold;\n  color: #ffffff;\n}\n\n.card-benefits {\n  display: flex;\n  flex-direction: column;\n  gap: 16rpx;\n  margin-bottom: 24rpx;\n}\n\n.benefit-item {\n  display: flex;\n  align-items: center;\n  gap: 12rpx;\n  font-size: 26rpx;\n  color: #666;\n}\n\n.card-footer {\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n  gap: 8rpx;\n  padding-top: 16rpx;\n  border-top: 2rpx solid #f0f0f0;\n}\n\n.view-detail {\n  font-size: 24rpx;\n  color: #999;\n}\n\n.loading-wrap {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  padding: 80rpx 0;\n}\n\n.empty-wrap {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: 120rpx 0;\n}\n\n.empty-img {\n  width: 300rpx;\n  height: 300rpx;\n  margin-bottom: 32rpx;\n}\n\n.empty-text {\n  font-size: 28rpx;\n  color: #999;\n}"
  },
  {
    "path": "pages/withdraw/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst AUTH = require('../../utils/auth')\n\nPage({\n\n  /**\n   * 页面的初始数据\n   */\n  data: {\n    balance: 0.00\n  },\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad: function(options) {\n    this.setData({\n      balance_pay_pwd: wx.getStorageSync('balance_pay_pwd')\n    })\n  },\n  onShow: function() {\n    AUTH.checkHasLogined().then(isLogined => {\n      if (!isLogined) {\n        AUTH.login(this)\n      } else {\n        this.userAmount()\n      }\n    })   \n  },\n  async userAmount() {\n    const res = await WXAPI.userAmount(wx.getStorageSync('token'))\n    if (res.code === 0) {\n      this.setData({\n        balance: res.data.balance\n      })\n    }\n  },\n  async bindSave() {\n    let minWidthAmount = wx.getStorageSync('WITHDRAW_MIN');\n    if (!minWidthAmount) {\n      minWidthAmount = 0\n    }\n    const amount = this.data.amount;\n    if (!amount) {\n      wx.showToast({\n        title: '请填写正确的提现金额',\n        icon: 'none',\n      })\n      return\n    }\n    if (this.data.balance_pay_pwd == '1' && !this.data.pwd) {\n      wx.showToast({\n        title: '请输入交易密码',\n        icon: 'none'\n      })\n      return\n    }\n    if (amount * 1 < minWidthAmount) {\n      wx.showToast({\n        title: '提现金额不能低于' + minWidthAmount,\n        icon: 'none',\n      })\n      return\n    }\n    if (amount * 1 > 2000) {\n      if (!this.data.name) {\n        wx.showToast({\n          title: '请输入真实姓名',\n          icon: 'none'\n        })\n        return\n      }\n    } else {\n      this.data.name = ''\n    }\n    const res = await WXAPI.withDrawApplyV3({\n      token: wx.getStorageSync('token'),\n      money: amount,\n      pwd: this.data.pwd ? this.data.pwd : '',\n      name: this.data.name ? this.data.name : '',\n    })\n    if (res.code == 0) {\n      wx.showModal({\n        title: '成功',\n        content: '您的提现申请已提交，等待财务打款',\n        showCancel: false,\n        success: function(res) {\n          if (res.confirm) {\n            wx.navigateBack({\n              delta: 0,\n            })\n          }\n        }\n      })\n    } else {\n      wx.showToast({\n        title: res.msg,\n        icon: 'none'\n      })\n    }\n  }\n})"
  },
  {
    "path": "pages/withdraw/index.json",
    "content": "{\n  \"navigationBarTitleText\": \"申请提现\"\n}"
  },
  {
    "path": "pages/withdraw/index.wxml",
    "content": "<view class=\"withdraw-container\">\n  <!-- 顶部余额卡片 -->\n  <view class=\"balance-card\">\n    <view class=\"balance-bg\">\n      <view class=\"balance-label\">可提现余额（元）</view>\n      <view class=\"balance-amount\">\n        <text class=\"balance-symbol\">¥</text>\n        <text class=\"balance-value\">{{ balance }}</text>\n      </view>\n      <view class=\"balance-tips\">提现将在1-3个工作日内到账</view>\n    </view>\n  </view>\n\n  <!-- 提现表单 -->\n  <view class=\"withdraw-form\">\n    <view class=\"form-title\">提现信息</view>\n    \n    <view class=\"form-item\">\n      <view class=\"item-label\">\n        <text class=\"label-icon\">💰</text>\n        <text>提现金额</text>\n      </view>\n      <van-field\n        type=\"digit\"\n        model:value=\"{{ amount }}\"\n        placeholder=\"请输入本次提现金额\"\n        clearable\n        border=\"{{ false }}\"\n        custom-style=\"padding: 0; font-size: 32rpx; font-weight: 500;\"\n      />\n    </view>\n\n    <view class=\"form-item\" wx:if=\"{{ amount > 2000 }}\">\n      <view class=\"item-label\">\n        <text class=\"label-icon\">👤</text>\n        <text>真实姓名</text>\n      </view>\n      <van-field\n        model:value=\"{{ name }}\"\n        placeholder=\"超过2000需要校验真实姓名\"\n        clearable\n        border=\"{{ false }}\"\n        custom-style=\"padding: 0; font-size: 32rpx;\"\n      />\n    </view>\n\n    <view class=\"form-item\" wx:if=\"{{ balance_pay_pwd == '1' }}\">\n      <view class=\"item-label\">\n        <text class=\"label-icon\">🔒</text>\n        <text>交易密码</text>\n      </view>\n      <van-field\n        password\n        model:value=\"{{ pwd }}\"\n        placeholder=\"请输入交易密码\"\n        clearable\n        border=\"{{ false }}\"\n        custom-style=\"padding: 0; font-size: 32rpx;\"\n      />\n    </view>\n  </view>\n\n  <!-- 温馨提示 -->\n  <view class=\"tips-box\">\n    <view class=\"tips-title\">\n      <text class=\"tips-icon\">ℹ️</text>\n      <text>温馨提示</text>\n    </view>\n    <view class=\"tips-content\">\n      <view class=\"tips-item\">• 提现金额将原路返回至您的账户</view>\n      <view class=\"tips-item\">• 每日最多可申请3次提现</view>\n      <view class=\"tips-item\">• 如有疑问请联系客服</view>\n    </view>\n  </view>\n\n  <!-- 提交按钮 -->\n  <view class=\"submit-btn-wrapper\">\n    <view class=\"submit-btn\" bind:tap=\"bindSave\">\n      <text class=\"btn-text\">立即提现</text>\n    </view>\n  </view>\n</view>\n"
  },
  {
    "path": "pages/withdraw/index.wxss",
    "content": "/* 京东风格 - 提现页面样式 */\npage {\n  background: #f5f5f5;\n  min-height: 100vh;\n}\n\n.withdraw-container {\n  padding-bottom: 40rpx;\n}\n\n/* 顶部余额卡片 */\n.balance-card {\n  padding: 40rpx 30rpx;\n  background: linear-gradient(135deg, #E93323 0%, #C81623 100%);\n  position: relative;\n  overflow: hidden;\n}\n\n.balance-card::before {\n  content: '';\n  position: absolute;\n  width: 400rpx;\n  height: 400rpx;\n  background: rgba(255, 255, 255, 0.1);\n  border-radius: 50%;\n  top: -200rpx;\n  right: -100rpx;\n}\n\n.balance-card::after {\n  content: '';\n  position: absolute;\n  width: 300rpx;\n  height: 300rpx;\n  background: rgba(255, 255, 255, 0.08);\n  border-radius: 50%;\n  bottom: -150rpx;\n  left: -50rpx;\n}\n\n.balance-bg {\n  position: relative;\n  z-index: 1;\n}\n\n.balance-label {\n  font-size: 28rpx;\n  color: rgba(255, 255, 255, 0.9);\n  margin-bottom: 20rpx;\n  font-weight: 400;\n}\n\n.balance-amount {\n  display: flex;\n  align-items: baseline;\n  margin-bottom: 16rpx;\n}\n\n.balance-symbol {\n  font-size: 40rpx;\n  color: #fff;\n  font-weight: bold;\n  margin-right: 8rpx;\n}\n\n.balance-value {\n  font-size: 72rpx;\n  color: #fff;\n  font-weight: bold;\n  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;\n}\n\n.balance-tips {\n  font-size: 24rpx;\n  color: rgba(255, 255, 255, 0.8);\n}\n\n/* 提现表单 */\n.withdraw-form {\n  margin: 24rpx 30rpx;\n  background: #fff;\n  border-radius: 16rpx;\n  padding: 32rpx;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04);\n}\n\n.form-title {\n  font-size: 32rpx;\n  font-weight: 600;\n  color: #333;\n  margin-bottom: 32rpx;\n  padding-left: 16rpx;\n  border-left: 6rpx solid #E93323;\n}\n\n.form-item {\n  margin-bottom: 36rpx;\n  padding-bottom: 32rpx;\n  border-bottom: 1rpx solid #f0f0f0;\n}\n\n.form-item:last-child {\n  margin-bottom: 0;\n  padding-bottom: 0;\n  border-bottom: none;\n}\n\n.item-label {\n  display: flex;\n  align-items: center;\n  font-size: 28rpx;\n  color: #666;\n  margin-bottom: 20rpx;\n  font-weight: 500;\n}\n\n.label-icon {\n  font-size: 32rpx;\n  margin-right: 12rpx;\n}\n\n/* 温馨提示 */\n.tips-box {\n  margin: 24rpx 30rpx;\n  background: #fff;\n  border-radius: 16rpx;\n  padding: 32rpx;\n  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.04);\n}\n\n.tips-title {\n  display: flex;\n  align-items: center;\n  font-size: 28rpx;\n  color: #333;\n  font-weight: 600;\n  margin-bottom: 24rpx;\n}\n\n.tips-icon {\n  font-size: 32rpx;\n  margin-right: 12rpx;\n}\n\n.tips-content {\n  padding-left: 44rpx;\n}\n\n.tips-item {\n  font-size: 26rpx;\n  color: #999;\n  line-height: 44rpx;\n  position: relative;\n}\n\n/* 提交按钮 */\n.submit-btn-wrapper {\n  padding: 40rpx 30rpx;\n  position: fixed;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  background: linear-gradient(to top, #fff 0%, rgba(255, 255, 255, 0.95) 100%);\n  z-index: 100;\n}\n\n.submit-btn {\n  height: 96rpx;\n  background: linear-gradient(135deg, #E93323 0%, #C81623 100%);\n  border-radius: 48rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-shadow: 0 8rpx 24rpx rgba(233, 51, 35, 0.3);\n  transition: all 0.3s;\n  position: relative;\n  overflow: hidden;\n}\n\n.submit-btn::before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: -100%;\n  width: 100%;\n  height: 100%;\n  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);\n  transition: left 0.5s;\n}\n\n.submit-btn:active {\n  transform: scale(0.98);\n  box-shadow: 0 4rpx 16rpx rgba(233, 51, 35, 0.4);\n}\n\n.btn-text {\n  font-size: 32rpx;\n  color: #fff;\n  font-weight: 600;\n  letter-spacing: 2rpx;\n}\n\n/* van-field 自定义样式覆盖 */\n.form-item .van-field {\n  padding: 0 !important;\n}\n\n.form-item .van-field__control {\n  color: #333;\n  font-weight: 500;\n}\n\n.form-item .van-field__control::-webkit-input-placeholder {\n  color: #ccc;\n  font-weight: 400;\n}"
  },
  {
    "path": "pages/wuliu/index.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst app = getApp()\nPage({\n  data: {},\n  onLoad: function (e) {\n    this.data.orderId = e.id\n    this.data.trackingNumber = e.trackingNumber\n    this.orderDetail()\n  },\n  onShow: function () {\n  },\n  async orderDetail() {\n    // https://www.yuque.com/apifm/nu0f75/oamel8\n    const res = await WXAPI.orderDetail(wx.getStorageSync('token'), this.data.orderId)\n    if (res.code != 0) {\n      wx.showModal({\n        title: '错误',\n        content: res.msg,\n        showCancel: false,\n        success: () => {\n          wx.navigateBack()\n        }\n      })\n      return;\n    }\n    const orderLogisticsShippers = res.data.orderLogisticsShippers\n    let trackingNumber = this.data.trackingNumber\n    if (!trackingNumber) {\n      trackingNumber = res.data.logistics.trackingNumber\n    }\n    let shipperName = this.data.shipperName\n    if (!shipperName) {\n      shipperName = res.data.logistics.shipperName\n    }\n    let logisticsTraces = null\n    if (this.data.trackingNumber && orderLogisticsShippers) {\n      // 查看子快递单\n      const entity = orderLogisticsShippers.find(ele => { return ele.trackingNumber == this.data.trackingNumber })\n      if (entity.traces) {\n        entity.tracesArray = JSON.parse (entity.traces)\n        logisticsTraces = entity.tracesArray.reverse()\n      }\n    } else {\n      if (res.data.logisticsTraces) {\n        logisticsTraces = res.data.logisticsTraces.reverse()\n      }\n    }\n    this.setData({\n      trackingNumber,\n      shipperName,\n      orderDetail: res.data,\n      logisticsTraces\n    });\n  },\n})\n"
  },
  {
    "path": "pages/wuliu/index.json",
    "content": "{\n    \"navigationBarTitleText\": \"物流信息\"\n}"
  },
  {
    "path": "pages/wuliu/index.wxml",
    "content": "<view class=\"container222\">\n    <!-- 顶部物流信息卡片 -->\n    <view class=\"top-header\">\n        <view class=\"header-card\">\n            <view class=\"header-content\">\n                <view class=\"header-icon\">\n                    <view class=\"icon-truck\">🚚</view>\n                </view>\n                <view class=\"header-info\">\n                    <view class=\"info-row\">\n                        <view class=\"info-label\">物流单号</view>\n                        <view class=\"info-value\">{{ trackingNumber }}</view>\n                    </view>\n                    <view class=\"info-row\">\n                        <view class=\"info-label\">物流公司</view>\n                        <view class=\"info-value\">{{ shipperName }}</view>\n                    </view>\n                </view>\n            </view>\n        </view>\n    </view>\n\n    <!-- 物流轨迹时间轴 -->\n    <view class=\"timeline-container\">\n        <view class=\"timeline-header\">\n            <view class=\"timeline-title\">物流轨迹</view>\n            <view class=\"timeline-subtitle\">Package Tracking</view>\n        </view>\n\n        <van-empty wx:if=\"{{ !logisticsTraces || logisticsTraces.length == 0 }}\" description=\"暂无物流信息\" />\n\n        <view class=\"timeline-content\" wx:if=\"{{ logisticsTraces && logisticsTraces.length > 0 }}\">\n            <view class=\"timeline-item {{index === 0 ? 'timeline-item-active' : ''}}\" wx:for=\"{{logisticsTraces}}\" wx:key=\"index\">\n                <!-- 时间轴节点 -->\n                <view class=\"timeline-node\">\n                    <view class=\"node-wrapper\">\n                        <view class=\"node-dot {{index === 0 ? 'node-dot-active' : ''}}\">\n                            <view class=\"dot-inner\" wx:if=\"{{index === 0}}\"></view>\n                        </view>\n                        <view class=\"node-line\" wx:if=\"{{index !== logisticsTraces.length - 1}}\"></view>\n                    </view>\n                </view>\n\n                <!-- 内容卡片 -->\n                <view class=\"timeline-card\">\n                    <view class=\"card-time\">{{item.AcceptTime}}</view>\n                    <view class=\"card-content\">{{item.AcceptStation}}</view>\n                    <view class=\"card-badge\" wx:if=\"{{index === 0}}\">最新</view>\n                </view>\n            </view>\n        </view>\n    </view>\n</view>\n"
  },
  {
    "path": "pages/wuliu/index.wxss",
    "content": "page {\n  min-height: 100vh;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  padding-bottom: 40rpx;\n}\n\n.container {\n  min-height: 100vh;\n}\n\n/* ==================== 顶部物流信息卡片 ==================== */\n.top-header {\n  padding: 40rpx 30rpx 30rpx;\n}\n\n.header-card {\n  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);\n  border-radius: 24rpx;\n  padding: 40rpx 32rpx;\n  box-shadow: 0 8rpx 32rpx rgba(102, 126, 234, 0.25);\n  position: relative;\n  overflow: hidden;\n}\n\n.header-card::before {\n  content: '';\n  position: absolute;\n  top: -50%;\n  right: -20%;\n  width: 300rpx;\n  height: 300rpx;\n  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);\n  border-radius: 50%;\n}\n\n.header-content {\n  display: flex;\n  align-items: flex-start;\n  position: relative;\n  z-index: 1;\n}\n\n.header-icon {\n  margin-right: 24rpx;\n}\n\n.icon-truck {\n  width: 88rpx;\n  height: 88rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  border-radius: 20rpx;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-size: 44rpx;\n  box-shadow: 0 8rpx 16rpx rgba(102, 126, 234, 0.3);\n}\n\n.header-info {\n  flex: 1;\n}\n\n.info-row {\n  margin-bottom: 20rpx;\n}\n\n.info-row:last-child {\n  margin-bottom: 0;\n}\n\n.info-label {\n  font-size: 24rpx;\n  color: #8b8fa3;\n  margin-bottom: 8rpx;\n  font-weight: 500;\n  letter-spacing: 1rpx;\n}\n\n.info-value {\n  font-size: 28rpx;\n  color: #2d3142;\n  font-weight: 600;\n  word-break: break-all;\n}\n\n/* ==================== 物流轨迹容器 ==================== */\n.timeline-container {\n  background: #ffffff;\n  margin: 0 30rpx;\n  border-radius: 24rpx;\n  padding: 40rpx 0;\n  box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);\n}\n\n.timeline-header {\n  padding: 0 40rpx 32rpx;\n  border-bottom: 2rpx solid #f0f1f5;\n}\n\n.timeline-title {\n  font-size: 36rpx;\n  font-weight: 700;\n  color: #2d3142;\n  margin-bottom: 8rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  -webkit-background-clip: text;\n  -webkit-text-fill-color: transparent;\n  background-clip: text;\n}\n\n.timeline-subtitle {\n  font-size: 22rpx;\n  color: #a8adbf;\n  font-weight: 500;\n  letter-spacing: 2rpx;\n  text-transform: uppercase;\n}\n\n/* ==================== 时间轴内容 ==================== */\n.timeline-content {\n  padding: 40rpx 0 20rpx;\n  position: relative;\n}\n\n.timeline-item {\n  display: flex;\n  padding: 0 40rpx;\n  margin-bottom: 32rpx;\n  position: relative;\n  animation: fadeInUp 0.6s ease-out forwards;\n  opacity: 0;\n}\n\n.timeline-item:nth-child(1) { animation-delay: 0.1s; }\n.timeline-item:nth-child(2) { animation-delay: 0.2s; }\n.timeline-item:nth-child(3) { animation-delay: 0.3s; }\n.timeline-item:nth-child(4) { animation-delay: 0.4s; }\n.timeline-item:nth-child(5) { animation-delay: 0.5s; }\n\n@keyframes fadeInUp {\n  from {\n    opacity: 0;\n    transform: translateY(20rpx);\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n\n/* ==================== 时间轴节点 ==================== */\n.timeline-node {\n  width: 48rpx;\n  margin-right: 24rpx;\n  display: flex;\n  justify-content: center;\n  flex-shrink: 0;\n}\n\n.node-wrapper {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  width: 100%;\n  height: 100%;\n}\n\n.node-dot {\n  width: 28rpx;\n  height: 28rpx;\n  border-radius: 50%;\n  background: #e5e7eb;\n  position: relative;\n  flex-shrink: 0;\n  transition: all 0.3s ease;\n}\n\n.node-dot-active {\n  width: 32rpx;\n  height: 32rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  box-shadow: 0 0 0 8rpx rgba(102, 126, 234, 0.15),\n              0 0 0 16rpx rgba(102, 126, 234, 0.08);\n  animation: pulse 2s ease-in-out infinite;\n}\n\n@keyframes pulse {\n  0%, 100% {\n    box-shadow: 0 0 0 8rpx rgba(102, 126, 234, 0.15),\n                0 0 0 16rpx rgba(102, 126, 234, 0.08);\n  }\n  50% {\n    box-shadow: 0 0 0 12rpx rgba(102, 126, 234, 0.2),\n                0 0 0 24rpx rgba(102, 126, 234, 0.1);\n  }\n}\n\n.dot-inner {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n  width: 12rpx;\n  height: 12rpx;\n  border-radius: 50%;\n  background: #ffffff;\n}\n\n.node-line {\n  width: 3rpx;\n  flex: 1;\n  background: linear-gradient(to bottom, #e5e7eb 0%, rgba(229, 231, 235, 0.3) 100%);\n  margin-top: 8rpx;\n  min-height: 60rpx;\n}\n\n.timeline-item-active .node-line {\n  background: linear-gradient(to bottom, \n              rgba(102, 126, 234, 0.3) 0%, \n              rgba(229, 231, 235, 0.3) 100%);\n}\n\n/* ==================== 内容卡片 ==================== */\n.timeline-card {\n  flex: 1;\n  background: #f8f9ff;\n  border-radius: 16rpx;\n  padding: 24rpx 28rpx;\n  position: relative;\n  border: 2rpx solid transparent;\n  transition: all 0.3s ease;\n  margin-bottom: 8rpx;\n}\n\n.timeline-item-active .timeline-card {\n  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);\n  border: 2rpx solid rgba(102, 126, 234, 0.2);\n  box-shadow: 0 4rpx 16rpx rgba(102, 126, 234, 0.15);\n}\n\n.timeline-card::before {\n  content: '';\n  position: absolute;\n  left: -12rpx;\n  top: 24rpx;\n  width: 0;\n  height: 0;\n  border-top: 8rpx solid transparent;\n  border-bottom: 8rpx solid transparent;\n  border-right: 12rpx solid #f8f9ff;\n}\n\n.timeline-item-active .timeline-card::before {\n  border-right-color: #f8f9ff;\n}\n\n.card-time {\n  font-size: 24rpx;\n  color: #8b8fa3;\n  margin-bottom: 12rpx;\n  font-weight: 500;\n  display: flex;\n  align-items: center;\n}\n\n.card-time::before {\n  content: '🕒';\n  margin-right: 8rpx;\n  font-size: 22rpx;\n}\n\n.timeline-item-active .card-time {\n  color: #667eea;\n  font-weight: 600;\n}\n\n.card-content {\n  font-size: 28rpx;\n  color: #2d3142;\n  line-height: 44rpx;\n  font-weight: 500;\n}\n\n.timeline-item-active .card-content {\n  font-weight: 600;\n  color: #1a1d2e;\n}\n\n.card-badge {\n  position: absolute;\n  top: -12rpx;\n  right: 20rpx;\n  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n  color: #ffffff;\n  font-size: 20rpx;\n  padding: 4rpx 16rpx;\n  border-radius: 20rpx;\n  font-weight: 600;\n  box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.4);\n  letter-spacing: 1rpx;\n}\n\n/* ==================== 空状态优化 ==================== */\n.timeline-container van-empty {\n  padding: 80rpx 0;\n}"
  },
  {
    "path": "project.config.json",
    "content": "{\n  \"description\": \"项目配置文件，详见文档：https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html\",\n  \"setting\": {\n    \"urlCheck\": true,\n    \"es6\": true,\n    \"enhance\": true,\n    \"postcss\": false,\n    \"preloadBackgroundData\": false,\n    \"minified\": true,\n    \"newFeature\": true,\n    \"coverView\": true,\n    \"nodeModules\": false,\n    \"autoAudits\": false,\n    \"showShadowRootInWxmlPanel\": true,\n    \"scopeDataCheck\": false,\n    \"uglifyFileName\": false,\n    \"checkInvalidKey\": true,\n    \"checkSiteMap\": true,\n    \"uploadWithSourceMap\": true,\n    \"compileHotReLoad\": true,\n    \"useMultiFrameRuntime\": true,\n    \"babelSetting\": {\n      \"ignore\": [],\n      \"disablePlugins\": [],\n      \"outputPath\": \"\"\n    },\n    \"useIsolateContext\": true,\n    \"userConfirmedBundleSwitch\": false,\n    \"packNpmManually\": false,\n    \"packNpmRelationList\": [],\n    \"minifyWXSS\": true,\n    \"disableUseStrict\": false,\n    \"minifyWXML\": true,\n    \"showES6CompileOption\": false,\n    \"useCompilerPlugins\": false,\n    \"ignoreUploadUnusedFiles\": true,\n    \"useStaticServer\": true,\n    \"condition\": false\n  },\n  \"compileType\": \"miniprogram\",\n  \"simulatorType\": \"wechat\",\n  \"simulatorPluginLibVersion\": {},\n  \"condition\": {\n    \"plugin\": {\n      \"list\": []\n    },\n    \"game\": {\n      \"list\": []\n    },\n    \"gamePlugin\": {\n      \"list\": []\n    },\n    \"miniprogram\": {\n      \"list\": []\n    }\n  },\n  \"editorSetting\": {\n    \"tabIndent\": \"insertSpaces\",\n    \"tabSize\": 2\n  },\n  \"packOptions\": {\n    \"ignore\": [],\n    \"include\": []\n  },\n  \"appid\": \"wxa46b09d413fbcaff\"\n}"
  },
  {
    "path": "project.private.config.json",
    "content": "{\n  \"setting\": {\n    \"compileHotReLoad\": true,\n    \"urlCheck\": false,\n    \"bigPackageSizeSupport\": false\n  },\n  \"condition\": {},\n  \"description\": \"项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档：https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html\",\n  \"libVersion\": \"3.14.1\",\n  \"projectname\": \"%E5%A4%A9%E4%BD%BF%E7%AB%A5%E8%A3%85\"\n}"
  },
  {
    "path": "sitemap.json",
    "content": "{\n  \"desc\": \"关于本文件的更多信息，请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html\",\n  \"rules\": [{\n  \"action\": \"allow\",\n  \"page\": \"*\"\n  }]\n}"
  },
  {
    "path": "typings/wx.d.ts",
    "content": "// generate time:2017-08-23 21:12:06 \n// Type definitions for wx app\n// Definitions by: hellopao <https://github.com/hellopao/wx.d.ts>\n\n/************************************************\n*                                               *\n*                 微信小程序  API                *\n*                                               *\n************************************************/\n\ninterface IAnimation {\n    /**\n     * 透明度，参数范围 0~1\n     */\n    opacity(value: number): IAnimation;\n    /**\n     * 颜色值\n     */\n    backgroundColor(color: string): IAnimation;\n    /**\n     * 长度值，如果传入 Number 则默认使用 px，可传入其他自定义单位的长度值\n     */\n    width(length: number): IAnimation;\n    /**\n     * 长度值，如果传入 Number 则默认使用 px，可传入其他自定义单位的长度值\n     */\n    height(length: number): IAnimation;\n    /**\n     * 长度值，如果传入 Number 则默认使用 px，可传入其他自定义单位的长度值\n     */\n    top(length: number): IAnimation;\n    /**\n     * 长度值，如果传入 Number 则默认使用 px，可传入其他自定义单位的长度值\n     */\n    left(length: number): IAnimation;\n    /**\n     * 长度值，如果传入 Number 则默认使用 px，可传入其他自定义单位的长度值\n     */\n    bottom(length: number): IAnimation;\n    /**\n     * 长度值，如果传入 Number 则默认使用 px，可传入其他自定义单位的长度值\n     */\n    right(length: number): IAnimation;\n    /**\n     * deg的范围-180~180，从原点顺时针旋转一个deg角度\n     */\n    rotate(deg: number): IAnimation;\n    /**\n     * deg的范围-180~180，在X轴旋转一个deg角度\n     */\n    rotateX(deg: number): IAnimation;\n    /**\n     * deg的范围-180~180，在Y轴旋转一个deg角度\n     */\n    rotateY(deg: number): IAnimation;\n    /**\n     * deg的范围-180~180，在Z轴旋转一个deg角度\n     */\n    rotateZ(deg: number): IAnimation;\n    /**\n     * 同transform-function rotate3d\n     */\n    rotate3d(x: number, y: number, z: number, deg: number): IAnimation;\n    /**\n     * 一个参数时，表示在X轴、Y轴同时缩放sx倍数；两个参数时表示在X轴缩放sx倍数，在Y轴缩放sy倍数\n     */\n    scale(sx: number, sy?: number): IAnimation;\n    /**\n     * 在X轴缩放sx倍数\n     */\n    scaleX(sx: number): IAnimation;\n    /**\n     * 在Y轴缩放sy倍数\n     */\n    scaleY(sy: number): IAnimation;\n    /**\n     * 在Z轴缩放sy倍数\n     */\n    scaleZ(sz: number): IAnimation;\n    /**\n     * 在X轴缩放sx倍数，在Y轴缩放sy倍数，在Z轴缩放sz倍数\n     */\n    scale3d(sx: number, sy: number, sz: number): IAnimation;\n    /**\n     * 一个参数时，表示在X轴偏移tx，单位px；两个参数时，表示在X轴偏移tx，在Y轴偏移ty，单位px。\n     */\n    translate(tx: number, ty?: number): IAnimation;\n    /**\n     * 在X轴偏移tx，单位px\n     */\n    translateX(tx: number): IAnimation;\n    /**\n     * 在Y轴偏移tx，单位px\n     */\n    translateY(tx: number): IAnimation;\n    /**\n     * 在Z轴偏移tx，单位px\n     */\n    translateZ(tx: number): IAnimation;\n    /**\n     * 在X轴偏移tx，在Y轴偏移ty，在Z轴偏移tz，单位px\n     */\n    translate3d(tx: number, ty: number, tz: number): IAnimation;\n    /**\n     * 参数范围-180~180；一个参数时，Y轴坐标不变，X轴坐标延顺时针倾斜ax度；两个参数时，分别在X轴倾斜ax度，在Y轴倾斜ay度\n     */\n    skew(ax: number, ay?: number): IAnimation;\n    /**\n     * 参数范围-180~180；Y轴坐标不变，X轴坐标延顺时针倾斜ax度\n     */\n    skewX(ax: number): IAnimation;\n    /**\n     * 参数范围-180~180；X轴坐标不变，Y轴坐标延顺时针倾斜ay度\n     */\n    skewY(ay: number): IAnimation;\n    /**\n     * 同transform-function matrix\n     */\n    matrix(a, b, c, d, tx, ty): IAnimation;\n    /**\n     * 同transform-function matrix3d\n     */\n    matrix3d(): IAnimation;\n}\n\ninterface ICanvasContext {\n    /**\n     * 设置填充色, 如果没有设置 fillStyle，默认颜色为 black。\n     */\n    setFillStyle(color: string): void;\n    /**\n     * 设置边框颜色, 如果没有设置 fillStyle，默认颜色为 black。\n     */\n    setStrokeStyle(color: string): void;\n    /**\n     * 设置阴影\n     */\n    setShadow(offsetX: number, offsetY: number, blur: number, color: string): void;\n    /**\n     * 创建一个线性的渐变颜色。需要使用 addColorStop() 来指定渐变点，至少要两个。\n     */ \n    createLinearGradient(x0: number, y0: number, x1: number, y1: number): void;\n    /**\n     * 创建一个圆形的渐变颜色。 起点在圆心，终点在圆环。 需要使用 addColorStop() 来指定渐变点，至少要两个。\n     */\n    createCircularGradient(x: number, y: number, r: number): void;\n    /**\n     * 创建一个颜色的渐变点。小于最小 stop 的部分会按最小 stop 的 color 来渲染，大于最大 stop 的部分会按最大 stop 的 color 来渲染。需要使用 addColorStop() 来指定渐变点，至少要两个。\n     */\n    addColorStop(stop: number, color: string): void;\n    /**\n     * 设置线条端点的样式\n     */\n    setLineCap(lineCap: 'butt' | 'round' | 'square'): void;\n    /**\n     * 设置两线相交处的样式\n     */\n    setLineJoin(lineJoin: 'bevel' | 'round' | 'miter'): void;\n    /**\n     * 设置线条宽度\n     */\n    setLineWidth(lineWidth: number): void;\n    /**\n     * 设置最大倾斜\n     */\n    setMiterLimit(miterLimit: number): void;\n    /**\n     * 添加一个矩形路径到当前路径。\n     */\n    rect(x: number, y: number, width: number, height: number): void;\n    /** \n     * 填充一个矩形。用 setFillStyle() 设置矩形的填充色，如果没设置默认是黑色。\n     */\n    fillRect(x: number, y: number, width: number, height: number): void;\n    /** \n     * 一个矩形(非填充)。用 setFillStroke() 设置矩形线条的颜色，如果没设置默认是黑色。\n     */\n    strokeRect(x: number, y: number, width: number, height: number): void;\n    /**\n     * 在给定的矩形区域内，清除画布上的像素\n     */\n    clearRect(x: number, y: number, width: number, height: number): void;\n    /**\n     * 对当前路径进行填充\n     */\n    fill(): void;\n    /**\n     * 对当前路径进行描边\n     */\n    stroke(): void;\n    /**\n     * 开始一个路径\n     */\n    beginPath(): void;\n    /**\n     * 关闭一个路径\n     */\n    closePath(): void;\n    /**\n     * 把路径移动到画布中的指定点，但不创建线条。\n     */\n    moveTo(x: number, y: number): void;\n    /**\n     * 添加一个新点，然后在画布中创建从该点到最后指定点的线条。\n     */\n    lineTo(x: number, y: number): void;\n    /**\n     * 添加一个弧形路径到当前路径，顺时针绘制。\n     */\n    arc(x: number, y: number, radius: number, startAngle: number, sweepAngle: number): void;\n    /**\n     * 创建二次方贝塞尔曲线\n     */\n    quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;\n    /**\n     * 创建三次方贝塞尔曲线\n     */\n    bezierCurveTo(cpx1: number, cpy1: number, cpx2: number, cpy2: number, x: number, y: number): void;\n    /**\n     * 对横纵坐标进行缩放\n     */\n    scale(scaleWidth: number/**横坐标缩放的倍数1 = 100%，0.5 = 50%，2 = 200%，依次类 */, scaleHeight: number/**\t纵坐标轴缩放的倍数1 = 100%，0.5 = 50%，2 = 200%，依次类 */): void;\n    /**\n     * 对坐标轴进行顺时针旋转\n     */\n    rotate(deg: number/**degrees * Math.PI/180；degrees范围为0~360;旋转角度，以弧度计 */): void;\n    /**\n     * 对坐标原点进行缩放\n     */\n    translate(x: number/**水平坐标平移量 */, y: number/**竖直坐标平移量 */): void;\n    /**\n     * 在画布上绘制被填充的文本\n     */\n    fillText(text: string, x: number, y: number): void;\n    /**\n     * 设置字体大小\n     */\n    setFontSize(fontSize: number): void;\n    /**\n     * 在画布上绘制图像\n     */\n    drawImage(imageResource: string, x: number, y: number, width: number, height: number): void;\n    /** \n     * 设置全局画笔透明度。\n     */\n    setGlobalAlpha(alpha: number): void;\n    /**\n     * 保存当前坐标轴的缩放、旋转、平移信息\n     */\n    save(): void;\n    /**\n     * 恢复之前保存过的坐标轴的缩放、旋转、平移信息\n     */\n    restore(): void;\n    /**\n     * 进行绘图\n     */\n    draw(): void;\n}\n\ninterface IAudioContext {\n    /**\n     * 播放 \n     */\n    play: () => void;\t\n    /**\n     * 暂停 \n     */\n    pause: () => void;\t\n    /**\n     * 跳转到指定位置，单位 s\n     */\n    seek: (position: number) => void;\t\n}\n\ninterface IVideoContext {\n    /**\n     * 播放 \n     */\n    play: () => void;\t\n    /**\n     * 暂停 \n     */\n    pause: () => void;\t\n    /**\n     * 跳转到指定位置，单位 s\n     */\n    seek: (position: number) => void;\n    /**\n     * 发送弹幕，danmu 包含两个属性 text, color。\n     */\n    sendDanmu: (danmu: {text: string; color: string;}) => void;\n}\n\ninterface IMapContext {\n    /**\n     * 获取当前地图中心的经纬度，返回的是 gcj02 坐标系，可以用于 wx.openLocation\n     */\n    getCenterLocation: (obj: {\n        /** \n         * 接口调用成功的回调函数 ，res = { longitude: \"经度\", latitude: \"纬度\"}\n         */\n        success?: (res: {longitude: string; latitude: string}) => void;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: () => void;\n        /** \n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: () => void;\n    }) => void;\n    /**\n     * 将地图中心移动到当前定位点，需要配合map组件的show-location使用\n     */\n    moveToLocation: () => void;\n}\n\ninterface Application {\n    setData: (obj: any) => void;\n}\n\ninterface AppConstructor {\n    new (): Application;\n    (opts: {\n        /**\n         * 生命周期函数--监听小程序初始化\n         */\n        onLaunch?: () => void;\n        /**\n         * 生命周期函数--监听小程序显示\n         */\n        onShow?: () => void;\n        /**\n         * 生命周期函数--监听小程序隐藏\n         */\n        onHide?: () => void;\n\n        [key: string]: any;\n    }): Application;\n}\n\ndeclare var App: AppConstructor;\ndeclare function getApp(): Application;\n\ndeclare function getCurrentPages(): Page[];\n\ninterface Page {\n    setData: (obj: any) => void;\n}\n\ninterface PageConstructor {\n    new (): Page;\n    (opts: {\n        /**\n         * 页面的初始数据\n         */\n        data?: any;\n        /**\n         * 页面的初始数据\n         */\n        onLoad?: () => void;\n        /**\n         * 生命周期函数--监听页面初次渲染完成\n         */\n        onReady?: () => void;\n        /**\n         * 生命周期函数--监听页面显示\n         */\n        onShow?: () => void;\n        /**\n         * 生命周期函数--监听页面隐藏\n         */\n        onHide?: () => void;\n        /**\n         * 生命周期函数--监听页面卸载\n         */\n        onUnload?: () => void;\n        /**\n         * 页面相关事件处理函数--监听用户下拉动作\n         */\n        onPullDownRefreash?: () => void;\n        /**\n         * 页面上拉触底事件的处理函数\n         */\n        onReachBottom?: () => void;\n        /**\n         * 用户点击右上角分享\n         */\n        onShareAppMessage?: () => {\n            /**\n             * 分享标题, 默认值当前小程序名称\n             */\n            title: string;\n            /**\n             * 分享描述, 默认值当前小程序名称\n             */\n            desc: string;\n            /**\n             * 分享路径\t默认值当前页面 path ，必须是以 / 开头的完整路径\n             */\n            path: string;\n        };\t\n\n        [key: string]: any;\n    }): Page;\n}\n\ndeclare var Page: PageConstructor;\n\ndeclare var wx: {\n    // # 网络 # \n    \n    request(obj: {\n        /**\n         * 开发者服务器接口地址\n         */\n        url: string;\n        /**\n         * 请求的参数\n         */\n        data?: any | string;\n        /**\n         * 设置请求的 header , header 中不能设置 Referer\n         */\n        header?: any;\n        /**\n         * 默认为 GET，有效值：OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT\n         */\n        method?: string;\n        /**\n         * 默认为 json。如果设置了 dataType 为 json，则会尝试对响应的数据做一次 JSON.parse\n         */\n        dataType?: string;\n        /**\n         * 收到开发者服务成功返回的回调函数，res = {data: '开发者服务器返回的内容'}\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 将本地资源上传到开发者服务器。如页面通过 wx.chooseImage 等接口获取到一个本地资源的临时文件路径后，可通过此接口将本地资源上传到指定服务器。客户端发起一个 HTTPS POST 请求，其中 content-type 为 multipart/form-data 。\n     */\n    uploadFile(obj: {\n        /**\n         * 开发者服务器 url\n         */\n        url: string;\n        /**\n         * 要上传文件资源的路径\n         */\n        filePath: string;\n        /**\n         * 文件对应的 key , 开发者在服务器端通过这个 key 可以获取到文件二进制内容\n         */\n        name: string;\n        /**\n         * HTTP 请求 Header , header 中不能设置 Referer\n         */\n        header?: any;\n        /**\n         * HTTP 请求中其他额外的 form data\n         */\n        formData?: any;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 下载文件资源到本地。客户端直接发起一个 HTTP GET 请求，返回文件的本地临时路径。\n     */\n    downloadFile(obj: {\n        /**\n         * 下载资源的 url\n         */\n        url: string;\n        /**\n         * HTTP 请求 Header\n         */\n        header?: any;\n        /**\n         * 下载成功后以 tempFilePath 的形式传给页面，res = {tempFilePath: '文件的临时路径'}\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 创建一个 WebSocket 连接；一个微信小程序同时只能有一个 WebSocket 连接，如果当前已存在一个 WebSocket 连接，会自动关闭该连接，并重新创建一个 WebSocket 连接。\n     */\n    connectSocket(obj: {\n        /**\n         * 开发者服务器接口地址，必须是 wss 协议，且域名必须是后台配置的合法域名\n         */\n        url: string;\n        /**\n         * 请求的数据\n         */\n        data?: any;\n        /**\n         * HTTP Header , header 中不能设置 Referer\n         */\n        header?: any;\n        /**\n         * 默认是GET，有效值： OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT\n         */\n        method?: string;\n        /**\n         * 子协议数组\n         */\n        protocols?: string[];\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 监听WebSocket连接打开事件。\n     */\n    onSocketOpen(callback: Function): void;\n                    \n    /**\n     * 监听WebSocket错误。\n     */\n    onSocketError(callback: Function): void;\n                    \n    /**\n     * 通过 WebSocket 连接发送数据，需要先 wx.connectSocket，并在 wx.onSocketOpen 回调之后才能发送。\n     */\n    sendSocketMessage(obj: {\n        /**\n         * 需要发送的内容\n         */\n        data: undefined;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 监听WebSocket接受到服务器的消息事件。\n     */\n    onSocketMessage(callback: Function): void;\n                    \n    /**\n     * 关闭WebSocket连接。\n     */\n    closeSocket(obj: {\n        /**\n         * 一个数字值表示关闭连接的状态号，表示连接被关闭的原因。如果这个参数没有被指定，默认的取值是1000 （表示正常连接关闭）\n         */\n        code?: number;\n        /**\n         * 一个可读的字符串，表示连接被关闭的原因。这个字符串必须是不长于123字节的UTF-8 文本（不是字符）\n         */\n        reason?: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 监听WebSocket关闭。\n     */\n    onSocketClose(callback: Function): void;\n                    \n    // # 媒体 # \n    \n    /**\n     * 从本地相册选择图片或使用相机拍照。\n     */\n    chooseImage(obj: {\n        /**\n         * 最多可以选择的图片张数，默认9\n         */\n        count?: number;\n        /**\n         * original 原图，compressed 压缩图，默认二者都有\n         */\n        sizeType?: string[];\n        /**\n         * album 从相册选图，camera 使用相机，默认二者都有\n         */\n        sourceType?: string[];\n        /**\n         * 成功则返回图片的本地文件路径列表 tempFilePaths\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 预览图片。\n     */\n    previewImage(obj: {\n        /**\n         * 当前显示图片的链接，不填则默认为 urls 的第一张\n         */\n        current?: string;\n        /**\n         * 需要预览的图片链接列表\n         */\n        urls: string[];\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 获取图片信息\n     */\n    getImageInfo(obj: {\n        /**\n         * 图片的路径，可以是相对路径，临时文件路径，存储文件路径，网络图片路径\n         */\n        src: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    saveImageToPhotosAlbum(obj: {\n        /**\n         * 图片文件路径，可以是临时文件路径也可以是永久文件路径，不支持网络图片路径\n         */\n        filePath: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 开始录音。当主动调用wx.stopRecord，或者录音超过1分钟时自动结束录音，返回录音文件的临时文件路径。当用户离开小程序时，此接口无法调用。\n     */\n    startRecord(obj: {\n        /**\n         * 录音成功后调用，返回录音文件的临时文件路径，res = {tempFilePath: '录音文件的临时路径'}\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * ​    主动调用停止录音。\n     */\n    stopRecord(): void;\n                    \n    /**\n     * 开始播放语音，同时只允许一个语音文件正在播放，如果前一个语音文件还没播放完，将中断前一个语音播放。\n     */\n    playVoice(obj: {\n        /**\n         * 需要播放的语音文件的文件路径\n         */\n        filePath: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 暂停正在播放的语音。再次调用wx.playVoice播放同一个文件时，会从暂停处开始播放。如果想从头开始播放，需要先调用 wx.stopVoice。\n     */\n    pauseVoice(): void;\n                    \n    /**\n     * 结束播放语音。\n     */\n    stopVoice(): void;\n                    \n    /**\n     * 获取后台音乐播放状态。\n     */\n    getBackgroundAudioPlayerState(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 使用后台播放器播放音乐，对于微信客户端来说，只能同时有一个后台音乐在播放。当用户离开小程序后，音乐将暂停播放；当用户点击“显示在聊天顶部”时，音乐不会暂停播放；当用户在其他小程序占用了音乐播放器，原有小程序内的音乐将停止播放。\n     */\n    playBackgroundAudio(obj: {\n        /**\n         * 音乐链接，目前支持的格式有 m4a, aac, mp3, wav\n         */\n        dataUrl: string;\n        /**\n         * 音乐标题\n         */\n        title?: string;\n        /**\n         * 封面URL\n         */\n        coverImgUrl?: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 暂停播放音乐。\n     */\n    pauseBackgroundAudio(): void;\n                    \n    /**\n     * 控制音乐播放进度。\n     */\n    seekBackgroundAudio(obj: {\n        /**\n         * 音乐位置，单位：秒\n         */\n        position: number;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 停止播放音乐。\n     */\n    stopBackgroundAudio(): void;\n                    \n    /**\n     * 监听音乐播放。\n     */\n    onBackgroundAudioPlay(callback: Function): void;\n                    \n    /**\n     * 监听音乐暂停。\n     */\n    onBackgroundAudioPause(callback: Function): void;\n                    \n    /**\n     * 监听音乐停止。\n     */\n    onBackgroundAudioStop(callback: Function): void;\n                    \n    getBackgroundAudioManager(): void;\n                    \n    /**\n     * 创建并返回 audio 上下文 audioContext 对象\n     */\n    createAudioContext(audioId: string): IAudioContext;\n                    \n    /**\n     * 拍摄视频或从手机相册中选视频，返回视频的临时文件路径。\n     */\n    chooseVideo(obj: {\n        /**\n         * album 从相册选视频，camera 使用相机拍摄，默认为：['album', 'camera']\n         */\n        sourceType?: string[];\n        /**\n         * 拍摄视频最长拍摄时间，单位秒。最长支持 60 秒\n         */\n        maxDuration?: number;\n        /**\n         * 默认调起的为前置还是后置摄像头。front: 前置，back: 后置，默认 back\n         */\n        camera?: string;\n        /**\n         * 接口调用成功，返回视频文件的临时文件路径，详见返回参数说明\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    saveVideoToPhotosAlbum(obj: {\n        /**\n         * 视频文件路径，可以是临时文件路径也可以是永久文件路径\n         */\n        filePath: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 创建并返回 video 上下文 videoContext 对象\n     */\n    createVideoContext(videoId: string): IVideoContext;\n                    \n    // # 文件 # \n    \n    /**\n     * 保存文件到本地。\n     */\n    saveFile(obj: {\n        /**\n         * 需要保存的文件的临时路径\n         */\n        tempFilePath: string;\n        /**\n         * 返回文件的保存路径，res = {savedFilePath: '文件的保存路径'}\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 获取本地已保存的文件列表\n     */\n    getSavedFileList(obj: {\n        /**\n         * 接口调用成功的回调函数，返回结果见success返回参数说明\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 获取本地文件的文件信息。此接口只能用于获取已保存到本地的文件，若需要获取临时文件信息，请使用 wx.getFileInfo 接口。\n     */\n    getSavedFileInfo(obj: {\n        /**\n         * 文件路径\n         */\n        filePath: string;\n        /**\n         * 接口调用成功的回调函数，返回结果见success返回参数说明\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 删除本地存储的文件\n     */\n    removeSavedFile(obj: {\n        /**\n         * 需要删除的文件路径\n         */\n        filePath: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 新开页面打开文档，支持格式：doc, xls, ppt, pdf, docx, xlsx, pptx\n     */\n    openDocument(obj: {\n        /**\n         * 文件路径，可通过 downFile 获得\n         */\n        filePath: string;\n        /**\n         * 文件类型，指定文件类型打开文件，有效值 doc, xls, ppt, pdf, docx, xlsx, pptx\n         */\n        fileType?: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    getFileInfo(obj: {\n        /**\n         * 本地文件路径\n         */\n        filePath: string;\n        /**\n         * 计算文件摘要的算法，默认值 md5，有效值：md5，sha1\n         */\n        digestAlgorithm?: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    // # 数据缓存 # \n    \n    /**\n     * 将数据存储在本地缓存中指定的 key 中，会覆盖掉原来该 key 对应的内容，这是一个异步接口。\n     */\n    setStorage(obj: {\n        /**\n         * 本地缓存中的指定的 key\n         */\n        key: string;\n        /**\n         * 需要存储的内容\n         */\n        data: any;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 将 data 存储在本地缓存中指定的 key 中，会覆盖掉原来该 key 对应的内容，这是一个同步接口。\n     */\n    setStorageSync(key: string, data: any, ): void;\n                    \n    /**\n     * 从本地缓存中异步获取指定 key 对应的内容。\n     */\n    getStorage(obj: {\n        /**\n         * 本地缓存中的指定的 key\n         */\n        key: string;\n        /**\n         * 接口调用的回调函数,res = {data: key对应的内容}\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 从本地缓存中同步获取指定 key 对应的内容。\n     */\n    getStorageSync(key: string): void;\n                    \n    /**\n     * 异步获取当前storage的相关信息\n     */\n    getStorageInfo(obj: {\n        /**\n         * 接口调用的回调函数，详见返回参数说明\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 同步获取当前storage的相关信息\n     */\n    getStorageInfoSync(): void;\n                    \n    /**\n     * 从本地缓存中异步移除指定 key 。\n     */\n    removeStorage(obj: {\n        /**\n         * 本地缓存中的指定的 key\n         */\n        key: string;\n        /**\n         * 接口调用的回调函数\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 从本地缓存中同步移除指定 key 。\n     */\n    removeStorageSync(key: string): void;\n                    \n    /**\n     * 清理本地数据缓存。\n     */\n    clearStorage(): void;\n                    \n    /**\n     * 同步清理本地数据缓存\n     */\n    clearStorageSync(): void;\n                    \n    // # 位置 # \n    \n    /**\n     * 获取当前的地理位置、速度。当用户离开小程序后，此接口无法调用；当用户点击“显示在聊天顶部”时，此接口可继续调用。\n     */\n    getLocation(obj: {\n        /**\n         * 默认为 wgs84 返回 gps 坐标，gcj02 返回可用于wx.openLocation的坐标\n         */\n        type?: string;\n        /**\n         * 接口调用成功的回调函数，返回内容详见返回参数说明。\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 打开地图选择位置\n     */\n    chooseLocation(obj: {\n        /**\n         * 接口调用成功的回调函数，返回内容详见返回参数说明。\n         */\n        success: Function;\n        /**\n         * 用户取消时调用\n         */\n        cancel?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * ​    使用微信内置地图查看位置\n     */\n    openLocation(obj: {\n        /**\n         * 纬度，范围为-90~90，负数表示南纬\n         */\n        latitude: number;\n        /**\n         * 经度，范围为-180~180，负数表示西经\n         */\n        longitude: number;\n        /**\n         * 缩放比例，范围5~18，默认为18\n         */\n        scale?: number;\n        /**\n         * 位置名\n         */\n        name?: string;\n        /**\n         * 地址的详细说明\n         */\n        address?: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 创建并返回 map 上下文 mapContext 对象\n     */\n    createMapContext(mapId: string): IMapContext;\n                    \n    // # 设备 # \n    \n    /**\n     * 获取系统信息。\n     */\n    getSystemInfo(obj: {\n        /**\n         * 接口调用成功的回调\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 获取系统信息同步接口\n     */\n    getSystemInfoSync(): void;\n                    \n    /**\n     * 获取网络类型。\n     */\n    getNetworkType(obj: {\n        /**\n         * 接口调用成功，返回网络类型 networkType\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    onNetworkStatusChange(callback: Function): void;\n                    \n    setScreenBrightness(obj: {\n        /**\n         * 屏幕亮度值，范围 0~1，0 最暗，1 最亮\n         */\n        value: number;\n        /**\n         * 接口调用成功\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    getScreenBrightness(obj: {\n        /**\n         * 接口调用成功\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    vibrateLong(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    vibrateShort(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 监听加速度数据，频率：5次/秒，接口调用后会自动开始监听，可使用 wx.stopAccelerometer 停止监听。\n     */\n    onAccelerometerChange(callback: Function): void;\n                    \n    startAccelerometer(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    stopAccelerometer(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 监听罗盘数据，频率：5次/秒，接口调用后会自动开始监听，可使用wx.stopCompass停止监听。\n     */\n    onCompassChange(callback: Function): void;\n                    \n    startCompass(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    stopCompass(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    makePhoneCall(obj: {\n        /**\n         * 需要拨打的电话号码\n         */\n        phoneNumber: string;\n        /**\n         * 接口调用成功的回调\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 调起客户端扫码界面，扫码成功后返回对应的结果\n     */\n    scanCode(obj: {\n        /**\n         * 是否只能从相机扫码，不允许从相册选择图片\n         */\n        onlyFromCamera?: boolean;\n        /**\n         * 接口调用成功的回调函数，返回内容详见返回参数说明。\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    setClipboardData(obj: {\n        /**\n         * 需要设置的内容\n         */\n        data: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    getClipboardData(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    openBluetoothAdapter(obj: {\n        /**\n         * 成功则返回成功初始化信息\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    closeBluetoothAdapter(obj: {\n        /**\n         * 成功则返回成功关闭模块信息\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    getBluetoothAdapterState(obj: {\n        /**\n         * 成功则返回本机蓝牙适配器状态\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    onBluetoothAdapterStateChange(callback: Function): void;\n                    \n    startBluetoothDevicesDiscovery(obj: {\n        /**\n         * 蓝牙设备主 service 的 uuid 列表\n         */\n        services?: Array<any>;\n        /**\n         * 是否允许重复上报同一设备， 如果允许重复上报，则onDeviceFound 方法会多次上报同一设备，但是 RSSI 值会有不同\n         */\n        allowDuplicatesKey?: boolean;\n        /**\n         * 上报设备的间隔，默认为0，意思是找到新设备立即上报，否则根据传入的间隔上报\n         */\n        interval?: number;\n        /**\n         * 成功则返回本机蓝牙适配器状态\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    stopBluetoothDevicesDiscovery(obj: {\n        /**\n         * 成功则返回本机蓝牙适配器状态\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    getBluetoothDevices(obj: {\n        /**\n         * 成功则返回本机蓝牙适配器状态\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    onBluetoothDeviceFound(callback: Function): void;\n                    \n    getConnectedBluetoothDevices(obj: {\n        /**\n         * 蓝牙设备主 service 的 uuid 列表\n         */\n        services: Array<any>;\n        /**\n         * 成功则返回本机蓝牙适配器状态\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    createBLEConnection(obj: {\n        /**\n         * 蓝牙设备 id，参考 getDevices 接口\n         */\n        deviceId: string;\n        /**\n         * 成功则返回本机蓝牙适配器状态\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    closeBLEConnection(obj: {\n        /**\n         * 蓝牙设备 id，参考 getDevices 接口\n         */\n        deviceId: string;\n        /**\n         * 成功则返回本机蓝牙适配器状态\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    getBLEDeviceServices(obj: {\n        /**\n         * 蓝牙设备 id，参考 getDevices 接口\n         */\n        deviceId: string;\n        /**\n         * 成功则返回本机蓝牙适配器状态\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    getBLEDeviceCharacteristics(obj: {\n        /**\n         * 蓝牙设备 id，参考 device 对象\n         */\n        deviceId: string;\n        /**\n         * 蓝牙服务 uuid\n         */\n        serviceId: string;\n        /**\n         * 成功则返回本机蓝牙适配器状态\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    readBLECharacteristicValue(obj: {\n        /**\n         * 蓝牙设备 id，参考 device 对象\n         */\n        deviceId: string;\n        /**\n         * 蓝牙特征值对应服务的 uuid\n         */\n        serviceId: string;\n        /**\n         * 蓝牙特征值的 uuid\n         */\n        characteristicId: string;\n        /**\n         * 成功则返回本机蓝牙适配器状态\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    writeBLECharacteristicValue(obj: {\n        /**\n         * 蓝牙设备 id，参考 device 对象\n         */\n        deviceId: string;\n        /**\n         * 蓝牙特征值对应服务的 uuid\n         */\n        serviceId: string;\n        /**\n         * 蓝牙特征值的 uuid\n         */\n        characteristicId: string;\n        /**\n         * 蓝牙设备特征值对应的二进制值（注意：vConsole 无法打印出 ArrayBuffer 类型数据）\n         */\n        value: undefined;\n        /**\n         * 成功则返回本机蓝牙适配器状态\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    notifyBLECharacteristicValueChange(obj: {\n        /**\n         * 蓝牙设备 id，参考 device 对象\n         */\n        deviceId: string;\n        /**\n         * 蓝牙特征值对应服务的 uuid\n         */\n        serviceId: string;\n        /**\n         * 蓝牙特征值的 uuid\n         */\n        characteristicId: string;\n        /**\n         * true: 启用 notify; false: 停用 notify\n         */\n        state: boolean;\n        /**\n         * 成功则返回本机蓝牙适配器状态\n         */\n        success: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    onBLEConnectionStateChange(callback: Function): void;\n                    \n    onBLECharacteristicValueChange(callback: Function): void;\n                    \n    startBeaconDiscovery(obj: {\n        /**\n         * iBeacon设备广播的 uuids\n         */\n        uuids: string[];\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    stopBeaconDiscovery(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    getBeacons(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    onBeaconUpdate(callback: Function): void;\n                    \n    onBeaconServiceChange(callback: Function): void;\n                    \n    onUserCaptureScreen(callback: Function): void;\n                    \n    addPhoneContact(obj: {\n        /**\n         * 头像本地文件路径\n         */\n        photoFilePath?: string;\n        /**\n         * 昵称\n         */\n        nickName?: string;\n        /**\n         * 姓氏\n         */\n        lastName?: string;\n        /**\n         * 中间名\n         */\n        middleName?: string;\n        /**\n         * 名字\n         */\n        firstName: string;\n        /**\n         * 备注\n         */\n        remark?: string;\n        /**\n         * 手机号\n         */\n        mobilePhoneNumber?: string;\n        /**\n         * 微信号\n         */\n        weChatNumber?: string;\n        /**\n         * 联系地址国家\n         */\n        addressCountry?: string;\n        /**\n         * 联系地址省份\n         */\n        addressState?: string;\n        /**\n         * 联系地址城市\n         */\n        addressCity?: string;\n        /**\n         * 联系地址街道\n         */\n        addressStreet?: string;\n        /**\n         * 联系地址邮政编码\n         */\n        addressPostalCode?: string;\n        /**\n         * 公司\n         */\n        organization?: string;\n        /**\n         * 职位\n         */\n        title?: string;\n        /**\n         * 工作传真\n         */\n        workFaxNumber?: string;\n        /**\n         * 工作电话\n         */\n        workPhoneNumber?: string;\n        /**\n         * 公司电话\n         */\n        hostNumber?: string;\n        /**\n         * 电子邮件\n         */\n        email?: string;\n        /**\n         * 网站\n         */\n        url?: string;\n        /**\n         * 工作地址国家\n         */\n        workAddressCountry?: string;\n        /**\n         * 工作地址省份\n         */\n        workAddressState?: string;\n        /**\n         * 工作地址城市\n         */\n        workAddressCity?: string;\n        /**\n         * 工作地址街道\n         */\n        workAddressStreet?: string;\n        /**\n         * 工作地址邮政编码\n         */\n        workAddressPostalCode?: string;\n        /**\n         * 住宅传真\n         */\n        homeFaxNumber?: string;\n        /**\n         * 住宅电话\n         */\n        homePhoneNumber?: string;\n        /**\n         * 住宅地址国家\n         */\n        homeAddressCountry?: string;\n        /**\n         * 住宅地址省份\n         */\n        homeAddressState?: string;\n        /**\n         * 住宅地址城市\n         */\n        homeAddressCity?: string;\n        /**\n         * 住宅地址街道\n         */\n        homeAddressStreet?: string;\n        /**\n         * 住宅地址邮政编码\n         */\n        homeAddressPostalCode?: string;\n        /**\n         * 接口调用成功\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    // # 界面 # \n    \n    /**\n     * 显示消息提示框\n     */\n    showToast(obj: {\n        /**\n         * 提示的内容\n         */\n        title: string;\n        /**\n         * 图标，有效值 \"success\", \"loading\"\n         */\n        icon?: string;\n        /**\n         * 自定义图标的本地路径，image 的优先级高于 icon\n         */\n        image?: string;\n        /**\n         * 提示的延迟时间，单位毫秒，默认：1500\n         */\n        duration?: number;\n        /**\n         * 是否显示透明蒙层，防止触摸穿透，默认：false\n         */\n        mask?: boolean;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    showLoading(obj: {\n        /**\n         * 提示的内容\n         */\n        title: string;\n        /**\n         * 是否显示透明蒙层，防止触摸穿透，默认：false\n         */\n        mask?: boolean;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 隐藏消息提示框\n     */\n    hideToast(): void;\n                    \n    hideLoading(): void;\n                    \n    /**\n     * ​显示模态弹窗\n     */\n    showModal(obj: {\n        /**\n         * 提示的标题\n         */\n        title: string;\n        /**\n         * 提示的内容\n         */\n        content: string;\n        /**\n         * 是否显示取消按钮，默认为 true\n         */\n        showCancel?: boolean;\n        /**\n         * 取消按钮的文字，默认为\"取消\"，最多 4 个字符\n         */\n        cancelText?: string;\n        /**\n         * 取消按钮的文字颜色，默认为\"#000000\"\n         */\n        cancelColor?: undefined;\n        /**\n         * 确定按钮的文字，默认为\"确定\"，最多 4 个字符\n         */\n        confirmText?: string;\n        /**\n         * 确定按钮的文字颜色，默认为\"#3CC51F\"\n         */\n        confirmColor?: undefined;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * ​显示操作菜单\n     */\n    showActionSheet(obj: {\n        /**\n         * 按钮的文字数组，数组长度最大为6个\n         */\n        itemList: undefined;\n        /**\n         * 按钮的文字颜色，默认为\"#000000\"\n         */\n        itemColor?: undefined;\n        /**\n         * 接口调用成功的回调函数，详见返回参数说明\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    setTopBarText(obj: {\n        /**\n         * 置顶栏文字内容\n         */\n        text: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 动态设置当前页面的标题。\n     */\n    setNavigationBarTitle(obj: {\n        /**\n         * 页面标题\n         */\n        title: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 在当前页面显示导航条加载动画。\n     */\n    showNavigationBarLoading(): void;\n                    \n    /**\n     * 隐藏导航条加载动画。\n     */\n    hideNavigationBarLoading(): void;\n                    \n    /**\n     * 保留当前页面，跳转到应用内的某个页面，使用wx.navigateBack可以返回到原页面。\n     */\n    navigateTo(obj: {\n        /**\n         * 需要跳转的应用内非 tabBar 的页面的路径 , 路径后可以带参数。参数与路径之间使用?分隔，参数键与参数值用=相连，不同参数用&分隔；如 'path?key=value&key2=value2'\n         */\n        url: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 关闭当前页面，跳转到应用内的某个页面。\n     */\n    redirectTo(obj: {\n        /**\n         * 需要跳转的应用内非 tabBar 的页面的路径，路径后可以带参数。参数与路径之间使用?分隔，参数键与参数值用=相连，不同参数用&分隔；如 'path?key=value&key2=value2'\n         */\n        url: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    reLaunch(obj: {\n        /**\n         * 需要跳转的应用内页面路径 , 路径后可以带参数。参数与路径之间使用?分隔，参数键与参数值用=相连，不同参数用&分隔；如 'path?key=value&key2=value2'，如果跳转的页面路径是 tabBar 页面则不能带参数\n         */\n        url: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 跳转到 tabBar 页面，并关闭其他所有非 tabBar 页面\n     */\n    switchTab(obj: {\n        /**\n         * 需要跳转的 tabBar 页面的路径（需在 app.json 的 tabBar 字段定义的页面），路径后不能带参数\n         */\n        url: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 关闭当前页面，返回上一页面或多级页面。可通过 getCurrentPages()) 获取当前的页面栈，决定需要返回几层。\n     */\n    navigateBack(obj: {\n        /**\n         * 返回的页面数，如果 delta 大于现有页面数，则返回到首页。\n         */\n        delta?: number;\n    }): void;\n                    \n    /**\n     * 创建一个动画实例animation。调用实例的方法来描述动画。最后通过动画实例的export方法导出动画数据传递给组件的animation属性。\n     */\n    createAnimation(obj: {\n        /**\n         * 400\n         */\n        duration?: number;\n        /**\n         * \"linear\"\n         */\n        timingFunction?: string;\n        /**\n         * 0\n         */\n        delay?: number;\n        /**\n         * \"50% 50% 0\"\n         */\n        transformOrigin?: string;\n    }): IAnimation;\n                    \n    pageScrollTo(obj: {\n        /**\n         * 滚动到页面的目标位置（单位px）\n         */\n        scrollTop: number;\n    }): void;\n                    \n    /**\n     * 创建 canvas 绘图上下文（指定 canvasId）.Tip: 需要指定 canvasId，该绘图上下文只作用于对应的 <canvas/>\n     */\n    createCanvasContext(canvasId: string): ICanvasContext;\n                    \n    /**\n     * 把当前画布的内容导出生成图片，并返回文件路径\n     */\n    canvasToTempFilePath(canvasId: string): void;\n                    \n    startPullDownRefresh(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 停止当前页面下拉刷新。\n     */\n    stopPullDownRefresh(): void;\n                    \n    // # WXML节点信息 # \n    \n    // # 第三方平台 # \n    \n    getExtConfig(obj: {\n        /**\n         * 返回第三方平台自定义的数据\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    getExtConfigSync(): void;\n                    \n    // # 开放接口 # \n    \n    /**\n     * 调用接口获取登录凭证（code）进而换取用户登录态信息，包括用户的唯一标识（openid） 及本次登录的 会话密钥（session_key）。用户数据的加解密通讯需要依赖会话密钥完成。\n     */\n    login(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 通过上述接口获得的用户登录态拥有一定的时效性。用户越久未使用小程序，用户登录态越有可能失效。反之如果用户一直在使用小程序，则用户登录态一直保持有效。具体时效逻辑由微信维护，对开发者透明。开发者只需要调用wx.checkSession接口检测当前用户登录态是否有效。登录态过期后开发者可以再调用wx.login获取新的用户登录态。\n     */\n    checkSession(obj: {\n        /**\n         * 接口调用成功的回调函数，登录态未过期\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数，登录态已过期\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    authorize(obj: {\n        /**\n         * 需要获取权限的scope，详见 scope 列表\n         */\n        scope: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 获取用户信息，withCredentials 为 true 时需要先调用 wx.login 接口。\n     */\n    getUserInfo(obj: {\n        /**\n         * 是否带上登录态信息\n         */\n        withCredentials?: boolean;\n        /**\n         * 指定返回用户信息的语言，zh_CN 简体中文，zh_TW 繁体中文，en 英文\n         */\n        lang?: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    /**\n     * 发起微信支付。\n     */\n    requestPayment(obj: {\n        /**\n         * 时间戳从1970年1月1日00:00:00至今的秒数,即当前的时间\n         */\n        timeStamp: string;\n        /**\n         * 随机字符串，长度为32个字符以下。\n         */\n        nonceStr: string;\n        /**\n         * 统一下单接口返回的 prepay_id 参数值，提交格式如：prepay_id=*\n         */\n        package: string;\n        /**\n         * 签名算法，暂支持 MD5\n         */\n        signType: string;\n        /**\n         * 签名,具体签名方案参见小程序支付接口文档;\n         */\n        paySign: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    chooseAddress(obj: {\n        /**\n         * 返回用户选择的收货地址信息\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    addCard(obj: {\n        /**\n         * 需要添加的卡券列表，列表内对象说明请参见请求对象说明\n         */\n        cardList: undefined;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    openCard(obj: {\n        /**\n         * 需要打开的卡券列表，列表内参数详见openCard 请求对象说明\n         */\n        cardList: undefined;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    openSetting(obj: {\n        /**\n         * 接口调用成功的回调函数，返回内容详见返回参数说明。\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    getSetting(obj: {\n        /**\n         * 接口调用成功的回调函数，返回内容详见返回参数说明。\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    getWeRunData(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    navigateToMiniProgram(obj: {\n        /**\n         * 要打开的小程序 appId\n         */\n        appId: string;\n        /**\n         * 打开的页面路径，如果为空则打开首页\n         */\n        path?: string;\n        /**\n         * 需要传递给目标小程序的数据，目标小程序可在 App.onLaunch()，App.onShow() 中获取到这份数据。详情\n         */\n        extraData?: any;\n        /**\n         * 要打开的小程序版本，有效值 develop（开发版），trial（体验版），release（正式版） ，仅在当前小程序为开发版或体验版时此参数有效；如果当前小程序是体验版或正式版，则打开的小程序必定是正式版。默认值 release\n         */\n        envVersion?: string;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    chooseInvoiceTitle(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    checkIsSupportSoterAuthentication(obj: {\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n    // # 数据 # \n    \n    /**\n     * 自定义分析数据上报接口。使用前，需要在小程序管理后台自定义分析中新建事件，配置好事件名与字段。\n     */\n    reportAnalytics(eventName: string,  data: string, ): void;\n                    \n    // # 拓展接口 # \n    \n    arrayBufferToBase64(arrayBuffer: string): void;\n                    \n    base64ToArrayBuffer(base64: string): void;\n                    \n    // # 调试接口 # \n    \n    setEnableDebug(obj: {\n        /**\n         * 是否打开调试\n         */\n        enableDebug: boolean;\n        /**\n         * 接口调用成功的回调函数\n         */\n        success?: Function;\n        /**\n         * 接口调用失败的回调函数\n         */\n        fail?: Function;\n        /**\n         * 接口调用结束的回调函数（调用成功、失败都会执行）\n         */\n        complete?: Function;\n    }): void;\n                    \n}"
  },
  {
    "path": "utils/address_parse.js",
    "content": "const WXAPI = require('apifm-wxapi')\nvar addressList = []; //地址列表\n\nvar smartObj = {};\n/**\n * 解析邮编\n * @param event识别的地址\n * @returns <obj>\n */\nasync function smart(event) {\n  console.log('event1', event);\n  event = stripscript(event); //过滤特殊字符\n  console.log('event2', event);\n  let obj = {};\n  let copyaddress = JSON.parse(JSON.stringify(event));\n  console.log('copyaddress', copyaddress);\n  copyaddress = copyaddress.split(\" \");\n  console.log('地址转为数组:', copyaddress);\n  for (let index = 0; index < copyaddress.length; index++) {\n    let res = copyaddress[index];\n    if (res) {\n      if (res.length == 1) {\n        res += \"XX\"; // 过滤掉一位的名字或者地址\n      }\n      let addressObj = await smatrAddress(res);\n      obj = Object.assign(obj, addressObj);\n      if (JSON.stringify(addressObj) === \"{}\") {\n        obj.name = res.replace(\"XX\", \"\");\n      }\n    }\n  }\n  return obj;\n}\nasync function smatrAddress(event) {\n  smartObj = {};\n  let address = event;\n  //address=  event.replace(/\\s/g, ''); //去除空格\n  address = stripscript(address); //过滤特殊字符\n  //身份证号匹配\n  if (IdentityCodeValid(address)) {\n    smartObj.idCard = address;\n    address = address.replace(address, \"\");\n  }\n\n  //电话匹配\n  let phone = address.match(\n    /(86-[1][0-9]{10}) | (86[1][0-9]{10})|([1][0-9]{10})/g\n  );\n  if (phone) {\n    smartObj.phone = phone[0];\n    address = address.replace(phone[0], \"\");\n  }\n  console.log('smatrAddress:', address);\n  let matchAddress = \"\";\n  //省匹配 比如输入北京市朝阳区，会用北  北京  北京市 北京市朝 以此类推在addressList里的province中做匹配，会得到北京市  河北省 天津市等等；\n  const resProvince = await WXAPI.provinceV2()\n  const provinceList = resProvince.data\n\n  let matchProvince = []; //粗略匹配上的省份\n  // for (let begIndex = 0; begIndex < address.length; begIndex++) {\n  matchAddress = \"\";\n  for (let endIndex = 0; endIndex < address.length; endIndex++) {\n    //  if (endIndex > begIndex) {\n    matchAddress = address.slice(0, endIndex + 2);\n    provinceList.forEach(res => {\n      if (res.name.indexOf(matchAddress) != -1) {\n        matchProvince.push({\n          province: res.name,\n          provinceCode: res.id,\n          matchValue: matchAddress\n        });\n      }\n    });\n    // }\n  }\n  //  }\n\n  //统计筛选初略统计出的省份\n  matchProvince.forEach(res => {\n    res.index = 0;\n    matchProvince.forEach(el => {\n      if (res.province == el.province) {\n        el.index++;\n        if (res.matchValue.length > el.matchValue.length) {\n          el.matchValue = res.matchValue;\n        }\n      }\n    });\n  });\n  if (matchProvince.length != 0) {\n    let province = matchProvince.reduce((p, v) => (p.index < v.index ? v : p));\n    smartObj.province = province.province;\n    smartObj.provinceCode = province.provinceCode;\n    address = address.replace(province.matchValue, \"\");\n  }\n  //市查找\n  const resCity = await WXAPI.cityV2()\n  let cityList = resCity.data\n  if (smartObj.provinceCode) {\n    cityList = resCity.data.filter(ele => {\n      return ele.pid == smartObj.provinceCode\n    })\n  }\n\n  let matchCity = []; //粗略匹配上的市\n  matchAddress = \"\";\n  for (let endIndex = 0; endIndex < address.length; endIndex++) {    \n    matchAddress = address.slice(0, endIndex + 2)\n    cityList.forEach(res => {\n      if (res.name.indexOf(matchAddress) != -1) {\n        matchCity.push({\n          city: res.name,\n          cityCode: res.id,\n          pid: res.pid,\n          matchValue: matchAddress,\n          province: smartObj.province,\n          provinceCode: smartObj.provinceCode\n        });\n      }\n    });\n  }\n\n  //统计筛选初略统计出的市\n  matchCity.forEach(res => {\n    res.index = 0;\n    matchCity.forEach(el => {\n      if (res.city == el.city) {\n        el.index++;\n        if (res.matchValue.length > el.matchValue.length) {\n          el.matchValue = res.matchValue;\n        }\n      }\n    });\n  });\n  // 直辖市处理\n  if (smartObj.province == '北京市') {\n    matchCity.push({\n      city: '北京市',\n      cityCode: '110100000000',\n      matchValue: '',\n      province: smartObj.province,\n      provinceCode: smartObj.provinceCode\n    });\n  }\n  if (smartObj.province == '上海市') {\n    matchCity.push({\n      city: '上海市',\n      cityCode: '310100000000',\n      matchValue: '',\n      province: smartObj.province,\n      provinceCode: smartObj.provinceCode\n    });\n  }\n  if (smartObj.province == '天津市') {\n    matchCity.push({\n      city: '天津市',\n      cityCode: '120100000000',\n      matchValue: '',\n      province: smartObj.province,\n      provinceCode: smartObj.provinceCode\n    });\n  }\n  if (smartObj.province == '重庆市') {\n    matchCity.push({\n      city: '重庆市',\n      cityCode: '500100000000',\n      matchValue: '',\n      province: smartObj.province,\n      provinceCode: smartObj.provinceCode\n    });\n  }\n  if (matchCity.length != 0) {\n    let city = matchCity.reduce((p, v) => (p.index < v.index ? v : p));\n    smartObj.city = city.city;\n    smartObj.cityCode = city.cityCode;\n    // smartObj.county = city.county;\n    // smartObj.countyCode = city.countyCode;\n    if (!smartObj.province) {\n      const _province = provinceList.find(ele => {\n        return ele.id == city.pid\n      })\n      smartObj.province = _province.name;\n      smartObj.provinceCode = city.pid;\n    }\n    address = address.replace(city.matchValue, \"\");\n  }\n\n  //区县查找\n  const resDistricts = await WXAPI.districts()\n  let districtList = resDistricts.data\n  if (smartObj.cityCode) {\n    districtList = resDistricts.data.filter(ele => {\n      return ele.pid == smartObj.cityCode\n    })\n  }\n  console.log('smartObj', smartObj);\n  let matchCounty = []; //粗略匹配上的区县\n  matchAddress = \"\";\n  for (let endIndex = 0; endIndex < address.length; endIndex++) {\n    matchAddress = address.slice(0, endIndex + 2);\n    districtList.forEach(res => {\n      if (res.name.indexOf(matchAddress) != -1) {\n        matchCounty.push({\n          county: res.name,\n          countyCode: res.id,\n          city: smartObj.city,\n          cityCode: smartObj.cityCode,\n          matchValue: matchAddress,\n          province: smartObj.province,\n          provinceCode: smartObj.provinceCode\n        });\n      }\n    });\n  }\n  //统计筛选初略统计出的区县\n  matchCounty.forEach(res => {\n    res.index = 0;\n    matchCounty.forEach(el => {\n      if (res.city == el.city) {\n        el.index++;\n        if (res.matchValue.length > el.matchValue.length) {\n          el.matchValue = res.matchValue;\n        }\n      }\n    });\n  });\n  if (matchCounty.length != 0) {\n    let city = matchCounty.reduce((p, v) => (p.index < v.index ? v : p));\n    smartObj.county = city.county;\n    smartObj.countyCode = city.countyCode;\n    if (!smartObj.province) {\n      smartObj.province = city.province;\n      smartObj.provinceCode = city.provinceCode;\n    }\n    if (!smartObj.city) {\n      smartObj.city = city.city;\n      smartObj.cityCode = city.cityCode;\n    }\n    address = address.replace(city.matchValue, \"\");\n  }\n\n  //街道查找\n  let matchStreet = []; //粗略匹配上的街道查\n  matchAddress = \"\";\n  for (let endIndex = 0; endIndex < address.length; endIndex++) {\n    matchAddress = address.slice(0, endIndex + 3);\n    addressList.forEach(el => {\n      if (el.name == smartObj.province) {\n        if (\n          smartObj.province == \"北京市\" ||\n          smartObj.province == \"天津市\" ||\n          smartObj.province == \"上海市\" ||\n          smartObj.province == \"重庆市\"\n        ) {\n          //nothing\n        } else {\n          el.children.forEach(element => {\n            if (element.name == smartObj.city) {\n              element.children.forEach(item => {\n                if (item.name == smartObj.county) {\n                  item.children.forEach(res => {\n                    if (res[\"street\"].indexOf(matchAddress) != -1) {\n                      matchStreet.push({\n                        street: res.street,\n                        streetCode: res.code,\n                        matchValue: matchAddress\n                      });\n                    }\n                  });\n                }\n              });\n            }\n          });\n        }\n      }\n    });\n  }\n\n  //统计筛选初略统计出的区县\n  matchStreet.forEach(res => {\n    res.index = 0;\n    matchStreet.forEach(el => {\n      if (res.city == el.city) {\n        el.index++;\n        if (res.matchValue.length > el.matchValue.length) {\n          el.matchValue = res.matchValue;\n        }\n      }\n    });\n  });\n\n  if (matchStreet.length != 0) {\n    let city = matchStreet.reduce((p, v) => (p.index < v.index ? v : p));\n    smartObj.street = city.street;\n    smartObj.streetCode = city.streetCode;\n    address = address.replace(city.matchValue, \"\");\n  }\n  //姓名查找\n  if (smartObj.province) {\n    smartObj.address = address;\n  }\n\n  return smartObj;\n}\n////过滤特殊字符\nfunction stripscript(s) {\n  s = s.replace(/\\t/g, \" \")\n  s = s.replace(/(\\d{3})-(\\d{4})-(\\d{4})/g, \"$1$2$3\");\n  s = s.replace(/(\\d{3}) (\\d{4}) (\\d{4})/g, \"$1$2$3\");\n  var pattern = new RegExp(\n    \"[`~!@#$^&*()=|{}':;',\\\\[\\\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“’。，、？-]\"\n  );\n  var rs = \"\";\n  for (var i = 0; i < s.length; i++) {\n    rs = rs + s.substr(i, 1).replace(pattern, \" \");\n  }\n  rs = rs.replace(/[\\r\\n]/g, \"\");\n  return rs;\n}\n\nfunction IdentityCodeValid(code) {\n  let pass;\n  var city = {\n    11: \"北京\",\n    12: \"天津\",\n    13: \"河北\",\n    14: \"山西\",\n    15: \"内蒙古\",\n    21: \"辽宁\",\n    22: \"吉林\",\n    23: \"黑龙江 \",\n    31: \"上海\",\n    32: \"江苏\",\n    33: \"浙江\",\n    34: \"安徽\",\n    35: \"福建\",\n    36: \"江西\",\n    37: \"山东\",\n    41: \"河南\",\n    42: \"湖北 \",\n    43: \"湖南\",\n    44: \"广东\",\n    45: \"广西\",\n    46: \"海南\",\n    50: \"重庆\",\n    51: \"四川\",\n    52: \"贵州\",\n    53: \"云南\",\n    54: \"西藏 \",\n    61: \"陕西\",\n    62: \"甘肃\",\n    63: \"青海\",\n    64: \"宁夏\",\n    65: \"新疆\",\n    71: \"台湾\",\n    81: \"香港\",\n    82: \"澳门\",\n    91: \"国外 \"\n  };\n  var tip = \"\";\n  pass = true;\n\n  if (!code || !/^\\d{17}(\\d|X)$/i.test(code)) {\n    tip = \"身份证号格式错误\";\n    pass = false;\n  } else if (!city[code.substr(0, 2)]) {\n    tip = \"地址编码错误\";\n    pass = false;\n  } else {\n    //18位身份证需要验证最后一位校验位\n    if (code.length == 18) {\n      code = code.split(\"\");\n      //∑(ai×Wi)(mod 11)\n      //加权因子\n      var factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];\n      //校验位\n      var parity = [1, 0, \"X\", 9, 8, 7, 6, 5, 4, 3, 2];\n      var sum = 0;\n      var ai = 0;\n      var wi = 0;\n      for (var i = 0; i < 17; i++) {\n        ai = code[i];\n        wi = factor[i];\n        sum += ai * wi;\n      }\n      var last = parity[sum % 11];\n      if (parity[sum % 11] != code[17]) {\n        tip = \"校验位错误\";\n        pass = false;\n      }\n    }\n  }\n  return pass;\n}\n\nmodule.exports = {\n  smart: smart\n};\n"
  },
  {
    "path": "utils/auth.js",
    "content": "const WXAPI = require('apifm-wxapi')\nconst CONFIG = require('../config.js')\nasync function checkSession(){\n  return new Promise((resolve, reject) => {\n    wx.checkSession({\n      success() {\n        return resolve(true)\n      },\n      fail() {\n        return resolve(false)\n      }\n    })\n  })\n}\n\nasync function bindSeller() {\n  const token = wx.getStorageSync('token')\n  const referrer = wx.getStorageSync('referrer')\n  if (!token) {\n    return\n  }\n  if (!referrer) {\n    return\n  }\n  const res = await WXAPI.bindSeller({\n    token,\n    uid: referrer\n  })\n}\n\n// 检测登录状态，返回 true / false\nasync function checkHasLogined() {\n  const token = wx.getStorageSync('token')\n  if (!token) {\n    return false\n  }\n  const loggined = await checkSession()\n  if (!loggined) {\n    wx.removeStorageSync('token')\n    return false\n  }\n  const checkTokenRes = await WXAPI.checkToken(token)\n  if (checkTokenRes.code != 0) {\n    wx.removeStorageSync('token')\n    return false\n  }\n  return true\n}\n\nasync function wxaCode(){\n  return new Promise((resolve, reject) => {\n    wx.login({\n      success(res) {\n        return resolve(res.code)\n      },\n      fail() {\n        wx.showToast({\n          title: '获取code失败',\n          icon: 'none'\n        })\n        return resolve('获取code失败')\n      }\n    })\n  })\n}\n\nasync function login(page){\n  const _this = this\n  wx.login({\n    success: function (res) {\n      const extConfigSync = wx.getExtConfigSync()\n      if (extConfigSync.subDomain) {\n        WXAPI.wxappServiceLogin({\n          code: res.code\n        }).then(function (res) {        \n          if (res.code == 10000) {\n            // 去注册\n            return;\n          }\n          if (res.code != 0) {\n            // 登录错误\n            wx.showModal({\n              title: '无法登录',\n              content: res.msg,\n              showCancel: false\n            })\n            return;\n          }\n          wx.setStorageSync('token', res.data.token)\n          wx.setStorageSync('uid', res.data.uid)\n          if (CONFIG.bindSeller) {\n            _this.bindSeller()\n          }\n          if ( page ) {\n            page.onShow()\n          }\n        })\n      } else {\n        WXAPI.login_wx(res.code).then(function (res) {        \n          if (res.code == 10000) {\n            // 去注册\n            return;\n          }\n          if (res.code != 0) {\n            // 登录错误\n            wx.showModal({\n              title: '无法登录',\n              content: res.msg,\n              showCancel: false\n            })\n            return;\n          }\n          wx.setStorageSync('token', res.data.token)\n          wx.setStorageSync('uid', res.data.uid)\n          if (CONFIG.bindSeller) {\n            _this.bindSeller()\n          }\n          if ( page ) {\n            page.onShow()\n          }\n        })\n      }\n    }\n  })\n}\n\nasync function authorize() {\n  // const code = await wxaCode()\n  // const resLogin = await WXAPI.login_wx(code)\n  // if (resLogin.code == 0) {\n  //   wx.setStorageSync('token', resLogin.data.token)\n  //   wx.setStorageSync('uid', resLogin.data.uid)\n  //   return resLogin\n  // }\n  return new Promise((resolve, reject) => {\n    wx.login({\n      success: function (res) {\n        const code = res.code\n        let referrer = '' // 推荐人\n        let referrer_storge = wx.getStorageSync('referrer');\n        if (referrer_storge) {\n          referrer = referrer_storge;\n        }\n        // 下面开始调用注册接口\n        const extConfigSync = wx.getExtConfigSync()\n        if (extConfigSync.subDomain) {\n          WXAPI.wxappServiceAuthorize({\n            code: code,\n            referrer: referrer\n          }).then(function (res) {\n            if (res.code == 0) {\n              wx.setStorageSync('token', res.data.token)\n              wx.setStorageSync('uid', res.data.uid)\n              resolve(res)\n            } else {\n              wx.showToast({\n                title: res.msg,\n                icon: 'none'\n              })\n              reject(res.msg)\n            }\n          })\n        } else {\n          WXAPI.authorize({\n            code: code,\n            referrer: referrer\n          }).then(function (res) {\n            if (res.code == 0) {\n              wx.setStorageSync('token', res.data.token)\n              wx.setStorageSync('uid', res.data.uid)\n              resolve(res)\n            } else {\n              wx.showToast({\n                title: res.msg,\n                icon: 'none'\n              })\n              reject(res.msg)\n            }\n          })\n        }\n      },\n      fail: err => {\n        reject(err)\n      }\n    })\n  })\n}\n\n// 最新的登陆接口，建议用这个\nasync function login20241025() {\n  const code = await wxaCode()\n  const extConfigSync = wx.getExtConfigSync()\n  if (extConfigSync.subDomain) {\n    // 服务商模式\n    const res = await WXAPI.wxappServiceLogin({ code })\n    if (res.code == 10000) {\n      // 去注册\n      return res\n    }\n    if (res.code != 0) {\n      // 登录错误\n      wx.showModal({\n        content: res.msg,\n        showCancel: false\n      })\n      return res\n    }\n    wx.setStorageSync('token', res.data.token)\n    wx.setStorageSync('uid', res.data.uid)\n    wx.setStorageSync('openid', res.data.openid)\n    wx.setStorageSync('mobile', res.data.mobile)\n    if (CONFIG.bindSeller) {\n      this.bindSeller()\n    }\n    return res\n  } else {\n    // 非服务商模式\n    const res = await WXAPI.login_wx(code)\n    if (res.code == 10000) {\n      // 去注册\n      return res;\n    }\n    if (res.code != 0) {\n      // 登录错误\n      wx.showModal({\n        content: res.msg,\n        showCancel: false\n      })\n      return res;\n    }\n    wx.setStorageSync('token', res.data.token)\n    wx.setStorageSync('uid', res.data.uid)\n    wx.setStorageSync('openid', res.data.openid)\n    wx.setStorageSync('mobile', res.data.mobile)\n    if (CONFIG.bindSeller) {\n      this.bindSeller()\n    }\n    return res\n  }\n}\n\nfunction loginOut(){\n  wx.removeStorageSync('token')\n  wx.removeStorageSync('uid')\n  wx.removeStorageSync('openid')\n  wx.removeStorageSync('mobile')\n}\n\nasync function checkAndAuthorize (scope) {\n  return new Promise((resolve, reject) => {\n    wx.getSetting({\n      success(res) {\n        if (!res.authSetting[scope]) {\n          wx.authorize({\n            scope: scope,\n            success() {\n              resolve() // 无返回参数\n            },\n            fail(e){\n              console.error(e)\n              // if (e.errMsg.indexof('auth deny') != -1) {\n              //   wx.showToast({\n              //     title: e.errMsg,\n              //     icon: 'none'\n              //   })\n              // }\n              wx.showModal({\n                title: '无权操作',\n                content: '需要获得您的授权',\n                showCancel: false,\n                confirmText: '立即授权',\n                confirmColor: '#e64340',\n                success(res) {\n                  wx.openSetting();\n                },\n                fail(e){\n                  console.error(e)\n                  reject(e)\n                },\n              })\n            }\n          })\n        } else {\n          resolve() // 无返回参数\n        }\n      },\n      fail(e){\n        console.error(e)\n        reject(e)\n      }\n    })\n  })  \n}\n\nmodule.exports = {\n  checkHasLogined: checkHasLogined,\n  wxaCode: wxaCode,\n  login: login,\n  login20241025: login20241025,\n  loginOut: loginOut,\n  checkAndAuthorize: checkAndAuthorize,\n  authorize: authorize,\n  bindSeller: bindSeller\n}"
  },
  {
    "path": "utils/image.js",
    "content": "function imageUtil (originalWidth, originalHeight) {\n  let imageSize = {}\n  wx.getSystemInfo({\n    success: function (res) {\n      const windowWidth = res.windowWidth\n      imageSize.x = 0\n      imageSize.y = 0\n      imageSize.windowWidth = windowWidth\n      imageSize.imageWidth = originalWidth\n      imageSize.imageHeight = originalHeight\n      if (originalWidth > windowWidth) {\n        imageSize.imageWidth = windowWidth\n        imageSize.imageHeight = windowWidth * originalHeight / originalWidth\n      } else {\n        imageSize.x = (windowWidth - originalWidth) / 2\n      }\n    }\n  })\n  return imageSize\n}\n\nmodule.exports = {\n  imageUtil: imageUtil\n}\n"
  },
  {
    "path": "utils/pay.js",
    "content": "const WXAPI = require('apifm-wxapi')\n\n/**\n * type: order 支付订单 recharge 充值 paybill 优惠买单\n * data: 扩展数据对象，用于保存参数\n */\nfunction wxpay(type, money, orderId, redirectUrl, data, content) {\n  const postData = {\n    token: wx.getStorageSync('token'),\n    money: money,\n    remark: \"在线充值\",\n    content: content ? content : ''\n  }\n  if (type === 'order') {\n    postData.remark = \"支付订单 ：\" + orderId;\n    postData.nextAction = {\n      type: 0,\n      id: orderId\n    };\n  }\n  if (type === 'paybill') {\n    postData.remark = \"优惠买单 ：\" + data.money;\n    postData.nextAction = {\n      type: 4,\n      uid: wx.getStorageSync('uid'),\n      money: data.money\n    };\n  }\n  if (type === 'fxsBuy') {\n    postData.remark = \"购买分销资格\";\n    postData.nextAction = {\n      type: 13\n    };\n  }\n  if (type === 'payTz') {\n    postData.remark = \"购买团长 ：\" + money;\n    postData.nextAction = {\n      type: 14\n    };\n  }\n  postData.payName = postData.remark;\n  if (postData.nextAction) {\n    postData.nextAction = JSON.stringify(postData.nextAction);  \n  }\n  const url = wx.getStorageSync('wxpay_api_url')\n  WXAPI.payVariableUrl(url ? url : '/pay/wx/wxapp', postData).then(function (res) {\n    if (res.code == 0) {\n      // 发起支付\n      wx.requestPayment({\n        timeStamp: res.data.timeStamp,\n        nonceStr: res.data.nonceStr,\n        package: res.data.package,\n        signType: res.data.signType,\n        paySign: res.data.paySign,\n        fail: function (aaa) {\n          console.error(aaa)\n          wx.showToast({\n            title: '支付失败:' + aaa\n          })\n        },\n        success: function () {\n          // 提示支付成功\n          wx.showToast({\n            title: '支付成功'\n          })\n          wx.redirectTo({\n            url: redirectUrl\n          });\n        }\n      })\n    } else {\n      wx.showModal({\n        title: '出错了',\n        content: JSON.stringify(res),\n        showCancel: false\n      })\n    }\n  })\n}\n\nmodule.exports = {\n  wxpay: wxpay\n}"
  },
  {
    "path": "utils/tools.js",
    "content": "const WXAPI = require('apifm-wxapi')\n\n// 显示购物车tabBar的Badge\nasync function showTabBarBadge(noTabBarPage){\n  const token = wx.getStorageSync('token')\n  if (!token) {\n    return 0\n  }\n  let number = 0\n  // 自营商品\n  let res = await WXAPI.shippingCarInfo(token)\n  if (res.code == 0) {\n    number += res.data.number\n  }\n  // vop 购物车\n  const shopping_cart_vop_open = wx.getStorageSync('shopping_cart_vop_open')\n  if (shopping_cart_vop_open == '1') {\n    res = await WXAPI.jdvopCartInfoV2(token)\n    if (res.code == 0) {\n      number += res.data.number\n    }\n  }\n  if (!noTabBarPage) {\n    if (number == 0) {\n      // 删除红点点\n      wx.removeTabBarBadge({\n        index: 3\n      })\n    } else {\n      // 显示红点点\n      wx.setTabBarBadge({\n        index: 3,\n        text: number + ''\n      })\n    }\n  }\n  return number\n}\n\nmodule.exports = {\n  showTabBarBadge: showTabBarBadge\n}"
  },
  {
    "path": "utils/tools.wxs",
    "content": "// 页面上使用的公共类\n// <wxs src=\"../../utils/tools.wxs\" module=\"tools\" />\n// tools.tofix2(12.33333)\nmodule.exports = {\n  msg: 'wxs-tools',\n  tofix2: function(num) {\n    return num.toFixed(2)\n  }\n};"
  }
]