Compare commits
4 Commits
test/hw-se
...
tmp/tmp-01
| Author | SHA1 | Date | |
|---|---|---|---|
| a2616c9757 | |||
| fb47da8095 | |||
| 37958cbe39 | |||
| 9f53f147ee |
@@ -54,6 +54,6 @@ const localDevConfig = ({
|
||||
uniacid: 115,
|
||||
domain: 'https://5g.aigc-quickapp.com/',
|
||||
},
|
||||
})['1']; // 选择要使用的环境配置
|
||||
})['2811']; // 选择要使用的环境配置
|
||||
|
||||
export default localDevConfig;
|
||||
1
App.vue
1
App.vue
@@ -266,7 +266,6 @@
|
||||
imgUrl: this.$util.img(share_data.imgUrl)
|
||||
},
|
||||
res => {
|
||||
console.log(res);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -40,15 +40,6 @@ export default {
|
||||
*/
|
||||
async sendMessage(message, options = {}) {
|
||||
try {
|
||||
// 调试:打印关键状态
|
||||
console.log('[AI Service] sendMessage 开始执行');
|
||||
console.log('[AI Service] store.state.memberInfo:', store.state.memberInfo);
|
||||
console.log('[AI Service] uniacid:', this.getUniacid());
|
||||
console.log('[AI Service] currentConversationId:', this.getConversationId());
|
||||
|
||||
const aiConfig = store.getters.globalAIKefuConfig;
|
||||
console.log('[AI Service] aiConfig:', aiConfig);
|
||||
|
||||
const params = {
|
||||
url: '/api/kefu/chat',
|
||||
data: {
|
||||
@@ -66,16 +57,11 @@ export default {
|
||||
}
|
||||
};
|
||||
|
||||
console.log('[AI Service] 发送请求到:', params.url);
|
||||
console.log('[AI Service] 请求参数:', JSON.stringify(params.data, null, 2));
|
||||
|
||||
const response = await http.sendRequest({
|
||||
...params,
|
||||
async: false
|
||||
});
|
||||
|
||||
console.log('[AI Service] 收到响应:', response);
|
||||
|
||||
const result = this.handleResponse(response);
|
||||
if (result.conversationId) {
|
||||
this.setConversationId(result.conversationId);
|
||||
@@ -103,7 +89,6 @@ export default {
|
||||
const match = Config.baseUrl.match(/^(?:https?:\/\/|wss?:\/\/)([^\/\s:]+)/);
|
||||
const domain = match ? match[1] : '';
|
||||
const wssUrl = `wss://${domain}/ws/aikefu`;
|
||||
console.log(`wssUrl = ${wssUrl}`);
|
||||
const socketTask = wx.connectSocket({
|
||||
url: wssUrl,
|
||||
header: {}
|
||||
@@ -114,7 +99,6 @@ export default {
|
||||
let isAuthenticated = false;
|
||||
|
||||
socketTask.onOpen(() => {
|
||||
console.log('WebSocket 连接成功,开始认证...');
|
||||
socketTask.send({
|
||||
data: JSON.stringify({
|
||||
action: 'auth',
|
||||
@@ -128,10 +112,8 @@ export default {
|
||||
socketTask.onMessage((res) => {
|
||||
try {
|
||||
const data = JSON.parse(res.data);
|
||||
console.log('收到 WebSocket 消息:', data);
|
||||
|
||||
if (data.type === 'auth_success') {
|
||||
console.log('认证成功,发送聊天消息...');
|
||||
isAuthenticated = true;
|
||||
socketTask.send({
|
||||
data: JSON.stringify({
|
||||
@@ -173,7 +155,6 @@ export default {
|
||||
|
||||
// 可选:处理 done
|
||||
else if (data.type === 'done') {
|
||||
console.log('对话完成:', data);
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
@@ -189,7 +170,6 @@ export default {
|
||||
});
|
||||
|
||||
socketTask.onClose(() => {
|
||||
console.log('WebSocket 连接已关闭');
|
||||
});
|
||||
|
||||
const timeout = setTimeout(() => {
|
||||
@@ -388,7 +368,6 @@ export default {
|
||||
async: false,
|
||||
data: {}
|
||||
});
|
||||
console.log('/api/kefu/health response', response);
|
||||
const available = [response?.data?.status, response?.data?.components?.ai_service_config?.status]
|
||||
.filter(item => item === 'healthy').length > 0;
|
||||
return {
|
||||
|
||||
@@ -59,7 +59,6 @@ if (process?.env?.NODE_ENV === 'development') {
|
||||
// 如果本地配置文件不存在或加载失败,保持使用默认配置
|
||||
// 只在开发模式下输出提示信息
|
||||
// #ifdef WEB
|
||||
console.log('本地配置文件 .local.config.js 不存在,使用默认配置');
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ export class CustomerService {
|
||||
|
||||
// 优先级:外部传入 > vuex store > 空对象
|
||||
const servicerConfig = this.externalConfig || this.vm.$store.state.servicerConfig || {};
|
||||
console.log(`【实时客服配置】`, servicerConfig);
|
||||
|
||||
let platformConfig = null;
|
||||
|
||||
@@ -167,8 +166,6 @@ export class CustomerService {
|
||||
}
|
||||
|
||||
const config = this.getPlatformConfig();
|
||||
console.log('【当前客服配置】', config);
|
||||
console.log('【客服类型】', config.type);
|
||||
|
||||
const { niushop = {}, sendMessageTitle = '', sendMessagePath = '', sendMessageImg = '' } = options;
|
||||
|
||||
@@ -180,31 +177,24 @@ export class CustomerService {
|
||||
// 核心路由:根据 type 决定行为
|
||||
switch (config.type) {
|
||||
case 'aikefu':
|
||||
console.log('【跳转 AI 客服】目标路径: /pages_tool/ai-chat/index');
|
||||
this.openDifyService();
|
||||
break;
|
||||
case 'wxwork':
|
||||
console.log('【跳转企业微信客服】');
|
||||
this.openWxworkService(false, config, options);
|
||||
break;
|
||||
case 'third':
|
||||
console.log('【跳转第三方客服】');
|
||||
this.openThirdService(config);
|
||||
break;
|
||||
case 'miniprogram':
|
||||
console.log('【跳转第三方小程序客服】');
|
||||
this.openThirdService(config);
|
||||
break;
|
||||
case 'niushop':
|
||||
console.log('【跳转牛商客服】');
|
||||
this.openNiushopService(niushop);
|
||||
break;
|
||||
case 'weapp':
|
||||
console.log('【跳转微信官方客服】');
|
||||
this.openWeappService(config, options);
|
||||
break;
|
||||
case 'aliapp':
|
||||
console.log('【跳转支付宝客服】');
|
||||
this.openAliappService(config);
|
||||
break;
|
||||
default:
|
||||
@@ -225,7 +215,7 @@ export class CustomerService {
|
||||
wx.navigateToMiniProgram({
|
||||
appId: 'wxeb490c6f9b154ef9',
|
||||
path: `pages/contacts/externalContactDetail?url=${encodeURIComponent(wxworkConfig.contact_url)}`,
|
||||
success: () => console.log('跳转企业微信成功'),
|
||||
success: () => {},
|
||||
fail: (err) => {
|
||||
console.error('跳转企业微信失败:', err);
|
||||
this.fallbackToOriginalService();
|
||||
@@ -262,24 +252,20 @@ export class CustomerService {
|
||||
}
|
||||
|
||||
openThirdService(config) {
|
||||
console.log('【第三方客服配置】', config);
|
||||
console.log('【配置字段】', Object.keys(config));
|
||||
|
||||
// 支持多种可能的字段名
|
||||
const miniAppId = config.mini_app_id || config.miniAppId || config.appid || config.appId || config.app_id;
|
||||
const miniAppPath = config.mini_app_path || config.miniAppPath || config.path || config.page_path || '';
|
||||
|
||||
console.log('【解析后的小程序配置】AppID:', miniAppId, 'Path:', miniAppPath);
|
||||
|
||||
|
||||
// 优先处理第三方微信小程序客服
|
||||
if (miniAppId) {
|
||||
console.log('【跳转第三方小程序】AppID:', miniAppId, 'Path:', miniAppPath);
|
||||
// #ifdef MP-WEIXIN
|
||||
wx.navigateToMiniProgram({
|
||||
appId: miniAppId,
|
||||
path: miniAppPath,
|
||||
success: () => {
|
||||
console.log('【跳转第三方小程序成功】');
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('【跳转第三方小程序失败】', err);
|
||||
@@ -295,7 +281,6 @@ export class CustomerService {
|
||||
|
||||
// 处理第三方链接客服
|
||||
if (config.third_url) {
|
||||
console.log('【跳转第三方链接】', config.third_url);
|
||||
// #ifdef H5
|
||||
window.location.href = config.third_url;
|
||||
// #endif
|
||||
@@ -326,7 +311,7 @@ export class CustomerService {
|
||||
// 此方法仅用于自定义跳转(如 useOfficial: false)
|
||||
if (config.useOfficial !== false) {
|
||||
// 不做任何事,应由 <button open-type="contact"> 触发
|
||||
console.log('使用微信官方客服,请确保按钮为 <button open-type="contact">');
|
||||
|
||||
return;
|
||||
}
|
||||
this.handleCustomWeappService(config, options);
|
||||
@@ -384,7 +369,7 @@ export class CustomerService {
|
||||
this.openThirdService(config);
|
||||
} else {
|
||||
// 支付宝原生客服由 button open-type="contact" 触发,此处不处理
|
||||
console.log('使用支付宝官方客服');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -644,8 +629,6 @@ export class CustomerService {
|
||||
handleUnifiedKefuClick(options = {}) {
|
||||
const validation = this.validateConfig();
|
||||
|
||||
console.log('【客服配置验证】', validation);
|
||||
|
||||
if (!validation.isValid) {
|
||||
console.error('客服配置无效:', validation.errors);
|
||||
uni.showToast({ title: '客服暂不可用', icon: 'none' });
|
||||
@@ -657,12 +640,10 @@ export class CustomerService {
|
||||
}
|
||||
|
||||
const platformConfig = this.getPlatformConfig();
|
||||
console.log('【当前客服配置】', platformConfig);
|
||||
|
||||
// 检查企业微信配置
|
||||
if (platformConfig.type === 'wxwork') {
|
||||
const wxworkConfig = this.getWxworkConfig();
|
||||
console.log('【企业微信配置】', wxworkConfig);
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
if (!wxworkConfig?.enable || !wxworkConfig?.contact_url) {
|
||||
|
||||
@@ -200,7 +200,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
play(){
|
||||
console.log(123)
|
||||
},
|
||||
async init() {
|
||||
|
||||
|
||||
@@ -164,7 +164,6 @@ export default {
|
||||
|
||||
// 商品详情
|
||||
if (this.goodsSkuDetail.goods_content) this.goodsSkuDetail.goods_content = (this.goodsSkuDetail.goods_content);
|
||||
console.log(this.goodsSkuDetail.goods_content)
|
||||
// if (this.goodsSkuDetail.goods_content) this.goodsSkuDetail.goods_content = htmlParser(this.goodsSkuDetail.goods_content);
|
||||
|
||||
//商品服务
|
||||
|
||||
@@ -316,11 +316,9 @@ function replaceVideo(html){
|
||||
|
||||
let rep = `<video style="width:100% !important;display:block;max-width: ${screenWidth} !important;"`;
|
||||
var html = html.replace(/\\/g, '').replace(/<video/g, rep);
|
||||
console.log(html)
|
||||
html = html.replace(/<video [^>]*src=['"]([^'"]+)[^>]*>/gi, (match, capture) => {
|
||||
return rep + ' src="' + util.img(capture) + '"/>';
|
||||
});
|
||||
// console.log(html)
|
||||
return html;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,16 +89,13 @@ export default {
|
||||
let platform = util.getDeviceInfo().platform;
|
||||
switch (platform) {
|
||||
case 'android':
|
||||
console.log('运行Android上')
|
||||
openMapByAndroid(arr[1], arr[0], name)
|
||||
break;
|
||||
case 'ios':
|
||||
console.log('运行iOS上')
|
||||
openMapByIos(arr[1], arr[0], name)
|
||||
break;
|
||||
default:
|
||||
openMapByDefault(arr[1], arr[0], name)
|
||||
console.log('运行在开发者工具上')
|
||||
break;
|
||||
}
|
||||
// #endif
|
||||
|
||||
@@ -43,7 +43,6 @@ export class NavigationHelper {
|
||||
|
||||
query.select('.uni-page-head').boundingClientRect((rect) => {
|
||||
if (rect && rect.height > 0) {
|
||||
console.log('直接查询导航栏高度成功:', rect.height)
|
||||
resolve(rect.height)
|
||||
} else {
|
||||
console.warn('未找到 uni-page-head 元素或高度为0')
|
||||
@@ -64,7 +63,6 @@ export class NavigationHelper {
|
||||
|
||||
const height = menuButtonInfo.bottom +
|
||||
(menuButtonInfo.top - systemInfo.statusBarHeight)
|
||||
console.log('微信小程序导航栏高度:', height)
|
||||
resolve(height)
|
||||
} catch (error) {
|
||||
console.error('微信小程序高度计算失败:', error)
|
||||
@@ -174,7 +172,6 @@ export class NavigationHelper {
|
||||
|
||||
// 处理服务请求
|
||||
async handleServiceRequest(event, component) {
|
||||
console.log('处理导航相关服务请求:', event.type)
|
||||
|
||||
// 安全检查事件目标
|
||||
if (this.shouldProcessNavigationRequest(event)) {
|
||||
@@ -278,7 +275,6 @@ export class NavigationHelper {
|
||||
// 清理缓存
|
||||
clearCache() {
|
||||
this.navigationCache.clear()
|
||||
console.log('导航缓存已清理')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,53 +21,35 @@ export default {
|
||||
methods: {
|
||||
// 判断是否已连接
|
||||
checkOpenSocket() {
|
||||
console.log('判断是否已连接');
|
||||
// alert('判断是否已连接')
|
||||
let self = this;
|
||||
uni.sendSocketMessage({
|
||||
data: 'ping',
|
||||
success: (res) => {
|
||||
console.log('连接成功,检查');
|
||||
// alert('连接成功,检查')
|
||||
// self.getChatList();
|
||||
},
|
||||
fail: (err) => { // 未连接打开websocket连接
|
||||
console.log('连接失败');
|
||||
// alert('连接失败')
|
||||
self.openConnection();
|
||||
}
|
||||
});
|
||||
},
|
||||
openConnection() { // 打开连接
|
||||
console.log('打开连接');
|
||||
// alert('打开连接')
|
||||
// uni.closeSocket(); // 确保已经关闭后再重新打开
|
||||
uni.connectSocket({
|
||||
url: config.webSocket,
|
||||
method: 'POST',
|
||||
success(res) {
|
||||
console.log('连接成功 connectSocket=', res);
|
||||
// alert('连接成功 connectSocket=', res);
|
||||
},
|
||||
fail(err) {
|
||||
console.log('连接失败 connectSocket=', err);
|
||||
}
|
||||
});
|
||||
// uni.onSocketOpen((res) => {
|
||||
// console.log('连接成功', res);
|
||||
// });
|
||||
this.onSocketMessage(); // 打开成功监听服务器返回的消息
|
||||
},
|
||||
// 打开成功监听服务器返回的消息
|
||||
onSocketMessage() { // 消息
|
||||
console.log("开始监听");
|
||||
|
||||
let that = this;
|
||||
this.pingInterval = config.pingInterval;
|
||||
this.timeoutObj = null;
|
||||
uni.onSocketMessage((res) => { //type:init,connect,close,string,order,goods
|
||||
let msg = JSON.parse(res.data);
|
||||
console.log("监听该服务器消息", res);
|
||||
if (msg.type == 'close') {
|
||||
clearInterval(that.timeoutObj);
|
||||
that.timeoutObj = null;
|
||||
@@ -141,22 +123,18 @@ export default {
|
||||
},
|
||||
// 检测心跳reset
|
||||
reset() {
|
||||
console.log("检测心跳");
|
||||
clearInterval(this.timeoutObj);
|
||||
this.start(); // 启动心跳
|
||||
},
|
||||
// 启动心跳 start
|
||||
start() {
|
||||
console.log("启动心跳");
|
||||
let self = this;
|
||||
this.timeoutObj = setInterval(function () {
|
||||
uni.sendSocketMessage({
|
||||
data: 'ping',
|
||||
success: (res) => {
|
||||
console.log('连接中....');
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('连接失败重新连接....');
|
||||
self.openConnection();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -34,7 +34,6 @@ export const makePhoneCall = (mobile) => {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: `${mobile}`,
|
||||
success(e) {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
|
||||
@@ -132,9 +132,7 @@ export default {
|
||||
let url = to;
|
||||
|
||||
// 替换url中的前缀
|
||||
console.log('页面跳转 redirectTo', to, param, mode);
|
||||
url = adaptSubpackageUrl(url);
|
||||
console.log('adaptSubpackageUrl', url);
|
||||
|
||||
if (param != undefined) {
|
||||
Object.keys(param).forEach(function (key) {
|
||||
@@ -178,7 +176,6 @@ export default {
|
||||
break;
|
||||
default:
|
||||
// 保留当前页面,跳转到应用内的某个页面,新增页面到栈顶,长度+1(上限10层)
|
||||
console.log('保留当前页面,navigateTo跳转到应用内的某个页面', url);
|
||||
uni.navigateTo({
|
||||
url
|
||||
});
|
||||
@@ -623,13 +620,8 @@ export default {
|
||||
appId: 'wxeb490c6f9b154ef9', // 是企业微信官方小程序的AppID(固定值, 由腾讯企业微信团队维护, 不需要修改,用于展示"添加企业微信联系人"的官方页面)
|
||||
path: `pages/contacts/externalContactDetail?url=${encodeURIComponent(wxworkConfig?.contact_url)}`,
|
||||
success: () => {
|
||||
console.log('跳转企业微信成功');
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('跳转企业微信失败:', err);
|
||||
// 降级处理:使用原有客服方式
|
||||
fallbackFunc && fallbackFunc();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
fallbackFunc && fallbackFunc();
|
||||
@@ -909,12 +901,11 @@ export default {
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
uni.removeStorage({
|
||||
key: 'source_member',
|
||||
success: res => {
|
||||
console.log('删除成功', res)
|
||||
}
|
||||
})
|
||||
uni.removeStorage({
|
||||
key: 'source_member',
|
||||
success: res => {
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -938,27 +929,23 @@ export default {
|
||||
success: res => {
|
||||
if (res.data.length) {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: res.data,
|
||||
success: (res) => {
|
||||
console.log("res", res)
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log('fail', res)
|
||||
}
|
||||
})
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: res.data,
|
||||
success: (res) => {
|
||||
},
|
||||
fail: (res) => {
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-ALIPAY
|
||||
my.requestSubscribeMessage({
|
||||
entityIds: res.data,
|
||||
success: res => {
|
||||
console.log("res", res)
|
||||
},
|
||||
fail: res => {
|
||||
console.log('fail', res)
|
||||
}
|
||||
});
|
||||
my.requestSubscribeMessage({
|
||||
entityIds: res.data,
|
||||
success: res => {
|
||||
},
|
||||
fail: res => {
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
@@ -1213,7 +1200,6 @@ export default {
|
||||
let _isQuickApp = false;
|
||||
try {
|
||||
const ua = navigator?.userAgent?.toLowerCase();
|
||||
// console.log('ua = ', ua);
|
||||
_isQuickApp = ua.indexOf('quickapp') !== -1;
|
||||
|
||||
if (!_isQuickApp) {
|
||||
|
||||
@@ -55,7 +55,6 @@ let Weixin = function () {
|
||||
typeof callback == 'function' && callback(res);
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log('获取收货地址 fail',res);
|
||||
alert(JSON.stringify(res))
|
||||
}
|
||||
});
|
||||
|
||||
@@ -98,9 +98,7 @@ export default {
|
||||
uni.setStorageSync('audio_list', audio_list)
|
||||
}
|
||||
}
|
||||
console.log(uni.getStorageSync('audio_list'))
|
||||
var n = this;
|
||||
// console.log(a)
|
||||
a.onPlay(function () {
|
||||
var e = setInterval(function () {
|
||||
var i = a.currentTime / a.duration * 100 + "%", s = Math.floor(Math.ceil(a.currentTime) / 60), o = (Math.ceil(a.currentTime) % 60 / 100).toFixed(2).slice(-2), r = Math.ceil(a.currentTime);
|
||||
@@ -113,13 +111,12 @@ export default {
|
||||
|
||||
var s = n.$util.img(n.value.audioUrl), o = n.audios[n.value.id].seconds || 0, r = 0, u = 1;
|
||||
0 == u && a.onEnded(function (e) {
|
||||
c[t].status = !1, n.status = !1, c[t].seconds = 0, console.log(c), n.audios = c;
|
||||
c[t].status = !1, n.status = !1, c[t].seconds = 0, n.audios = c;
|
||||
});
|
||||
var c = n.audios;
|
||||
c[t] || (c[t] = {}), a.paused && 0 == o ? (a.src = s, a.play(), 1 == u && (a.loop = !0),
|
||||
c[t].status = !0, n.status = !0, n.pauseOther(t)) : a.paused && o > 0 ? (a.play(), 0 == r ? a.seek(o) : a.seek(0),
|
||||
c[t].status = !0, n.status = !0, n.pauseOther(t)) : (a.pause(), c[t].status = !1, n.status = !1), n.audios = c;
|
||||
console.log(n.audios)
|
||||
},
|
||||
pauseOther: function (e) {
|
||||
var t = this;
|
||||
@@ -190,18 +187,14 @@ export default {
|
||||
var u = s + ":" + o, c = that.audios;
|
||||
c[t].audiowidth = i, c[t].Time = e, c[t].audiotime = u, c[t].seconds = r
|
||||
that.audios = c
|
||||
// console.log(c)
|
||||
console.log(that.audios[that.value.id].audiotime)
|
||||
that.audiotime = that.audios[that.value.id].audiotime
|
||||
that.audiowidth = that.audios[that.value.id].audiowidth
|
||||
console.log(i)
|
||||
that.lyg = i
|
||||
}, 1e3);
|
||||
});
|
||||
|
||||
|
||||
this.audioContext.onEnded(() => {
|
||||
console.log('播放结束');
|
||||
this.status = 0
|
||||
});
|
||||
}
|
||||
|
||||
@@ -256,7 +256,6 @@ export default {
|
||||
try {
|
||||
// 发送视频被点击播放事件
|
||||
this.$emit('channel-video-click-play', item);
|
||||
console.log('播放视频:', item);
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
// 在微信小程序环境中调用视频播放接口
|
||||
@@ -289,7 +288,6 @@ export default {
|
||||
*/
|
||||
imgError(index) {
|
||||
// 图片加载失败的处理逻辑
|
||||
console.log('图片加载失败:', index);
|
||||
// 为失败的图片设置默认图片
|
||||
const item = this.value.list[index];
|
||||
if (item) {
|
||||
@@ -306,7 +304,6 @@ export default {
|
||||
addMouseDragScroll() {
|
||||
// 只在Web环境中添加
|
||||
// #ifndef MP
|
||||
console.log('addMouseDragScroll called');
|
||||
|
||||
let isDragging = false;
|
||||
let startX = 0;
|
||||
@@ -329,11 +326,9 @@ export default {
|
||||
const handleMouseDown = (e) => {
|
||||
// 检查是否点击在组件内
|
||||
if (this.$el.contains(e.target)) {
|
||||
console.log('mousedown event in component:', e);
|
||||
// 查找可滚动元素
|
||||
currentScrollElement = findScrollableParent(e.target);
|
||||
if (currentScrollElement) {
|
||||
console.log('Found scrollable element:', currentScrollElement);
|
||||
isDragging = true;
|
||||
startX = e.pageX;
|
||||
startScrollLeft = currentScrollElement.scrollLeft;
|
||||
@@ -345,17 +340,14 @@ export default {
|
||||
// 鼠标移动事件
|
||||
const handleMouseMove = (e) => {
|
||||
if (!isDragging || !currentScrollElement) return;
|
||||
console.log('mousemove event:', e);
|
||||
e.preventDefault();
|
||||
const dx = e.pageX - startX;
|
||||
currentScrollElement.scrollLeft = startScrollLeft - dx;
|
||||
console.log('scrollLeft:', currentScrollElement.scrollLeft);
|
||||
};
|
||||
|
||||
// 鼠标释放事件
|
||||
const handleMouseUp = () => {
|
||||
if (isDragging && currentScrollElement) {
|
||||
console.log('mouseup event');
|
||||
currentScrollElement.style.cursor = 'grab';
|
||||
}
|
||||
isDragging = false;
|
||||
@@ -368,21 +360,17 @@ export default {
|
||||
document.addEventListener('mouseup', handleMouseUp);
|
||||
document.addEventListener('mouseleave', handleMouseUp);
|
||||
|
||||
console.log('Global mouse event listeners added');
|
||||
|
||||
// 组件销毁时移除事件监听器
|
||||
this.$once('hook:beforeDestroy', () => {
|
||||
document.removeEventListener('mousedown', handleMouseDown);
|
||||
document.removeEventListener('mousemove', handleMouseMove);
|
||||
document.removeEventListener('mouseup', handleMouseUp);
|
||||
document.removeEventListener('mouseleave', handleMouseUp);
|
||||
console.log('Global mouse event listeners removed');
|
||||
});
|
||||
|
||||
// 为所有.channel-nav元素添加必要的样式
|
||||
setTimeout(() => {
|
||||
const channelNavs = document.querySelectorAll('.channel-nav');
|
||||
console.log('Found channel-nav elements:', channelNavs.length);
|
||||
channelNavs.forEach(element => {
|
||||
element.style.overflowX = 'auto';
|
||||
element.style.overflowY = 'hidden';
|
||||
@@ -391,11 +379,9 @@ export default {
|
||||
element.style.maxWidth = '100%';
|
||||
element.style.cursor = 'grab';
|
||||
element.style.userSelect = 'none'; // 防止文本选择
|
||||
console.log('Added styles to channel-nav:', element);
|
||||
});
|
||||
}, 100); // 延迟执行,确保DOM已完全渲染
|
||||
|
||||
console.log('Mouse drag scroll setup completed');
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,6 @@ export default {
|
||||
const enableEmbedMode = Boolean(this.value?.embedMode)
|
||||
&& Boolean(this.value?.feedToken)
|
||||
&& wechatChannelUtil.isEmbedModeSupported();
|
||||
console.log('enableEmbedMode', enableEmbedMode);
|
||||
return enableEmbedMode;
|
||||
// #endif
|
||||
return false
|
||||
|
||||
@@ -91,7 +91,6 @@ export default {
|
||||
// 页面跳转
|
||||
redirectTo(item) {
|
||||
if (!item.wap_url || this.$util.getCurrRoute() != this.$util.MEMBER_PAGE_URL || this.storeToken) {
|
||||
console.log(item);
|
||||
this.$util.diyRedirectTo(item);
|
||||
} else {
|
||||
this.$refs.login.open(item.wap_url);
|
||||
|
||||
@@ -164,7 +164,6 @@ export default {
|
||||
return;
|
||||
}
|
||||
}
|
||||
console.log(link)
|
||||
this.$util.diyRedirectTo(link);
|
||||
},
|
||||
swiperChange(e) {
|
||||
|
||||
@@ -358,11 +358,6 @@ export default {
|
||||
});
|
||||
} else data = this.setPagestyle;
|
||||
|
||||
console.log(`diy-group ['diyDataArray'] = `, {
|
||||
data: data,
|
||||
diyData: this.diyData,
|
||||
diyGlobalData: this.diyGlobalData,
|
||||
})
|
||||
return data;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -109,7 +109,6 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('get live status', err);
|
||||
});
|
||||
|
||||
// 往后间隔1分钟或更慢的频率去轮询获取直播状态
|
||||
@@ -127,8 +126,7 @@ export default {
|
||||
clearInterval(timer);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('get live status', err);
|
||||
.catch(err => {
|
||||
});
|
||||
}, 60000);
|
||||
// #endif
|
||||
|
||||
@@ -119,7 +119,6 @@ export default {
|
||||
obj += 'border-bottom-left-radius:' + this.value.bottomAroundRadius * 2 + 'rpx;';
|
||||
obj += 'border-bottom-right-radius:' + this.value.bottomAroundRadius * 2 + 'rpx;';
|
||||
}
|
||||
console.log(obj)
|
||||
return obj;
|
||||
},
|
||||
// 子项样式
|
||||
@@ -140,14 +139,12 @@ export default {
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
console.log(121)
|
||||
var data = {
|
||||
num: this.value.count
|
||||
};
|
||||
console.log(this.value)
|
||||
if (this.value.sources == 'diy') {
|
||||
data.num = 0;
|
||||
data.merch_id_arr = this.value.merchIds.toString();
|
||||
|
||||
@@ -75,8 +75,6 @@ export default {
|
||||
// 允许从相机和相册扫码,h5端不起作用
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
console.log('条码类型:' + res.scanType);
|
||||
console.log('条码内容:' + res.result);
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
|
||||
@@ -221,10 +221,7 @@ export default {
|
||||
|
||||
// 组件创建钩子
|
||||
created() {
|
||||
console.log(`diy-tab-create`, {
|
||||
value: this.mergedValue,
|
||||
tabs: this.mergedValue.tabs
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
// 组件挂载钩子
|
||||
|
||||
@@ -114,7 +114,6 @@ export default {
|
||||
style += 'box-shadow:' + (this.value.ornament.type == 'shadow' ? '0 0 10rpx ' + this.value.ornament.color : '') + ';';
|
||||
style += 'border:' + (this.value.ornament.type == 'stroke' ? '2rpx solid ' + this.value.ornament.color : '') + ';';
|
||||
|
||||
console.log(this.value);
|
||||
|
||||
return style;
|
||||
},
|
||||
@@ -174,7 +173,6 @@ export default {
|
||||
// 图片加载错误处理
|
||||
imgError(index) {
|
||||
// 图片加载失败的处理逻辑
|
||||
console.log('图片加载失败:', index);
|
||||
},
|
||||
|
||||
// 弹窗视频加载完成事件
|
||||
@@ -202,7 +200,6 @@ export default {
|
||||
|
||||
if (width && height) {
|
||||
this.popupVideoRatio = width >= height ? 'landscape' : 'portrait';
|
||||
console.log(`弹窗视频宽高比检测: ${width}x${height}, 比例: ${this.popupVideoRatio}`);
|
||||
} else {
|
||||
// 获取失败,默认竖屏
|
||||
this.popupVideoRatio = 'portrait';
|
||||
|
||||
@@ -127,8 +127,6 @@ export default {
|
||||
const videoUrl = this.videoUrl;
|
||||
if (!videoUrl) return;
|
||||
|
||||
console.log('H5端预加载视频获取比例:', videoUrl);
|
||||
|
||||
const video = document.createElement('video');
|
||||
video.preload = 'metadata';
|
||||
video.src = videoUrl;
|
||||
@@ -138,11 +136,9 @@ export default {
|
||||
video.addEventListener('loadedmetadata', () => {
|
||||
const width = video.videoWidth;
|
||||
const height = video.videoHeight;
|
||||
console.log('H5端预加载获取视频宽高:', width, height);
|
||||
|
||||
if (width && height) {
|
||||
this.videoRatio = width >= height ? 'landscape' : 'portrait';
|
||||
console.log('H5端视频比例判定:', this.videoRatio, width >= height ? '横屏' : '竖屏');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -156,8 +152,6 @@ export default {
|
||||
|
||||
// 视频加载完成事件(组件内video标签)
|
||||
onVideoLoaded(event) {
|
||||
console.log('视频组件 loadedmetadata 事件触发');
|
||||
|
||||
let width = 0;
|
||||
let height = 0;
|
||||
|
||||
@@ -165,7 +159,6 @@ export default {
|
||||
if (event && event.target) {
|
||||
width = event.target.videoWidth || 0;
|
||||
height = event.target.videoHeight || 0;
|
||||
console.log('H5端组件视频宽高:', width, height);
|
||||
}
|
||||
// #endif
|
||||
|
||||
@@ -173,24 +166,20 @@ export default {
|
||||
if (event && event.detail) {
|
||||
width = event.detail.width || 0;
|
||||
height = event.detail.height || 0;
|
||||
console.log('微信小程序端视频宽高:', width, height);
|
||||
}
|
||||
// #endif
|
||||
|
||||
if (width && height) {
|
||||
this.videoRatio = width >= height ? 'landscape' : 'portrait';
|
||||
console.log('视频比例最终判定:', this.videoRatio);
|
||||
}
|
||||
},
|
||||
|
||||
// 视频播放事件
|
||||
onVideoPlay() {
|
||||
console.log('视频开始播放');
|
||||
},
|
||||
|
||||
// 视频暂停事件
|
||||
onVideoPause() {
|
||||
console.log('视频暂停');
|
||||
},
|
||||
|
||||
// 视频错误事件
|
||||
|
||||
@@ -149,9 +149,8 @@ export const wechatChannelUtil = {
|
||||
wx.openChannelsActivity({
|
||||
feedId: item.feedId,
|
||||
finderUserName: item.finderUserName,
|
||||
success: (res) => {
|
||||
console.log('打开视频号成功', res);
|
||||
resolve(res);
|
||||
success: (res) => {
|
||||
resolve(res);
|
||||
},
|
||||
fail: (err) => {
|
||||
this.handleError(err, item);
|
||||
|
||||
@@ -2,7 +2,6 @@ export default {
|
||||
methods: {
|
||||
// 异步触发事件
|
||||
async __$emitEvent(payload = {eventName: '__unnamedEvent', data: {}, promiseCallback: null}) {
|
||||
// console.log('__$emitEvent', payload)
|
||||
await this.$eventBus.emit(payload.eventName, payload.data, payload.promiseCallback)
|
||||
},
|
||||
|
||||
|
||||
@@ -186,7 +186,6 @@ export default {
|
||||
uni.getStorage({
|
||||
key: 'shopInfo',
|
||||
success: (e) => {
|
||||
console.log('【调试】当前 shopInfo:', e.data);
|
||||
this.shopInfo = e.data;
|
||||
},
|
||||
fail: () => {
|
||||
|
||||
@@ -53,40 +53,29 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 检查配置,决定是否显示隐私协议
|
||||
const shopInfo = uni.getStorageSync('shopInfo');
|
||||
if (shopInfo?.ischina == 1 && shopInfo?.index_login_auth == 1) {
|
||||
this.listenPrivacySettingChange()
|
||||
this.curPageShow()
|
||||
} else {
|
||||
// 如果不需要显示隐私协议,直接触发同意事件
|
||||
this.$emit('agree');
|
||||
}
|
||||
this.listenPrivacySettingChange()
|
||||
this.curPageShow()
|
||||
this.proactive()
|
||||
},
|
||||
created() {
|
||||
try {
|
||||
// #ifdef MP-WEIXIN
|
||||
//查询微信侧记录的用户是否有待同意的隐私政策信息
|
||||
wx.getPrivacySetting({
|
||||
success: (res) => {
|
||||
// console.log('隐私政策信息', res);
|
||||
// console.log(res.privacyContractName);
|
||||
this.privacyContractName = res.privacyContractName
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifdef QUICKAPP-WEBVIEW || H5
|
||||
if (this.$util.isQuickApp()) {
|
||||
if (typeof has != 'undefined' && has?.getPrivacySetting) {
|
||||
has.getPrivacySetting({
|
||||
success: (res) => {
|
||||
if (res.privacyContractName) {
|
||||
this.privacyContractName = res.privacyContractName
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
if (this.$util.isQuickApp() && typeof has != 'undefined' && has?.getPrivacySetting) {
|
||||
has.getPrivacySetting({
|
||||
success: (res) => {
|
||||
if (res.privacyContractName) {
|
||||
this.privacyContractName = res.privacyContractName
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
} catch (e) {
|
||||
@@ -94,39 +83,50 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 统一弹窗 + 关闭其他页面的弹窗
|
||||
*/
|
||||
showPrivacyPopup() {
|
||||
this.popUp()
|
||||
this.closeOtherPagePopUp(this.disPopUp)
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据是否需要授权决定弹窗或 emit agree
|
||||
*/
|
||||
checkAndShow(needAuthorization) {
|
||||
if (needAuthorization) {
|
||||
const privacyAgreed = uni.getStorageSync('privacyAgreed');
|
||||
if (privacyAgreed) {
|
||||
this.$emit('agree')
|
||||
} else {
|
||||
this.showPrivacyPopup()
|
||||
}
|
||||
} else {
|
||||
this.$emit('agree')
|
||||
}
|
||||
},
|
||||
|
||||
getPrivacySettingByQuickApp() {
|
||||
// #ifdef QUICKAPP-WEBVIEW || H5 || WEB
|
||||
if (this.$util.isQuickApp()) {
|
||||
if (typeof has != 'undefined' && has?.getPrivacySetting) {
|
||||
has.getPrivacySetting({
|
||||
success: (res) => {
|
||||
// console.log(res)
|
||||
if (res.needAuthorization) {
|
||||
this.popUp()
|
||||
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
|
||||
this.closeOtherPagePopUp(this.disPopUp)
|
||||
} else {
|
||||
this.$emit('agree')
|
||||
}
|
||||
},
|
||||
})
|
||||
} else {
|
||||
// 属于嵌入到快应用Webview组件中的情况,按照H5的方式来处理,判断是否已经授权
|
||||
if (uni.getStorageSync('privacyAgreed')) {
|
||||
this.$emit('agree')
|
||||
} else {
|
||||
this.popUp()
|
||||
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
|
||||
this.closeOtherPagePopUp(this.disPopUp)
|
||||
}
|
||||
}
|
||||
if (!this.$util.isQuickApp()) return;
|
||||
if (typeof has != 'undefined' && has?.getPrivacySetting) {
|
||||
has.getPrivacySetting({
|
||||
success: (res) => {
|
||||
this.checkAndShow(res.needAuthorization)
|
||||
},
|
||||
})
|
||||
} else {
|
||||
this.checkAndShow(!uni.getStorageSync('privacyAgreed'))
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
|
||||
/**
|
||||
* 监听平台侧的隐私授权事件
|
||||
*/
|
||||
listenPrivacySettingChange() {
|
||||
// #ifdef MP-WEIXIN
|
||||
// 监听微信侧隐私政策授权变化事件
|
||||
if (wx.onNeedPrivacyAuthorization) {
|
||||
wx.onNeedPrivacyAuthorization((resolve) => {
|
||||
if (typeof this.privacyAuthorization === 'function') {
|
||||
@@ -137,66 +137,28 @@ export default {
|
||||
// #endif
|
||||
|
||||
// #ifdef QUICKAPP-WEBVIEW || H5 || WEB
|
||||
if (this.$util.isQuickApp()) {
|
||||
// 监听快速应用侧隐私政策授权变化事件
|
||||
if (typeof has != 'undefined' && has?.onPrivacySettingChange) {
|
||||
has.onPrivacySettingChange((res) => {
|
||||
// console.log(res)
|
||||
if (res.needAuthorization) {
|
||||
this.popUp()
|
||||
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
|
||||
this.closeOtherPagePopUp(this.disPopUp)
|
||||
} else {
|
||||
this.$emit('agree')
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.$util.isQuickApp() && typeof has != 'undefined' && has?.onPrivacySettingChange) {
|
||||
has.onPrivacySettingChange((res) => {
|
||||
this.checkAndShow(res.needAuthorization)
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
|
||||
// 主动查询用户隐私政策授权状态,针对快速应用
|
||||
this.getPrivacySettingByQuickApp();
|
||||
},
|
||||
// 主动查询用户隐私政策授权状态
|
||||
proactive() {
|
||||
// 检查配置,决定是否显示隐私协议
|
||||
const shopInfo = uni.getStorageSync('shopInfo');
|
||||
if (!(shopInfo?.ischina == 1 && shopInfo?.index_login_auth == 1)) {
|
||||
// 如果不需要显示隐私协议,直接触发同意事件
|
||||
this.$emit('agree');
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* 主动查询隐私授权状态并弹窗
|
||||
*/
|
||||
proactive() {
|
||||
// #ifdef MP-WEIXIN
|
||||
if (wx.getPrivacySetting) {
|
||||
wx.getPrivacySetting({
|
||||
success: (res) => {
|
||||
// console.log(res)
|
||||
if (res.needAuthorization) {
|
||||
// 检查本地存储中是否已经同意过隐私政策
|
||||
const privacyAgreed = uni.getStorageSync('privacyAgreed');
|
||||
if (!privacyAgreed) {
|
||||
this.popUp()
|
||||
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
|
||||
this.closeOtherPagePopUp(this.disPopUp)
|
||||
} else {
|
||||
this.$emit('agree')
|
||||
}
|
||||
} else {
|
||||
this.$emit('agree')
|
||||
}
|
||||
this.checkAndShow(res.needAuthorization)
|
||||
},
|
||||
});
|
||||
} else {
|
||||
// 检查本地存储中是否已经同意过隐私政策
|
||||
const privacyAgreed = uni.getStorageSync('privacyAgreed');
|
||||
if (privacyAgreed) {
|
||||
this.$emit('agree');
|
||||
} else {
|
||||
this.popUp()
|
||||
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
|
||||
this.closeOtherPagePopUp(this.disPopUp)
|
||||
}
|
||||
// 低版本基础库直接检查本地存储
|
||||
this.checkAndShow(!uni.getStorageSync('privacyAgreed'))
|
||||
}
|
||||
// #endif
|
||||
|
||||
@@ -205,29 +167,24 @@ export default {
|
||||
// #endif
|
||||
|
||||
// #ifdef H5 || WEB
|
||||
// 检查本地存储中是否已经同意过隐私政策
|
||||
const privacyAgreed = uni.getStorageSync('privacyAgreed');
|
||||
if (privacyAgreed) {
|
||||
this.$emit('agree');
|
||||
} else {
|
||||
this.popUp()
|
||||
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
|
||||
this.closeOtherPagePopUp(this.disPopUp)
|
||||
}
|
||||
this.checkAndShow(!uni.getStorageSync('privacyAgreed'))
|
||||
// #endif
|
||||
},
|
||||
//初始化监听程序
|
||||
|
||||
/**
|
||||
* 初始化监听程序(页面级)
|
||||
*/
|
||||
curPageShow() {
|
||||
closeOtherPagePopUpHooks.add(this.disPopUp)
|
||||
this.privacyAuthorization = resolve => {
|
||||
this.privacyResolves.add(resolve)
|
||||
//打开弹窗
|
||||
this.popUp()
|
||||
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
|
||||
this.closeOtherPagePopUp(this.disPopUp)
|
||||
this.showPrivacyPopup()
|
||||
}
|
||||
},
|
||||
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
|
||||
|
||||
/**
|
||||
* 弹窗时关掉其他页面的隐私弹窗,避免重叠
|
||||
*/
|
||||
closeOtherPagePopUp(closePopUp) {
|
||||
closeOtherPagePopUpHooks.forEach(hook => {
|
||||
if (closePopUp !== hook) {
|
||||
@@ -235,16 +192,12 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
//打开隐私协议
|
||||
|
||||
openPrivacyContract() {
|
||||
// #ifdef MP-WEIXIN
|
||||
wx.openPrivacyContract({
|
||||
success(res) {
|
||||
// console.log('打开隐私协议', res);
|
||||
},
|
||||
fail(err) {
|
||||
// console.error('打开隐私协议失败', err)
|
||||
}
|
||||
success(res) {},
|
||||
fail(err) {}
|
||||
});
|
||||
// #endif
|
||||
|
||||
@@ -252,59 +205,44 @@ export default {
|
||||
if (this.$util.isQuickApp()) {
|
||||
if (typeof has != 'undefined' && has?.openPrivacySetting) {
|
||||
has.openPrivacySetting({
|
||||
success: (res) => {
|
||||
// console.log('打开隐私协议', res);
|
||||
},
|
||||
fail: (err) => {
|
||||
// console.error('打开隐私协议失败', err)
|
||||
}
|
||||
success: (res) => {},
|
||||
fail: (err) => {}
|
||||
});
|
||||
} else {
|
||||
// 属于嵌入到快应用Webview组件中的情况,按照H5的方式来处理
|
||||
this.$util.redirectTo(privacyContractPage);
|
||||
}
|
||||
} else {
|
||||
// H5 环境下的处理逻辑
|
||||
this.$util.redirectTo(privacyContractPage);
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
//打开用户服务协议
|
||||
|
||||
openPrivacyService() {
|
||||
// #ifdef QUICKAPP-WEBVIEW || H5 || WEB
|
||||
if (this.$util.isQuickApp()) {
|
||||
if (typeof has != 'undefined' && has?.openPrivacySetting) {
|
||||
has.openPrivacySetting({
|
||||
success: (res) => {
|
||||
// console.log('打开用户服务协议', res);
|
||||
},
|
||||
fail: (err) => {
|
||||
// console.error('打开用户服务协议失败', err)
|
||||
}
|
||||
success: (res) => {},
|
||||
fail: (err) => {}
|
||||
});
|
||||
} else {
|
||||
// 属于嵌入到快应用Webview组件中的情况,按照H5的方式来处理
|
||||
this.$util.redirectTo(privacyServicePage);
|
||||
}
|
||||
} else {
|
||||
// H5 环境下的处理逻辑
|
||||
this.$util.redirectTo(privacyServicePage);
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
// 不同意
|
||||
|
||||
handleDisagree() {
|
||||
this.privacyResolves.forEach(resolve => {
|
||||
resolve({
|
||||
event: 'disagree',
|
||||
})
|
||||
resolve({ event: 'disagree' })
|
||||
})
|
||||
this.privacyResolves.clear()
|
||||
//关闭弹窗
|
||||
this.disPopUp()
|
||||
// 保存用户授权状态到本地存储,无论同意还是不同意,都不再重复弹出
|
||||
|
||||
uni.setStorageSync('privacyAgreed', true);
|
||||
//退出小程序
|
||||
|
||||
uni.showModal({
|
||||
content: '未同意隐私协议,无法使用相关功能',
|
||||
success: () => {
|
||||
@@ -312,7 +250,7 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 同意并继续
|
||||
|
||||
handleAgree() {
|
||||
this.privacyResolves.forEach(resolve => {
|
||||
resolve({
|
||||
@@ -321,28 +259,23 @@ export default {
|
||||
})
|
||||
})
|
||||
this.privacyResolves.clear()
|
||||
//关闭弹窗
|
||||
this.disPopUp()
|
||||
|
||||
// 保存用户授权状态到本地存储,用于所有环境
|
||||
uni.setStorageSync('privacyAgreed', true);
|
||||
uni.setStorageSync('privacyAgreed', true);
|
||||
this.$emit('agree')
|
||||
},
|
||||
//打开弹窗
|
||||
|
||||
popUp() {
|
||||
this.showPop = true;
|
||||
},
|
||||
//关闭弹窗
|
||||
|
||||
disPopUp() {
|
||||
this.showPop = false;
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 清理事件监听器和集合
|
||||
this.privacyResolves.clear()
|
||||
closeOtherPagePopUpHooks.delete(this.disPopUp)
|
||||
// 注意:这里需要根据实际情况清理微信和快速应用的事件监听器
|
||||
// 由于微信的 wx.onNeedPrivacyAuthorization 没有对应的 off 方法,这里可能需要其他方式处理
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -89,7 +89,6 @@ export default {
|
||||
}
|
||||
},
|
||||
endVal() {
|
||||
console.log(123)
|
||||
if (this.autoplay) {
|
||||
this.start()
|
||||
}
|
||||
|
||||
@@ -164,7 +164,6 @@
|
||||
appId: 'wxeb490c6f9b154ef9', // 企业微信小程序AppID
|
||||
path: `pages/contacts/externalContactDetail?url=${encodeURIComponent(contactUrl)}`,
|
||||
success: () => {
|
||||
console.log('跳转企业微信成功');
|
||||
this.$util.showToast({
|
||||
title: '跳转成功',
|
||||
icon: 'success'
|
||||
@@ -189,7 +188,6 @@
|
||||
this.wxWorkSDK.addContact({
|
||||
userId: contactId
|
||||
}, (res) => {
|
||||
console.log('打开用户资料成功:', res);
|
||||
}, (err) => {
|
||||
console.error('打开用户资料失败:', err);
|
||||
this.showError('打开用户资料失败');
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
},
|
||||
"router" : {
|
||||
"mode" : "history",
|
||||
"base" : "/hwappx/test/"
|
||||
"base" : "/hwappx/common/"
|
||||
},
|
||||
"title" : "",
|
||||
"devServer" : {
|
||||
|
||||
@@ -87,8 +87,6 @@ export default {
|
||||
return true;
|
||||
}
|
||||
|
||||
// 打开登录弹窗
|
||||
// console.log('==> _handleDiyGroupInteractionEvent, 未登录,打开登录弹窗', { payload })
|
||||
this.$refs.login?.open();
|
||||
|
||||
// 阻止事件继续传播
|
||||
|
||||
@@ -413,10 +413,8 @@ export default {
|
||||
}
|
||||
},
|
||||
success: function (res) {
|
||||
console.log('success', res);
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('fail', res);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -151,8 +151,7 @@ export default {
|
||||
// #endif
|
||||
}, this.wait);
|
||||
|
||||
// console.log('this.top', this.top);
|
||||
// console.log('this.radius', this.radius);
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
this.animationData = uni
|
||||
|
||||
@@ -566,7 +566,6 @@ export default {
|
||||
// 手指触摸事件 用于菜单左滑
|
||||
touchS(e) {
|
||||
this.startX = e.touches[0].clientX;
|
||||
// console.log('开始' + e.touches[0].clientX);
|
||||
},
|
||||
touchE(e, cartIndex) {
|
||||
this.endX = e.changedTouches[0].clientX;
|
||||
|
||||
@@ -72,7 +72,6 @@ export default {
|
||||
url: '/api/lucky/status',
|
||||
data: {},
|
||||
success: res => {
|
||||
console.log(res)
|
||||
this.langstatus = res.status
|
||||
if(this.langstatus == 1){
|
||||
// this.$langConfig.refresh();
|
||||
|
||||
@@ -762,13 +762,10 @@ export default {
|
||||
}
|
||||
this.$forceUpdate();
|
||||
// this.orderCreateData.coupon[merch_id].coupon_id = data.coupon_id
|
||||
console.log(this.selectCouponId)
|
||||
},
|
||||
//确定使用优惠券
|
||||
useCpopon() {
|
||||
console.log(this.merchCoupon.merch_id)
|
||||
this.orderCreateData.coupon[this.merchCoupon.merch_id].coupon_id = this.selectCouponId;
|
||||
console.log(this.orderCreateData.coupon)
|
||||
this.$refs.couponPopup.close();
|
||||
this.calculate();
|
||||
},
|
||||
|
||||
@@ -137,7 +137,6 @@ export default {
|
||||
}
|
||||
},
|
||||
fail: function(res) {
|
||||
console.log('fail', res);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
@@ -359,9 +359,8 @@ export default {
|
||||
getFenxiaoDetail() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/detail',
|
||||
success: res => {
|
||||
console.log(res)
|
||||
if (res.data) {
|
||||
success: res => {
|
||||
if (res.data) {
|
||||
if (res.data.status == -1) {
|
||||
this.$util.showToast({
|
||||
title: '当前分销商已冻结'
|
||||
|
||||
@@ -136,12 +136,10 @@ export default {
|
||||
image_list: this.$util.img(this.goodsList[this.currIndex].goods_image)
|
||||
}
|
||||
},
|
||||
success: function (res) {
|
||||
console.log('success', res);
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('fail', res);
|
||||
}
|
||||
success: function (res) {
|
||||
},
|
||||
fail: function (res) {
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -312,9 +312,8 @@
|
||||
if (res.code == 0 && res.data.length) {
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: res.data,
|
||||
fail: res => {
|
||||
console.log('fail', res);
|
||||
},
|
||||
fail: res => {
|
||||
},
|
||||
complete: () => {
|
||||
callback();
|
||||
}
|
||||
|
||||
@@ -118,7 +118,6 @@
|
||||
this.categoryId = 'category-' + index;
|
||||
// 阻止切换分类之后滚动事件也立即执行
|
||||
this.scrollLock = true;
|
||||
console.log(index)
|
||||
|
||||
// this.goodsList = []
|
||||
// this.getgoodslist()
|
||||
@@ -174,9 +173,8 @@
|
||||
data: {
|
||||
is_type_show:1,
|
||||
},
|
||||
success: res => {
|
||||
console.log( res.data)
|
||||
this.categoryTree = res.data
|
||||
success: res => {
|
||||
this.categoryTree = res.data
|
||||
},
|
||||
fail: () => {
|
||||
this.$util.showToast({
|
||||
|
||||
@@ -164,11 +164,8 @@ export default {
|
||||
id:this.goodsData.id
|
||||
},
|
||||
success: res => {
|
||||
console.log(res)
|
||||
if(res.result.detail){
|
||||
this.goodsData = res.result.detail
|
||||
console.log(this.goodsData.goods_image)
|
||||
}else{
|
||||
this.$util.showToast({
|
||||
title: '商品不存在',
|
||||
});
|
||||
@@ -737,7 +734,6 @@ export default {
|
||||
})
|
||||
|
||||
// 清空规格的图片
|
||||
console.log(this.goodsData)
|
||||
return false
|
||||
for (var i = 0; i < this.goodsData.goods_sku_data.length; i++) {
|
||||
if (this.goodsData.goods_sku_data[i].sku_images.length == 0) this.goodsData.goods_sku_data[i].sku_image = '';
|
||||
@@ -796,9 +792,6 @@ export default {
|
||||
} else if (this.goodsData.verify_validity_type == 2) {
|
||||
data.virtual_indate = this.virtualTime;
|
||||
}
|
||||
|
||||
// console.log(this.goodsData.goods_spec_format,'format')
|
||||
// if(this.goodsData.goods_spec_format == '[]'){
|
||||
// data.carmichael= data.carmichael
|
||||
// }
|
||||
var save = null;
|
||||
|
||||
@@ -150,9 +150,8 @@ export default {
|
||||
data: {
|
||||
merch_id:this.merch_id
|
||||
},
|
||||
success: res => {
|
||||
console.log(res)
|
||||
this.merch = res.data
|
||||
success: res => {
|
||||
this.merch = res.data
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -54,9 +54,8 @@ export default {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/config/agreement',
|
||||
data: data,
|
||||
success: res => {
|
||||
console.log(res.data.title)
|
||||
uni.setNavigationBarTitle({
|
||||
success: res => {
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.data.title
|
||||
})
|
||||
this.content = res.data.content
|
||||
|
||||
@@ -671,15 +671,7 @@ async loadChatHistoryIfExist() {
|
||||
return;
|
||||
}
|
||||
// 需要根据实际返回的 response.data.messages 来映射
|
||||
console.log('【调试】后端返回的历史消息数据:', response.messages);
|
||||
this.messages = response.messages.map(msg => {
|
||||
console.log('【调试】单条消息完整数据:', JSON.stringify(msg));
|
||||
console.log('【调试】单条消息时间字段:');
|
||||
console.log(' - created_at:', msg.created_at, typeof msg.created_at);
|
||||
console.log(' - create_time:', msg.create_time, typeof msg.create_time);
|
||||
console.log(' - time:', msg.time, typeof msg.time);
|
||||
console.log(' - Date.now():', Date.now());
|
||||
|
||||
let content = '';
|
||||
if (msg.role === 'user') {
|
||||
content = msg.query || (typeof msg.inputs === 'string' ? msg.inputs : JSON.stringify(msg.inputs || '')) || '';
|
||||
@@ -688,7 +680,6 @@ async loadChatHistoryIfExist() {
|
||||
}
|
||||
// 只使用后端返回的真实时间,不使用假时间
|
||||
const realTimestamp = msg.created_at || msg.create_time || msg.time;
|
||||
console.log('【调试】最终使用的时间戳:', realTimestamp);
|
||||
return {
|
||||
id: msg.message_id || (Date.now() + Math.random() * 10000),
|
||||
role: msg.role === 'user' ? 'user' : 'assistant',
|
||||
@@ -740,13 +731,11 @@ async loadChatHistoryIfExist() {
|
||||
|
||||
// 从相册选择头像
|
||||
chooseAvatarFromAlbum() {
|
||||
console.log('选择从相册选择头像')
|
||||
this.selectAvatar()
|
||||
},
|
||||
|
||||
// 统一头像选择方法 - 仅从相册选择
|
||||
selectAvatar() {
|
||||
console.log('开始选择头像')
|
||||
|
||||
// #ifdef H5
|
||||
// H5环境下的处理 - 仅从相册选择
|
||||
@@ -1259,11 +1248,9 @@ async loadChatHistoryIfExist() {
|
||||
offset: this.historyOffset // 改用独立偏移量
|
||||
});
|
||||
|
||||
if (response.success && Array.isArray(response.messages) && response.messages.length > 0) {
|
||||
console.log('【调试】加载更多历史消息数据:', response.messages);
|
||||
const historyMessages = response.messages.map(msg => {
|
||||
console.log('【调试】加载更多单条消息数据:', msg);
|
||||
// 只使用后端返回的真实时间,不使用假时间
|
||||
if (response.success && Array.isArray(response.messages) && response.messages.length > 0) {
|
||||
const historyMessages = response.messages.map(msg => {
|
||||
// 只使用后端返回的真实时间,不使用假时间
|
||||
const realTimestamp = msg.create_time || msg.created_at || msg.time;
|
||||
return {
|
||||
id: msg.id || `history-${Date.now()}-${Math.random().toString(36).slice(2)}`,
|
||||
@@ -1370,7 +1357,6 @@ async loadChatHistoryIfExist() {
|
||||
navigator.mediaDevices.getUserMedia({ audio: true })
|
||||
.then(stream => {
|
||||
// 语音输入处理
|
||||
console.log('语音输入开始')
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('语音输入错误:', error)
|
||||
@@ -1480,7 +1466,6 @@ async loadChatHistoryIfExist() {
|
||||
if (width && height) {
|
||||
// 判断视频方向:宽度 >= 高度为横屏,否则为竖屏
|
||||
const videoRatio = width >= height ? 'landscape' : 'portrait';
|
||||
console.log(`AI聊天视频宽高比检测: ${width}x${height}, 比例: ${videoRatio}`);
|
||||
|
||||
// 动态设置视频样式
|
||||
// 这里可以添加逻辑来动态调整视频播放器的样式
|
||||
|
||||
@@ -183,7 +183,6 @@ export default {
|
||||
onShow() {
|
||||
// 监听键盘高度变化
|
||||
uni.onKeyboardHeightChange((res) => {
|
||||
console.log('键盘高度变化:', res.height);
|
||||
this.keyboardHeight = res.height;
|
||||
if (this.$refs.chat && this.$refs.chat.updateKeyboardHeight) {
|
||||
this.$refs.chat.updateKeyboardHeight(res.height);
|
||||
@@ -233,7 +232,6 @@ export default {
|
||||
|
||||
setupNavigationEvents() {
|
||||
uni.onWindowResize((res) => {
|
||||
console.log('窗口大小变化:', res.size);
|
||||
this.calculateScrollViewHeight();
|
||||
});
|
||||
},
|
||||
@@ -241,8 +239,6 @@ export default {
|
||||
// ========== 事件处理方法 ==========
|
||||
|
||||
async handleServiceRequest(event) {
|
||||
console.log('处理服务请求:', EventSafety.extractEventData(event));
|
||||
|
||||
if (event.matches('.service-component') ||
|
||||
event.detail?.componentType === 'service') {
|
||||
await this.processServiceRequest(event);
|
||||
@@ -250,12 +246,10 @@ export default {
|
||||
},
|
||||
|
||||
async handleNavigationRequest(event) {
|
||||
console.log('处理导航请求:', event.type);
|
||||
this.emitNavigationInfo(event);
|
||||
},
|
||||
|
||||
handleComponentInteraction(event) {
|
||||
console.log('处理组件交互:', event.detail);
|
||||
this.processComponentInteraction(event);
|
||||
},
|
||||
|
||||
@@ -271,16 +265,11 @@ export default {
|
||||
|
||||
// ========== 初始化页面 ==========
|
||||
initChat() {
|
||||
console.log('AI聊天页面初始化');
|
||||
|
||||
// 检查是否有从商品分类传递过来的商品信息
|
||||
const selectedProduct = uni.getStorageSync('selectedProduct')
|
||||
if (selectedProduct) {
|
||||
console.log('检测到选择的商品:', selectedProduct)
|
||||
|
||||
// 清除存储的商品信息,避免重复发送
|
||||
uni.removeStorageSync('selectedProduct')
|
||||
|
||||
// 延迟发送商品信息,确保聊天组件已经初始化
|
||||
setTimeout(() => {
|
||||
this.sendProductToAI(selectedProduct)
|
||||
@@ -329,7 +318,6 @@ export default {
|
||||
this. $off(eventType, handler);
|
||||
});
|
||||
this.safeEventHandlers.clear();
|
||||
console.log('组件清理完成');
|
||||
},
|
||||
|
||||
showError(message) {
|
||||
@@ -443,11 +431,9 @@ export default {
|
||||
},
|
||||
|
||||
onMessageSent(message) {
|
||||
console.log('用户发送消息:', message);
|
||||
},
|
||||
|
||||
onAIResponse(message) {
|
||||
console.log('AI回复消息:', message);
|
||||
},
|
||||
|
||||
generateAIResponse(userMessage) {
|
||||
@@ -489,7 +475,6 @@ export default {
|
||||
},
|
||||
|
||||
onHistoryLoaded(messages) {
|
||||
console.log('历史消息加载完成:', messages.length);
|
||||
},
|
||||
|
||||
onFilePreview(message) {
|
||||
@@ -497,19 +482,15 @@ export default {
|
||||
},
|
||||
|
||||
onAudioPlay(message) {
|
||||
console.log('音频播放:', message);
|
||||
},
|
||||
|
||||
onAudioPause(message) {
|
||||
console.log('音频暂停:', message);
|
||||
},
|
||||
|
||||
onVideoPlay(message) {
|
||||
console.log('视频播放:', message);
|
||||
},
|
||||
|
||||
onVideoPause(message) {
|
||||
console.log('视频暂停:', message);
|
||||
},
|
||||
|
||||
sendProductToAI(product) {
|
||||
@@ -520,8 +501,6 @@ export default {
|
||||
|
||||
const productContent = `我想了解以下商品的详细信息:\n商品名称:${product.goods_name}\n价格:¥${product.price}\n商品ID:${product.goods_id}`
|
||||
|
||||
console.log('商品信息已发送到AI客服:', productContent)
|
||||
|
||||
// 使用sendMessageWithContent方法发送商品信息
|
||||
this.$refs.chat.sendMessageWithContent(productContent)
|
||||
},
|
||||
@@ -548,7 +527,6 @@ export default {
|
||||
},
|
||||
|
||||
onInputChange(value) {
|
||||
console.log('输入内容:', value);
|
||||
},
|
||||
|
||||
// ✅ 新增:权限校验(核心修复)
|
||||
|
||||
@@ -130,12 +130,10 @@ export default {
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
},
|
||||
toDetail(item) {
|
||||
console.log(item.files_url);
|
||||
const url = item.files_url;
|
||||
uni.showLoading({ title: "正在加载" });
|
||||
try {
|
||||
@@ -147,7 +145,6 @@ export default {
|
||||
uni.openDocument({
|
||||
filePath: filePath,
|
||||
success: () => {
|
||||
console.log("打开成功");
|
||||
},
|
||||
fail: () => {
|
||||
},
|
||||
@@ -161,14 +158,12 @@ export default {
|
||||
uni.hideLoading();
|
||||
},
|
||||
complete: (res) => {
|
||||
console.log("下载完成", res);
|
||||
if (res.statusCode === 404) {
|
||||
uni.showToast({ title: "文件不存在", icon: "none" });
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.log("CatchClause", e);
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
@@ -196,7 +191,6 @@ export default {
|
||||
uni.openDocument({
|
||||
filePath: filePath,
|
||||
success: () => {
|
||||
console.log("打开成功");
|
||||
},
|
||||
fail: () => {
|
||||
},
|
||||
@@ -210,14 +204,12 @@ export default {
|
||||
uni.hideLoading();
|
||||
},
|
||||
complete: (res) => {
|
||||
console.log("下载完成", res);
|
||||
if (res.statusCode === 404) {
|
||||
uni.showToast({ title: "文件不存在", icon: "none" });
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.log("CatchClause", e);
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
@@ -249,7 +241,6 @@ export default {
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.log("CatchClause", e);
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
@@ -265,12 +256,10 @@ export default {
|
||||
this.$util.showToast({ title: res.message });
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
},
|
||||
change(e) {
|
||||
console.log(e);
|
||||
this.ismessage = e.show ? 1 : 0;
|
||||
},
|
||||
tapMessage() {
|
||||
@@ -285,7 +274,6 @@ export default {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone + "",
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -293,11 +281,9 @@ export default {
|
||||
uni.setClipboardData({
|
||||
data: text,
|
||||
success: () => {
|
||||
console.log("复制成功");
|
||||
uni.showToast({ title: "复制成功", icon: "success", duration: 2000 });
|
||||
},
|
||||
fail: () => {
|
||||
console.log("复制失败");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -110,7 +110,6 @@ export default {
|
||||
})
|
||||
},
|
||||
toDetail(item) {
|
||||
console.log(item.files_url)
|
||||
uni.showLoading({
|
||||
title: '正在加载'
|
||||
})
|
||||
@@ -118,12 +117,10 @@ export default {
|
||||
uni.downloadFile({
|
||||
url: item.files_url,
|
||||
success: res => {
|
||||
console.log(res)
|
||||
if (res.statusCode === 200) {
|
||||
uni.openDocument({
|
||||
filePath: res.tempFilePath,
|
||||
success: () => {
|
||||
console.log('打开成功')
|
||||
},
|
||||
fail: () => {
|
||||
},
|
||||
@@ -137,7 +134,6 @@ export default {
|
||||
uni.hideLoading()
|
||||
},
|
||||
complete: res => {
|
||||
console.log('下载完成', res)
|
||||
if (res.statusCode === 404) {
|
||||
uni.showToast({
|
||||
title: '文件不存在',
|
||||
@@ -147,7 +143,6 @@ export default {
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log('CatchClause', e)
|
||||
uni.hideLoading()
|
||||
}
|
||||
},
|
||||
|
||||
@@ -324,9 +324,8 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
console.log('fail', res);
|
||||
}
|
||||
fail: res => {
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
|
||||
@@ -265,9 +265,8 @@
|
||||
if (res.code == 0 && res.data.length) {
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: res.data,
|
||||
fail: res => {
|
||||
console.log('fail', res);
|
||||
},
|
||||
fail: res => {
|
||||
},
|
||||
complete: () => {
|
||||
callback();
|
||||
}
|
||||
|
||||
@@ -114,8 +114,6 @@ export default {
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
console.log(`后台服务器返回的信息:${msg}`);
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
|
||||
@@ -2,7 +2,6 @@ export default {
|
||||
methods: {
|
||||
// 跳转至登录页
|
||||
toLogin(url) {
|
||||
console.log('跳转至登录页', {url, currentRoute: this.$util.getCurrentRoute()});
|
||||
this.$refs.login.open(url ?? this.$util.getCurrentRoute());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,7 +264,6 @@ export default {
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: res.data,
|
||||
fail: (res) => {
|
||||
console.log('fail', res)
|
||||
},
|
||||
complete: ()=> {
|
||||
callback();
|
||||
|
||||
@@ -266,7 +266,6 @@ export default {
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: res.data,
|
||||
fail: (res) => {
|
||||
console.log('fail', res)
|
||||
},
|
||||
complete: ()=> {
|
||||
callback();
|
||||
|
||||
@@ -75,7 +75,6 @@ export default {
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.log("CatchClause", error);
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
@@ -103,7 +102,6 @@ export default {
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err);
|
||||
uni.hideLoading();
|
||||
this.$util.showToast({ title: '下载失败' });
|
||||
}
|
||||
@@ -114,7 +112,6 @@ export default {
|
||||
url: '/api/seal/info',
|
||||
data: { keyword: this.keyword },
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
this.list = res.value;
|
||||
this.info = res;
|
||||
this.title = res.name;
|
||||
|
||||
@@ -64,7 +64,6 @@ export default {
|
||||
uni.openDocument({
|
||||
filePath: res.tempFilePath,
|
||||
success: (res) => {
|
||||
console.log('打开文档成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ export default {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/config/defaultvr',
|
||||
success: res => {
|
||||
console.log(res)
|
||||
if (res.code == 0) {
|
||||
uni.setNavigationBarTitle({
|
||||
title:res.data.title
|
||||
|
||||
@@ -416,7 +416,6 @@ const store = new Vuex.Store({
|
||||
},
|
||||
// 生成主题颜色CSS变量
|
||||
themeColorSet() {
|
||||
// console.log('样式颜色设置...');
|
||||
let theme = this.state.themeStyle;
|
||||
if (!theme?.main_color || !theme?.aux_color) return;
|
||||
try {
|
||||
@@ -440,7 +439,6 @@ const store = new Vuex.Store({
|
||||
} catch (e) {
|
||||
console.error('设置主题颜色失败', e);
|
||||
}
|
||||
// console.log('themeColor => ', this.state.themeColor);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user