Procházet zdrojové kódy

更新 分享页地图marker样式;版本不同清除storage

wzh před 3 roky
rodič
revize
b94f73ab25

+ 13 - 1
miniprogram/apis/apiConfig.js

@@ -1,5 +1,17 @@
 let v = wx.getAccountInfoSync()
-let apiUrl = `${v.miniProgram.envVersion == 'release'?'https://interface.huihenduo.com.cn/hhd-pat/':'https://interface.huihenduo.com.cn/hhd-pat-dev/'}`
+let appVersion = wx.getStorageSync('appVersion')
+let {
+  envVersion
+} = v.miniProgram
+if (appVersion != envVersion) {
+  wx.clearStorage({
+    success: (res) => {
+      wx.setStorageSync('appVersion', envVersion)
+    },
+  })
+
+}
+let apiUrl = `${envVersion == 'release'?'https://interface.huihenduo.com.cn/hhd-pat/':'https://interface.huihenduo.com.cn/hhd-pat-dev/'}`
 
 function api(url, data, method) {
   return new Promise((resolve, reject) => {

+ 3 - 3
miniprogram/pages/share/share.js

@@ -6,9 +6,9 @@ Page({
       id: 999,
       latitude: '32.001233',
       longitude: '120.5475',
-      iconPath: "https://6875-huihenduo-2gx127w7f837b584-1255802371.tcb.qcloud.la/%E8%B4%A7%E4%B8%BB%E5%B0%8F%E7%A8%8B%E5%BA%8F%E5%85%88%E8%A1%8C%E7%89%88/location.png",
-      height: 30,
-      width: 30
+      iconPath: "https://6875-huihenduo-2gx127w7f837b584-1255802371.tcb.qcloud.la/miniapp-static/red-circle.png?sign=6d208881376358fb4111aa6d7f1a7846&t=1647934972",
+      height: 20,
+      width: 20
     }],
     logoUrl: 'https://6875-huihenduo-2gx127w7f837b584-1255802371.tcb.qcloud.la/miniapp-static/%E6%B1%87%E5%BE%88%E5%A4%9Alogo-%E5%B7%A6%E5%8F%B3.png'
   },

+ 1 - 1
miniprogram/pages/share/share.wxml

@@ -3,4 +3,4 @@
   <view class="text">航行日志</view>
 </view>
 <image mode="widthFix" src="{{shareImageUrl}}" class="main-image"></image>
-<map enable-zoom="{{false}}" enable-scroll="{{false}}" scale="12" markers="{{markers}}" latitude="{{markers[0].latitude}}" longitude="{{markers[0].longitude}}" class="map" name=""></map>
+<map enable-zoom="{{false}}" enable-scroll="{{false}}" scale="8" markers="{{markers}}" latitude="{{markers[0].latitude}}" longitude="{{markers[0].longitude}}" class="map" name=""></map>