From 32732c9e074c4f1cf0ad39aaf927d7381867d587 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Sat, 19 Apr 2025 19:16:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=A4=B4=E5=83=8F=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=94=AF=E4=BB=98=E5=AE=9D=E9=BB=98=E8=AE=A4=EF=BC=8C?= =?UTF-8?q?=E5=AE=A2=E6=9C=8D=E4=BC=98=E5=8C=96=EF=BC=8C=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 43 ++++++++++----- components/cart/cart.vue | 2 +- components/online-service/online-service.vue | 5 +- components/payment/payment.vue | 6 ++- manifest.json | 25 ++++----- pages/personal/personal.vue | 55 +++++++++++++++++--- 6 files changed, 98 insertions(+), 38 deletions(-) diff --git a/App.vue b/App.vue index 15c4edfd..21e23acc 100644 --- a/App.vue +++ b/App.vue @@ -356,27 +356,44 @@ * url url地址 */ request_params_handle(url) { + // 拼接字符 + let query_str = ''; // 用户信息 - var user = this.get_user_cache_info(); - var token = user == null ? '' : user.token || ''; - var uuid = this.request_uuid(); - var client_value = this.application_client_type(); - var client_brand = this.application_client_brand(); + let user = this.get_user_cache_info(); + let token = user == null ? '' : user.token || ''; + let uuid = this.request_uuid(); + let client_value = this.application_client_type(); + let client_brand = this.application_client_brand(); + query_str += '&application_client_type=' + client_value + '&application_client_brand=' + client_brand+'&token=' + token+'&uuid=' + uuid; + // 启动参数 - var params = this.get_launch_cache_info(); - var referrer = params == null ? null : params.referrer || null; - var referrer_params = referrer == null ? '' : '&referrer=' + referrer; + let params = this.get_launch_cache_info() || null; + // 邀请信息 + if(params != null && ( params.referrer || null) != null) { + query_str += '&referrer=' + params.referrer; + } + // 用户位置 - var user_location = this.choice_user_location_init(); - var user_location_params = (user_location || null) != null && (user_location.status || 0) == 1 ? '&user_lng=' + user_location.lng + '&user_lat=' + user_location.lat : ''; + let user_location = this.choice_user_location_init() || null; + if(user_location != null && (user_location.status || 0) == 1) { + query_str += '&user_lng=' + user_location.lng + '&user_lat=' + user_location.lat; + } + // 当前语言 - var lang = this.get_language_value(); + let lang = this.get_language_value(); + query_str += '&lang=' + lang; // 当前主题 - var theme = this.get_theme_value(); + let theme = this.get_theme_value(); + query_str += '&theme='+theme; + + // 第三方登录插件 3dsky平台跳转过来 登录token + if(params != null && (params['mztToken'] || null) != null) { + query_str += '&mzt_token='+params['mztToken']; + } // 拼接标识 var join = url.indexOf('?') == -1 ? '?' : '&'; - return url + join + 'system_type=' + this.data.system_type + '&application=app&application_client_type=' + client_value + '&application_client_brand=' + client_brand + '&token=' + token + '&uuid=' + uuid + referrer_params + user_location_params + '&lang=' + lang+'&theme='+theme; + return url + join + 'system_type=' + this.data.system_type + '&application=app'+ query_str; }, /** diff --git a/components/cart/cart.vue b/components/cart/cart.vue index 461b2d87..cc405e5a 100644 --- a/components/cart/cart.vue +++ b/components/cart/cart.vue @@ -1563,7 +1563,7 @@ margin-left: 18rpx; } .cart-nav-remove-submit { - padding: 0rpx 18rpx; + padding: 0rpx 12rpx; } /* diff --git a/components/online-service/online-service.vue b/components/online-service/online-service.vue index e8066548..5c9d4e98 100644 --- a/components/online-service/online-service.vue +++ b/components/online-service/online-service.vue @@ -53,7 +53,7 @@ @@ -85,7 +85,7 @@ @@ -423,6 +423,7 @@ .spread .ring { /* 速度为1.5 * 层数 = 实际运行速度,速度修改则 animation-delay 属性也修改相同速度 */ animation: pulsing 1.5s ease-out infinite; + z-index: -1; } /* 速度为1*层数 */ .spread .ring:nth-of-type(1) { diff --git a/components/payment/payment.vue b/components/payment/payment.vue index 04710c86..c63131fa 100644 --- a/components/payment/payment.vue +++ b/components/payment/payment.vue @@ -632,8 +632,10 @@ // 数据设置 self.order_item_pay_success_handle(data, order_id); }, - fail: (res) => { - self.order_item_pay_fail_handle(data, order_id, self.$t('paytips.paytips.6y488i')); + fail: (res) => { + let msg = res.memo || res.errMsg || self.$t('paytips.paytips.6y488i'); + let code = res.resultCode || res.errCode || res.errNo || null; + self.order_item_pay_fail_handle(data, order_id, msg+(code == null ? '' : '('+code+')')); }, }); } diff --git a/manifest.json b/manifest.json index 9695f3ae..c8d9a6ec 100644 --- a/manifest.json +++ b/manifest.json @@ -186,18 +186,19 @@ } }, "__usePrivacyCheck__" : true, - "plugins" : {} + "plugins" : { + // 腾讯地图路线规划插件(需要到小程序后台设置->第三方设置->插件管理里面添加【腾讯位置服务路线规划】插件,教程 https://mp.weixin.qq.com/wxopen/plugindevdoc?appid=wx50b5593e81dd937a) + // "routePlan" : { + // "version" : "1.0.19", + // "provider" : "wx50b5593e81dd937a" + // }, + // 直播(需要到小程序后台设置->第三方设置->插件管理里面添加【小程序直播组件】插件,教程 https://mp.weixin.qq.com/wxopen/pluginbasicprofile?action=intro&appid=wx2b03c6e691cd7370) + // "live-player-plugin" : { + // "version" : "1.3.5", + // "provider" : "wx2b03c6e691cd7370" + // } + } }, - // 腾讯地图路线规划插件(需要到小程序后台设置->第三方设置->插件管理里面添加【腾讯位置服务路线规划】插件,教程 https://mp.weixin.qq.com/wxopen/plugindevdoc?appid=wx50b5593e81dd937a) - // "routePlan" : { - // "version" : "1.0.19", - // "provider" : "wx50b5593e81dd937a" - // }, - // 直播(需要到小程序后台设置->第三方设置->插件管理里面添加【小程序直播组件】插件,教程 https://mp.weixin.qq.com/wxopen/pluginbasicprofile?action=intro&appid=wx2b03c6e691cd7370) - // "live-player-plugin" : { - // "version" : "1.3.5", - // "provider" : "wx2b03c6e691cd7370" - // } "mp-alipay" : { "usingComponents" : true, "appid" : "2021001173639600" @@ -237,7 +238,7 @@ "h5" : { "sdkConfigs" : { "maps" : { - "qqmap" : { + "tencent" : { "key" : "56SBZ-PCC3G-US2QM-IXYFE-4DE5H-GRBDK" } } diff --git a/pages/personal/personal.vue b/pages/personal/personal.vue index 55aaf9a4..d3fd98e8 100644 --- a/pages/personal/personal.vue +++ b/pages/personal/personal.vue @@ -168,25 +168,37 @@ }, // 头像事件 - choose_avatar_event(e) { - var self = this; - if (this.application_client_type == 'weixin') { - self.upload_handle(e.detail.avatarUrl); + choose_avatar_event(e = null) { + let self = this; + let arr = ['weixin', 'alipay']; + if (arr.indexOf(this.application_client_type) != -1) { + if(e !== null) { + let temp_url = e.detail.avatarUrl; + if(this.application_client_type == 'alipay') { + // 支付宝如果是临时文件走文件上传,普通图片地址走表单 + if(temp_url.substr(-6) == '.image') { + self.upload_handle(temp_url, self); + } else { + self.upload_url_handle(temp_url, self); + } + } else { + self.upload_handle(temp_url, self); + } + } } else { uni.chooseImage({ count: 1, success(res) { if (res.tempFilePaths.length > 0) { - self.upload_handle(res.tempFilePaths[0]); + self.upload_handle(res.tempFilePaths[0], self); } }, }); } }, - + // 上传处理 - upload_handle(image) { - var self = this; + upload_handle(image, self) { uni.uploadFile({ url: app.globalData.get_request_url('useravatarupload', 'personal'), filePath: image, @@ -206,6 +218,33 @@ }, }); }, + + // form上传url + upload_url_handle(image, self) { + uni.showLoading({ + title: this.$t('common.upload_in_text'), + }); + uni.request({ + url: app.globalData.get_request_url('useravatarupload', 'personal'), + method: 'POST', + data: {file: image}, + dataType: 'json', + success: (res) => { + uni.hideLoading(); + if (res.data.code == 0) { + var temp = self.user_data; + temp['avatar'] = res.data.data; + self.setData({ user_data: temp }); + } else { + app.globalData.showToast(res.data.msg); + } + }, + fail: () => { + uni.hideLoading(); + app.globalData.showToast(this.$t('common.internet_error_tips')); + }, + }); + }, // 数据提交 form_submit(e) {