Browse Source

版本号修改

jiayubo 3 months ago
parent
commit
a64fe1b98d

+ 11 - 4
api/login.js

@@ -1,19 +1,26 @@
 import request from '@/utils/request'
 
 // 登录方法
-export function login(username, password, code, uuid, referrerType, referrerId, latitude, longitude) {
+export function login(username, password, code, uuid, referrerType, referrerId, latitude, longitude, referrerQrCodeVersion) {
 	// 如果经纬度保留6位小数 - 直接使用字符串格式传递
 	const lat = typeof latitude === 'number' ? latitude.toFixed(6) : (latitude || "0.000000")
 	const lng = typeof longitude === 'number' ? longitude.toFixed(6) : (longitude || "0.000000")
 	
+	// 确保referrerQrCodeVersion有默认值
+	const qrCodeVersion = referrerQrCodeVersion || ""
+	// 确保referrerType有默认值1
+	const type = 1
+	// 确保referrerId有默认值
+	const id = referrerId || ""
+	
 	const data = {
 		username,
 		password,
 		code,
 		uuid,
-		referrerType,
-    referrerId,
-    referrerQrCodeVersion,
+		referrerType: type,
+    referrerId: id,
+    referrerQrCodeVersion: qrCodeVersion,  // 使用带默认值的变量
 		latitude: lat,
 		longitude: lng
 	}

+ 4 - 14
components/QRCode/index.vue

@@ -59,22 +59,12 @@ const getAppVersion = () => {
     console.log(accountInfo,'accountInfoaccountInfoaccountInfoaccountInfo');
     
     // 获取环境类型
-    const envVersion = accountInfo.miniProgram.envVersion; // develop, trial, release
-    console.log(envVersion,'envVersionenvVersionenvVersionenvVersion');
-    // 根据不同环境返回不同的版本号
-    if (envVersion === 'release') {
-      // 正式环境,尝试获取真实版本号,获取不到则使用固定版本号
-      return accountInfo.miniProgram.version || '1.0.0';
-    } else if (envVersion === 'trial') {
-      // 体验版环境
-      return 'beta_1.0.0'; // 或其他自定义的体验版版本号
-    } else {
-      // 开发环境或其他环境
-      return 'dev_1.0.0'; // 自定义的开发版版本号
-    }
+    const envVersion = accountInfo.miniProgram.version;
+   
+    return envVersion;
   } catch (error) {
     console.error('获取小程序版本号失败:', error);
-    return 'default_1.0.0'; // 默认版本号
+    return 'unknown_version';
   }
 }
 

+ 4 - 3
pages/login.vue

@@ -50,7 +50,7 @@ const loginForm = reactive({
   password: '',
   code: '',
   uuid: '',
-  referrerType: '',
+  referrerType: 1,
   referrerId: '',
   referrerQrCodeVersion: '',
   latitude: 0,
@@ -75,11 +75,12 @@ onLoad((options) => {
   console.log('options.scene:>>>>>>>123123s', options.scene)
   const scene = decodeURIComponent(options.scene)
   const params = scene.split(':')
+  console.log('params:>>>>>>>123123s', params)
   loginForm.referrerType = params[0]
   loginForm.referrerId = params[1]
   if (params.length >= 3) {
     loginForm.referrerQrCodeVersion = params[2]
-    // console.log('从二维码获取参数:', loginForm.referrerType, loginForm.referrerId)
+    console.log('从二维码获取参数:', loginForm.referrerQrCodeVersion)
   }
   // }
 
@@ -92,7 +93,7 @@ onLoad((options) => {
   }
 })
 
-// 用户注册 - assuming this might be needed later, keeping it
+// 用户注册
 const handleUserRegister = () => {
   router.push('/pages/register') // 替换为实际的路由跳转逻辑
 }

+ 3 - 3
pages_home/pages/Volunteerside/goodsDetails.vue

@@ -15,7 +15,7 @@
           <view class="service-price-tag2">{{ listData.businessPrice }}</view>
           <view class="service-price-tag3">/{{ listData.businessUnit }}</view>
         </view>
-        <view class="service-text">{{ listData.businessTierName }}</view>
+        <view class="service-text">{{ listData.businessDescribe }}</view>
       </view>
 
       <!-- 预约-资质认证 -->
@@ -245,7 +245,7 @@
         <up-line></up-line>
 
         <!-- 钱包支付选项 -->
-        <!-- <view class="payment-option">
+        <view class="payment-option">
           <view class="option-left">
             <image src="/static/钱包.png" class="payment-icon"></image>
             <text class="option-text">钱包</text>
@@ -255,7 +255,7 @@
               :label="item.name" :name="item.name"></up-radio>
           </up-radio-group>
         </view>
-        <up-line></up-line> -->
+        <up-line></up-line>
 
         <!-- 微信支付选项 -->
         <view class="payment-option">

+ 4 - 0
pages_home/styles/goodsDetails.css

@@ -59,6 +59,10 @@
   letter-spacing: -0.02em;
   color: #141414;
   margin-left: 20rpx;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  max-width: 694rpx;
 }
 
 .service-description-bottom {

File diff suppressed because it is too large
+ 1 - 1
pages_home/styles/goodsDetails.min.css


+ 4 - 0
pages_home/styles/goodsDetails.scss

@@ -57,6 +57,10 @@
     letter-spacing: -0.02em;
     color: #141414;
     margin-left: 20rpx;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    max-width: 694rpx;
   }
 }