Merge branch 'dev/1.0' of https://git.aigc-quickapp.com/Uniapp/lucky_shop into dev/1.0
This commit is contained in:
@@ -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,13 +563,12 @@ image {
|
||||
line-height: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.view_ul_100 .fl {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.view_ul_100 .fr {
|
||||
/* padding-left: 30rpx;*/
|
||||
/* padding-left: 30rpx;*/
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user