Compare commits

...

8 Commits

9 changed files with 461 additions and 470 deletions

View File

@@ -3,5 +3,5 @@ export const lang = {
title: '商品分类', title: '商品分类',
search:'商品搜索', search:'商品搜索',
seeMore : '查看更多', seeMore : '查看更多',
Make: "询底价" Make: "询"
} }

View File

@@ -22,7 +22,7 @@ export const lang = {
status:'该商品已下架', status:'该商品已下架',
sellout:'库存不足', sellout:'库存不足',
max:'已达最大限购数量', max:'已达最大限购数量',
makebtn:'价格电议', makebtn:' ',
sales:'销量', sales:'销量',
stock:'库存', stock:'库存',
kefu:'客服', kefu:'客服',

View File

@@ -6,6 +6,6 @@ export const lang = {
Price:'价格', Price:'价格',
Filter:'筛选', Filter:'筛选',
Search:'请输入您要搜索的商品', Search:'请输入您要搜索的商品',
Make:'立即询底价', Make:'查看详情',
} }

View File

@@ -1,6 +1,6 @@
export const lang = { export const lang = {
//title为每个页面的标题 //title为每个页面的标题
title: '退款', title: '售后',
checkDetail: '查看详情', checkDetail: '查看详情',
emptyTips: '暂无退款记录' emptyTips: '暂无售后记录'
} }

View File

@@ -90,10 +90,7 @@
<view class="goods-tag-list" v-if="goodsSkuDetail.label_name"> <view class="goods-tag-list" v-if="goodsSkuDetail.label_name">
<text class="tag-item">{{ goodsSkuDetail.label_name }}</text> <text class="tag-item">{{ goodsSkuDetail.label_name }}</text>
</view> </view>
<view class="logistics-wrap">
<text v-if="goodsSkuDetail.stock_show">{{$lang('stock')}}: {{ goodsSkuDetail.stock +goodsSkuDetail.unit}}</text>
<text v-if="goodsSkuDetail.sale_show">{{$lang('sales')}}: {{ goodsSkuDetail.sale_num+goodsSkuDetail.unit }}</text>
</view>
<!-- 会员卡 --> <!-- 会员卡 -->
<!-- <view class="member-card-wrap" @click="$util.redirectTo('/pages_tool/member/card_buy')" v-if="membercard"> <!-- <view class="member-card-wrap" @click="$util.redirectTo('/pages_tool/member/card_buy')" v-if="membercard">
<text class="iconfont icon-huiyuan"></text> <text class="iconfont icon-huiyuan"></text>

View File

