express.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210
  1. <template>
  2. <!-- 商城 -->
  3. <view class="" style="padding: 0 24rpx">
  4. <view style="position: relative; padding-bottom: 20rpx">
  5. <!-- 自定义导航栏 -->
  6. <image
  7. src="../../static/images/index/back.png"
  8. style="
  9. width: 750rpx;
  10. height: 1200rpx;
  11. position: absolute;
  12. top: 0;
  13. z-index: -1;
  14. left: -24rpx;
  15. "
  16. mode=""
  17. >
  18. </image>
  19. <u-navbar
  20. bgColor="rgba(255, 215,215, 1)"
  21. :placeholder="true"
  22. :safeAreaInsetTop="true"
  23. >
  24. <view class="u-nav-slot" slot="left" style="display: flex">
  25. <view
  26. class=""
  27. style="width: 40rpx; height: 40rpx; position: relative"
  28. >
  29. <u-badge
  30. :absolute="true"
  31. :offset="[0, -8]"
  32. :type="type"
  33. max="99"
  34. :value="unReadCount"
  35. ></u-badge>
  36. <image
  37. @click="tochat"
  38. src="../../static/images/index/xiaoxi.png"
  39. mode=""
  40. style="width: 40rpx; height: 40rpx"
  41. >
  42. </image>
  43. </view>
  44. <image
  45. @click="counter"
  46. src="../../static/images/index/compile.png"
  47. mode=""
  48. style="width: 40rpx; height: 40rpx; margin-left: 22rpx"
  49. ></image>
  50. <image
  51. src="../../static/images/index/dianhua.png"
  52. mode=""
  53. style="width: 40rpx; height: 40rpx; margin-left: 22rpx"
  54. @click="callphone"
  55. ></image>
  56. </view>
  57. <view class="u-nav-slot" slot="center" style="width: 320rpx">
  58. <u-subsection
  59. bgColor="rgba(248, 50, 36, 0.1)"
  60. activeColor="#F83224"
  61. inactiveColor="#222"
  62. :list="list"
  63. :current="current"
  64. @change="sectionChange"
  65. ></u-subsection>
  66. </view>
  67. </u-navbar>
  68. <!-- 地址 -->
  69. <view class="address">
  70. <view class="left u-flex" style="display: flex">
  71. <view
  72. class="u-row-between left"
  73. style="display: flex; flex-direction: column"
  74. >
  75. <image
  76. src="../../static/express/ji.png"
  77. style="width: 40rpx; height: 40rpx"
  78. mode=""
  79. ></image>
  80. <image
  81. @click="changeadd"
  82. src="../../static/express/change.png"
  83. style="width: 40rpx; height: 40rpx"
  84. mode=""
  85. >
  86. </image>
  87. </view>
  88. <view
  89. class="u-row-between left"
  90. style="
  91. flex: 1;
  92. margin-left: 28rpx;
  93. border-bottom: 2rpx solid rgba(151, 151, 151, 0.08);
  94. display: flex;
  95. "
  96. >
  97. <view
  98. v-if="JSON.stringify(topadd) == '{}'"
  99. class="u-row-between"
  100. style=""
  101. @click="send"
  102. >
  103. <view class="pople">{{ i18n.sender }}</view>
  104. <view class="jiadd" style="margin-top: 14rpx">{{
  105. i18n.informat
  106. }}</view>
  107. </view>
  108. <view v-else class="u-row-between" style="" @click="send">
  109. <view class="">
  110. <text class="topname">{{ topadd.name }}</text>
  111. <text class="topaddress" style="margin-left: 8rpx">{{
  112. replacePhoneToStar(topadd.mobile)
  113. }}</text>
  114. </view>
  115. <view class="topaddress" style="margin-top: 14rpx">{{
  116. topadd.full_address
  117. }}</view>
  118. </view>
  119. <view class="u-flex" @click.stop="addbook(1)">
  120. <view class="" style="color: rgba(151, 151, 151, 1)">|</view>
  121. <text class="right">{{ i18n.addressbook }}</text>
  122. </view>
  123. </view>
  124. </view>
  125. <view
  126. class="left u-flex"
  127. style="
  128. display: flex;
  129. margin-top: 26rpx;
  130. border-bottom: 2rpx solid rgba(151, 151, 151, 0.08);
  131. "
  132. >
  133. <view
  134. class="u-row-between left"
  135. style="display: flex; flex-direction: column"
  136. >
  137. <image
  138. src="../../static/express/shou.png"
  139. style="width: 40rpx; height: 40rpx"
  140. mode=""
  141. ></image>
  142. <!-- <image src="../../static/express/change.png" style='width: 40rpx;;height:40rpx ;' mode=""> -->
  143. </view>
  144. <view
  145. class="u-row-between left"
  146. style="flex: 1; margin-left: 28rpx; display: flex"
  147. >
  148. <view
  149. v-if="JSON.stringify(bottomadd) == '{}'"
  150. class="u-row-between"
  151. style=""
  152. @click="recipirnt"
  153. >
  154. <view class="pople">{{ i18n.recipient }}</view>
  155. <view class="jiadd" style="margin-top: 14rpx">{{
  156. i18n.informate
  157. }}</view>
  158. </view>
  159. <view v-else class="u-row-between" style="" @click="recipirnt">
  160. <view class="">
  161. <text class="topname">{{ bottomadd.name }}</text>
  162. <text class="topaddress" style="margin-left: 8rpx">{{
  163. replacePhoneToStar(bottomadd.mobile)
  164. }}</text>
  165. </view>
  166. <view class="topaddress" style="margin-top: 14rpx">{{
  167. bottomadd.full_address
  168. }}</view>
  169. </view>
  170. <view class="u-flex" @click.stop="addbook(0)">
  171. <view class="" style="color: rgba(151, 151, 151, 1)">|</view>
  172. <text class="right">{{ i18n.addressbook }}</text>
  173. </view>
  174. </view>
  175. </view>
  176. <!-- 物品信息 -->
  177. <view class="info u-flex u-row-between">
  178. <view class="u-flex">
  179. <text class="wupin">{{ i18n.item }}</text>
  180. <view class="mast">{{ i18n.required }}</view>
  181. </view>
  182. <view
  183. v-if="JSON.stringify(goodinfo) === '{}'"
  184. class="u-flex"
  185. @click="goods"
  186. >
  187. <view class="change">{{ i18n.selection }}</view>
  188. <image
  189. src="../../static/express/next1.png"
  190. style="width: 28rpx; height: 28rpx; margin-left: 6rpx"
  191. mode=""
  192. ></image>
  193. </view>
  194. <view v-else class="goodname" @click="goods">
  195. {{ goodinfo.goodname }},{{ goodinfo.weight }}kg
  196. </view>
  197. </view>
  198. <!-- 跨境物流 -->
  199. <view class="info u-flex u-row-between">
  200. <view class="u-flex">
  201. <text class="wupin">{{ i18n.flow }}</text>
  202. </view>
  203. <view class="u-flex" @click="changewu">
  204. <!-- <text class="change" style="color: rgba(248, 50, 36, 1);">{{i18n.selection}}</text> -->
  205. <text class="change" style="color: rgba(248, 50, 36, 1)">{{
  206. leftname ? leftname + " | " + rightname : i18n.selection
  207. }}</text>
  208. <image
  209. v-if="leftname == ''"
  210. src="../../static/express/next1.png"
  211. style="width: 28rpx; height: 28rpx; margin-left: 6rpx"
  212. mode=""
  213. ></image>
  214. </view>
  215. </view>
  216. <!-- 去寄件 -->
  217. <view class="" style="margin-top: 34rpx">
  218. <view class="mail" @click="todev">
  219. {{ i18n.mail }}
  220. </view>
  221. </view>
  222. <view class="bottom u-flex u-row-between">
  223. <button
  224. style="
  225. background-color: transparent;
  226. padding-left: 0 !important;
  227. padding-right: 0 !important;
  228. margin: 0 !important;
  229. "
  230. open-type="share"
  231. class="u-flex"
  232. >
  233. <image
  234. src="../../static/express/share.png"
  235. style="width: 36rpx; height: 36rpx"
  236. mode=""
  237. ></image>
  238. <text class="friend">{{ i18n.share }}</text>
  239. </button>
  240. <view class="friend">|</view>
  241. <view class="u-flex" @click="counter">
  242. <image
  243. src="/static/images/index/compile.png"
  244. style="width: 36rpx; height: 36rpx"
  245. mode=""
  246. >
  247. </image>
  248. <text class="friend">{{ i18n.compute }}</text>
  249. </view>
  250. </view>
  251. </view>
  252. <!-- 我的包裹 -->
  253. <view class="parcel">
  254. <view class="u-flex u-row-between">
  255. <view class="myparcel">
  256. <text>{{ i18n.mine }}</text>
  257. <text style="color: rgba(248, 50, 36, 1)">{{ i18n.parcel }}</text>
  258. </view>
  259. <view class="add u-flex">
  260. <image
  261. src="../../static/express/add.png"
  262. mode=""
  263. style="width: 44rpx; height: 44rpx"
  264. ></image>
  265. <text class="addtext" @click="toparcel">{{ i18n.addsign }}</text>
  266. </view>
  267. </view>
  268. <view class="u-flex u-row-around" style="margin-top: 44rpx">
  269. <view class="flexc" @click="pack('to_transit')">
  270. <view
  271. class=""
  272. style="position: relative; width: 68rpx; height: 68rpx"
  273. >
  274. <u-badge
  275. :absolute="true"
  276. :offset="[0, -15]"
  277. :type="type"
  278. max="99"
  279. :value="transit"
  280. ></u-badge>
  281. <image
  282. src="/static/express/address.png"
  283. style="width: 68rpx; height: 68rpx"
  284. mode=""
  285. >
  286. </image>
  287. </view>
  288. <text style="margin-top: 16rpx" class="bao">{{
  289. i18n.deliver
  290. }}</text>
  291. </view>
  292. <view
  293. class="flexc"
  294. style="position: relative"
  295. @click="pack('transit_receipt')"
  296. >
  297. <view
  298. class=""
  299. style="position: relative; width: 68rpx; height: 68rpx"
  300. >
  301. <u-badge
  302. :absolute="true"
  303. :offset="[0, -15]"
  304. :type="type"
  305. max="99"
  306. :value="receipt"
  307. ></u-badge>
  308. <image
  309. src="/static/express/sign.png"
  310. style="width: 68rpx; height: 68rpx"
  311. mode=""
  312. ></image>
  313. </view>
  314. <text style="margin-top: 16rpx" class="bao">{{ i18n.Sign }}</text>
  315. </view>
  316. <view
  317. class="flexc"
  318. style="position: relative"
  319. @click="pack('to_overseas')"
  320. >
  321. <view
  322. class=""
  323. style="position: relative; width: 68rpx; height: 68rpx"
  324. >
  325. <u-badge
  326. :absolute="true"
  327. :offset="[0, -15]"
  328. :type="type"
  329. max="99"
  330. :value="overseas"
  331. ></u-badge>
  332. <image
  333. src="../../static/express/send.png"
  334. style="width: 68rpx; height: 68rpx"
  335. mode=""
  336. ></image>
  337. </view>
  338. <text style="margin-top: 16rpx" class="bao">{{
  339. i18n.overseas
  340. }}</text>
  341. </view>
  342. </view>
  343. </view>
  344. <!-- 拼包 -->
  345. <view class="u-flex u-row-between" style="margin-top: 32rpx">
  346. <view class="u-flex">
  347. <text class="hai">{{ i18n.parceling }}</text>
  348. <image
  349. v-if="language == 'zh-CN'"
  350. style="width: 180rpx; height: 32rpx"
  351. src="/static/express/label.png"
  352. mode=""
  353. ></image>
  354. <image
  355. v-if="language == 'en-US'"
  356. style="width: 300rpx; height: 32rpx"
  357. src="/static/express/label1.png"
  358. mode=""
  359. ></image>
  360. <image
  361. v-if="language == 'es-ES'"
  362. style="width: 334rpx; height: 32rpx"
  363. src="/static/express/label2.png"
  364. mode=""
  365. ></image>
  366. <image
  367. v-if="language == 'it-IT'"
  368. style="width: 366rpx; height: 32rpx"
  369. src="/static/express/label3.png"
  370. mode=""
  371. ></image>
  372. </view>
  373. <view class="u-flex">
  374. <text class="more" @click="more">{{ i18n.more }}</text>
  375. <image
  376. src="../../static/express/next2.png"
  377. style="width: 30rpx; height: 30rpx"
  378. mode=""
  379. ></image>
  380. </view>
  381. </view>
  382. <!-- 拼包数据 -->
  383. <view class="label" v-for="(item, idx) in expressList" :key="idx">
  384. <view class="" style="display: flex">
  385. <view class="left flexc">
  386. <text class="bourn">{{ i18n.destination }}</text>
  387. <view class="addres">{{ item.containerBase.country_name }}</view>
  388. <view class="addres">{{ item.containerBase.province_name }}</view>
  389. </view>
  390. <view class="" style="flex: 1; margin-left: 20rpx">
  391. <view class="u-flex u-row-between">
  392. <view class="">
  393. <text class="bigtitle" v-if="item.type == 'normal'">{{
  394. i18n.Ordinary
  395. }}</text>
  396. <text class="bigtitle" v-else>{{ i18n.Special }}</text>
  397. <text style="margin: 0 8rpx">|</text>
  398. <text v-if="language == 'zh-CN'" class="bigtitle">{{
  399. item.transportType.name_cn
  400. }}</text>
  401. <text v-if="language == 'en-US'" class="bigtitle">{{
  402. item.transportType.name_en
  403. }}</text>
  404. <text v-if="language == 'es-ES'" class="bigtitle">{{
  405. item.transportType.name_es
  406. }}</text>
  407. <text v-if="language == 'it-IT'" class="bigtitle">{{
  408. item.transportType.name_ita
  409. }}</text>
  410. </view>
  411. <view class="mon">
  412. <text class="timeb">{{ i18n.price }}</text>
  413. <text>¥</text>
  414. <text v-if="item.price" style="font-size: 32rpx">{{
  415. item.price.slice(0, -3)
  416. }}</text>
  417. <text v-if="item.price">{{ item.price.slice(-3) }}</text>
  418. </view>
  419. </view>
  420. <view class="" style="margin-top: 34rpx">
  421. <u-line-progress
  422. activeColor="rgba(255, 21, 21, 1)"
  423. :percentage="item.progress"
  424. height="6"
  425. :showText="false"
  426. ></u-line-progress>
  427. </view>
  428. <view class="u-flex u-row-between" style="margin-top: 20rpx">
  429. <view class="u-flex">
  430. <view class="">
  431. <text class="timeb">{{ i18n.already }} </text>
  432. <text class="timeb" style="color: rgba(255, 21, 21, 1)"
  433. >{{ item.used_weight }}kg</text
  434. >
  435. </view>
  436. <text style="margin: 0 8rpx">|</text>
  437. <view class="">
  438. <text class="timeb">{{ i18n.residue }} </text>
  439. <text class="timeb" style="color: rgba(255, 21, 21, 1)"
  440. >{{ item.residual_weight }}kg</text
  441. >
  442. </view>
  443. </view>
  444. <view class="">
  445. <text class="timeb">{{ i18n.plan }}{{ item.progress }}%</text>
  446. </view>
  447. </view>
  448. </view>
  449. </view>
  450. <view class="u-flex u-row-between" style="margin-top: 32rpx">
  451. <text class="timea"
  452. >{{ i18n.start }}:{{ item.begin_date }}/{{ i18n.cut }}:{{
  453. item.end_date
  454. }}</text
  455. >
  456. <view class="pinb" @click="toaccount(item)">{{
  457. i18n.goparceling
  458. }}</view>
  459. </view>
  460. </view>
  461. </view>
  462. <u-popup round="28" :show="logshow" @close="close">
  463. <view class="pop">
  464. <kj-flow
  465. :language="language"
  466. :goodstype="goodinfo.goodtype"
  467. ref="child"
  468. :province_id="province_id"
  469. @success="success"
  470. @close="close()"
  471. :leftchangea="leftchange"
  472. :rightchangea="rightchange"
  473. :typeida="typeid"
  474. ></kj-flow>
  475. </view>
  476. </u-popup>
  477. <!-- <u-button @click="show = true">打开</u-button> -->
  478. <view class="" style="height: 160rpx"></view>
  479. <kj-tabbar :value1="0"></kj-tabbar>
  480. </view>
  481. </template>
  482. <script>
  483. import { conn } from "@/utils/WebIM";
  484. export default {
  485. data() {
  486. return {
  487. //顶部分段器
  488. list: [],
  489. current: 0,
  490. type: "error",
  491. percentage: 50, //进度条
  492. logshow: false, //物流选择
  493. status_collection: "", //我的包裹选择值
  494. transit: 0, //发往中转点
  495. receipt: 0, //中转已签收
  496. overseas: 0, //正发往海外
  497. topadd: {}, //新建寄件人
  498. bottomadd: {}, //新建收件人
  499. province_id: "",
  500. leftname: "",
  501. rightname: "",
  502. container_id: "", //货柜列表
  503. language: "zh-CN",
  504. goodinfo: {}, //物品信息
  505. unit_price: "",
  506. expressList: [],
  507. leftchange: "",
  508. rightchange: "",
  509. typeid: "",
  510. unReadCount: 0,
  511. };
  512. },
  513. onLoad(options) {
  514. this.list = [this.i18n.border, this.i18n.shop];
  515. if (options.current) {
  516. this.current = options.current;
  517. }
  518. this.topadd = {}; //新建寄件人
  519. this.bottomadd = {}; //新建收件人
  520. },
  521. onShow() {
  522. this.list[0] = this.i18n.border;
  523. this.list[1] = this.i18n.shop;
  524. // uni.setNavigationBarTitle({
  525. // title: this.i18n.setup
  526. // })
  527. this.express(); //获取包裹数量
  528. if (uni.getStorageSync("language") != "") {
  529. this.language = uni.getStorageSync("language");
  530. }
  531. this.getexpress();
  532. this.getlist();
  533. },
  534. computed: {
  535. i18n() {
  536. return this.$t("index");
  537. },
  538. },
  539. methods: {
  540. getlist() {
  541. this.unReadCount = 0;
  542. conn
  543. .getServerConversations({
  544. pageSize: 50,
  545. cursor: "",
  546. })
  547. .then((res) => {
  548. console.log(res);
  549. res.data.conversations.forEach((item) => {
  550. this.unReadCount += item.unReadCount;
  551. });
  552. });
  553. },
  554. onShareAppMessage(res) {
  555. if (res.from === "button") {
  556. // 来自页面内分享按钮
  557. console.log(res.target);
  558. }
  559. return {
  560. title: this.i18n.border,
  561. path: "/pages/express/express",
  562. };
  563. },
  564. callphone() {
  565. uni.$u.http
  566. .get("/api/config", {
  567. params: {
  568. module: "basic",
  569. },
  570. })
  571. .then((res) => {
  572. console.log(res);
  573. uni.makePhoneCall({
  574. phoneNumber: res.service_mobile,
  575. });
  576. })
  577. .catch(() => {});
  578. },
  579. //价格计算
  580. calculate() {
  581. uni.$u.http
  582. .get("/api/express-order/calculate", {
  583. params: {
  584. container_id: this.container_id, // 是 String 货柜ID
  585. weight: this.goodinfo.weight, //是 String 重量(kg)
  586. length: this.goodinfo.length, //是 String 长(m)
  587. width: this.goodinfo.width, //是 String 宽(m)
  588. height: this.goodinfo.height, //是 String 高(m)
  589. type: this.goodinfo.goodtype, //是 String 商品类型: normal.普通商品,
  590. },
  591. })
  592. .then((res) => {
  593. console.log(res);
  594. uni.navigateTo({
  595. url:
  596. "/pageB/delivery?goodinfo=" +
  597. encodeURIComponent(JSON.stringify(this.goodinfo)) +
  598. "&topadd=" +
  599. encodeURIComponent(JSON.stringify(this.topadd)) +
  600. "&bottom=" +
  601. encodeURIComponent(JSON.stringify(this.bottomadd)) +
  602. "&leftname=" +
  603. this.leftname +
  604. "&rightname=" +
  605. this.rightname +
  606. "&container_id=" +
  607. this.container_id +
  608. "&unit_price=" +
  609. this.unit_price +
  610. "&all=" +
  611. res,
  612. });
  613. })
  614. .catch(() => {});
  615. },
  616. //拼包列表
  617. getexpress() {
  618. uni.$u.http
  619. .get("/api/express-group-package", {
  620. params: {
  621. is_page: 0,
  622. page: 1,
  623. limit: 3,
  624. transport_type_id: "",
  625. container_base_id: "",
  626. type: "",
  627. },
  628. })
  629. .then((res) => {
  630. this.expressList = res;
  631. })
  632. .catch(() => {});
  633. },
  634. //跨境物流选择
  635. success(msg) {
  636. this.logshow = false;
  637. this.leftname = msg.leftname;
  638. this.container_id = msg.dateid;
  639. this.rightname = msg.rightname;
  640. this.unit_price = msg.unit_price;
  641. this.leftchange = msg.leftchange;
  642. this.rightchange = msg.rightchange;
  643. this.typeid = msg.typeid;
  644. },
  645. //物流选择
  646. changewu() {
  647. var that = this;
  648. if (this.province_id) {
  649. this.logshow = true;
  650. setTimeout(() => {
  651. console.log("2222222", this.$refs.child);
  652. that.$refs.child.transport();
  653. }, 800);
  654. } else {
  655. this.$u.toast(this.i18n.selectcity);
  656. }
  657. },
  658. //改变地址
  659. changeadd() {
  660. var a = {};
  661. a = this.topadd;
  662. this.topadd = this.bottomadd;
  663. this.bottomadd = a;
  664. this.province_id = this.bottomadd.province_id;
  665. },
  666. //正则匹配手机号
  667. replacePhoneToStar: function (phone) {
  668. if (phone) {
  669. return phone.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  670. }
  671. },
  672. //地址薄
  673. addbook(index) {
  674. var that = this;
  675. uni.navigateTo({
  676. url: "/pageC/addressManagement/addressManagement?tabs=" + index,
  677. events: {
  678. getadd(res) {
  679. if (index == 1) {
  680. that.topadd = res;
  681. console.log("topadd", that.topadd);
  682. } else {
  683. that.bottomadd = res;
  684. console.log("bottom", that.bottomadd);
  685. that.province_id = that.bottomadd.province_id;
  686. }
  687. },
  688. },
  689. });
  690. },
  691. //我的包裹
  692. express() {
  693. uni.$u.http
  694. .get("/api/express-order/status-count", {})
  695. .then((res) => {
  696. console.log(res);
  697. this.overseas = res.to_overseas;
  698. this.receipt = res.transit_receipt;
  699. this.transit = res.to_transit;
  700. })
  701. .catch(() => {});
  702. },
  703. todev() {
  704. if (JSON.stringify(this.topadd) === "{}") {
  705. this.$u.toast("请填写寄件人地址");
  706. } else if (JSON.stringify(this.bottomadd) === "{}") {
  707. this.$u.toast("请填写收件人地址");
  708. } else if (JSON.stringify(this.goodinfo) === "{}") {
  709. this.$u.toast("请填写物品信息");
  710. } else if (this.leftname == "") {
  711. this.$u.toast("请选择物流方式");
  712. } else {
  713. this.calculate();
  714. }
  715. },
  716. count() {
  717. uni.navigateTo({
  718. url: "/pageB/account",
  719. });
  720. },
  721. pack(index) {
  722. uni.navigateTo({
  723. // url: '/pageB/myPackage?index=' + index
  724. url: "/pageC/myPackage/myPackage?type=" + index,
  725. });
  726. },
  727. more() {
  728. uni.navigateTo({
  729. url: "/pageB/list/list",
  730. });
  731. },
  732. //拼包快递
  733. toaccount(info) {
  734. uni.navigateTo({
  735. url:
  736. "/pageB/ParcelExpress?expressinfo=" +
  737. encodeURIComponent(JSON.stringify(info)) +
  738. "&type=" +
  739. "pin",
  740. });
  741. },
  742. //物流计算器
  743. counter() {
  744. uni.navigateTo({
  745. url: "/pageA/counter",
  746. });
  747. },
  748. //消息
  749. tochat() {
  750. uni.navigateTo({
  751. url: "/pageA/chat/news",
  752. });
  753. },
  754. //物品信息
  755. goods() {
  756. var that = this;
  757. if (JSON.stringify(this.goodinfo) == "{}") {
  758. uni.navigateTo({
  759. url: "/pageB/goods",
  760. events: {
  761. goodinfo: function (res) {
  762. console.log("goodinfo", res);
  763. that.goodinfo = res;
  764. },
  765. },
  766. });
  767. } else {
  768. uni.navigateTo({
  769. url:
  770. "/pageB/goods?goodinfo=" +
  771. encodeURIComponent(JSON.stringify(this.goodinfo)),
  772. events: {
  773. goodinfo: function (res) {
  774. that.goodinfo = res;
  775. console.log(res);
  776. },
  777. },
  778. });
  779. }
  780. },
  781. //寄件人信息
  782. send() {
  783. var that = this;
  784. if (JSON.stringify(that.topadd) == "{}") {
  785. uni.navigateTo({
  786. url: "/pageC/addEditAddress/addEditAddress",
  787. events: {
  788. topadd: function (res) {
  789. // console.log(res);
  790. that.topadd = res;
  791. },
  792. },
  793. });
  794. } else {
  795. var that = this;
  796. uni.navigateTo({
  797. url: "/pageC/addEditAddress/addEditAddress?id=" + that.topadd.id,
  798. events: {
  799. topadd: function (res) {
  800. // console.log(res);
  801. that.topadd = res;
  802. },
  803. },
  804. });
  805. }
  806. },
  807. recipirnt() {
  808. var that = this;
  809. if (JSON.stringify(that.bottomadd) == "{}") {
  810. uni.navigateTo({
  811. url: "/pageB/recipientinfo",
  812. events: {
  813. bottomadd: function (res) {
  814. console.log(res);
  815. that.bottomadd = res;
  816. that.province_id = res.province_id;
  817. },
  818. },
  819. });
  820. } else {
  821. uni.navigateTo({
  822. url: "/pageB/recipientinfo?id=" + that.bottomadd.id,
  823. events: {
  824. bottomadd: function (res) {
  825. console.log(res);
  826. that.bottomadd = res;
  827. that.province_id = res.province_id;
  828. },
  829. },
  830. });
  831. }
  832. },
  833. close() {
  834. this.logshow = false;
  835. },
  836. //分段器切换
  837. sectionChange(index) {
  838. this.current = index;
  839. console.log(index);
  840. if (this.current == 1) {
  841. uni.switchTab({
  842. url: "/pages/index/index?current=1",
  843. });
  844. this.current = 0;
  845. }
  846. },
  847. toparcel() {
  848. uni.navigateTo({
  849. url: "/pageB/parcel",
  850. });
  851. },
  852. },
  853. };
  854. </script>
  855. <style lang="scss" scoped>
  856. button {
  857. border: 0rpx solid rgba(0, 0, 0, 1) !important;
  858. }
  859. page {
  860. background-color: rgba(0, 0, 0, 0);
  861. }
  862. .bao {
  863. font-family: PingFangSC, PingFang SC;
  864. font-weight: 400;
  865. font-size: 26rpx;
  866. color: #222222;
  867. line-height: 36rpx;
  868. text-align: center;
  869. font-style: normal;
  870. }
  871. .goodname {
  872. font-family: SFPro, SFPro;
  873. font-weight: 400;
  874. font-size: 28rpx;
  875. color: #222222;
  876. line-height: 32rpx;
  877. text-align: left;
  878. font-style: normal;
  879. }
  880. .topname {
  881. font-family: PingFangSC, PingFang SC;
  882. font-weight: 500;
  883. font-size: 30rpx;
  884. color: #222222;
  885. line-height: 42rpx;
  886. text-align: left;
  887. font-style: normal;
  888. }
  889. .topaddress {
  890. font-family: PingFangSC, PingFang SC;
  891. font-weight: 400;
  892. font-size: 26rpx;
  893. color: #777777;
  894. line-height: 36rpx;
  895. text-align: left;
  896. font-style: normal;
  897. }
  898. .pop {
  899. font-family: PingFangSC, PingFang SC;
  900. font-weight: 500;
  901. font-size: 36rpx;
  902. color: #333333;
  903. line-height: 50rpx;
  904. text-align: left;
  905. font-style: normal;
  906. padding: 32rpx 28rpx 0 0;
  907. box-sizing: border-box;
  908. }
  909. .mon {
  910. font-family: HarmonyOS_Sans_Medium;
  911. font-size: 20rpx;
  912. color: #f83224;
  913. line-height: 26rpx;
  914. text-align: left;
  915. font-style: normal;
  916. font-weight: 600;
  917. }
  918. .bigtitle {
  919. font-family: PingFangSC, PingFang SC;
  920. font-weight: 600;
  921. font-size: 28rpx;
  922. color: #222222;
  923. line-height: 40rpx;
  924. text-align: left;
  925. font-style: normal;
  926. }
  927. .timeb {
  928. font-family: PingFangSC, PingFang SC;
  929. font-weight: 400;
  930. font-size: 22rpx;
  931. color: #666666;
  932. line-height: 32rpx;
  933. text-align: left;
  934. font-style: normal;
  935. }
  936. .timea {
  937. font-family: PingFangSC, PingFang SC;
  938. font-weight: 400;
  939. font-size: 22rpx;
  940. color: #555555;
  941. line-height: 32rpx;
  942. text-align: left;
  943. font-style: normal;
  944. }
  945. .pinb {
  946. width: 148rpx;
  947. height: 64rpx;
  948. background: #ff1515;
  949. border-radius: 42rpx;
  950. font-family: PingFangSC, PingFang SC;
  951. font-weight: 500;
  952. font-size: 28rpx;
  953. color: #ffffff;
  954. line-height: 64rpx;
  955. text-align: center;
  956. font-style: normal;
  957. }
  958. .label {
  959. margin-top: 20rpx;
  960. width: 702rpx;
  961. // height: 288rpx;
  962. background: #ffffff;
  963. border-radius: 16rpx;
  964. padding: 32rpx 20rpx;
  965. box-sizing: border-box;
  966. .left {
  967. width: 144rpx;
  968. height: 144rpx;
  969. background: #f5f5f5;
  970. border-radius: 8rpx;
  971. .bourn {
  972. font-family: PingFangSC, PingFang SC;
  973. font-weight: 400;
  974. font-size: 20rpx;
  975. color: #222222;
  976. line-height: 28rpx;
  977. text-align: left;
  978. font-style: normal;
  979. }
  980. .addres {
  981. font-family: PingFangSC, PingFang SC;
  982. font-weight: 500;
  983. font-size: 28rpx;
  984. color: #222222;
  985. line-height: 40rpx;
  986. text-align: left;
  987. font-style: normal;
  988. }
  989. }
  990. }
  991. .flexc {
  992. display: flex;
  993. flex-direction: column;
  994. justify-content: center;
  995. align-items: center;
  996. }
  997. .hai {
  998. font-family: PingFangSC, PingFang SC;
  999. font-weight: 600;
  1000. font-size: 32rpx;
  1001. color: #222222;
  1002. line-height: 44rpx;
  1003. text-align: left;
  1004. font-style: normal;
  1005. margin-right: 10rpx;
  1006. }
  1007. .more {
  1008. font-family: PingFangSC, PingFang SC;
  1009. font-weight: 400;
  1010. font-size: 24rpx;
  1011. color: #f83224;
  1012. line-height: 34rpx;
  1013. text-align: left;
  1014. font-style: normal;
  1015. }
  1016. .parcel {
  1017. width: 702rpx;
  1018. // height: 260rpx;
  1019. background: #ffffff;
  1020. border-radius: 16rpx;
  1021. margin-top: 20rpx;
  1022. padding: 24rpx;
  1023. box-sizing: border-box;
  1024. .myparcel {
  1025. font-family: PingFangSC, PingFang SC;
  1026. font-weight: 600;
  1027. font-size: 28rpx;
  1028. color: #222222;
  1029. line-height: 40rpx;
  1030. text-align: left;
  1031. font-style: normal;
  1032. }
  1033. .add {
  1034. // width: 240rpx;
  1035. height: 48rpx;
  1036. background: rgba(248, 50, 36, 0.06);
  1037. border-radius: 24rpx;
  1038. .addtext {
  1039. font-family: PingFangSC, PingFang SC;
  1040. font-weight: 600;
  1041. font-size: 20rpx;
  1042. color: #000000;
  1043. line-height: 28rpx;
  1044. text-align: left;
  1045. font-style: normal;
  1046. }
  1047. }
  1048. }
  1049. .address {
  1050. width: 702rpx;
  1051. // height: 776rpx;
  1052. background: #ffffff;
  1053. border-radius: 20rpx;
  1054. padding: 48rpx 24rpx 36rpx;
  1055. box-sizing: border-box;
  1056. margin-top: 38rpx;
  1057. .bottom {
  1058. padding: 0 76rpx;
  1059. box-sizing: border-box;
  1060. margin-top: 48rpx;
  1061. .friend {
  1062. font-family: PingFangSC, PingFang SC;
  1063. font-weight: 400;
  1064. font-size: 28rpx;
  1065. color: #555555;
  1066. line-height: 40rpx;
  1067. text-align: left;
  1068. font-style: normal;
  1069. margin-left: 12rpx;
  1070. }
  1071. }
  1072. .mail {
  1073. width: 646rpx;
  1074. height: 84rpx;
  1075. background: #f83224;
  1076. box-shadow: 0rpx 16rpx 40rpx -12rpx rgba(255, 21, 21, 0.5);
  1077. border-radius: 44rpx;
  1078. font-family: PingFangSC, PingFang SC;
  1079. font-weight: 500;
  1080. font-size: 32rpx;
  1081. color: #ffffff;
  1082. line-height: 84rpx;
  1083. text-align: center;
  1084. font-style: normal;
  1085. }
  1086. .info {
  1087. height: 100rpx;
  1088. border-bottom: 2rpx solid rgba(151, 151, 151, 0.08);
  1089. .wupin {
  1090. font-family: PingFangSC, PingFang SC;
  1091. font-weight: 400;
  1092. font-size: 28rpx;
  1093. color: #333333;
  1094. line-height: 40rpx;
  1095. text-align: left;
  1096. font-style: normal;
  1097. }
  1098. .change {
  1099. font-family: PingFangSC, PingFang SC;
  1100. font-weight: 400;
  1101. font-size: 28rpx;
  1102. color: #666666;
  1103. line-height: 40rpx;
  1104. text-align: left;
  1105. font-style: normal;
  1106. }
  1107. .mast {
  1108. // width: 62rpx;
  1109. height: 30rpx;
  1110. border-radius: 16rpx;
  1111. border: 1rpx solid #f83224;
  1112. font-family: PingFangSC, PingFang SC;
  1113. font-weight: 400;
  1114. font-size: 20rpx;
  1115. color: #ff1515;
  1116. line-height: 30rpx;
  1117. text-align: center;
  1118. font-style: normal;
  1119. margin-left: 12rpx;
  1120. padding: 0 4rpx;
  1121. box-sizing: border-box;
  1122. }
  1123. }
  1124. .left {
  1125. height: 128rpx;
  1126. .pople {
  1127. font-family: PingFangSC, PingFang SC;
  1128. font-weight: 500;
  1129. font-size: 30rpx;
  1130. color: #222222;
  1131. line-height: 42rpx;
  1132. text-align: left;
  1133. font-style: normal;
  1134. }
  1135. .jiadd {
  1136. font-family: PingFangSC, PingFang SC;
  1137. font-weight: 400;
  1138. font-size: 26rpx;
  1139. color: #777777;
  1140. line-height: 36rpx;
  1141. text-align: left;
  1142. font-style: normal;
  1143. }
  1144. .right {
  1145. font-family: PingFangSC, PingFang SC;
  1146. font-weight: 600;
  1147. font-size: 26rpx;
  1148. color: #222222;
  1149. line-height: 36rpx;
  1150. text-align: left;
  1151. font-style: normal;
  1152. margin-left: 18rpx;
  1153. }
  1154. }
  1155. }
  1156. // ::v-deep .u-navbar__content.data-v-1194bf80 {
  1157. // background-color: rgba(0, 0, 0, 0) !important;
  1158. // }
  1159. // ::v-deep .u-status-bar.data-v-13f16680 {
  1160. // background-color: rgba(0, 0, 0, 0) !important;
  1161. // }
  1162. ::v-deep .u-subsection--button.data-v-b14d3440 {
  1163. /* padding: 6rpx 34rpx !important; */
  1164. border-radius: 64rpx !important;
  1165. }
  1166. ::v-deep .u-subsection--button__bar.data-v-b14d3440 {
  1167. border-radius: 32rpx !important;
  1168. }
  1169. </style>