张田田 9 месяцев назад
Родитель
Сommit
cd559ed2ed

+ 56 - 39
miniprogram/module/article/pages/add-address/add-address.ts

@@ -1,5 +1,6 @@
 import PageContainerBehavior from "../../../../core/behavior/page-container.behavior";
-import smart from "address-smart-parse";
+// import parseAddress from "../../../../utils/address-parse";
+import AddressParse from "address-parse";
 import tickleBehavior, {
   getTickleContext,
 } from "../../../../core/behavior/tickle.behavior";
@@ -51,7 +52,6 @@ Page({
     this.setData({ detail: "" });
   },
   onRegionConfirm(e: any) {
-    console.log(e.detail.values, "onRegionConfirm");
     this.setData({
       region:
         e.detail.values[0].name +
@@ -68,11 +68,8 @@ Page({
       "formData.areaCode": e.detail.values[2].code,
       "formData.areaName": e.detail.values[2].name,
     });
-
-    console.log(this.data.region, "onRegionConfirm");
   },
   onRegionCancel(e: any) {
-    console.log(e, "onRegionCancel");
     this.setData({
       regionPickerVisible: false,
     });
@@ -129,14 +126,12 @@ Page({
   // 添加地址
   async onAddress(params: any) {
     const res = await addAddressMethod(params);
-    console.log(res, "添加地址");
-    wx.showToast({ title: "添加地址成功", icon: "success" });
+    wx.showToast({ title: "添加成功", icon: "success" });
   },
   // 更新地址
   async onUpdate(params: any) {
     const res = await updateAddressMethod(params);
-    console.log(res, "更新地址");
-    wx.showToast({ title: "保存成功", icon: "success" });
+    wx.showToast({ title: "更新成功", icon: "success" });
   },
   // 保存
   async onSave() {
@@ -168,7 +163,7 @@ Page({
       this.setData({
         "formData.tagList": [this.data.selectedTag],
       });
-    
+
       this.setData({ saving: true });
       if (this.data.id) {
         this.data.formData.id = this.data.id;
@@ -177,31 +172,32 @@ Page({
         await this.onAddress(this.data.formData);
       }
       this.setData({ saving: false });
-      if (this.data.type === "orderDetail") {
-        // 订单详情页
-        
-      }
-        // 返回上一页
-        const pages = getCurrentPages();
-        console.log(pages, "保存地址pages");
+      // if (this.data.type === "orderDetail") {
+      //   // 订单详情页
+      //   wx.redirectTo({
+      //     url: "/module/article/pages/order-detail/order-detail",
+      //   });
+      // } else if (this.data.type === "orderList") {
+      //   // 订单列表页
+      //   wx.redirectTo({
+      //     url: "/module/article/pages/order-list/order-list",
+      //   });
+      // }
+      // 返回上一页
+      const pages = getCurrentPages();
       if (pages.length > 1) {
         const prevPage = pages[pages.length - 2];
-        console.log(prevPage.route, "prevPage");
         if (
           prevPage.route ===
           "module/article/pages/manage-address/manage-address"
         ) {
-          console.log(prevPage.route, "上一页面");
           wx.redirectTo({
             url: "/module/article/pages/manage-address/manage-address",
           });
-        } else {
-          // wx.navigateBack();
         }
       }
       // 保存成功后可自动跳转或提示
     } catch (error: any) {
-      console.log("保存失败", error);
       wx.showToast({ title: error.errMsg, icon: "none" });
       this.setData({ saving: false }); // 无论成功失败都重置
     }
@@ -238,7 +234,7 @@ Page({
     this.setData({ smartPasteValue: "" });
   },
   // 获取省市区编码
-  getCodeByName(list, name) {
+  getCodeByName(list: any, name: any) {
     for (const code in list) {
       if (list[code] === name) {
         return code;
@@ -249,7 +245,6 @@ Page({
   // 删除地址
   async onDelete() {
     const that = this;
-    console.log(that.data.id, "6666");
     wx.showModal({
       title: "确定删除地址?",
       content: "删除后地址不可恢复",
@@ -259,14 +254,9 @@ Page({
       confirmText: "删除",
       success: async (res) => {
         if (res.confirm) {
-          console.log(that.data.id, "删除地址的id");
           const res = await deleteAddressMethod(that.data.id);
-          console.log(res, "删除地址");
           wx.showToast({ title: "删除成功", icon: "success" });
           wx.navigateBack();
-          // setTimeout(() => {
-          //   wx.navigateBack();
-          // }, 1500);
         }
       },
     });
@@ -289,15 +279,17 @@ Page({
       value = value.replace(name, ",");
     }
     // 5. 用智能库进一步解析省市区
-    let result = smart(this.data.smartPasteValue);
-    console.log(result, "识别的result");
+    let [result] = AddressParse.parse(this.data.smartPasteValue);
     result = {
       ...result,
-      name: result.name || name,
-      phone: result.phone || phone,
-      detailAddress: result.address,
+      name: result.name,
+      phone: result.phone || result.mobile,
+      detailAddress: result.details,
+      county: result.area,
+      provinceCode: result.provinceCode,
+      cityCode: result.cityCode,
+      areaCode: result.areaCode,
     };
-
     // 6. 校验
     if (!result.name || !result.phone) {
       wx.showToast({ title: "请按照提示输入正确的地址信息", icon: "none" });
@@ -310,7 +302,6 @@ Page({
     // 7. 省市区识别
     const { province, city, county } = result;
     const { province_list, city_list, county_list } = this.data.areaList;
-
     if (province && city) {
       const provinceCode = this.getCodeByName(province_list, province);
       const cityCode = this.getCodeByName(city_list, city);
@@ -322,7 +313,7 @@ Page({
         "formData.provinceCode": provinceCode,
         "formData.cityCode": cityCode,
         "formData.areaCode": areaCode,
-        "formData.detailAddress": result.address,
+        "formData.detailAddress": result.details,
         region: `${province},${city}${county ? "," + county : ""}`,
       });
     } else {
@@ -331,7 +322,7 @@ Page({
     // 其他字段(如姓名、手机号、详细地址)可以单独 setData,不受省市影响
     this.setData({
       "formData.liaison": result.name,
-      "formData.phone": result.phone,
+      "formData.phone": result.phone || result.mobile,
     });
     wx.showToast({ title: "已识别", icon: "success" });
   },
@@ -339,7 +330,6 @@ Page({
   async getAddressDetail(id: string) {
     try {
       const res = await getAddressDetailByPatientIdMethod(id);
-      console.log(res.data, "获取地址详情");
       if (res && res.data) {
         this.setData({
           "formData.isDefault": res.data.isDefault,
@@ -374,5 +364,32 @@ Page({
     if (options.type) {
       this.setData({ type: options.type });
     }
+    if (options.imported) {
+      const imported = JSON.parse(decodeURIComponent(options.imported));
+      const { provinceName, cityName, areaName } = imported;
+      const { province_list, city_list, county_list } = this.data.areaList;
+      if (provinceName && cityName) {
+        const provinceCode = this.getCodeByName(province_list, provinceName);
+        const cityCode = this.getCodeByName(city_list, cityName);
+        const areaCode = this.getCodeByName(county_list, areaName);
+        this.setData({
+          "formData.isDefault": imported.isDefault || "N",
+          "formData.liaison": imported.liaison,
+          "formData.phone": imported.phone,
+          "formData.detailAddress": imported.detailAddress,
+          "formData.provinceName": imported.provinceName,
+          "formData.cityName": imported.cityName,
+          "formData.areaName": imported.areaName,
+          "formData.provinceCode": provinceCode,
+          "formData.cityCode": cityCode,
+          "formData.areaCode": areaCode,
+          region: imported.region,
+        });
+        this.setData({
+          selectedTag: "",
+          type: "imported",
+        });
+      }
+    }
   },
 });

+ 34 - 17
miniprogram/module/article/pages/manage-address/manage-address.ts

@@ -24,6 +24,7 @@ Page({
     }
     if (options.orderId) {
       this.setData({ orderId: options.orderId });
+      wx.setStorageSync("orderId", options.orderId);
     }
   },
   // 更新订单地址
@@ -47,6 +48,7 @@ Page({
   async selectAddress(e: any) {
     const item = e.currentTarget.dataset.item;
     const type = wx.getStorageSync("type");
+    const orderId = wx.getStorageSync("orderId");
     console.log(type, "页面切换type", item);
     const pages = getCurrentPages();
     console.log(pages, "pages");
@@ -58,7 +60,7 @@ Page({
       );
       console.log(orderPage, "orderPage");
       try {
-        await this.updataOrderAddress(this.data.orderId, item);
+        await this.updataOrderAddress(orderId, item);
         if (orderPage) {
           // orderPage.setData({ selectedAddress: item });
           wx.navigateBack();
@@ -68,14 +70,25 @@ Page({
       }
     } else if (type === "orderList") {
       // 订单列表 切换地址
-      const orderPage = pages.find(
+      const findPage = pages.find(
         (page) => page.route === "module/article/pages/order-list/order-list"
       );
+      console.log(findPage, "orderPage", orderId,item);
       try {
-        await this.updataOrderAddress(this.data.orderId, item);
-        if (orderPage) {
+        await this.updataOrderAddress(orderId, item);
+        if (findPage) {
           // orderPage.setData({ selectedAddress: item });
-          wx.navigateBack();
+          console.log("orderPage8888");
+          // wx.navigateBack({
+            // delta: 1,
+            // fail: () => {
+            //   console.log("orderPage9999");
+              wx.redirectTo({
+                url: "/"+findPage.route+"?tab=pending",
+              });
+            // },
+          // });
+        
         }
       } catch (error: any) {
         getTickleContext.call(this).showWarnMessage(error.errMsg);
@@ -173,18 +186,22 @@ Page({
       success: (res) => {
         console.log(res, "导入微信地址");
         // 拼接参数
-        // const params = encodeURIComponent(
-        //   JSON.stringify({
-        //     name: res.userName,
-        //     phone: res.telNumber,
-        //     region:
-        //       res.provinceName + " " + res.cityName + " " + res.countyName,
-        //     detail: res.detailInfo,
-        //   })
-        // );
-        // wx.navigateTo({
-        //   url: `/module/article/pages/add-address/add-address?imported=${params}`
-        // });
+        const params = encodeURIComponent(
+          JSON.stringify({
+            liaison: res.userName,
+            phone: res.telNumber,
+            region:
+              res.provinceName + " " + res.cityName + " " + res.countyName,
+            provinceName: res.provinceName,
+            cityName: res.cityName,
+            areaName: res.countyName,
+            detailAddress: res.detailInfoNew,
+          })
+        );
+        console.log(params, "微信地址的拼接");
+        wx.navigateTo({
+          url: `/module/article/pages/add-address/add-address?imported=${params}`,
+        });
       },
       fail: () => {
         wx.showToast({ title: "导入失败或用户取消", icon: "none" });

+ 1 - 1
miniprogram/module/article/pages/manage-address/manage-address.wxml

@@ -27,7 +27,7 @@
         <t-tag theme="primary" variant="outline" wx:if="{{item.tag}}">{{item.tag}}</t-tag>
       </view>
       <view class="address-detail">{{item.fullAddress}}</view>
-      <t-icon name="edit" class="edit-icon" bind:tap="onEdit" data-id="{{item.id}}"  />
+      <t-icon name="edit" class="edit-icon" catchtap="onEdit" data-id="{{item.id}}"  />
     </view>
   </block>
 </scroll-view>

+ 1 - 1
miniprogram/module/article/pages/order-detail/order-detail.scss

@@ -50,7 +50,7 @@
 .address-name {
   font-weight: 500;
   font-size: 28rpx;
-  margin-right: 10rpx;
+  margin-right: 20rpx;
 }
 
 .address-phone {

+ 1 - 1
miniprogram/module/article/pages/order-detail/order-detail.wxml

@@ -21,7 +21,7 @@
 <view class="order-detail-scroll">
   <!-- 服务包信息 -->
   <view class="service-card">
-    <t-image src="{{orderDetail.photo}}" class="service-img" />
+    <t-image src="{{orderDetail.photo}}" class="service-img" wx:if="{{orderDetail.photo}}" />
     <view class="service-info">
       <view class="service-title">{{orderDetail.conditioningWrapName}}</view>
       <view class="service-doctor" wx:if="{{orderDetail.operateBy}}">开具医生:{{orderDetail.operateBy}}</view>

+ 6 - 1
miniprogram/module/article/pages/order-list/order-list.scss

@@ -153,13 +153,18 @@
   transition: none !important;
 }
 .contact {
-  font-size: 24rpx;
+  font-size: 28rpx;
   color: black;
   margin-bottom: 10rpx;
+  font-weight: bold;
+  display: flex
 }
 .line{
   width: 100%;
   height: 1px;
   background-color: #eee;
   margin: 24rpx 0;
+}
+.name{
+margin-right: 20rpx;
 }

+ 3 - 3
miniprogram/module/article/pages/order-list/order-list.ts

@@ -10,9 +10,6 @@ import {
 // module/article/pages/order-list/order-list.ts
 Page({
   behaviors: [PageContainerBehavior, tickleBehavior],
-  lifetimes: {
-    attached() {},
-  },
   properties: {},
   data: {
     showConfirm: false,
@@ -100,6 +97,7 @@ Page({
   computed: {},
   onLoad(options: any) {
     // 读取 tab 参数,默认为 all
+    console.log(options, "options");
     const tab = options?.tab || "all";
     this.setData({ currentTab: tab });
     // this.filterOrdersList(tab);
@@ -133,6 +131,8 @@ Page({
     if (res && res.data) {
       res.data.forEach((item: any) => {
         item.address = `${item.provinceName}${item.cityName}${item.areaName}${item.detailAddress}`;
+        item.liaison = (item.liaison !== null && item.liaison !== undefined) ? item.liaison : '';
+        item.phone = (item.phone !== null && item.phone !== undefined) ? item.phone : '';
       });
       this.setData({ orders: res.data });
       console.log(this.data.orders, "获取订单列表");

+ 6 - 6
miniprogram/module/article/pages/order-list/order-list.wxml

@@ -17,15 +17,15 @@
         <text class="order-status {{statusClassObj[item.orderStatus]}}">{{statusObj[item.orderStatus]}}</text>
       </view>
       <view class="order-user" data-status="{{item.orderStatus}}" catchtap="changeAddress" data-id="{{item.id}}">
-        <text class="contact" wx:if="{{item.liaison || item.phone}}">{{item.liaison || ''}} {{item.phone || ''}}</text>
-        <text wx:if="{{item.address}}">{{item.address || ''}}</text>
+        <view class="contact"><view class="name" wx:if="item.liaison">{{item.liaison}}</view>  <view wx:if="{{item.phone}}">{{item.phone}}</view> </view>
+        <view wx:if="{{item.address}}">{{item.address || ''}}</view>
       </view>
       <view class="order-body">
-        <image src="{{item.photo}}" class="order-img" />
+        <image src="{{item.photo}}" class="order-img" wx:if="{{item.photo}}" />
         <view class="order-info">
-          <text class="order-title">{{item.conditioningWrapName}}</text>
-          <text class="order-doctor">开具医生:<text style="color:black">{{item.operateBy}}</text></text>
-          <text class="order-time">开具时间:<text style="color:black">{{item.operateTime}}</text></text>
+          <text class="order-title">{{item.conditioningWrapName || ''}}</text>
+          <text class="order-doctor" wx:if="{{item.operateBy}}">开具医生:<text style="color:black">{{item.operateBy}}</text></text>
+          <text class="order-time" wx:if="{{item.operateTime}}">开具时间:<text style="color:black">{{item.operateTime}}</text></text>
         </view>
       </view>
 

+ 18 - 44
miniprogram/module/chats/components/questionnaire/questionnaire.ts

@@ -12,7 +12,7 @@ interface Message {
     | "text"
     | "report"
     | "again"
-    | "follow" 
+    | "follow"
     | "count";
 
   payload: AnyObject;
@@ -33,7 +33,6 @@ Component({
     attached: function () {
       let isAnalysis: number;
       isAnalysis = wx.getStorageSync("isAnalysis");
-      console.log("attached-isAnalysis", isAnalysis);
       if (isAnalysis === 3 || isAnalysis === 4) {
         // 对话管家
         this._start();
@@ -71,7 +70,6 @@ Component({
   },
   observers: {
     "messages.**"(messages) {
-      console.log("questionnaire-messages",messages)
       const message = Object.values(messages).pop() as Message;
       this.setData({ lastId: message?.id });
     },
@@ -89,22 +87,14 @@ Component({
       this.triggerEvent("boxBottom", {
         inputBoxBottom: this.data.inputBoxBottom+100,
       });
-      console.log(this.data.inputBoxBottom, "监听页面高度boxbottom");
     },
     handle(event: HandleEvent) {
       const isAnalysis = wx.getStorageSync("isAnalysis");
-      console.log(event,"handle变化中的isAnalysis",isAnalysis,"this.data._next",this.data._next)
       if (isAnalysis === 3 || isAnalysis === 4) {
-        console.log(this.data._next, "handle", isAnalysis);
         const index = event.target?.id.split(".").pop() ?? 0;
         const questions = this.data._next.questions;
-        // questions[index].required = true
-        console.log(questions[index], "handle==nextquestion");
-        // 如果questions[index]的css是select 如果questions里的options则options的length为空 questions[index].required = true
-      
         Object.assign(questions[index], event.detail);
         this.setData({ "_next.questions": questions });
-        // console.log(this.data._next, "handle==nextquestion", isAnalysis);
         this._next();
       } else {
         // 随访
@@ -123,13 +113,11 @@ Component({
           {},
           {
             transform({ data }: any) {
-              console.log(data, "剩余次数");
               return data?.residuedCou;
             },
           }
         );
-       this.triggerEvent("count", { count });
-        console.log("count",count);
+        this.triggerEvent("count", { count });
         if (count > 0) {
           // if (count < 0) {
           this.setData({
@@ -174,9 +162,7 @@ Component({
     async _next() {
       let isAnalysis: number;
       isAnalysis = wx.getStorageSync("isAnalysis");
-      console.log(this.data.messageType,"isAnalysis==next",isAnalysis,this.data._next.classify);
       if (isAnalysis === 3 || isAnalysis === 4) {
-        console.log("next刚开始对话管家",this.data._next.classify)
         // 对话管家
         if (this.data._next.classify === "tongue") {
           this._createMessage({
@@ -195,34 +181,30 @@ Component({
             type: "again",
             payload: { title: "" },
           });
-        } else if(this.data.messageType === 2){
+        } else if (this.data.messageType === 2) {
           // todo 如果是对话管家 调用dialogueManage/dialog 这个接口
           // 如果是健康评估 调用其他接口  但后端返回的数据是一样的
-          let data:any = {}
-          console.log(this.data._next,"isAnalysis111",isAnalysis);
-          if(isAnalysis === 3){
-            const res = await Post(
-              `/dialogueManage/dialog`,
-              this.data._next
-            );
-            data = res.data
-          }else{
+
+          let data: any = {};
+          if (isAnalysis === 3) {
+            const res = await Post(`/dialogueManage/dialog`, this.data._next);
+            data = res.data;
+          } else {
             const res = await Post(
               `/dialogueManage/dialogTreat`,
               this.data._next
             );
-            data = res.data
+            data = res.data;
           }
           // const { data } = await Post(
           //   `/dialogueManage/dialog`,
           //   this.data._next
           // );
-          console.log("获取的返回数据111",data)
           data.nextQuestions?.forEach((question: any, index: number) => {
+            // isAnalysis 2是随访  3健康管家 4健康评估
             if (isAnalysis === 2) {
               // 随访
               if (question.css === "tongue") {
-                console.log(question, "tonguetongue");
                 this._createMessage({
                   id: `${question.classify}.${question.id}.${index}`,
                   type: "analysis",
@@ -230,8 +212,6 @@ Component({
                 });
               }
             } else {
-              console.log(isAnalysis,"返回的question",question);
-              // question.required = true
               // 对话管家
               if (question.classify === "tongue_result") {
                 this._updateMessage({
@@ -241,7 +221,6 @@ Component({
                 });
               } else {
                 if (question.css === "tongue") {
-                  console.log(question, "tonguetongue");
                   this._createMessage({
                     id: `${question.classify}.${question.id}.${index}`,
                     type: "analysis",
@@ -254,16 +233,13 @@ Component({
                     payload: { title: question.content },
                   });
                 } else if (["select", "checkbox"].includes(question.css)) {
-                  console.log("select",question)
-                  // 如果question.options.length为0 则不显示
-                //  question?.options?.options.length>0?question.required=true:question.required=false
-                if (question.options && question.options.length > 0) {
-                  // 检查所有 item.options 的长度是否都为 0
-                  const allOptionsEmpty = question.options.every((item: any) => !item.options || item.options.length === 0);
-                  console.log("allOptionsEmpty",allOptionsEmpty)
-                  question.required = allOptionsEmpty;
-                }
-                 console.log("srequiredelect",question.required)
+                  if (question.options && question.options.length > 0) {
+                    // 检查所有 item.options 的长度是否都为 0
+                    const allOptionsEmpty = question.options.every(
+                      (item: any) => !item.options || item.options.length === 0
+                    );
+                    question.required = allOptionsEmpty;
+                  }
                   this._createMessage({
                     id: `${question.classify}.${question.id}.${index}`,
                     type: "select",
@@ -303,8 +279,6 @@ Component({
               });
             }
             if (data.over) return this._end();
-
-          
           }
           this.setData({
             [`_next.classify`]: data.classify,

+ 251 - 6
package-lock.json

@@ -10,13 +10,193 @@
       "dependencies": {
         "@vant/area-data": "^2.0.0",
         "@vant/weapp": "^1.11.7",
-        "address-smart-parse": "^3.0.3",
+        "address-parse": "^1.2.19",
         "tdesign-miniprogram": "^1.9.7"
       },
       "devDependencies": {
+        "babel-plugin-import": "^1.13.8",
         "miniprogram-api-typings": "^2.12.0"
       }
     },
+    "node_modules/@babel/code-frame": {
+      "version": "7.27.1",
+      "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.27.1.tgz",
+      "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@babel/helper-validator-identifier": "^7.27.1",
+        "js-tokens": "^4.0.0",
+        "picocolors": "^1.1.1"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@babel/generator": {
+      "version": "7.28.0",
+      "resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.28.0.tgz",
+      "integrity": "sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@babel/parser": "^7.28.0",
+        "@babel/types": "^7.28.0",
+        "@jridgewell/gen-mapping": "^0.3.12",
+        "@jridgewell/trace-mapping": "^0.3.28",
+        "jsesc": "^3.0.2"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@babel/helper-globals": {
+      "version": "7.28.0",
+      "resolved": "https://registry.npmmirror.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz",
+      "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@babel/helper-module-imports": {
+      "version": "7.27.1",
+      "resolved": "https://registry.npmmirror.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz",
+      "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@babel/traverse": "^7.27.1",
+        "@babel/types": "^7.27.1"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@babel/helper-string-parser": {
+      "version": "7.27.1",
+      "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
+      "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@babel/helper-validator-identifier": {
+      "version": "7.27.1",
+      "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz",
+      "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@babel/parser": {
+      "version": "7.28.0",
+      "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.28.0.tgz",
+      "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@babel/types": "^7.28.0"
+      },
+      "bin": {
+        "parser": "bin/babel-parser.js"
+      },
+      "engines": {
+        "node": ">=6.0.0"
+      }
+    },
+    "node_modules/@babel/template": {
+      "version": "7.27.2",
+      "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.27.2.tgz",
+      "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@babel/code-frame": "^7.27.1",
+        "@babel/parser": "^7.27.2",
+        "@babel/types": "^7.27.1"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@babel/traverse": {
+      "version": "7.28.0",
+      "resolved": "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.28.0.tgz",
+      "integrity": "sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@babel/code-frame": "^7.27.1",
+        "@babel/generator": "^7.28.0",
+        "@babel/helper-globals": "^7.28.0",
+        "@babel/parser": "^7.28.0",
+        "@babel/template": "^7.27.2",
+        "@babel/types": "^7.28.0",
+        "debug": "^4.3.1"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@babel/types": {
+      "version": "7.28.2",
+      "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.28.2.tgz",
+      "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@babel/helper-string-parser": "^7.27.1",
+        "@babel/helper-validator-identifier": "^7.27.1"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@jridgewell/gen-mapping": {
+      "version": "0.3.12",
+      "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz",
+      "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@jridgewell/sourcemap-codec": "^1.5.0",
+        "@jridgewell/trace-mapping": "^0.3.24"
+      }
+    },
+    "node_modules/@jridgewell/resolve-uri": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
+      "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=6.0.0"
+      }
+    },
+    "node_modules/@jridgewell/sourcemap-codec": {
+      "version": "1.5.4",
+      "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz",
+      "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/@jridgewell/trace-mapping": {
+      "version": "0.3.29",
+      "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz",
+      "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@jridgewell/resolve-uri": "^3.1.0",
+        "@jridgewell/sourcemap-codec": "^1.4.14"
+      }
+    },
     "node_modules/@vant/area-data": {
       "version": "2.0.0",
       "resolved": "https://registry.npmmirror.com/@vant/area-data/-/area-data-2.0.0.tgz",
@@ -29,11 +209,62 @@
       "integrity": "sha512-Rwn9BBnb4kHSV4XmvBicwtd42J+amEUfnFDcXJsGNPNX4a9c/DoT6YLsm4X1wB2+sQbdiQsbFBLAvGRBxCkD8g==",
       "license": "MIT"
     },
-    "node_modules/address-smart-parse": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmmirror.com/address-smart-parse/-/address-smart-parse-3.0.3.tgz",
-      "integrity": "sha512-MMhe9hFSJJWK6h2MTLVbsspmPDErMIX+ZtLoQlhpsVjqfiqzFWwfxVySt1xHds1nUIBOfGEJiIeF2lTy77AFVA==",
-      "license": "ISC"
+    "node_modules/address-parse": {
+      "version": "1.2.19",
+      "resolved": "https://registry.npmmirror.com/address-parse/-/address-parse-1.2.19.tgz",
+      "integrity": "sha512-LjTHC6dGDO/Ymh0WEZwvEb/XxGpm7IJEJVzNsy+aBQPGIQXs0T+SlytZIPnGNE1VYJ3fwwME2pSJDczmQaogvg==",
+      "license": "MIT",
+      "dependencies": {
+        "address-parse": "^1.2.19"
+      }
+    },
+    "node_modules/babel-plugin-import": {
+      "version": "1.13.8",
+      "resolved": "https://registry.npmmirror.com/babel-plugin-import/-/babel-plugin-import-1.13.8.tgz",
+      "integrity": "sha512-36babpjra5m3gca44V6tSTomeBlPA7cHUynrE2WiQIm3rEGD9xy28MKsx5IdO45EbnpJY7Jrgd00C6Dwt/l/2Q==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@babel/helper-module-imports": "^7.0.0"
+      }
+    },
+    "node_modules/debug": {
+      "version": "4.4.1",
+      "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.1.tgz",
+      "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "ms": "^2.1.3"
+      },
+      "engines": {
+        "node": ">=6.0"
+      },
+      "peerDependenciesMeta": {
+        "supports-color": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/js-tokens": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz",
+      "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/jsesc": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-3.1.0.tgz",
+      "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
+      "dev": true,
+      "license": "MIT",
+      "bin": {
+        "jsesc": "bin/jsesc"
+      },
+      "engines": {
+        "node": ">=6"
+      }
     },
     "node_modules/miniprogram-api-typings": {
       "version": "2.12.0",
@@ -42,6 +273,20 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/ms": {
+      "version": "2.1.3",
+      "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
+      "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/picocolors": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz",
+      "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+      "dev": true,
+      "license": "ISC"
+    },
     "node_modules/tdesign-miniprogram": {
       "version": "1.9.7",
       "resolved": "https://registry.npmmirror.com/tdesign-miniprogram/-/tdesign-miniprogram-1.9.7.tgz",

+ 2 - 1
package.json

@@ -9,10 +9,11 @@
   "dependencies": {
     "@vant/area-data": "^2.0.0",
     "@vant/weapp": "^1.11.7",
-    "address-smart-parse": "^3.0.3",
+    "address-parse": "^1.2.19",
     "tdesign-miniprogram": "^1.9.7"
   },
   "devDependencies": {
+    "babel-plugin-import": "^1.13.8",
     "miniprogram-api-typings": "^2.12.0"
   }
 }