From f5032ceb90f6c80add92f4e5984bb80bf7422c66 Mon Sep 17 00:00:00 2001 From: eric Date: Sat, 26 Nov 2022 22:44:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/app.js | 2 +- dist/app.json | 2 +- dist/pages/my/index.js | 2 +- src/app.config.ts | 2 +- src/pages/home/index.tsx | 2 ++ src/pages/my/index.tsx | 62 +++++++++++++++++++++++++--------------- 6 files changed, 45 insertions(+), 27 deletions(-) diff --git a/dist/app.js b/dist/app.js index bb5d1b8..652151c 100644 --- a/dist/app.js +++ b/dist/app.js @@ -1,2 +1,2 @@ /*! For license information please see app.js.LICENSE.txt */ -"use strict";require("./prebundle/vendors-node_modules_taro_weapp_prebundle_antmjs_vantui_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-TS5T3MDA_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-5ZOEZXK4_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_lodash_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_moment_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-JHQVW7VO_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-framework-react_dist_runtime_js.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-YPK4VK53_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_plu-b2bd19.js"),require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-HER2BAHA_js.js"),require("./prebundle/remoteEntry.js"),require("./prebundle/node_modules_taro_weapp_prebundle_react_jsx-runtime_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_react_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_run-08648c.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_react-dom_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-node_modules_taro_weapp_prebundle_tarojs_taro_js.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94890.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94891.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94892.js"),require("./prebundle/node_modules_taro_weapp_prebundle_sync_recursive-_94893.js"),require("./common"),require("./vendors"),require("./taro"),require("./runtime"),(wx.webpackJsonp=wx.webpackJsonp||[]).push([["app"],{"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/app.ts":function(e,r,t){var n=t("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),o=t("./node_modules/@babel/runtime/helpers/esm/createClass.js"),s=t("./node_modules/@babel/runtime/helpers/esm/inherits.js"),u=t("./node_modules/@babel/runtime/helpers/esm/createSuper.js"),i=t("webpack/container/remote/@tarojs/taro"),a=t.n(i),d=t("webpack/container/remote/react"),p=t("./config.js"),l=function(e){(0,s.default)(App,e);var r=(0,u.default)(App);function App(){return(0,n.default)(this,App),r.apply(this,arguments)}return(0,o.default)(App,[{key:"componentDidMount",value:function componentDidMount(){a().cloud.init({env:p.envConfig,traceUser:!0}),new(a().cloud.Cloud)({resourceEnv:p.envConfig}).init()}},{key:"componentDidShow",value:function componentDidShow(){}},{key:"componentDidHide",value:function componentDidHide(){}},{key:"render",value:function render(){return this.props.children}}]),App}(d.Component);r.default=l},"./src/app.ts":function(e,r,t){t("webpack/container/remote/@tarojs/plugin-platform-weapp/dist/runtime");var n=t("webpack/container/remote/@tarojs/runtime"),o=t("webpack/container/remote/@tarojs/plugin-framework-react/dist/runtime"),s=t("webpack/container/remote/@tarojs/taro"),u=t("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/app.ts"),i=t("webpack/container/remote/react"),a=t("webpack/container/remote/react-dom"),d=t.n(a),p={pages:["pages/home/index","pages/home/components/CheckIn/index","pages/home/components/Certified/index","pages/activityList/index","pages/formSubmit/index","pages/activityList/components/details/index","pages/mountainPeak/index","pages/my/index","pages/my/components/Version/index","pages/my/components/AbountUs/index","pages/my/components/CheckinDetail/index"],permission:{"scope.userLocation":{desc:"你的位置信息将用于小程序位置接口的效果展示"}},requiredPrivateInfos:["getLocation","chooseLocation"],window:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#fff",navigationBarTitleText:"WeChat",navigationBarTextStyle:"black"}};n.window.__taroAppConfig=p;App((0,o.createReactApp)(u.default,i,d(),p));(0,s.initPxTransform)({designWidth:750,deviceRatio:{640:1.17,750:1,828:.905}})},"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":function(e,r,t){function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(r,{default:function(){return _assertThisInitialized}})},"./node_modules/@babel/runtime/helpers/esm/classCallCheck.js":function(e,r,t){function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}t.d(r,{default:function(){return _classCallCheck}})},"./node_modules/@babel/runtime/helpers/esm/createClass.js":function(e,r,t){function _defineProperties(e,r){for(var t=0;t { }) }}>订阅消息 */} + + diff --git a/src/pages/my/index.tsx b/src/pages/my/index.tsx index b0b973f..651f682 100644 --- a/src/pages/my/index.tsx +++ b/src/pages/my/index.tsx @@ -204,27 +204,45 @@ const my = (props: any) => { */} - {type !== "people" || - (true && ( - { - if (isin) { - // 跳转到目的页面,打开新页面 - Taro.navigateTo({ - url: "/pages/my/components/CheckinDetail/index", - }); - } else { - Toast.fail({ - message: "请先登录", - selector: "#vanToast-demo2", - }); - } - }} - /> - ))} + { + if (isin) { + // 跳转到目的页面,打开新页面 + Taro.navigateTo({ + url: "/pages/my/components/CheckinDetail/index", + }); + } else { + Toast.fail({ + message: "请先登录", + selector: "#vanToast-demo2", + }); + } + }} + /> + + { + // 获取收获地址 + Taro.chooseAddress({ + success: function (res) { + console.log(res.userName); + console.log(res.postalCode); + console.log(res.provinceName); + console.log(res.cityName); + console.log(res.countyName); + console.log(res.detailInfo); + console.log(res.nationalCode); + console.log(res.telNumber); + }, + }); + }} + /> {/* { }); }} /> */} - -