用户头像支持支付宝默认,客服优化,支付错误提示优化
parent
7d78f07cdc
commit
32732c9e07
43
App.vue
43
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;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1563,7 +1563,7 @@
|
|||
margin-left: 18rpx;
|
||||
}
|
||||
.cart-nav-remove-submit {
|
||||
padding: 0rpx 18rpx;
|
||||
padding: 0rpx 12rpx;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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+')'));
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue