Merge branch 'feat/personnel_channel' into dev/1.0
This commit is contained in:
@@ -77,18 +77,16 @@ export default {
|
|||||||
* 然后将 site.js 文件放到 `unpackage\dist\build\mp-weixin\` 目录下面
|
* 然后将 site.js 文件放到 `unpackage\dist\build\mp-weixin\` 目录下面
|
||||||
*/
|
*/
|
||||||
// 商户ID
|
// 商户ID
|
||||||
uniacid: 1, //825
|
uniacid: uniacid, //825
|
||||||
|
|
||||||
//api请求地址
|
//api请求地址
|
||||||
baseUrl: 'https://dev.aigc-quickapp.com/',
|
baseUrl: domain,
|
||||||
// baseUrl: 'http://localhost:8010/',
|
|
||||||
|
|
||||||
// 图片域名
|
// 图片域名
|
||||||
imgDomain: 'https://dev.aigc-quickapp.com/',
|
imgDomain: domain,
|
||||||
//imgDomain: 'http://localhost:8010/',
|
|
||||||
|
|
||||||
// H5端域名
|
// H5端域名
|
||||||
h5Domain: 'https://dev.aigc-quickapp.com/',
|
h5Domain: domain,
|
||||||
|
|
||||||
// // api请求地址
|
// // api请求地址
|
||||||
// baseUrl: 'https://tsaas.liveplatform.cn/',
|
// baseUrl: 'https://tsaas.liveplatform.cn/',
|
||||||
|
|||||||
@@ -2,13 +2,68 @@
|
|||||||
* 客服统一处理服务
|
* 客服统一处理服务
|
||||||
* 整合各种客服方式,提供统一的调用接口
|
* 整合各种客服方式,提供统一的调用接口
|
||||||
*/
|
*/
|
||||||
export class CustomerService {
|
class CustomerService {
|
||||||
constructor(vueInstance, externalConfig = null) {
|
constructor(vueInstance, externalConfig = {}) {
|
||||||
|
if (!vueInstance.$lang) {
|
||||||
|
throw new Error('CustomerService 必须在 Vue 实例中初始化');
|
||||||
|
}
|
||||||
|
|
||||||
this.vm = vueInstance;
|
this.vm = vueInstance;
|
||||||
this.externalConfig = externalConfig; // 外部传入的最新配置(优先级最高)
|
this.externalConfig = externalConfig; // 外部传入的最新配置(优先级最高)
|
||||||
this.latestPlatformConfig = null;
|
this.latestPlatformConfig = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getSupoortKeFuList() {
|
||||||
|
if (!this.vm) return [];
|
||||||
|
|
||||||
|
const vm = this.vm;
|
||||||
|
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
id: 'weixin-official',
|
||||||
|
name: vm.$lang('customer.weChatKefu'),
|
||||||
|
isOfficial: true,
|
||||||
|
type: 'weapp'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'custom-kefu',
|
||||||
|
name: vm.$lang('customer.systemKefu'),
|
||||||
|
isOfficial: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'qyweixin-kefu',
|
||||||
|
name: vm.$lang('customer.weChatWorkKefu'),
|
||||||
|
isOfficial: false
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开客服选择弹窗
|
||||||
|
*/
|
||||||
|
openCustomerSelectPopupDialog() {
|
||||||
|
const kefu_list = this.getSupoortKeFuList();
|
||||||
|
const kefuNames = kefu_list.map(item => item.name);
|
||||||
|
|
||||||
|
uni.showActionSheet({
|
||||||
|
itemList: kefuNames,
|
||||||
|
success: (res) => {
|
||||||
|
const kefu = kefu_list[res.tapIndex];
|
||||||
|
this.externalConfig = kefu ?? this.externalConfig ?? {};
|
||||||
|
if (kefu.isOfficial) {
|
||||||
|
uni.openCustomerServiceConversation({
|
||||||
|
sessionFrom: 'weapp',
|
||||||
|
showMessageCard: true
|
||||||
|
});
|
||||||
|
} else if (kefu.id === 'custom-kefu') {
|
||||||
|
this.handleCustomerClick();
|
||||||
|
} else if (kefu.id === 'qyweixin-kefu') {
|
||||||
|
this.handleQyWeixinKefuClick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 强制刷新配置(支持传入外部配置)
|
* 强制刷新配置(支持传入外部配置)
|
||||||
* @param {Object} externalConfig 外部最新配置
|
* @param {Object} externalConfig 外部最新配置
|
||||||
@@ -82,7 +137,7 @@ export class CustomerService {
|
|||||||
validateConfig() {
|
validateConfig() {
|
||||||
const config = this.getPlatformConfig();
|
const config = this.getPlatformConfig();
|
||||||
const wxworkConfig = this.getWxworkConfig();
|
const wxworkConfig = this.getWxworkConfig();
|
||||||
|
|
||||||
const result = {
|
const result = {
|
||||||
isValid: true,
|
isValid: true,
|
||||||
errors: [],
|
errors: [],
|
||||||
@@ -122,35 +177,11 @@ export class CustomerService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 跳转到Dify客服页面
|
* 跳转到AI客服页面
|
||||||
*/
|
*/
|
||||||
openDifyService() {
|
openAIKeFuService() {
|
||||||
try {
|
const vm = this.vm;
|
||||||
if (this.vm.setAiUnreadCount) {
|
vm.$util.redirectTo(vm.$util.AI_CHAT_PAGE_URL);
|
||||||
this.vm.setAiUnreadCount(0);
|
|
||||||
}
|
|
||||||
// 强制跳转,忽略框架层的封装
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages_tool/ai-chat/index',
|
|
||||||
fail: (err) => {
|
|
||||||
// 兜底:使用window.location跳转(H5)
|
|
||||||
// #ifdef H5
|
|
||||||
window.location.href = '/pages_tool/ai-chat/index';
|
|
||||||
// #endif
|
|
||||||
console.error('跳转Dify客服失败:', err);
|
|
||||||
uni.showToast({
|
|
||||||
title: '跳转客服失败',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
console.error('跳转Dify客服异常:', e);
|
|
||||||
uni.showToast({
|
|
||||||
title: '跳转客服失败',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -170,7 +201,7 @@ export class CustomerService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const config = this.getPlatformConfig();
|
const config = this.getPlatformConfig();
|
||||||
const { niushop = {}, sendMessageTitle = '', sendMessagePath = '', sendMessageImg = '' } = options;
|
const { niushop = {}, sendMessageTitle = '', sendMessagePath = '', sendMessageImg = '' } = options || {};
|
||||||
|
|
||||||
if (config.type === 'none') {
|
if (config.type === 'none') {
|
||||||
this.showNoServicePopup();
|
this.showNoServicePopup();
|
||||||
@@ -180,7 +211,7 @@ export class CustomerService {
|
|||||||
// 核心分支:根据最新的type处理
|
// 核心分支:根据最新的type处理
|
||||||
switch (config.type) {
|
switch (config.type) {
|
||||||
case 'aikefu':
|
case 'aikefu':
|
||||||
this.openDifyService();
|
this.openAIKeFuService();
|
||||||
break;
|
break;
|
||||||
case 'wxwork':
|
case 'wxwork':
|
||||||
this.openWxworkService(false, config, options);
|
this.openWxworkService(false, config, options);
|
||||||
@@ -211,7 +242,7 @@ export class CustomerService {
|
|||||||
openWxworkService(useOriginalService = false, servicerConfig = null, options = {}) {
|
openWxworkService(useOriginalService = false, servicerConfig = null, options = {}) {
|
||||||
const config = servicerConfig || this.getPlatformConfig();
|
const config = servicerConfig || this.getPlatformConfig();
|
||||||
const wxworkConfig = this.getWxworkConfig();
|
const wxworkConfig = this.getWxworkConfig();
|
||||||
const { sendMessageTitle = '', sendMessagePath = '', sendMessageImg = '' } = options;
|
const { sendMessageTitle = '', sendMessagePath = '', sendMessageImg = '' } = options || {};
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
if (wxworkConfig?.enable && wxworkConfig?.contact_url && !useOriginalService) {
|
if (wxworkConfig?.enable && wxworkConfig?.contact_url && !useOriginalService) {
|
||||||
@@ -292,7 +323,7 @@ export class CustomerService {
|
|||||||
* @param {Object} options 选项参数
|
* @param {Object} options 选项参数
|
||||||
*/
|
*/
|
||||||
handleCustomWeappService(config, options = {}) {
|
handleCustomWeappService(config, options = {}) {
|
||||||
const { sendMessageTitle = '', sendMessagePath = '', sendMessageImg = '' } = options;
|
const { sendMessageTitle = '', sendMessagePath = '', sendMessageImg = '' } = options || {};
|
||||||
|
|
||||||
if (config.customServiceUrl) {
|
if (config.customServiceUrl) {
|
||||||
let url = config.customServiceUrl;
|
let url = config.customServiceUrl;
|
||||||
@@ -300,11 +331,11 @@ export class CustomerService {
|
|||||||
if (sendMessageTitle) params.push(`title=${encodeURIComponent(sendMessageTitle)}`);
|
if (sendMessageTitle) params.push(`title=${encodeURIComponent(sendMessageTitle)}`);
|
||||||
if (sendMessagePath) params.push(`path=${encodeURIComponent(sendMessagePath)}`);
|
if (sendMessagePath) params.push(`path=${encodeURIComponent(sendMessagePath)}`);
|
||||||
if (sendMessageImg) params.push(`img=${encodeURIComponent(sendMessageImg)}`);
|
if (sendMessageImg) params.push(`img=${encodeURIComponent(sendMessageImg)}`);
|
||||||
|
|
||||||
if (params.length > 0) {
|
if (params.length > 0) {
|
||||||
url += (url.includes('?') ? '&' : '?') + params.join('&');
|
url += (url.includes('?') ? '&' : '?') + params.join('&');
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url,
|
url: url,
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
@@ -328,7 +359,7 @@ export class CustomerService {
|
|||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
window.open(config.thirdPartyServiceUrl, '_blank');
|
window.open(config.thirdPartyServiceUrl, '_blank');
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
if (config.thirdPartyMiniAppId) {
|
if (config.thirdPartyMiniAppId) {
|
||||||
wx.navigateToMiniProgram({
|
wx.navigateToMiniProgram({
|
||||||
@@ -381,7 +412,7 @@ export class CustomerService {
|
|||||||
console.log('支付宝小程序客服', config);
|
console.log('支付宝小程序客服', config);
|
||||||
switch (config.type) {
|
switch (config.type) {
|
||||||
case 'aikefu':
|
case 'aikefu':
|
||||||
this.openDifyService();
|
this.openAIKeFuService();
|
||||||
break;
|
break;
|
||||||
case 'third':
|
case 'third':
|
||||||
this.openThirdService(config);
|
this.openThirdService(config);
|
||||||
@@ -395,26 +426,29 @@ export class CustomerService {
|
|||||||
/**
|
/**
|
||||||
* 拨打电话
|
* 拨打电话
|
||||||
*/
|
*/
|
||||||
makePhoneCall() {
|
makePhoneCall(mobileNumber) {
|
||||||
this.vm.$api.sendRequest({
|
if (mobileNumber) {
|
||||||
url: '/api/site/shopcontact',
|
return uni.makePhoneCall({
|
||||||
success: res => {
|
phoneNumber: mobileNumber
|
||||||
if (res.code === 0 && res.data?.mobile) {
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 从缓存中获取电话信息
|
||||||
|
uni.getStorage({
|
||||||
|
key: 'shopInfo',
|
||||||
|
success: (res) => {
|
||||||
|
const shopInfo = res.data;
|
||||||
|
const mobile = shopInfo?.mobile ?? '';
|
||||||
|
if (mobile) {
|
||||||
uni.makePhoneCall({
|
uni.makePhoneCall({
|
||||||
phoneNumber: res.data.mobile
|
phoneNumber: mobile
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '暂无客服电话',
|
title: '暂无客服电话',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
|
||||||
fail: () => {
|
|
||||||
uni.showToast({
|
|
||||||
title: '获取客服电话失败',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -424,8 +458,8 @@ export class CustomerService {
|
|||||||
*/
|
*/
|
||||||
showNoServicePopup() {
|
showNoServicePopup() {
|
||||||
const siteInfo = this.vm.$store.state.siteInfo || {};
|
const siteInfo = this.vm.$store.state.siteInfo || {};
|
||||||
const message = siteInfo?.site_tel
|
const message = siteInfo?.site_tel
|
||||||
? `请联系客服,客服电话是${siteInfo.site_tel}`
|
? `请联系客服,客服电话是${siteInfo.site_tel}`
|
||||||
: '抱歉,商家暂无客服,请线下联系';
|
: '抱歉,商家暂无客服,请线下联系';
|
||||||
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
@@ -506,6 +540,6 @@ export class CustomerService {
|
|||||||
* @param {Object} externalConfig 外部最新配置
|
* @param {Object} externalConfig 外部最新配置
|
||||||
* @returns {CustomerService} 客服服务实例
|
* @returns {CustomerService} 客服服务实例
|
||||||
*/
|
*/
|
||||||
export function createCustomerService(vueInstance, externalConfig = null) {
|
export function createCustomerService(vueInstance, externalConfig = {}) {
|
||||||
return new CustomerService(vueInstance, externalConfig);
|
return new CustomerService(vueInstance, externalConfig);
|
||||||
}
|
}
|
||||||
@@ -1,161 +1,205 @@
|
|||||||
import { langConfig } from './config-external.js';
|
import { langConfig } from './config-external.js';
|
||||||
|
|
||||||
|
|
||||||
// 缓存已加载的语言包
|
// 缓存已加载的语言包
|
||||||
const loadedLangPacks = {};
|
const loadedLangPacks = {};
|
||||||
|
|
||||||
// 处理页面目录映射
|
// 处理页面目录映射
|
||||||
function processRoutePath(route) {
|
function processRoutePath(route) {
|
||||||
let routeParts = route.split("/");
|
let routeParts = route.split("/");
|
||||||
|
|
||||||
// ---- 处理页面目录映射 <begin> 分包造成的,需要根据实际目录结构进行映射----
|
// ---- 处理页面目录映射 <begin> 分包造成的,需要根据实际目录结构进行映射----
|
||||||
if (routeParts[0] === 'pages_tool') {
|
// 先处理特殊的分包路径
|
||||||
routeParts = [routeParts[1], ...routeParts.slice(2)];
|
if (routeParts[0] === 'pages_tool') {
|
||||||
} else if (routeParts[0] === 'pages_goods') {
|
// pages_tool 分包下的页面,直接使用子目录作为语言包路径
|
||||||
routeParts[0] = 'goods';
|
routeParts = [routeParts[1], ...routeParts.slice(2)];
|
||||||
} else if (routeParts[0] === 'pages_member') {
|
} else if (routeParts[0] === 'pages_goods') {
|
||||||
routeParts[0] = 'member';
|
// pages_goods 分包映射到 goods 目录
|
||||||
} else if (routeParts[0] === 'pages_order') {
|
routeParts[0] = 'goods';
|
||||||
routeParts[0] = 'order';
|
} else if (routeParts[0] === 'pages_member') {
|
||||||
} else if (routeParts[0] === 'pages_promotion') {
|
// pages_member 分包映射到 member 目录
|
||||||
const promotionModules = ['point', 'fenxiao', 'merch'];
|
routeParts[0] = 'member';
|
||||||
if (routeParts[1] && promotionModules.includes(routeParts[1])) {
|
} else if (routeParts[0] === 'pages_order') {
|
||||||
routeParts = [routeParts[1], ...routeParts.slice(2)];
|
// pages_order 分包映射到 order 目录
|
||||||
}
|
routeParts[0] = 'order';
|
||||||
}
|
} else if (routeParts[0] === 'pages_promotion') {
|
||||||
// ---- 处理页面目录映射 <end>----
|
// pages_promotion 分包特殊处理
|
||||||
|
const promotionModules = ['point', 'fenxiao', 'merch'];
|
||||||
if (routeParts[0] === 'pages') {
|
if (routeParts[1] && promotionModules.includes(routeParts[1])) {
|
||||||
routeParts = routeParts.slice(1);
|
routeParts = [routeParts[1], ...routeParts.slice(2)];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return routeParts.join("/");
|
// ---- 处理页面目录映射 <end>----
|
||||||
|
|
||||||
|
// 去掉pages目录,只保留子目录
|
||||||
|
if (routeParts[0] === 'pages') {
|
||||||
|
routeParts = routeParts.slice(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return routeParts.join("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加载语言包(同步方式)
|
// 加载语言包(同步方式)
|
||||||
function loadLangPackSync(lang, path) {
|
function loadLangPackSync(lang, path) {
|
||||||
try {
|
try {
|
||||||
if (loadedLangPacks[`${lang}_${path}`]) {
|
if (loadedLangPacks[`${lang}_${path}`]) {
|
||||||
return loadedLangPacks[`${lang}_${path}`];
|
return loadedLangPacks[`${lang}_${path}`];
|
||||||
}
|
}
|
||||||
const langData = require(`@/lang/${lang}/${path}.js`).lang;
|
const langData = require(`@/lang/${lang}/${path}.js`).lang;
|
||||||
loadedLangPacks[`${lang}_${path}`] = langData;
|
loadedLangPacks[`${lang}_${path}`] = langData;
|
||||||
return langData;
|
return langData;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`加载语言包 ${lang}/${path} 失败:`, error);
|
console.error(`加载语言包 ${lang}/${path} 失败:`, error);
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
langList: langConfig.langList,
|
langList: langConfig.langList,
|
||||||
/**
|
/**
|
||||||
* 解析多语言
|
* * 解析多语言
|
||||||
*/
|
* @param {Object} field
|
||||||
lang(field) {
|
*/
|
||||||
let _this = getCurrentPages()[getCurrentPages().length - 1];
|
lang(field) {
|
||||||
if (!_this) return;
|
let _this = getCurrentPages()[getCurrentPages().length - 1];
|
||||||
|
if (!_this) return;
|
||||||
|
|
||||||
const locale = uni.getStorageSync('lang') || "zh-cn";
|
const locale = uni.getStorageSync('lang') || "zh-cn"; //设置语言
|
||||||
|
|
||||||
let value = '';
|
let value = ''; // 存放解析后的语言值
|
||||||
let langPath = '';
|
let langPath = ''; // 存放当前页面语言包路径
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var lang = loadLangPackSync(locale, 'common');
|
//公共语言包(同步加载)
|
||||||
|
var lang = loadLangPackSync(locale, 'common');
|
||||||
let route = _this.route;
|
|
||||||
langPath = processRoutePath(route);
|
//当前页面语言包(同步加载)
|
||||||
|
let route = _this.route;
|
||||||
let currentPageLang = loadLangPackSync(locale, langPath);
|
langPath = processRoutePath(route);
|
||||||
|
|
||||||
|
// 加载当前页面语言包
|
||||||
|
let currentPageLang = loadLangPackSync(locale, langPath);
|
||||||
|
|
||||||
let mergedLang = { ...lang, ...currentPageLang };
|
// 合并语言包
|
||||||
|
let mergedLang = { ...lang, ...currentPageLang };
|
||||||
|
|
||||||
var arr = field.split(".");
|
// 解析字段
|
||||||
if (arr.length > 1) {
|
var arr = field.split(".");
|
||||||
let temp = mergedLang;
|
if (arr.length > 1) {
|
||||||
let found = true;
|
// 处理嵌套属性,如 common.currencySymbol
|
||||||
for (let key of arr) {
|
let temp = mergedLang;
|
||||||
if (temp[key] !== undefined) {
|
let found = true;
|
||||||
temp = temp[key];
|
for (let key of arr) {
|
||||||
} else {
|
if (temp[key] !== undefined) {
|
||||||
found = false;
|
temp = temp[key];
|
||||||
break;
|
} else {
|
||||||
}
|
found = false;
|
||||||
}
|
break;
|
||||||
value = found ? temp : field;
|
}
|
||||||
} else {
|
}
|
||||||
value = mergedLang[field] !== undefined ? mergedLang[field] : field;
|
value = found ? temp : field;
|
||||||
}
|
} else {
|
||||||
|
value = mergedLang[field] !== undefined ? mergedLang[field] : field;
|
||||||
} catch (e) {
|
}
|
||||||
console.error('解析语言包失败:', e, { langPath, field, locale });
|
|
||||||
value = field;
|
} catch (e) {
|
||||||
}
|
console.error('解析语言包失败:', e, { langPath, field, locale });
|
||||||
|
value = field;
|
||||||
|
}
|
||||||
|
|
||||||
if (arguments.length > 1) {
|
if (arguments.length > 1) {
|
||||||
for (var i = 1; i < arguments.length; i++) {
|
//有参数,需要替换
|
||||||
value = value.replace("{" + (i - 1) + "}", arguments[i]);
|
for (var i = 1; i < arguments.length; i++) {
|
||||||
}
|
value = value.replace("{" + (i - 1) + "}", arguments[i]);
|
||||||
}
|
}
|
||||||
if (value == undefined || (value == 'title' && field == 'title')) value = '';
|
}
|
||||||
|
if (value == undefined || (value == 'title' && field == 'title')) value = ''; // field
|
||||||
|
|
||||||
if (field == value) {
|
// 多语言调试,注释后可以关闭控制台输出
|
||||||
console.warn(`警告: 字段 ${field} 在语言包 ${langPath} 中未找到对应值,使用默认值 ${field} 当前语言: ${locale}`);
|
if (field == value) {
|
||||||
}
|
console.warn(`警告: 字段 ${field} 在语言包 ${langPath} 中未找到对应值,使用默认值 ${field} 当前语言: ${locale}`);
|
||||||
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 切换语言
|
* * 切换语言
|
||||||
*/
|
* @param {String} value 语言值
|
||||||
change(value, url = '/pages_tool/member/index') {
|
* @param {String} url 切换后跳转的页面url
|
||||||
let _this = getCurrentPages()[getCurrentPages().length - 1];
|
*/
|
||||||
if (!_this) return;
|
change(value, url = '/pages_tool/member/index') {
|
||||||
|
let _this = getCurrentPages()[getCurrentPages().length - 1];
|
||||||
|
if (!_this) return;
|
||||||
|
|
||||||
uni.setStorageSync("lang", value);
|
uni.setStorageSync("lang", value);
|
||||||
const locale = uni.getStorageSync('lang') || "zh-cn";
|
const locale = uni.getStorageSync('lang') || "zh-cn"; //设置语言
|
||||||
|
|
||||||
// ✅ 关键修复:清空所有语言包缓存(不再保留任何旧缓存)
|
// 清空已加载的语言包缓存
|
||||||
for (let key in loadedLangPacks) {
|
for (let key in loadedLangPacks) {
|
||||||
delete loadedLangPacks[key];
|
if (!key.startsWith(locale)) {
|
||||||
}
|
delete loadedLangPacks[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.refresh();
|
this.refresh();
|
||||||
|
|
||||||
if (url) {
|
if (url) {
|
||||||
uni.reLaunch({ url: url });
|
uni.reLaunch({ url: url });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//刷新标题、tabbar
|
//刷新标题、tabbar
|
||||||
refresh() {
|
refresh() {
|
||||||
let _this = getCurrentPages()[getCurrentPages().length - 1];
|
let _this = getCurrentPages()[getCurrentPages().length - 1];
|
||||||
if (!_this) return;
|
if (!_this) return;
|
||||||
const locale = uni.getStorageSync('lang') || "zh-cn";
|
const locale = uni.getStorageSync('lang') || "zh-cn"; //设置语言
|
||||||
|
|
||||||
this.title(this.lang("title"));
|
this.title(this.lang("title"));
|
||||||
},
|
|
||||||
title(str) {
|
//设置tabbar的文字语言
|
||||||
if (str) {
|
// uni.setTabBarItem({
|
||||||
uni.setNavigationBarTitle({
|
// index: 0,
|
||||||
title: str
|
// text: this.lang("tabBar.home")
|
||||||
});
|
// });
|
||||||
}
|
// uni.setTabBarItem({
|
||||||
},
|
// index: 1,
|
||||||
// 获取语言包列表
|
// text: this.lang("tabBar.category")
|
||||||
list() {
|
// });
|
||||||
var list = [];
|
// uni.setTabBarItem({
|
||||||
try {
|
// index: 2,
|
||||||
for (var i = 0; i < langConfig.langList.length; i++) {
|
// text: this.lang("tabBar.cart")
|
||||||
let langType = langConfig.langList[i];
|
// });
|
||||||
let item = loadLangPackSync(langType, 'common');
|
// uni.setTabBarItem({
|
||||||
list.push({
|
// index: 3,
|
||||||
name: item.common ? item.common.name : langType,
|
// text: this.lang("tabBar.member")
|
||||||
value: langType
|
// });
|
||||||
});
|
},
|
||||||
}
|
title(str) {
|
||||||
} catch (e) {
|
if (str) {
|
||||||
console.error('获取语言包列表失败:', e);
|
uni.setNavigationBarTitle({
|
||||||
}
|
title: str,
|
||||||
return list;
|
success: function (res) {
|
||||||
}
|
},
|
||||||
}
|
fail: function (err) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取语言包列表
|
||||||
|
list() {
|
||||||
|
var list = [];
|
||||||
|
try {
|
||||||
|
//公共语言包
|
||||||
|
for (var i = 0; i < langConfig.langList.length; i++) {
|
||||||
|
let langType = langConfig.langList[i];
|
||||||
|
let item = loadLangPackSync(langType, 'common');
|
||||||
|
list.push({
|
||||||
|
name: item.common ? item.common.name : langType,
|
||||||
|
value: langType
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error('获取语言包列表失败:', e);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export const CATEGORY_PAGE_URL = '/pages_goods/category';
|
|||||||
export const CONTACT_PAGE_URL = '/pages_tool/contact/contact';
|
export const CONTACT_PAGE_URL = '/pages_tool/contact/contact';
|
||||||
export const MEMBER_PAGE_URL = '/pages_tool/member/index';
|
export const MEMBER_PAGE_URL = '/pages_tool/member/index';
|
||||||
export const LOGIN_PAGE_URL = '/pages_tool/login/login';
|
export const LOGIN_PAGE_URL = '/pages_tool/login/login';
|
||||||
|
export const AI_CHAT_PAGE_URL = '/pages_tool/ai-chat/index';
|
||||||
|
|
||||||
// 当前最新的tabBar.list (参见pages.json 中的tabBar.list 配置)
|
// 当前最新的tabBar.list (参见pages.json 中的tabBar.list 配置)
|
||||||
export const systemTabBarList = [
|
export const systemTabBarList = [
|
||||||
@@ -119,6 +120,7 @@ export default {
|
|||||||
CONTACT_PAGE_URL,
|
CONTACT_PAGE_URL,
|
||||||
INDEX_PAGE_URL,
|
INDEX_PAGE_URL,
|
||||||
LOGIN_PAGE_URL,
|
LOGIN_PAGE_URL,
|
||||||
|
AI_CHAT_PAGE_URL,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面跳转
|
* 页面跳转
|
||||||
|
|||||||
@@ -1,64 +1,43 @@
|
|||||||
<template>
|
<template>
|
||||||
<view v-if="pageCount == 1 || need" class="fixed-box"
|
<!-- 悬浮按钮 -->
|
||||||
:style="[customContainerStyle, {
|
<view v-if="pageCount == 1 || need" class="fixed-box" :style="[customContainerStyle, {
|
||||||
height: fixBtnShow ? '400rpx' : '320rpx',
|
height: fixBtnShow ? '400rpx' : '320rpx',
|
||||||
backgroundImage: bgUrl ? `url(${bgUrl})` : '',
|
backgroundImage: bgUrl ? `url(${bgUrl})` : '',
|
||||||
backgroundSize: 'cover'
|
backgroundSize: 'cover'
|
||||||
}]">
|
}]">
|
||||||
|
|
||||||
<!-- AI 智能助手(优先显示) -->
|
|
||||||
<view
|
|
||||||
v-if="fixBtnShow && enableAIChat"
|
|
||||||
class="btn-item common-bg"
|
|
||||||
@click="openAIChat"
|
|
||||||
:style="{ backgroundImage: aiAgentimg ? `url(${aiAgentimg})` : '', backgroundSize: '100% 100%' }"
|
|
||||||
>
|
|
||||||
<text class="ai-icon" v-if="!aiAgentimg">🤖</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 普通客服(仅当未启用 AI 时显示) -->
|
|
||||||
<template v-else-if="fixBtnShow">
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<button
|
|
||||||
class="btn-item common-bg"
|
|
||||||
hoverClass="none"
|
|
||||||
openType="contact"
|
|
||||||
sessionFrom="weapp"
|
|
||||||
showMessageCard="true"
|
|
||||||
:style="[{ backgroundImage: kefuimg ? `url(${kefuimg})` : '', backgroundSize: '100% 100%' }, customButtonStyle]"
|
|
||||||
>
|
|
||||||
<text class="icox icox-kefu" v-if="!kefuimg"></text>
|
|
||||||
</button>
|
|
||||||
<!-- #endif -->
|
|
||||||
|
|
||||||
<!-- #ifndef MP-WEIXIN -->
|
|
||||||
<button
|
|
||||||
class="btn-item common-bg"
|
|
||||||
hoverClass="none"
|
|
||||||
@click="openKefuSelectPopup"
|
|
||||||
:style="[{ backgroundImage: kefuimg ? `url(${kefuimg})` : '', backgroundSize: '100% 100%' }, customButtonStyle]"
|
|
||||||
>
|
|
||||||
<text class="icox icox-kefu" v-if="!kefuimg"></text>
|
|
||||||
</button>
|
|
||||||
<!-- #endif -->
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 中英文切换按钮 -->
|
<!-- 中英文切换按钮 -->
|
||||||
<view
|
<view v-if="isLanguageSwitchEnabled && fixBtnShow" class="btn-item common-bg" @click="toggleLanguage">
|
||||||
v-if="isLanguageSwitchEnabled && fixBtnShow"
|
|
||||||
class="btn-item common-bg"
|
|
||||||
@click="toggleLanguage"
|
|
||||||
>
|
|
||||||
<text>{{ currentLangDisplayName }}</text>
|
<text>{{ currentLangDisplayName }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- AI 智能助手 -->
|
||||||
|
<view v-if="fixBtnShow && enableAIChat" class="btn-item common-bg" @click="openAIChat"
|
||||||
|
:style="{ backgroundImage: aiAgentimg ? `url(${aiAgentimg})` : '', backgroundSize: '100% 100%' }">
|
||||||
|
<text class="ai-icon" v-if="!aiAgentimg">🤖</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 微信小程序客服按钮 -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<button class="btn-item common-bg" hoverClass="none" openType="contact" sessionFrom="weapp" showMessageCard="true"
|
||||||
|
:style="[{ backgroundImage: kefuimg ? `url(${kefuimg})` : '', backgroundSize: '100% 100%' }, customButtonStyle]">
|
||||||
|
<text class="icox icox-kefu" v-if="!kefuimg"></text>
|
||||||
|
</button>
|
||||||
|
<!-- #endif -->
|
||||||
|
|
||||||
|
<!-- 普通客服(仅当未启用 AI 时显示) -->
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<template v-if="fixBtnShow">
|
||||||
|
<button class="btn-item common-bg" hoverClass="none" @click="openCustomerSelectPopup"
|
||||||
|
:style="[{ backgroundImage: kefuimg ? `url(${kefuimg})` : '', backgroundSize: '100% 100%' }, customButtonStyle]">
|
||||||
|
<text class="icox icox-kefu" v-if="!kefuimg"></text>
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
<!-- #endif -->
|
||||||
|
|
||||||
<!-- 电话按钮(始终显示) -->
|
<!-- 电话按钮(始终显示) -->
|
||||||
<view
|
<view v-if="fixBtnShow" class="btn-item common-bg" @click="call()"
|
||||||
v-if="fixBtnShow"
|
:style="[{ backgroundImage: phoneimg ? `url(${phoneimg})` : '', backgroundSize: '100% 100%' }, customButtonStyle]">
|
||||||
class="btn-item common-bg"
|
|
||||||
@click="call()"
|
|
||||||
:style="[{ backgroundImage: phoneimg ? `url(${phoneimg})` : '', backgroundSize: '100% 100%' }, customButtonStyle]"
|
|
||||||
>
|
|
||||||
<text class="iconfont icon-dianhua" v-if="!phoneimg"></text>
|
<text class="iconfont icon-dianhua" v-if="!phoneimg"></text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -77,17 +56,12 @@ export default {
|
|||||||
return {
|
return {
|
||||||
pageCount: 0,
|
pageCount: 0,
|
||||||
fixBtnShow: true,
|
fixBtnShow: true,
|
||||||
|
|
||||||
shopInfo: null,
|
shopInfo: null,
|
||||||
currentLangIndex: 0,
|
currentLangIndex: 0,
|
||||||
langIndexMap: {},
|
langIndexMap: {},
|
||||||
kefuList: [
|
|
||||||
{ id: 'weixin-official', name: '微信官方客服', isOfficial: true, type: 'weapp' },
|
|
||||||
{ id: 'custom-kefu', name: '自定义在线客服', isOfficial: false, type: 'custom' },
|
|
||||||
{ id: 'qyweixin-kefu', name: '企业微信客服', isOfficial: false, type: 'qyweixin' }
|
|
||||||
],
|
|
||||||
selectedKefu: null,
|
|
||||||
customerService: null,
|
customerService: null,
|
||||||
buttonConfig: null,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -111,13 +85,8 @@ export default {
|
|||||||
return !!this.shopInfo?.ischina;
|
return !!this.shopInfo?.ischina;
|
||||||
},
|
},
|
||||||
enableAIChat() {
|
enableAIChat() {
|
||||||
const defaultEnable = true;
|
return !!this.shopInfo?.enableAIChat;
|
||||||
if (!this.shopInfo) return defaultEnable;
|
|
||||||
return this.shopInfo.hasOwnProperty('enableAIChat')
|
|
||||||
? !!this.shopInfo.enableAIChat
|
|
||||||
: defaultEnable;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
currentLangDisplayName() {
|
currentLangDisplayName() {
|
||||||
const lang = this.langIndexMap[this.currentLangIndex];
|
const lang = this.langIndexMap[this.currentLangIndex];
|
||||||
return lang === 'zh-cn' ? 'EN' : 'CN';
|
return lang === 'zh-cn' ? 'EN' : 'CN';
|
||||||
@@ -127,39 +96,22 @@ export default {
|
|||||||
},
|
},
|
||||||
customButtonStyle() {
|
customButtonStyle() {
|
||||||
return this.shopInfo?.floatingButton?.button || {};
|
return this.shopInfo?.floatingButton?.button || {};
|
||||||
},
|
|
||||||
customTextStyle() {
|
|
||||||
return this.shopInfo?.floatingButton?.text || {};
|
|
||||||
},
|
|
||||||
unreadCount() {
|
|
||||||
return this.$store.state.aiUnreadCount || 0;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
shopInfo: {
|
|
||||||
handler(newVal) {
|
|
||||||
// 可在此添加额外逻辑(如埋点、通知等),当前无需操作
|
|
||||||
},
|
|
||||||
immediate: true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.customerService = createCustomerService(this);
|
||||||
this.initLanguage();
|
this.initLanguage();
|
||||||
this.pageCount = getCurrentPages().length;
|
|
||||||
|
|
||||||
uni.getStorage({
|
uni.getStorage({
|
||||||
key: 'shopInfo',
|
key: 'shopInfo',
|
||||||
success: (e) => {
|
success: (e) => {
|
||||||
console.log('【调试】当前 shopInfo:', e.data);
|
|
||||||
this.shopInfo = e.data;
|
this.shopInfo = e.data;
|
||||||
},
|
|
||||||
fail: () => {
|
|
||||||
console.warn('未获取到 shopInfo,使用默认设置');
|
|
||||||
// shopInfo 为 null,computed 会自动返回默认值,无需手动赋值
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 初始化多语言配置
|
||||||
|
*/
|
||||||
initLanguage() {
|
initLanguage() {
|
||||||
this.langList = this.$langConfig.list();
|
this.langList = this.$langConfig.list();
|
||||||
this.langIndexMap = {};
|
this.langIndexMap = {};
|
||||||
@@ -178,78 +130,41 @@ export default {
|
|||||||
this.currentLangIndex = 0;
|
this.currentLangIndex = 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 电话联系客服
|
||||||
|
*/
|
||||||
call() {
|
call() {
|
||||||
if (this.tel) {
|
this.customerService.makePhoneCall(this.tel);
|
||||||
uni.makePhoneCall({ phoneNumber: this.tel + '' });
|
|
||||||
} else {
|
|
||||||
uni.showToast({ title: '暂无联系电话', icon: 'none' });
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 切换中英文语言,并刷新当前页面(保留所有参数)
|
* 切换中英文语言,并刷新当前页面(保留所有参数)
|
||||||
*/
|
*/
|
||||||
toggleLanguage() {
|
toggleLanguage() {
|
||||||
this.currentLangIndex = this.currentLangIndex === 0 ? 1 : 0;
|
this.currentLangIndex = this.currentLangIndex === 0 ? 1 : 0;
|
||||||
const targetLang = this.langIndexMap[this.currentLangIndex];
|
const targetLang = this.langIndexMap[this.currentLangIndex];
|
||||||
|
|
||||||
// 调用语言切换逻辑(设置 storage + 清空缓存)
|
|
||||||
this.$langConfig.change(targetLang);
|
|
||||||
|
|
||||||
// H5 环境需要强制刷新页面才能生效
|
|
||||||
if (uni.getSystemInfoSync().platform === 'browser') {
|
|
||||||
// 延迟 100ms 确保 change() 执行完成
|
|
||||||
setTimeout(() => {
|
|
||||||
window.location.reload();
|
|
||||||
}, 100);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
openKefuSelectPopup() {
|
|
||||||
const kefuNames = this.kefuList.map(item => item.name);
|
|
||||||
uni.showActionSheet({
|
|
||||||
itemList: kefuNames,
|
|
||||||
success: (res) => {
|
|
||||||
this.selectedKefu = this.kefuList[res.tapIndex];
|
|
||||||
this.reinitCustomerService(this.selectedKefu);
|
|
||||||
this.handleSelectedKefu();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
reinitCustomerService(kefu) {
|
|
||||||
this.customerService = createCustomerService(this, kefu);
|
|
||||||
this.buttonConfig = this.customerService.getButtonConfig();
|
|
||||||
},
|
|
||||||
handleSelectedKefu() {
|
|
||||||
const kefu = this.selectedKefu;
|
|
||||||
if (!kefu) return;
|
|
||||||
|
|
||||||
if (kefu.isOfficial) {
|
// 调用语言切换逻辑(设置 storage + 清空缓存)
|
||||||
uni.openCustomerServiceConversation({
|
this.$langConfig.change(targetLang);
|
||||||
sessionFrom: 'weapp',
|
|
||||||
showMessageCard: true
|
|
||||||
});
|
|
||||||
} else if (kefu.id === 'custom-kefu') {
|
|
||||||
this.customerService.handleCustomerClick();
|
|
||||||
} else if (kefu.id === 'qyweixin-kefu') {
|
|
||||||
this.customerService.handleQyWeixinKefuClick();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开 AI 智能助手
|
||||||
|
*/
|
||||||
openAIChat() {
|
openAIChat() {
|
||||||
uni.navigateTo({
|
this.$util.redirectTo(this.$util.AI_CHAT_PAGE_URL);
|
||||||
url: '/pages_tool/ai-chat/index',
|
},
|
||||||
success: () => {
|
openCustomerSelectPopup() {
|
||||||
console.log('✅ AI 客服跳转成功');
|
if (this.customerService) {
|
||||||
},
|
this.customerService.openCustomerSelectPopupDialog();
|
||||||
fail: (err) => {
|
} else {
|
||||||
console.error('❌ 跳转失败:', err);
|
uni.showToast({ title: '客服初始化中,请稍后重试', icon: 'none' });
|
||||||
uni.showToast({ title: '跳转失败,请重试', icon: 'none' });
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="scss" scoped>
|
||||||
.fixed-box {
|
.fixed-box {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 0rpx;
|
right: 0rpx;
|
||||||
@@ -287,7 +202,8 @@ export default {
|
|||||||
|
|
||||||
/* 定义共同的背景颜色 */
|
/* 定义共同的背景颜色 */
|
||||||
.common-bg {
|
.common-bg {
|
||||||
background-color: var(--hover-nav-bg-color); /* 使用变量以保持一致性 */
|
background-color: var(--hover-nav-bg-color);
|
||||||
|
/* 使用变量以保持一致性 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-item text {
|
.btn-item text {
|
||||||
@@ -304,7 +220,6 @@ export default {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 14rpx 0;
|
margin: 14rpx 0;
|
||||||
background: #fff;
|
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
@@ -318,21 +233,7 @@ export default {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.unread-badge {
|
|
||||||
position: absolute;
|
|
||||||
top: -5rpx;
|
|
||||||
right: -5rpx;
|
|
||||||
background-color: #ff4544;
|
|
||||||
color: white;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
min-width: 30rpx;
|
|
||||||
height: 30rpx;
|
|
||||||
font-size: 20rpx;
|
|
||||||
line-height: 30rpx;
|
|
||||||
text-align: center;
|
|
||||||
padding: 0 8rpx;
|
|
||||||
box-shadow: 0 2rpx 10rpx rgba(255, 69, 68, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-icon {
|
.ai-icon {
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
|
|||||||
@@ -1,28 +1,35 @@
|
|||||||
export const lang = {
|
export const lang = {
|
||||||
|
|
||||||
// 底部选项卡
|
// 底部选项卡
|
||||||
tabBar: {
|
tabBar: {
|
||||||
home: 'index',
|
home: 'index',
|
||||||
category: 'category',
|
category: 'category',
|
||||||
cart: 'cart',
|
cart: 'cart',
|
||||||
member: 'member',
|
member: 'member',
|
||||||
},
|
},
|
||||||
|
|
||||||
//公共
|
//公共
|
||||||
common: {
|
common: {
|
||||||
//语言包名称
|
//语言包名称
|
||||||
name: '英文',
|
name: '英文',
|
||||||
mescrollTextInOffset: 'pull to refresh',
|
mescrollTextInOffset: 'pull to refresh',
|
||||||
mescrollTextOutOffset: 'Loading...',
|
mescrollTextOutOffset: 'Loading...',
|
||||||
mescrollEmpty: "No data available",
|
mescrollEmpty: "No data available",
|
||||||
goodsRecommendTitle: 'Guess you like',
|
goodsRecommendTitle: 'Guess you like',
|
||||||
currencySymbol: '¥',
|
currencySymbol: '¥',
|
||||||
submit: 'Submit',
|
submit: 'Submit',
|
||||||
searchTip: 'Please enter search keywords'
|
searchTip: 'Please enter search keywords'
|
||||||
},
|
},
|
||||||
|
|
||||||
login: 'Login/Register',
|
//customer service
|
||||||
loginTips: 'Click to login and enjoy more exciting information',
|
customer: {
|
||||||
toLogin: 'Go to login',
|
weChatKefu: 'WeChat Customer Service',
|
||||||
toGoodsCategoryPage: 'Go shopping',
|
systemKefu: 'System Customer Service',
|
||||||
}
|
weChatWorkKefu: 'WeChat Work Customer Service',
|
||||||
|
},
|
||||||
|
|
||||||
|
login: 'Login/Register',
|
||||||
|
loginTips: 'Click to login and enjoy more exciting information',
|
||||||
|
toLogin: 'Go to login',
|
||||||
|
toGoodsCategoryPage: 'Go shopping',
|
||||||
|
}
|
||||||
@@ -21,6 +21,13 @@ export const lang = {
|
|||||||
searchTip: '请输入搜索关键词'
|
searchTip: '请输入搜索关键词'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//客服
|
||||||
|
customer: {
|
||||||
|
weChatKefu: '微信客服',
|
||||||
|
systemKefu: '专属客服',
|
||||||
|
weChatWorkKefu: '企业微信客服',
|
||||||
|
},
|
||||||
|
|
||||||
login: '登录/注册',
|
login: '登录/注册',
|
||||||
loginTpis: '点击登录 享受更多精彩信息',
|
loginTpis: '点击登录 享受更多精彩信息',
|
||||||
toLogin: '去登录',
|
toLogin: '去登录',
|
||||||
|
|||||||
@@ -321,6 +321,12 @@
|
|||||||
"navigationBarTitleText": "AI 客服"
|
"navigationBarTitleText": "AI 客服"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "agreement/contenr",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "vr/index",
|
"path": "vr/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -1,167 +1,159 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :style="themeColor">
|
<view :style="themeColor">
|
||||||
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }"
|
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }"
|
||||||
class="page-img">
|
class="page-img">
|
||||||
<view class="site-info-box"
|
<view class="site-info-box"
|
||||||
v-if="$util.isWeiXin() && followOfficialAccount && followOfficialAccount.isShow && wechatQrcode">
|
v-if="$util.isWeiXin() && followOfficialAccount && followOfficialAccount.isShow && wechatQrcode">
|
||||||
<view class="site-info">
|
<view class="site-info">
|
||||||
<view class="img-box" v-if="siteInfo.logo_square">
|
<view class="img-box" v-if="siteInfo.logo_square">
|
||||||
<image :src="$util.img(siteInfo.logo_square)" mode="aspectFill"></image>
|
<image :src="$util.img(siteInfo.logo_square)" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-box" :style="{ color: '#ffffff' }">
|
<view class="info-box" :style="{ color: '#ffffff' }">
|
||||||
<text class="font-size-base">{{ siteInfo.site_name }}</text>
|
<text class="font-size-base">{{ siteInfo.site_name }}</text>
|
||||||
<text>{{ followOfficialAccount.welcomeMsg }}</text>
|
<text>{{ followOfficialAccount.welcomeMsg }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="dite-button" @click="officialAccountsOpen">{{ isEnEnv ? 'Follow Official Account' : '关注公众号'
|
<view class="dite-button" @click="officialAccountsOpen">{{ isEnEnv ? 'Follow Official Account' : '关注公众号'
|
||||||
}}</view>
|
}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="safeBgUrl"
|
<!-- <view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch" :style="{ backgroundImage: bgImg }">
|
||||||
:scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
|
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="false"/>
|
||||||
<template v-slot:components>
|
</view> -->
|
||||||
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
|
|
||||||
:haveTopCategory="true" :followOfficialAccount="followOfficialAccount" />
|
|
||||||
</template>
|
|
||||||
<template v-slot:default>
|
|
||||||
<ns-copyright v-show="isShowCopyRight" />
|
|
||||||
</template>
|
|
||||||
</diy-index-page>
|
|
||||||
|
|
||||||
<view v-else class="bg-index"
|
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
|
||||||
:style="{ backgroundImage: backgroundUrlStyle, paddingTop: paddingTop, marginTop: marginTop }">
|
:scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
|
||||||
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
|
<template v-slot:components>
|
||||||
:followOfficialAccount="followOfficialAccount" />
|
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
|
||||||
<ns-copyright v-show="isShowCopyRight" />
|
:haveTopCategory="true" :followOfficialAccount="followOfficialAccount" />
|
||||||
</view>
|
</template>
|
||||||
|
<template v-slot:default>
|
||||||
|
<ns-copyright v-show="isShowCopyRight" />
|
||||||
|
</template>
|
||||||
|
</diy-index-page>
|
||||||
|
|
||||||
<template v-if="adv.advshow != -1">
|
<view v-else class="bg-index"
|
||||||
<view @touchmove.prevent.stop>
|
:style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
|
||||||
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
|
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
|
||||||
<view class="small-bot">
|
:followOfficialAccount="followOfficialAccount" />
|
||||||
<swiper autoplay="true" :circular="true" indicator-active-color="#fff"
|
<ns-copyright v-show="isShowCopyRight" />
|
||||||
indicator-color="rgba(255,255,255,0.6)" :indicator-dots="true" interval="3000">
|
</view>
|
||||||
<swiper-item v-for="(item, index) in adv.list" :key="index">
|
|
||||||
<image class="slide-image" @click="$util.diyRedirectTo(item.link)" height="100%"
|
|
||||||
:src="$util.img(item.imageUrl)" width="100%"></image>
|
|
||||||
</swiper-item>
|
|
||||||
</swiper>
|
|
||||||
<view class="small-bot-close" @click="closePopupWindow">
|
|
||||||
<i class="iconfont icon-round-close" style="color:#fff"></i>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</uni-popup>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 底部tabBar -->
|
<template v-if="adv.advshow != -1">
|
||||||
<view class="page-bottom" v-if="openBottomNav">
|
<view @touchmove.prevent.stop>
|
||||||
<diy-bottom-nav @callback="callback" :name="name" />
|
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
|
||||||
</view>
|
<view class="small-bot">
|
||||||
|
<!-- <view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==1}}">
|
||||||
|
<view bindtap="adverclose">跳过</view>
|
||||||
|
<view class="time">{{clock}}s</view>
|
||||||
|
</view>
|
||||||
|
<view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==0}}">
|
||||||
|
<view class="time" style="line-height: 64rpx;">{{clock}}s</view>
|
||||||
|
</view> -->
|
||||||
|
<swiper autoplay="true" :circular="true" indicator-active-color="#fff"
|
||||||
|
indicator-color="rgba(255,255,255,0.6)" :indicator-dots="true" interval="3000">
|
||||||
|
<swiper-item v-for="(item, index) in adv.list" :key="index">
|
||||||
|
<image class="slide-image" @click="$util.diyRedirectTo(item.link)" height="100%"
|
||||||
|
:src="$util.img(item.imageUrl)" width="100%"></image>
|
||||||
|
<!-- <image bindtap="adverclose" class="slide-image" height="100%" src="{{item.imgurl}}" width="100%" wx:if="{{item.click==1}}"></image> -->
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
<view bindtap="adverclose" class="small-bot-close" @click="closePopupWindow">
|
||||||
|
<i class="iconfont icon-round-close" style="color:#fff"></i>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="image-wrap">
|
||||||
|
<swiper class="swiper" style="width:100%;height: 1200rpx;" :autoplay="true" interval="3000" circular="true" :indicator-dots="true" indicator-color="#000" indicator-active-color="red">
|
||||||
|
<swiper-item class="swiper-item" v-for="(item, index) in adv.list" :key="index" v-if="item.imageUrl" @click="$util.diyRedirectTo(item.link)">
|
||||||
|
<view class="item">
|
||||||
|
<image :src="$util.img(item.imageUrl)" mode="aspectFit" :show-menu-by-longpress="true"/>
|
||||||
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
</view>
|
||||||
|
<text class="iconfont icon-round-close" @click="closePopupWindow"></text> -->
|
||||||
|
</uni-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- 关注公众号弹窗 -->
|
<!-- 底部tabBar -->
|
||||||
<view @touchmove.prevent class="official-accounts-inner" v-if="wechatQrcode">
|
<view class="page-bottom" v-if="openBottomNav">
|
||||||
<uni-popup ref="officialAccountsPopup" type="center">
|
<diy-bottom-nav @callback="callback" :name="name" />
|
||||||
<view class="official-accounts-wrap">
|
</view>
|
||||||
<image class="content" :src="$util.img(wechatQrcode)" mode="aspectFit"></image>
|
|
||||||
<text class="desc">关注了解更多</text>
|
|
||||||
<text class="close iconfont icon-round-close" @click="officialAccountsClose"></text>
|
|
||||||
</view>
|
|
||||||
</uni-popup>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 收藏 -->
|
<!-- 关注公众号弹窗 -->
|
||||||
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
|
<view @touchmove.prevent class="official-accounts-inner" v-if="wechatQrcode">
|
||||||
<view v-if="showTip" class="collectPopupWindow"
|
<uni-popup ref="officialAccountsPopup" type="center">
|
||||||
:style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
|
<view class="official-accounts-wrap">
|
||||||
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" />
|
<image class="content" :src="$util.img(wechatQrcode)" mode="aspectFit"></image>
|
||||||
<text @click="closeCollectPopupWindow">我知道了</text>
|
<text class="desc">关注了解更多</text>
|
||||||
</view>
|
<text class="close iconfont icon-round-close" @click="officialAccountsClose"></text>
|
||||||
</uni-popup>
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 选择门店弹出框 -->
|
<!-- 收藏 -->
|
||||||
<view @touchmove.prevent.stop class="choose-store">
|
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
|
||||||
<uni-popup ref="chooseStorePopup" type="center" :maskClick="false" class="choose-store">
|
<view v-if="showTip" class="collectPopupWindow"
|
||||||
<view class="choose-store-popup">
|
:style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
|
||||||
<view class="head-wrap" @click="closeChooseStorePopup">请确认门店</view>
|
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" />
|
||||||
<view class="position-wrap">
|
<text @click="closeCollectPopupWindow">我知道了</text>
|
||||||
<text class="iconfont icon-dizhi"></text>
|
</view>
|
||||||
<text class="address">{{ currentPosition }}</text>
|
</uni-popup>
|
||||||
<view class="reposition" @click="reposition"
|
|
||||||
v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1">
|
<!-- 选择门店弹出框,定位当前位置,展示最近的一个门店 -->
|
||||||
<text class="iconfont icon-dingwei"></text>
|
<view @touchmove.prevent.stop class="choose-store">
|
||||||
<text>重新定位</text>
|
<uni-popup ref="chooseStorePopup" type="center" :maskClick="false" class="choose-store">
|
||||||
</view>
|
<view class="choose-store-popup">
|
||||||
</view>
|
<view class="head-wrap" @click="closeChooseStorePopup">请确认门店</view>
|
||||||
<view class="store-wrap" v-if="nearestStore">
|
<view class="position-wrap">
|
||||||
<text class="tag">当前门店</text>
|
<text class="iconfont icon-dizhi"></text>
|
||||||
<view class="store-name">{{ nearestStore.store_name }}</view>
|
<text class="address">{{ currentPosition }}</text>
|
||||||
<view class="address">{{ nearestStore.show_address }}</view>
|
<view class="reposition" @click="reposition"
|
||||||
<view class="distance" v-if="nearestStore.distance">
|
v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1">
|
||||||
<text class="iconfont icon-dizhi"></text>
|
<text class="iconfont icon-dingwei"></text>
|
||||||
<text>{{ nearestStore.distance > 1 ? nearestStore.distance + 'km' :
|
<text>重新定位</text>
|
||||||
nearestStore.distance *
|
</view>
|
||||||
1000 +
|
</view>
|
||||||
'm' }}</text>
|
<view class="store-wrap" v-if="nearestStore">
|
||||||
</view>
|
<text class="tag">当前门店</text>
|
||||||
</view>
|
<view class="store-name">{{ nearestStore.store_name }}</view>
|
||||||
<button type="primary" @click="enterStore">确认进入</button>
|
<view class="address">{{ nearestStore.show_address }}</view>
|
||||||
<view class="other-store" @click="chooseOtherStore"
|
<view class="distance" v-if="nearestStore.distance">
|
||||||
v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1">
|
<text class="iconfont icon-dizhi"></text>
|
||||||
<text>选择其他门店</text>
|
<text>{{ nearestStore.distance > 1 ? nearestStore.distance + 'km' :
|
||||||
<text class="iconfont icon-right"></text>
|
nearestStore.distance *
|
||||||
</view>
|
1000 +
|
||||||
</view>
|
'm' }}</text>
|
||||||
</uni-popup>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<hover-nav :need="true"></hover-nav>
|
<button type="primary" @click="enterStore">确认进入</button>
|
||||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
<view class="other-store" @click="chooseOtherStore"
|
||||||
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1">
|
||||||
<ns-login ref="login"></ns-login>
|
<text>选择其他门店</text>
|
||||||
</view>
|
<text class="iconfont icon-right"></text>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</view>
|
||||||
|
<hover-nav :need="true"></hover-nav>
|
||||||
|
<!-- 隐私协议 -->
|
||||||
|
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||||
|
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
||||||
|
<ns-login ref="login"></ns-login>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
import diyJs from '@/common/js/diy.js';
|
import diyJs from '@/common/js/diy.js';
|
||||||
import scroll from '@/common/js/scroll-view.js';
|
import scroll from '@/common/js/scroll-view.js';
|
||||||
import indexJs from './public/js/index.js';
|
import indexJs from './public/js/index.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [diyJs, scroll, indexJs],
|
mixins: [diyJs, scroll, indexJs]
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
diyData: { global: {}, value: null },
|
|
||||||
followOfficialAccount: {},
|
|
||||||
wechatQrcode: '',
|
|
||||||
adv: { advshow: -1, list: [] },
|
|
||||||
// ❌ 不要定义 siteInfo、bgUrl,除非你明确知道它们不会冲突
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
|
||||||
// ✅ 安全获取 bgUrl(用于 diy-index-page 的 prop)
|
|
||||||
safeBgUrl() {
|
|
||||||
// 优先取全局配置中的 bgUrl,没有则用组件自己的 bgUrl(如有),否则为空
|
|
||||||
return this.diyData?.global?.bgUrl || this.bgUrl || '';
|
|
||||||
},
|
|
||||||
|
|
||||||
// ✅ 安全生成 background-image 样式字符串(用于 fallback 区域)
|
|
||||||
backgroundUrlStyle() {
|
|
||||||
const url = this.diyData?.global?.bgUrl || this.bgUrl || '';
|
|
||||||
return url ? `url(${url})` : 'none';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 如果你的 mixin 中已经处理了数据加载,这里可以留空
|
|
||||||
// 否则建议在 created/mounted 中初始化默认值或请求数据
|
|
||||||
created() {
|
|
||||||
// 可选:如果 mixin 没有初始化 diyData,这里再兜底一次
|
|
||||||
if (!this.diyData) {
|
|
||||||
this.diyData = { global: {}, value: null };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -170,86 +162,85 @@ export default {
|
|||||||
@import './public/css/index.scss';
|
@import './public/css/index.scss';
|
||||||
|
|
||||||
.small-bot {
|
.small-bot {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
z-index: 122;
|
z-index: 122;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small-bot swiper {
|
.small-bot swiper {
|
||||||
width: 560rpx;
|
width: 560rpx;
|
||||||
height: 784rpx;
|
height: 784rpx;
|
||||||
margin: 120rpx auto 0;
|
margin: 120rpx auto 0;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small-bot swiper .slide-image {
|
.small-bot swiper .slide-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small-bot-close {
|
.small-bot-close {
|
||||||
width: 66rpx;
|
width: 66rpx;
|
||||||
height: 66rpx;
|
height: 66rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 64rpx;
|
line-height: 64rpx;
|
||||||
font-size: 64rpx;
|
font-size: 64rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
margin: 30rpx auto 0;
|
margin: 30rpx auto 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small-bot-close i {
|
.small-bot-close i {
|
||||||
font-size: 60rpx;
|
font-size: 60rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.swiper /deep/ .uni-swiper-dots-horizontal {
|
.swiper /deep/ .uni-swiper-dots-horizontal {
|
||||||
left: 40%;
|
left: 40%;
|
||||||
bottom: 40px
|
bottom: 40px
|
||||||
}
|
}
|
||||||
|
|
||||||
.wap-floating>>>.uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
.wap-floating>>>.uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
background: none !important;
|
background: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.choose-store>>>.goodslist-uni-popup-box {
|
.choose-store>>>.goodslist-uni-popup-box {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/.diy-index-page .uni-popup .uni-popup__wrapper-box {
|
/deep/.diy-index-page .uni-popup .uni-popup__wrapper-box {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .placeholder {
|
/deep/ .placeholder {
|
||||||
height: 0;
|
height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/::-webkit-scrollbar {
|
/deep/::-webkit-scrollbar {
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||||
max-height: unset !important;
|
max-height: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .mescroll-totop {
|
/deep/ .mescroll-totop {
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
right: 28rpx !important;
|
right: 28rpx !important;
|
||||||
bottom: 200rpx !important;
|
bottom: 200rpx !important;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
/* #ifdef MP-WEIXIN */
|
/* #ifdef MP-WEIXIN */
|
||||||
right: 27rpx !important;
|
right: 27rpx !important;
|
||||||
bottom: 180rpx !important;
|
bottom: 180rpx !important;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"navigationBarBackgroundColor": "#ff4544",
|
|
||||||
"navigationBarTextStyle": "white",
|
|
||||||
"backgroundColor": "#f8f8f8",
|
|
||||||
"enablePullDownRefresh": false,
|
|
||||||
"onReachBottomDistance": 50,
|
|
||||||
"usingComponents": {
|
|
||||||
"ai-chat-message": "/components/ai-chat-message/ai-chat-message"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -531,7 +531,7 @@ export default {
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
||||||
/* 引入图标字体 */
|
/* 引入图标字体 */
|
||||||
@import url('/common/css/iconfont.css');
|
@import url('@/common/css/iconfont.css');
|
||||||
|
|
||||||
/* 页面样式 */
|
/* 页面样式 */
|
||||||
.ai-chat-page {
|
.ai-chat-page {
|
||||||
|
|||||||
Reference in New Issue
Block a user