Compare commits
24 Commits
custom/com
...
release/v1
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ed337b59a | |||
| 31336f9a80 | |||
| 2f7c9bf0af | |||
| f8257361b5 | |||
| ec05534ff1 | |||
| 4f9c353e9a | |||
| 52b5f5b006 | |||
| 5a8663eb48 | |||
| 8108802204 | |||
| 6fe3bceb4b | |||
| ee4fbb277c | |||
| 6718010ceb | |||
| faf1f6d3d8 | |||
| 2d98a32efc | |||
| 7fde30063b | |||
| 10465b7cf2 | |||
| c7e9b497ae | |||
| de63cd4c6a | |||
| 2f230d3b2c | |||
| 6f01b3c1c6 | |||
| b10fcf02d4 | |||
| 6956841c8b | |||
| 90820ade30 | |||
| 8df59abd03 |
@@ -20,6 +20,10 @@ try {
|
||||
// 默认域名, 自定义发行时可以修改
|
||||
let defaultDomain = '';
|
||||
|
||||
// #ifdef H5_XCX_5G_QUICKAPP_COM
|
||||
defaultDomain = 'https://xcx20.5g-quickapp.com';
|
||||
// #endif
|
||||
|
||||
// #ifdef H5_XCX_AIGC_QUICKAPP_COM
|
||||
defaultDomain = 'https://xcx.aigc-quickapp.com/';
|
||||
// #endif
|
||||
|
||||
@@ -61,8 +61,8 @@ export default {
|
||||
groupby_promotion_aux_color: '#F7B500',//活动辅色
|
||||
},
|
||||
...{
|
||||
hover_nav_bg_color: '#c6251b', //背景色: 红色 '#c6251b', 白色: '#FFFC'
|
||||
hover_nav_text_color: '#FFFFFF' // 文字颜色: 白色 '#FFFFFF', 黑色: '#000'
|
||||
hover_nav_bg_color: '#FFFC', //背景色: 红色 '#c6251b', 白色: '#FFFC'
|
||||
hover_nav_text_color: '#000' // 文字颜色: 白色 '#FFFFFF', 黑色: '#000'
|
||||
},
|
||||
},
|
||||
'green': {
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
},
|
||||
"router" : {
|
||||
"mode" : "history",
|
||||
"base" : "/hwappx/common/"
|
||||
"base" : "/hwappx/2811/"
|
||||
},
|
||||
"title" : "",
|
||||
"devServer" : {
|
||||
|
||||
11
package.json
11
package.json
@@ -21,6 +21,17 @@
|
||||
"PRODUCTION": true
|
||||
}
|
||||
},
|
||||
"h5-xcx20.5g-quickapp.com": {
|
||||
"title": "H5-xcx20.5g-quickapp.com",
|
||||
"env": {
|
||||
"UNI_PLATFORM": "h5"
|
||||
},
|
||||
"define": {
|
||||
"H5_XCX_5G_QUICKAPP_COM": true,
|
||||
"H5_PRODUCTION": true,
|
||||
"PRODUCTION": true
|
||||
}
|
||||
},
|
||||
"h5-xcx.aigc-quickapp.com": {
|
||||
"title": "H5-xcx.aigc-quickapp.com",
|
||||
"env": {
|
||||
|
||||
@@ -321,6 +321,7 @@ export default {
|
||||
<style scoped>
|
||||
>>>.uni-tag--primary.uni-tag--inverted {
|
||||
background-color: #f5f5f5 !important;
|
||||
|
||||
}
|
||||
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<view class="view_ul_100" v-for="(item, index) in dataList" :key="index"
|
||||
style="margin-bottom: 20rpx;">
|
||||
|
||||
@@ -89,8 +88,12 @@
|
||||
</map>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
<!-- <view wx:if="landline !=0">
|
||||
<button bindtap="contact">
|
||||
<view class="message">
|
||||
@@ -113,20 +116,44 @@
|
||||
<view class="fui-cell ">
|
||||
<view class="fui-cell-label ">{{ $lang('name') }}</view>
|
||||
<view class="fui-cell-info">
|
||||
<input v-model="Form.realname" class="fui-input" :placeholder="$lang('pleaseEnterName')" value=""></input>
|
||||
<input
|
||||
id="input-realname"
|
||||
:value="Form.realname"
|
||||
@input="e => Form.realname = e.detail.value"
|
||||
class="fui-input"
|
||||
:placeholder="$lang('pleaseEnterName')"
|
||||
:key="formKey"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fui-cell ">
|
||||
<view class="fui-cell-label">{{ $lang('contactInfo') }}</view>
|
||||
<view class="fui-cell-info">
|
||||
<input v-model="Form.mobile" class="fui-input" maxlength="11" :placeholder="$lang('pleaseEnterMobile')" type="number"></input>
|
||||
<input
|
||||
id="input-mobile"
|
||||
:value="Form.mobile"
|
||||
@input="e => Form.mobile = e.detail.value"
|
||||
class="fui-input"
|
||||
maxlength="11"
|
||||
:placeholder="$lang('pleaseEnterMobile')"
|
||||
type="number"
|
||||
:key="formKey"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fui-cell ">
|
||||
<view class="fui-cell-label" style="position: absolute;top:10px">{{ $lang('messageContent') }}</view>
|
||||
<view class="fui-cell-info" style="margin-left: 160rpx;border: solid 2rpx #eee;">
|
||||
<!-- <input v-model="Form.mailbox" class="fui-input" placeholder="请输入您的邮箱" type="text" ></input> -->
|
||||
<textarea class="textarea" v-model="Form.remark" :placeholder="$lang('pleaseEnterMessage')" style="font-size: 28rpx;padding: 10rpx;"></textarea>
|
||||
<textarea
|
||||
id="textarea-remark"
|
||||
:value="Form.remark"
|
||||
@input="e => Form.remark = e.detail.value"
|
||||
class="textarea"
|
||||
:placeholder="$lang('pleaseEnterMessage')"
|
||||
style="font-size: 28rpx;padding: 10rpx;"
|
||||
:key="formKey"
|
||||
></textarea>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -149,15 +176,15 @@ export default {
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
return {
|
||||
minScrollTop: 100, // 设置回到顶端按钮显示要求,最小页面滚动距离
|
||||
minScrollTop: 100,
|
||||
dataList: [],
|
||||
ismessage: 0,
|
||||
Form: {
|
||||
realname: '',
|
||||
mobile: '',
|
||||
remark: ''
|
||||
|
||||
},
|
||||
formKey: Date.now(),
|
||||
markers: [
|
||||
{
|
||||
id: 1,
|
||||
@@ -182,25 +209,22 @@ export default {
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
//刷新多语言
|
||||
this.$langConfig.refresh();
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/personnel',
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.dataList = res.data
|
||||
this.shop = res.shop
|
||||
this.personnel_bg = res.set.personnel_bg ? res.set.personnel_bg : 'public/static/img/diy_view/member_info_bg.png'
|
||||
this.dataList = res.data;
|
||||
this.shop = res.shop;
|
||||
this.personnel_bg = res.set.personnel_bg ? res.set.personnel_bg : 'public/static/img/diy_view/member_info_bg.png';
|
||||
this.markers = [{
|
||||
id: 1,
|
||||
//iconPath:'http://saas.cn//public/static/img/kefu.png',
|
||||
latitude: this.shop.latitude,
|
||||
longitude: this.shop.longitude
|
||||
}]
|
||||
}];
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
}
|
||||
fail: res => {}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
@@ -222,47 +246,105 @@ export default {
|
||||
// window.open('https://xcx10.5g-quickapp.com/test.php')
|
||||
},
|
||||
save() {
|
||||
if (!this.Form.realname.trim()) {
|
||||
uni.showToast({ title: '请填写姓名', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
if (!this.Form.mobile || !/^1[3-9]\d{9}$/.test(this.Form.mobile)) {
|
||||
uni.showToast({ title: '手机号格式不正确', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
if (!this.Form.remark.trim()) {
|
||||
uni.showToast({ title: '请填写留言内容', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
this.$api.sendRequest({
|
||||
url: '/api/member/message',
|
||||
data: this.Form,
|
||||
success: res => {
|
||||
uni.showToast({ title: res.message || '提交成功', icon: 'success' });
|
||||
|
||||
|
||||
// 重置表单数据
|
||||
this.Form = { realname: '', mobile: '', remark: '' };
|
||||
this.formKey = Date.now();
|
||||
|
||||
// 关闭弹窗
|
||||
this.$refs.informationPopup.close();
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
|
||||
// 微信小程序:延迟清空原生输入框(确保 DOM 已更新)
|
||||
// #ifdef MP-WEIXIN
|
||||
setTimeout(() => {
|
||||
this.clearInputValues();
|
||||
}, 100);
|
||||
// #endif
|
||||
},
|
||||
fail: res => {
|
||||
fail: () => {
|
||||
uni.showToast({ title: '提交失败,请重试', icon: 'none' });
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
change(e) {
|
||||
console.log(e)
|
||||
this.ismessage = e.show ? 1 : 0
|
||||
this.ismessage = e.show ? 1 : 0;
|
||||
},
|
||||
//留言打开
|
||||
|
||||
tapMessage() {
|
||||
this.ismessage = 1
|
||||
// 重置数据
|
||||
this.Form = { realname: '', mobile: '', remark: '' };
|
||||
this.formKey = Date.now();
|
||||
this.ismessage = 1;
|
||||
this.$refs.informationPopup.open();
|
||||
|
||||
// 微信小程序:打开后清空原生输入框
|
||||
// #ifdef MP-WEIXIN
|
||||
setTimeout(() => {
|
||||
this.clearInputValues();
|
||||
}, 300); // 确保弹窗已渲染
|
||||
// #endif
|
||||
},
|
||||
//留言关闭
|
||||
|
||||
closeinformationPopup() {
|
||||
this.ismessage = 0
|
||||
this.ismessage = 0;
|
||||
this.$refs.informationPopup.close();
|
||||
|
||||
// 微信小程序:关闭后也清空(防止下次打开残留)
|
||||
// #ifdef MP-WEIXIN
|
||||
setTimeout(() => {
|
||||
this.clearInputValues();
|
||||
}, 100);
|
||||
// #endif
|
||||
},
|
||||
|
||||
// 专门用于微信小程序清空原生 input/textarea
|
||||
clearInputValues() {
|
||||
// #ifdef MP-WEIXIN
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
|
||||
// 分别清空每个输入框
|
||||
['input-realname', 'input-mobile', 'textarea-remark'].forEach(id => {
|
||||
query.select('#' + id).fields({ node: true }, (res) => {
|
||||
if (res && res.node) {
|
||||
res.node.value = '';
|
||||
}
|
||||
}).exec();
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
|
||||
Tel(m) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: m + '',
|
||||
success(e) {
|
||||
console.log(e)
|
||||
console.log(e);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
copy(text) {
|
||||
uni.setClipboardData({
|
||||
data: text,
|
||||
success: () => {
|
||||
console.log('复制成功');
|
||||
// 可以添加用户友好的提示,例如使用uni.showToast提示复制成功
|
||||
uni.showToast({
|
||||
title: this.$lang('copySuccess'),
|
||||
icon: 'success',
|
||||
@@ -270,8 +352,6 @@ export default {
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('复制失败');
|
||||
// 可以添加错误处理或用户友好的提示
|
||||
uni.showToast({
|
||||
title: err.message || err.errMsg || this.$lang('copyFailed'),
|
||||
icon: 'none',
|
||||
@@ -280,12 +360,13 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
tomap() {
|
||||
uni.openLocation({
|
||||
latitude: parseFloat(this.shop.latitude),
|
||||
longitude: parseFloat(this.shop.longitude),
|
||||
name: this.$lang('oneClickNavigation'),
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -438,7 +519,6 @@ image {
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
image {
|
||||
max-width: 100%;
|
||||
}
|
||||
@@ -483,7 +563,6 @@ image {
|
||||
line-height: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.view_ul_100 .fl {
|
||||
width: 10%;
|
||||
}
|
||||
@@ -511,7 +590,6 @@ image {
|
||||
.list_cotact .view_ul_100>view {
|
||||
padding: 20rpx 30rpx 0rpx 30rpx;
|
||||
}
|
||||
|
||||
.list_cotact .view_ul_two .view_li>view {
|
||||
background-color: #fff;
|
||||
padding: 20rpx 30rpx 0rpx 30rpx;
|
||||
@@ -531,7 +609,6 @@ image {
|
||||
.view_ul_two {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.contact_name {
|
||||
color: rgba(71, 71, 71, .79);
|
||||
font-size: 24rpx;
|
||||
@@ -553,7 +630,7 @@ image {
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
border-radius: 50rpx;
|
||||
width: 160rpx; // 足够容纳4个汉字(8个字符)
|
||||
width: 160rpx;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.15), 0 1rpx 3rpx rgba(0, 0, 0, 0.1);
|
||||
@@ -565,7 +642,6 @@ image {
|
||||
}
|
||||
|
||||
.message {
|
||||
/* background-color: rgba(0,0,0,.8); */
|
||||
border-radius: 50%;
|
||||
bottom: 50%;
|
||||
height: 90rpx;
|
||||
|
||||
14
readme.md
14
readme.md
@@ -30,9 +30,10 @@
|
||||
|
||||
1. 使用HBuilderX打开项目
|
||||
2. 选择菜单栏 "发行" -> "小程序-微信",进行发布构建
|
||||
3. 然后在终端进入项目根目录,执行 `npm run mp-weixin` 手动输出构建包。例如:mp-weixin-2025-10-31-1761881054836.zip
|
||||
4. 然后将mp-weixin-2025-10-31-1761881054836发给微信开发定制客户技术人员,
|
||||
5. 定制客户技术人员可以修改解压后,修改项目根目录下的site.js,进行针对客户的信息配置,然后使用微信开发者工具打开发布后的代码进行上传发布
|
||||
4. 0
|
||||
3. 然后在终端进入项目根目录,执行 `npm run mp-weixin` 手动输出构建包。例如:mp-weixin-2025-10-31-1761881054836.zip(改id)
|
||||
5. 然后将mp-weixin-2025-10-31-1761881054836发给微信开发定制客户技术人员,
|
||||
6. 定制客户技术人员可以修改解压后,修改项目根目录下的site.js,进行针对客户的信息配置,然后使用微信开发者工具打开发布后的代码进行上传发布
|
||||
|
||||
参照:`common\js\config.js` 文件内容说明:
|
||||
|
||||
@@ -114,5 +115,8 @@ export default config;
|
||||
|
||||
### 快应用发布
|
||||
1. 使用HBuilderX打开项目
|
||||
2. 选择菜单栏 "发行" -> "快应用",进行发布构建
|
||||
3. 使用快应用开发者工具打开发布后的代码进行上传发布
|
||||
2. manifest.jion---web配置---基础路径---/hwappx/改编号/
|
||||
3. 选择菜单栏 "发行" ->自定义发行---H5-xcx.aigc-quickapp.com "快应用",进行发布构建
|
||||
4. unpackage---dist---build---web---打包(可以写上id)
|
||||
5. 然后将压缩包发给开发定制客户技术人员,
|
||||
6. 使用快应用开发者工具打开发布后的代码进行上传发布
|
||||
@@ -1,8 +1,40 @@
|
||||
const path = require('path');
|
||||
const { zionUniMpLoadPackagePlugin } = require('zion-uniapp-mp-load-package/webpack');
|
||||
|
||||
// 打印出process.env
|
||||
// for (let key in process.env) {
|
||||
// console.log(key, process.env[key]);
|
||||
// }
|
||||
|
||||
|
||||
// 定义UNI_OUTPUT_DIR环境变量
|
||||
try {
|
||||
if (!process.env.NODE_ENV) {
|
||||
throw new Error('NODE_ENV 环境变量未设置');
|
||||
}
|
||||
|
||||
const buildDir = process.env.NODE_ENV === 'production' ? 'build' : 'dev';
|
||||
|
||||
const UNI_SCRIPT = process.env.UNI_SCRIPT ?? '';
|
||||
|
||||
if ([
|
||||
// 参照 package.json 中定义的 "uni-app" --> "scripts"
|
||||
'h5-xcx20.5g-quickapp.com', 'h5-xcx.aigc-quickapp.com', 'h5-5g.aigc-quickapp.com', 'h5-test.aigc-quickapp.com'
|
||||
].includes(UNI_SCRIPT)) {
|
||||
process.env.UNI_OUTPUT_DIR = path.join(__dirname, `unpackage/dist/${buildDir}/h5/${UNI_SCRIPT}`);
|
||||
console.log('UNI_OUTPUT_DIR = ', process.env.UNI_OUTPUT_DIR);
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
console.log('NODE_ENV 环境变量未设置,默认使用开发模式');
|
||||
}
|
||||
|
||||
// 导出配置
|
||||
module.exports = {
|
||||
productionSourceMap: false,
|
||||
configureWebpack: config => {
|
||||
console.log('config.mode = ', config.mode);
|
||||
|
||||
if (config.mode === 'production') {
|
||||
console.log('开始尝试配置极限压缩');
|
||||
// 配置zion-uniapp-mp-load-package插件
|
||||
|
||||
Reference in New Issue
Block a user