@@ -319,8 +319,9 @@ export default {
@import './public/css/list.scss'; @import './public/css/list.scss';
</style> </style>
<style scoped> <style scoped>
>>>.uni-tag--primary.uni-tag--inverted { .uni-tag--primary.uni-tag--inverted {
background-color: #f5f5f5 !important; background-color: #f5f5f5 !important;
} }
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box { /deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {

View File

@@ -400,7 +400,7 @@
.price { .price {
color: var(--price-color); color: var(--price-color);
color: #fff !important; color: #fff !important;
font-size: 15rpx !important; font-size: 27rpx !important;
font-weight: bold !important; font-weight: bold !important;
} }
} }

View File

@@ -14,7 +14,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view @click="test()">Test</view> -->
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<view class="view_ul view_ul_one clearfix"> <view class="view_ul view_ul_one clearfix">
@@ -44,7 +43,6 @@
<view class="text" style="font-size: 40rpx;font-weight: 600;color:#333"> <view class="text" style="font-size: 40rpx;font-weight: 600;color:#333">
{{ item.realname }}</view> {{ item.realname }}</view>
<view class="text">{{ item.position }}</view> <view class="text">{{ item.position }}</view>
<!-- <view class="text">{{item.mobile_text}}{{item.mobile}}</view> -->
<view class="text" style="padding-bottom:20rpx;color:#0054a5">{{ item.address }}</view> <view class="text" style="padding-bottom:20rpx;color:#0054a5">{{ item.address }}</view>
<view class="contact_name" v-if="item.mobile" <view class="contact_name" v-if="item.mobile"
style="padding-top:30rpx;padding-bottom:0rpx;border-top: solid 1px #eee;font-size:28rpx;display: flex;"> style="padding-top:30rpx;padding-bottom:0rpx;border-top: solid 1px #eee;font-size:28rpx;display: flex;">
@@ -65,20 +63,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="view_ul view_ul_two clearfix " v-if="dataList.length > 3" >
<view @click="Tel(item.mobile)" class="view_li w50_li" v-for="(item,index) in dataList" >
<view class="bl bor" hoverClass="none" url="" style="box-shadow: 5rpx 5rpx 10rpx #dcdcdc;height: 230rpx;position: relative;">
<view class="contact_name" v-if="item.position">{{item.position_text}}{{item.position}}</view>
<view class="contact_name">{{item.title_text}}{{item.realname}}</view>
<view class="contact_name">{{item.mobile_text}}{{item.mobile}}</view>
<view class="contact_name" style="padding-bottom:10rpx;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;">{{item.address_text}}{{item.address}}</view>
<view class="contact_name" style="padding-top:10rpx;padding-bottom:0rpx;border-top: solid 1px #eee;position: absolute;bottom: 0;display: flex">
<image mode="widthFix":src="$util.img('public/static/img/boda.png')"></image>
<view style="margin-top: -6rpx;margin-left: 10rpx;font-size: 24rpx;color:rgba(71,71,71,.79)">点击拨打电话</view>
</view>
</view>
</view>
</view> -->
<map v-if="shop.longitude > 0 && shop.latitude > 0 && ismessage == 0" id="map" <map v-if="shop.longitude > 0 && shop.latitude > 0 && ismessage == 0" id="map"
style="width: 100%; height:400rpx" scale="12" :markers="markers" bindupdated="bindupdated" style="width: 100%; height:400rpx" scale="12" :markers="markers" bindupdated="bindupdated"
:longitude="shop.longitude" :latitude="shop.latitude" show-location> :longitude="shop.longitude" :latitude="shop.latitude" show-location>
@@ -90,14 +74,6 @@
</view> </view>
</view> </view>
<!-- <view wx:if="landline !=0">
<button bindtap="contact">
<view class="message">
<image mode="widthFix" src="{{contactbg}}"></image>
</view>
</button>
</view> -->
</view> </view>
<!--留言弹窗--> <!--留言弹窗-->
<view class="goods-sku"> <view class="goods-sku">
@@ -113,20 +89,43 @@
<view class="fui-cell "> <view class="fui-cell ">
<view class="fui-cell-label ">{{ $lang('name') }}</view> <view class="fui-cell-label ">{{ $lang('name') }}</view>
<view class="fui-cell-info"> <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> </view>
<view class="fui-cell "> <view class="fui-cell ">
<view class="fui-cell-label">{{ $lang('contactInfo') }}</view> <view class="fui-cell-label">{{ $lang('contactInfo') }}</view>
<view class="fui-cell-info"> <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> </view>
<view class="fui-cell "> <view class="fui-cell ">
<view class="fui-cell-label" style="position: absolute;top:10px">{{ $lang('messageContent') }}</view> <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;"> <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
<textarea class="textarea" v-model="Form.remark" :placeholder="$lang('pleaseEnterMessage')" style="font-size: 28rpx;padding: 10rpx;"></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> </view>
</view> </view>
@@ -149,28 +148,20 @@ export default {
mixins: [scroll], mixins: [scroll],
data() { data() {
return { return {
minScrollTop: 100, // 设置回到顶端按钮显示要求,最小页面滚动距离 minScrollTop: 100,
dataList: [], dataList: [],
ismessage: 0, ismessage: 0,
Form: { Form: {
realname: '', realname: '',
mobile: '', mobile: '',
remark: '' remark: ''
}, },
formKey: Date.now(),
markers: [ markers: [
{ {
id: 1, id: 1,
/* width:20, //宽度
height:20, //高度*/
// iconPath: '../../static/goal_weizhi.png', //目标位置图标路径
//这里的经纬度是 目的地 的经纬度
latitude: 0, latitude: 0,
longitude: 0, longitude: 0,
callout: {
/* title:123,
content:'123' */
}
} }
], ],
landline: 0, landline: 0,
@@ -182,87 +173,125 @@ export default {
}; };
}, },
onLoad(option) { onLoad(option) {
//刷新多语言
this.$langConfig.refresh(); this.$langConfig.refresh();
this.$api.sendRequest({ this.$api.sendRequest({
url: '/api/member/personnel', url: '/api/member/personnel',
success: res => { success: res => {
if (res.code == 0) { if (res.code == 0) {
this.dataList = res.data this.dataList = res.data;
this.shop = res.shop 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.personnel_bg = res.set.personnel_bg ? res.set.personnel_bg : 'public/static/img/diy_view/member_info_bg.png';
this.markers = [{ this.markers = [{
id: 1, id: 1,
//iconPath:'http://saas.cn//public/static/img/kefu.png',
latitude: this.shop.latitude, latitude: this.shop.latitude,
longitude: this.shop.longitude longitude: this.shop.longitude
}] }];
} }
}, },
fail: res => { fail: res => {}
}
}); });
}, },
methods: { methods: {
test() {
// channelReady(function(bAvailable) {
// alert('是否存在框架服务:' + bAvailable)
// })
// window.location.href = 'https://hapjs.org/app//[path][?key=value] hap://app//[path][?key=value] '
//参数说明: package: 应用包名,必选 path: 应用内页面的 path可选默认为首页 key-value: 希望传给页面的参数,可选,可以有多个
// const isQuickAppEnv = navigator.userAgent.includes('HuaweiQuickApp');
// let quickAppBridge;
// console.log(window.quickapp)
// if (isQuickAppEnv) {
// quickAppBridge = window.quickapp;
// }
// quickAppBridge.invoke('startQuickAppPage', { page: '/NativePage' });
// window.postMessage({ action: 'someAction', data: 'some data' }, '*');
// window.open('https://xcx10.5g-quickapp.com/test.php')
},
save() { 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({ this.$api.sendRequest({
url: '/api/member/message', url: '/api/member/message',
data: this.Form, data: this.Form,
success: res => { success: res => {
uni.showToast({ title: res.message || '提交成功', icon: 'success' });
// 重置表单数据
this.Form = { realname: '', mobile: '', remark: '' };
this.formKey = Date.now();
// 关闭弹窗
this.$refs.informationPopup.close(); 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) { change(e) {
console.log(e) this.ismessage = e.show ? 1 : 0;
this.ismessage = e.show ? 1 : 0
}, },
//留言打开
tapMessage() { tapMessage() {
this.ismessage = 1 // 重置数据
this.Form = { realname: '', mobile: '', remark: '' };
this.formKey = Date.now();
this.ismessage = 1;
this.$refs.informationPopup.open(); this.$refs.informationPopup.open();
// 微信小程序:打开后清空原生输入框
// #ifdef MP-WEIXIN
setTimeout(() => {
this.clearInputValues();
}, 300); // 确保弹窗已渲染
// #endif
}, },
//留言关闭
closeinformationPopup() { closeinformationPopup() {
this.ismessage = 0 this.ismessage = 0;
this.$refs.informationPopup.close(); 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) { Tel(m) {
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: m + '', phoneNumber: m + '',
success(e) { success(e) {
console.log(e) console.log(e);
} }
}) });
}, },
copy(text) { copy(text) {
uni.setClipboardData({ uni.setClipboardData({
data: text, data: text,
success: () => { success: () => {
console.log('复制成功');
// 可以添加用户友好的提示例如使用uni.showToast提示复制成功
uni.showToast({ uni.showToast({
title: this.$lang('copySuccess'), title: this.$lang('copySuccess'),
icon: 'success', icon: 'success',
@@ -270,8 +299,6 @@ export default {
}); });
}, },
fail: (err) => { fail: (err) => {
console.log('复制失败');
// 可以添加错误处理或用户友好的提示
uni.showToast({ uni.showToast({
title: err.message || err.errMsg || this.$lang('copyFailed'), title: err.message || err.errMsg || this.$lang('copyFailed'),
icon: 'none', icon: 'none',
@@ -280,12 +307,13 @@ export default {
} }
}); });
}, },
tomap() { tomap() {
uni.openLocation({ uni.openLocation({
latitude: parseFloat(this.shop.latitude), latitude: parseFloat(this.shop.latitude),
longitude: parseFloat(this.shop.longitude), longitude: parseFloat(this.shop.longitude),
name: this.$lang('oneClickNavigation'), name: this.$lang('oneClickNavigation'),
}) });
} }
} }
}; };
@@ -439,14 +467,6 @@ image {
z-index: 0; z-index: 0;
} }
image {
max-width: 100%;
}
.bl {
display: block;
}
.line1 { .line1 {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -484,18 +504,12 @@ image {
border-radius: 10rpx; border-radius: 10rpx;
} }
.view_ul_100 .fl {
width: 10%;
}
.view_ul_100 .fr { .view_ul_100 .fr {
/* padding-left: 30rpx;*/
width: 100%; width: 100%;
} }
.view_ul_100>view { .view_ul_100>view {
background: #fff; background: #fff;
// box-shadow: 5rpx 5rpx 10rpx #dcdcdc;
} }
.view_ul_100 .text { .view_ul_100 .text {
@@ -512,26 +526,6 @@ image {
padding: 20rpx 30rpx 0rpx 30rpx; padding: 20rpx 30rpx 0rpx 30rpx;
} }
.list_cotact .view_ul_two .view_li>view {
background-color: #fff;
padding: 20rpx 30rpx 0rpx 30rpx;
}
.list_cotact .view_ul_two .view_li>view .address {
background-color: #5dc2d0;
color: #fff;
display: inline-block;
font-size: 28rpx;
line-height: 48rpx;
margin-bottom: 30rpx;
padding: 0 30rpx;
width: auto;
}
.view_ul_two {
margin-top: 20rpx;
}
.contact_name { .contact_name {
color: rgba(71, 71, 71, .79); color: rgba(71, 71, 71, .79);
font-size: 24rpx; font-size: 24rpx;
@@ -553,7 +547,7 @@ image {
color: #fff; color: #fff;
font-size: 24rpx; font-size: 24rpx;
border-radius: 50rpx; border-radius: 50rpx;
width: 160rpx; // 足够容纳4个汉字(8个字符) width: 160rpx;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.15), 0 1rpx 3rpx rgba(0, 0, 0, 0.1); box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.15), 0 1rpx 3rpx rgba(0, 0, 0, 0.1);
@@ -565,7 +559,6 @@ image {
} }
.message { .message {
/* background-color: rgba(0,0,0,.8); */
border-radius: 50%; border-radius: 50%;
bottom: 50%; bottom: 50%;
height: 90rpx; height: 90rpx;

View File

@@ -23,9 +23,9 @@
<view class="lineheight-clear"> <view class="lineheight-clear">
<view class="discount-price"> <view class="discount-price">
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
<text class="price price-style large">{{ parseFloat(showPrice(item)).toFixed(2).split('.')[0] }}</text>
<text class="unit price-style small">.{{ parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
</view> </view>
<view class="member-price-tag" v-if="item.member_price && item.member_price == showPrice(item)"> <view class="member-price-tag" v-if="item.member_price && item.member_price == showPrice(item)">
<image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image> <image :src="$util.img('public/uniapp/index/VIP.png')" mode="widthFix"></image>
@@ -39,7 +39,7 @@
<text class="unit">{{ $lang('common.currencySymbol') }}</text> <text class="unit">{{ $lang('common.currencySymbol') }}</text>
<text>{{ showMarketPrice(item) }}</text> <text>{{ showMarketPrice(item) }}</text>
</view> </view>
<view class="sale font-size-activity-tag color-tip" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit ? item.unit : '' }}</view>
</view> </view>
</view> </view>
</view> </view>