From 32ff09e5fd3d64dfed727316854c1a706a7fb6c8 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Wed, 24 Apr 2024 18:00:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=AE=9A=E4=BD=8Dbu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/payment/index.vue | 4 ++-- pages/cloud_warehouse/market/market.vue | 15 ++++++++++++++- utils/uniMP.js | 3 ++- utils/uniMPevent.js | 2 +- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/components/payment/index.vue b/components/payment/index.vue index 44e3e26..2024309 100644 --- a/components/payment/index.vue +++ b/components/payment/index.vue @@ -84,8 +84,8 @@ default: '' }, sale_type: { - type: String, - default: '' + type: [Number,String], + default: 1 } }, data() { diff --git a/pages/cloud_warehouse/market/market.vue b/pages/cloud_warehouse/market/market.vue index ce8f75a..282a92b 100644 --- a/pages/cloud_warehouse/market/market.vue +++ b/pages/cloud_warehouse/market/market.vue @@ -628,7 +628,7 @@ long: longitude }).then(res => { let town = res.data.address_reference.town.title - let street_id = street_id = res.data.address_reference.town.id + let street_id = res.data.address_reference.town.id this.street = res.data.address_reference.town.title; this.$store.commit('setAddress', { street_id: street_id, @@ -637,6 +637,19 @@ uni.$emit('getLocation_succees', { street_id, }); + uni.$emit('changeAddress', { + addr:{ + address: res.data.address, + location: `${res.data.location.lat},${res.data.location.lng}` + }, + area: res.data.ad_info.adcode, + latitude: res.data.location.lat, + longitude: res.data.location.lng, + street:{ + code: street_id, + name: town + } + }) this.where.location = `${latitude},${longitude}`; this.$nextTick(() => { setTimeout(() => { diff --git a/utils/uniMP.js b/utils/uniMP.js index 8ebfd45..7ac5c78 100644 --- a/utils/uniMP.js +++ b/utils/uniMP.js @@ -339,7 +339,8 @@ const open = (id = null) => { uniMP: true, token: token, avatar: avatar, - } + }, + // path: '/pages/index/index?unimp=true' }, (ret) => { uni.hideLoading(); if (0 != ret.code) { diff --git a/utils/uniMPevent.js b/utils/uniMPevent.js index 12bd385..5f38d08 100644 --- a/utils/uniMPevent.js +++ b/utils/uniMPevent.js @@ -3,7 +3,7 @@ import { uniMPgetLocation, test } from "@/utils/uniMPfunction.js" -console.log(123) + export const initEvent = () => { mp.onUniMPEventReceive(async (ret) => { console.log('小程序事件: ', ret);