用户头像支持支付宝默认,客服优化,支付错误提示优化

master
gongfuxiang 2025-04-19 19:16:16 +08:00
parent 7d78f07cdc
commit 32732c9e07
6 changed files with 98 additions and 38 deletions

43
App.vue
View File

@ -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;
},
/**

View File

@ -1563,7 +1563,7 @@
margin-left: 18rpx;
}
.cart-nav-remove-submit {
padding: 0rpx 18rpx;
padding: 0rpx 12rpx;
}
/*

View File

@ -53,7 +53,7 @@
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<button class="chat-btn" open-type="contact" :class="'alipay-contact '+common_ent">
<contact-button class="alipay-chat-btn" :tnt-inst-id="mini_alipay_tnt_inst_id" :scene="mini_alipay_scene" :alipay-card-no="mini_alipay_openid || ''" :icon="chat_image" size="40rpx*40rpx" />
<contact-button class="alipay-chat-btn" :tnt-inst-id="mini_alipay_tnt_inst_id" :scene="mini_alipay_scene" :alipay-card-no="mini_alipay_openid || ''" :icon="chat_image" size="50px*50px" />
</button>
<!-- #endif -->
<!-- #ifdef H5 || APP -->
@ -85,7 +85,7 @@
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<button class="chat-btn alipay-contact" :class="common_ent" open-type="contact">
<contact-button class="alipay-chat-btn" :tnt-inst-id="mini_alipay_tnt_inst_id" :scene="mini_alipay_scene" :alipay-card-no="mini_alipay_openid || ''" :icon="chat_image" size="40rpx*40rpx" />
<contact-button class="alipay-chat-btn" :tnt-inst-id="mini_alipay_tnt_inst_id" :scene="mini_alipay_scene" :alipay-card-no="mini_alipay_openid || ''" :icon="chat_image" size="50px*50px" />
</button>
<!-- #endif -->
<!-- #ifdef H5 || APP -->
@ -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) {

View File

@ -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+')'));
},
});
}

View File

@ -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"
}
}

View File

@ -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 @@
},
});
},
// formurl
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) {