From 7057a880b4a3c9b116f0fd4f49b18fe54e19ca15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=85=E4=BF=9D=E5=90=8C=E5=AD=A6?= <3228274159@qq.com> Date: Fri, 28 Jun 2024 09:30:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BE=AE=E4=BF=A1=E6=94=AF?= =?UTF-8?q?=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/baseurl.js | 2 +- pages/index/index.vue | 9 +++++++-- stor/index.js | 9 ++++++--- unpackage/dist/dev/mp-weixin/common/baseurl.js | 2 +- unpackage/dist/dev/mp-weixin/pages/index/index.js | 9 +++++++-- unpackage/dist/dev/mp-weixin/stor/index.js | 11 +++++++---- 6 files changed, 29 insertions(+), 13 deletions(-) diff --git a/common/baseurl.js b/common/baseurl.js index 020a12f..3fdf07b 100644 --- a/common/baseurl.js +++ b/common/baseurl.js @@ -4,7 +4,7 @@ //基础地址 // export const BASE_URL = 'https://h5.zhenpin.yhd.la/' // export const BASE_URL = 'https://h3.zhenpin.yhd.la/' -export const BASE_URL = 'https://h3.zhenpin.yhd.la/' +export const BASE_URL = 'https://h5.zhenpin.yhd.la/' export const BASE_URLS = 'http://47.97.35.139:19260/' export const BASE_URLSS = 'http://47.97.35.139:19270/' //微信appid diff --git a/pages/index/index.vue b/pages/index/index.vue index c51b02d..1f8b6f4 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -296,8 +296,13 @@ }) } const myGps = () => { - longitude.value=uni.getStorageSync('longitude') - latitude.value = uni.getStorageSync('latitude') + longitude.value=0 + latitude.value =0 + setTimeout(()=>{ + longitude.value=uni.getStorageSync('longitude') + latitude.value = uni.getStorageSync('latitude') + },500) + console.log(longitude.value,latitude.value); console.log("返回中心点"); } const iiii = () => { diff --git a/stor/index.js b/stor/index.js index 40eb672..b37d0d1 100644 --- a/stor/index.js +++ b/stor/index.js @@ -89,6 +89,7 @@ export const storindex = defineStore('storindex', () => { p.value = 0 } else { console.log("out_trade_no", res); + console.log('这是订单号'+res); const res1 = await getWxPlay({ appId: appid, phone: uni.getStorageSync('phoneNumber'), @@ -114,7 +115,7 @@ export const storindex = defineStore('storindex', () => { console.log('用户付款成功', res2); //获取扫码后的设备id和手机号验证传入订单信息启动设备 - const res4 = await ({ + const res4 = await start({ mid: uni.getStorageSync('mid'), price: 100, time: times.value, @@ -147,9 +148,10 @@ export const storindex = defineStore('storindex', () => { }) //不为200或者0的时候启动失败并提示原因。 } else { + console.log(res4); uni.showToast({ icon: 'none', - title: `${res4.data.statusText},请在我的页面联系客服解决`, + title: `请在我的页面联系客服解决`, duration: 1200, success: async (res) => { p.value = 0 @@ -399,9 +401,10 @@ export const storindex = defineStore('storindex', () => { }) } else { p.value = 0 + console.log(res4); uni.showToast({ icon: 'none', - title: `${res4.data.statusText},请在我的页面联系客服解决`, + title: `请在我的页面联系客服解决`, duration: 1200, success: (res) => { uni.setStorageSync('orderid', orderid.value) diff --git a/unpackage/dist/dev/mp-weixin/common/baseurl.js b/unpackage/dist/dev/mp-weixin/common/baseurl.js index 17d5707..fbc524a 100644 --- a/unpackage/dist/dev/mp-weixin/common/baseurl.js +++ b/unpackage/dist/dev/mp-weixin/common/baseurl.js @@ -1,5 +1,5 @@ "use strict"; -const BASE_URL = "https://h3.zhenpin.yhd.la/"; +const BASE_URL = "https://h5.zhenpin.yhd.la/"; const BASE_URLS = "http://47.97.35.139:19260/"; const BASE_URLSS = "http://47.97.35.139:19270/"; const appid = "wxc5f11d5f96fbd989"; diff --git a/unpackage/dist/dev/mp-weixin/pages/index/index.js b/unpackage/dist/dev/mp-weixin/pages/index/index.js index b640db9..fb5f671 100644 --- a/unpackage/dist/dev/mp-weixin/pages/index/index.js +++ b/unpackage/dist/dev/mp-weixin/pages/index/index.js @@ -116,8 +116,13 @@ const _sfc_main = { }); }; const myGps = () => { - longitude.value = common_vendor.index.getStorageSync("longitude"); - latitude.value = common_vendor.index.getStorageSync("latitude"); + longitude.value = 0; + latitude.value = 0; + setTimeout(() => { + longitude.value = common_vendor.index.getStorageSync("longitude"); + latitude.value = common_vendor.index.getStorageSync("latitude"); + }, 500); + console.log(longitude.value, latitude.value); console.log("返回中心点"); }; const iiii = () => { diff --git a/unpackage/dist/dev/mp-weixin/stor/index.js b/unpackage/dist/dev/mp-weixin/stor/index.js index 7b6234e..4e62d93 100644 --- a/unpackage/dist/dev/mp-weixin/stor/index.js +++ b/unpackage/dist/dev/mp-weixin/stor/index.js @@ -54,6 +54,7 @@ const storindex = common_vendor.defineStore("storindex", () => { p.value = 0; } else { console.log("out_trade_no", res); + console.log("这是订单号" + res); const res1 = await api_api.getWxPlay({ appId: common_baseurl.appid, phone: common_vendor.index.getStorageSync("phoneNumber"), @@ -75,7 +76,7 @@ const storindex = common_vendor.defineStore("storindex", () => { //付款成功进入执行启动设备 success: async (res2) => { console.log("用户付款成功", res2); - const res4 = await { + const res4 = await api_api.start({ mid: common_vendor.index.getStorageSync("mid"), price: 100, time: times.value, @@ -83,7 +84,7 @@ const storindex = common_vendor.defineStore("storindex", () => { orderId: orderid.value, phone: common_vendor.index.getStorageSync("phoneNumber"), openId: common_vendor.index.getStorageSync("openid") - }; + }); console.log(res4); if (res4.code == 200 || res4.code == 0) { common_vendor.index.showToast({ @@ -106,9 +107,10 @@ const storindex = common_vendor.defineStore("storindex", () => { } }); } else { + console.log(res4); common_vendor.index.showToast({ icon: "none", - title: `${res4.data.statusText},请在我的页面联系客服解决`, + title: `请在我的页面联系客服解决`, duration: 1200, success: async (res3) => { p.value = 0; @@ -352,9 +354,10 @@ const storindex = common_vendor.defineStore("storindex", () => { }); } else { p.value = 0; + console.log(res4); common_vendor.index.showToast({ icon: "none", - title: `${res4.data.statusText},请在我的页面联系客服解决`, + title: `请在我的页面联系客服解决`, duration: 1200, success: (res2) => { common_vendor.index.setStorageSync("orderid", orderid.value);