Compare commits
33 Commits
custom/281
...
custom/com
| Author | SHA1 | Date | |
|---|---|---|---|
| 23c954981b | |||
| aa2f13f3b2 | |||
| 09c49365a3 | |||
| 40c1d27f02 | |||
| ae5577c0ee | |||
| 04d045e81e | |||
| 30fef9770a | |||
| 3f666a5e83 | |||
| 94c9d1c556 | |||
| 3acd3870b6 | |||
| bec0a51d81 | |||
| d744e1c16d | |||
| 6a1bf3b5bc | |||
| 526de0d73f | |||
| dcf3703892 | |||
| 6894950b7e | |||
| 781bb8845e | |||
| b70725c104 | |||
| 8dce1058f6 | |||
| 6b6c50ebb8 | |||
| b079487c9a | |||
| ef7b609efb | |||
| 7a28bb7f7a | |||
| 921e8b79b1 | |||
| 0101c36012 | |||
| 469bc4da81 | |||
| 50072c45ab | |||
| c790d63005 | |||
| 71c866c0f8 | |||
| a5740f53af | |||
| 8f0a13c473 | |||
| 6d0c914e79 | |||
| 3fec0470cf |
@@ -61,8 +61,8 @@ export default {
|
||||
groupby_promotion_aux_color: '#F7B500',//活动辅色
|
||||
},
|
||||
...{
|
||||
hover_nav_bg_color: '#FFFC', //背景色: 红色 '#c6251b', 白色: '#FFFC'
|
||||
hover_nav_text_color: '#000' // 文字颜色: 白色 '#FFFFFF', 黑色: '#000'
|
||||
hover_nav_bg_color: '#c6251b', //背景色: 红色 '#c6251b', 白色: '#FFFC'
|
||||
hover_nav_text_color: '#FFFFFF' // 文字颜色: 白色 '#FFFFFF', 黑色: '#000'
|
||||
},
|
||||
},
|
||||
'green': {
|
||||
|
||||
@@ -1162,5 +1162,47 @@ export default {
|
||||
verifyMobile(mobile) {
|
||||
var parse = /^\d{11}$/.test(mobile);
|
||||
return parse;
|
||||
},
|
||||
/**
|
||||
* 判断是否为快应用环境
|
||||
* @returns {boolean} 是否为快应用
|
||||
*/
|
||||
isQuickApp() {
|
||||
// #ifndef QUICKAPP-WEBVIEW
|
||||
let _isQuickApp = false;
|
||||
try {
|
||||
const ua = navigator?.userAgent?.toLowerCase();
|
||||
console.log('ua = ', ua);
|
||||
_isQuickApp = ua.indexOf('quickapp') !== -1;
|
||||
|
||||
if (!_isQuickApp) {
|
||||
// 特殊说明由于网站是嵌入到快应用的Webview组件中<web>,UA中不会包含quickapp字符串,
|
||||
// 但是会包含uniacid参数,所以这里通过uniacid参数来判断是否为快应用环境
|
||||
_isQuickApp = ua.indexOf('uniacid=') !== -1;
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
if (!_isQuickApp) {
|
||||
const systemInfo = this.getDeviceInfo();
|
||||
_isQuickApp = systemInfo?.platform === 'quickapp' || process?.env?.UNI_PLATFORM === 'quickapp';
|
||||
}
|
||||
return _isQuickApp;
|
||||
// #endif
|
||||
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
* 判断是否为华为快应用环境
|
||||
* @returns {boolean} 是否为华为快应用
|
||||
*/
|
||||
isHuaweiQuickApp() {
|
||||
if (!this.isQuickApp()) return false;
|
||||
|
||||
// #ifndef QUICKAPP-WEBVIEW-HUAWEI
|
||||
const systemInfo = this.getDeviceInfo();
|
||||
return systemInfo.brand === 'HUAWEI' || systemInfo.manufacturer === 'HUAWEI' ||
|
||||
(typeof qh !== 'undefined' && qh.platform === 'huawei');
|
||||
// #endif
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,78 +1,164 @@
|
||||
<template>
|
||||
<!-- #ifdef MP -->
|
||||
<view v-if="showPop">
|
||||
<view class="privacy-mask">
|
||||
<view>
|
||||
<view class="privacy-mask" v-if="showPop">
|
||||
<view class="privacy-wrap">
|
||||
<view class="privacy-title">用户隐私保护提示</view>
|
||||
<view class="privacy-desc">
|
||||
感谢您使用本小程序,在使用前您应当阅读并同意
|
||||
<text class="privacy-link" @tap="openPrivacyContract">{{privacyContractName}}</text>,
|
||||
当点击同意并继续时,即表示您已理解并同意该条款内容,该条款将对您产生法律约束力;如您不同意,将无法继续使用小程序相关功能。
|
||||
感谢您使用{{ appName }},在使用前您应当阅读并同意
|
||||
<text class="privacy-link" @tap="openPrivacyContract">{{ privacyContractName }}</text>
|
||||
<!-- #ifdef QUICKAPP-WEBVIEW || H5 -->
|
||||
<text class="privacy-link" @tap="openPrivacyService">{{ privacyServiceName }}</text>
|
||||
<!-- #endif -->
|
||||
,当点击同意并继续时,即表示您已理解并同意该条款内容,该条款将对您产生法律约束力;如您不同意,将无法继续使用{{ appName }}相关功能。
|
||||
</view>
|
||||
<view class="privacy-button-flex">
|
||||
<button class="privacy-button-btn bg-disagree" @tap="handleDisagree">不同意</button>
|
||||
<button id="agree-btn" class="privacy-button-btn bg-agree" open-type="agreePrivacyAuthorization" @agreeprivacyauthorization="handleAgree">同意并继续</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #ifdef QUICKAPP-WEBVIEW || MP-WEIXIN -->
|
||||
<button id="agree-btn" class="privacy-button-btn bg-agree" open-type="agreePrivacyAuthorization"
|
||||
@agreeprivacyauthorization="handleAgree">同意并继续</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef WEB || H5 -->
|
||||
<view v-if="showPop"></view>
|
||||
<button id="agree-btn" class="privacy-button-btn bg-agree" @tap="handleAgree" @click="handleAgree">同意并继续</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
// #ifdef QUICKAPP-WEBVIEW
|
||||
import has from '@system.has'
|
||||
// #endif
|
||||
|
||||
const closeOtherPagePopUpHooks = new Set();
|
||||
const privacyContractPage = '/pages_tool/agreement/contenr?type=0';
|
||||
const privacyServicePage = '/pages_tool/agreement/contenr?type=1';
|
||||
|
||||
export default {
|
||||
name: 'PrivacyPopup',
|
||||
data() {
|
||||
return {
|
||||
agree: false,
|
||||
showPop: false,
|
||||
privacyAuthorization: null,
|
||||
privacyResolves: new Set(),
|
||||
closeOtherPagePopUpHooks: new Set(),
|
||||
privacyContractName: '用户隐私保护指引'
|
||||
privacyContractName: '用户隐私保护指引',
|
||||
appName: '本小程序',
|
||||
// #ifdef WEB || H5
|
||||
appName: '本应用',
|
||||
privacyContractName: '《隐私条款》',
|
||||
privacyServiceName: '《用户服务协议》',
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
this.listenPrivacySettingChange()
|
||||
this.curPageShow()
|
||||
},
|
||||
created() {
|
||||
let that = this
|
||||
//查询微信侧记录的用户是否有待同意的隐私政策信息
|
||||
try {
|
||||
// #ifdef MP-WEIXIN
|
||||
//查询微信侧记录的用户是否有待同意的隐私政策信息
|
||||
wx.getPrivacySetting({
|
||||
success(res) {
|
||||
success: (res) => {
|
||||
// console.log('隐私政策信息', res);
|
||||
// console.log(res.privacyContractName);
|
||||
that.privacyContractName = res.privacyContractName
|
||||
this.privacyContractName = res.privacyContractName
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifdef QUICKAPP-WEBVIEW || H5
|
||||
if (this.$util.isQuickApp()) {
|
||||
if (typeof has != 'undefined' && has?.getPrivacySetting) {
|
||||
has.getPrivacySetting({
|
||||
success: (res) => {
|
||||
if (res.privacyContractName) {
|
||||
this.privacyContractName = res.privacyContractName
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
} catch (e) {
|
||||
// console.log("=========低版本基础库==========")
|
||||
console.error("=========低版本基础库==========", e)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 监听何时需要提示用户阅读隐私政策
|
||||
init() {
|
||||
let that = this;
|
||||
getPrivacySettingByQuickApp() {
|
||||
// #ifdef QUICKAPP-WEBVIEW || H5 || WEB
|
||||
if (this.$util.isQuickApp()) {
|
||||
if (typeof has != 'undefined' && has?.getPrivacySetting) {
|
||||
has.getPrivacySetting({
|
||||
success: (res) => {
|
||||
// console.log(res)
|
||||
if (res.needAuthorization) {
|
||||
this.popUp()
|
||||
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
|
||||
this.closeOtherPagePopUp(this.disPopUp)
|
||||
} else {
|
||||
this.$emit('agree')
|
||||
}
|
||||
},
|
||||
})
|
||||
} else {
|
||||
// 属于嵌入到快应用Webview组件中的情况,按照H5的方式来处理,判断是否已经授权
|
||||
if (uni.getStorageSync('privacyAgreed')) {
|
||||
this.$emit('agree')
|
||||
} else {
|
||||
this.popUp()
|
||||
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
|
||||
this.closeOtherPagePopUp(this.disPopUp)
|
||||
}
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
|
||||
listenPrivacySettingChange() {
|
||||
// #ifdef MP-WEIXIN
|
||||
// 监听微信侧隐私政策授权变化事件
|
||||
if (wx.onNeedPrivacyAuthorization) {
|
||||
wx.onNeedPrivacyAuthorization((resolve) => {
|
||||
if (typeof that.privacyAuthorization === 'function') {
|
||||
that.privacyAuthorization(resolve)
|
||||
if (typeof this.privacyAuthorization === 'function') {
|
||||
this.privacyAuthorization(resolve)
|
||||
}
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef QUICKAPP-WEBVIEW || H5 || WEB
|
||||
if (this.$util.isQuickApp()) {
|
||||
// 监听快速应用侧隐私政策授权变化事件
|
||||
if (typeof has != 'undefined' && has?.onPrivacySettingChange) {
|
||||
has.onPrivacySettingChange((res) => {
|
||||
// console.log(res)
|
||||
if (res.needAuthorization) {
|
||||
this.popUp()
|
||||
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
|
||||
this.closeOtherPagePopUp(this.disPopUp)
|
||||
} else {
|
||||
this.$emit('agree')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
|
||||
// 主动查询用户隐私政策授权状态,针对快速应用
|
||||
this.getPrivacySettingByQuickApp();
|
||||
},
|
||||
// 主动查询用户隐私政策授权状态
|
||||
proactive() {
|
||||
let that = this
|
||||
// #ifdef MP-WEIXIN
|
||||
if (wx.getPrivacySetting) {
|
||||
wx.getPrivacySetting({
|
||||
success: (res) => {
|
||||
// console.log(res)
|
||||
if (res.needAuthorization) {
|
||||
that.popUp()
|
||||
this.popUp()
|
||||
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
|
||||
this.closeOtherPagePopUp(this.disPopUp)
|
||||
} else {
|
||||
@@ -83,9 +169,15 @@
|
||||
} else {
|
||||
this.$emit('agree')
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifdef QUICKAPP-WEBVIEW
|
||||
this.getPrivacySettingByQuickApp();
|
||||
// #endif
|
||||
},
|
||||
//初始化监听程序
|
||||
curPageShow() {
|
||||
closeOtherPagePopUpHooks.add(this.disPopUp)
|
||||
this.privacyAuthorization = resolve => {
|
||||
this.privacyResolves.add(resolve)
|
||||
//打开弹窗
|
||||
@@ -93,11 +185,10 @@
|
||||
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
|
||||
this.closeOtherPagePopUp(this.disPopUp)
|
||||
}
|
||||
this.closeOtherPagePopUpHooks.add(this.disPopUp)
|
||||
},
|
||||
// 额外逻辑:当前页面的隐私弹窗弹起的时候,关掉其他页面的隐私弹窗
|
||||
closeOtherPagePopUp(closePopUp) {
|
||||
this.closeOtherPagePopUpHooks.forEach(hook => {
|
||||
closeOtherPagePopUpHooks.forEach(hook => {
|
||||
if (closePopUp !== hook) {
|
||||
hook()
|
||||
}
|
||||
@@ -105,6 +196,7 @@
|
||||
},
|
||||
//打开隐私协议
|
||||
openPrivacyContract() {
|
||||
// #ifdef MP-WEIXIN
|
||||
wx.openPrivacyContract({
|
||||
success(res) {
|
||||
// console.log('打开隐私协议', res);
|
||||
@@ -113,6 +205,51 @@
|
||||
// console.error('打开隐私协议失败', err)
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifdef QUICKAPP-WEBVIEW || H5 || WEB
|
||||
if (this.$util.isQuickApp()) {
|
||||
if (typeof has != 'undefined' && has?.openPrivacySetting) {
|
||||
has.openPrivacySetting({
|
||||
success: (res) => {
|
||||
// console.log('打开隐私协议', res);
|
||||
},
|
||||
fail: (err) => {
|
||||
// console.error('打开隐私协议失败', err)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 属于嵌入到快应用Webview组件中的情况,按照H5的方式来处理
|
||||
this.$util.redirectTo(privacyContractPage);
|
||||
}
|
||||
} else {
|
||||
// H5 环境下的处理逻辑
|
||||
this.$util.redirectTo(privacyContractPage);
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
//打开用户服务协议
|
||||
openPrivacyService() {
|
||||
// #ifdef QUICKAPP-WEBVIEW || H5 || WEB
|
||||
if (this.$util.isQuickApp()) {
|
||||
if (typeof has != 'undefined' && has?.openPrivacySetting) {
|
||||
has.openPrivacySetting({
|
||||
success: (res) => {
|
||||
// console.log('打开用户服务协议', res);
|
||||
},
|
||||
fail: (err) => {
|
||||
// console.error('打开用户服务协议失败', err)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 属于嵌入到快应用Webview组件中的情况,按照H5的方式来处理
|
||||
this.$util.redirectTo(privacyServicePage);
|
||||
}
|
||||
} else {
|
||||
// H5 环境下的处理逻辑
|
||||
this.$util.redirectTo(privacyServicePage);
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
// 不同意
|
||||
handleDisagree() {
|
||||
@@ -143,26 +280,34 @@
|
||||
this.privacyResolves.clear()
|
||||
//关闭弹窗
|
||||
this.disPopUp()
|
||||
|
||||
// #ifdef QUICKAPP-WEBVIEW || H5 || WEB
|
||||
// 保存用户授权状态到本地存储,用于快应用Webview组件中的H5方式处理
|
||||
uni.setStorageSync('privacyAgreed', true);
|
||||
// #endif
|
||||
this.$emit('agree')
|
||||
},
|
||||
//打开弹窗
|
||||
popUp() {
|
||||
if (this.showPop === false) {
|
||||
this.showPop = true
|
||||
}
|
||||
this.showPop = true;
|
||||
},
|
||||
//关闭弹窗
|
||||
disPopUp() {
|
||||
if (this.showPop === true) {
|
||||
this.showPop = false
|
||||
}
|
||||
this.showPop = false;
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 清理事件监听器和集合
|
||||
this.privacyResolves.clear()
|
||||
closeOtherPagePopUpHooks.delete(this.disPopUp)
|
||||
// 注意:这里需要根据实际情况清理微信和快速应用的事件监听器
|
||||
// 由于微信的 wx.onNeedPrivacyAuthorization 没有对应的 off 方法,这里可能需要其他方式处理
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.privacy-mask {
|
||||
.privacy-mask {
|
||||
position: fixed;
|
||||
z-index: 5000;
|
||||
top: 0;
|
||||
@@ -173,43 +318,46 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.privacy-wrap {
|
||||
.privacy-wrap {
|
||||
width: 632rpx;
|
||||
padding: 48rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.privacy-title {
|
||||
.privacy-title {
|
||||
padding: 0rpx 30rpx 40rpx 30rpx;
|
||||
font-weight: 700;
|
||||
font-size: 36rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.privacy-desc {
|
||||
.privacy-desc {
|
||||
font-size: 30rpx;
|
||||
color: #555;
|
||||
line-height: 2;
|
||||
text-align: left;
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.privacy-link {
|
||||
.privacy-link {
|
||||
color: #2f80ed;
|
||||
}
|
||||
}
|
||||
|
||||
.privacy-button-flex {
|
||||
.privacy-button-flex {
|
||||
display: flex;
|
||||
padding: 20rpx 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.privacy-button-btn {
|
||||
.privacy-button-btn {
|
||||
color: #FFF;
|
||||
font-size: 30rpx;
|
||||
// #ifdef QUICKAPP-WEBVIEW || H5 || WEB
|
||||
font-size: 28rpx;
|
||||
// #endif
|
||||
font-weight: 500;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
@@ -220,18 +368,18 @@
|
||||
flex: 1;
|
||||
margin-right: 30rpx;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.privacy-button-btn::after {
|
||||
.privacy-button-btn::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.bg-disagree {
|
||||
.bg-disagree {
|
||||
color: #07c160;
|
||||
background: #f2f2f2;
|
||||
}
|
||||
}
|
||||
|
||||
.bg-agree {
|
||||
.bg-agree {
|
||||
margin-right: 0rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -3,5 +3,5 @@ export const lang = {
|
||||
title: '商品分类',
|
||||
search:'商品搜索',
|
||||
seeMore : '查看更多',
|
||||
Make: "咨询"
|
||||
Make: "询底价"
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export const lang = {
|
||||
status:'该商品已下架',
|
||||
sellout:'库存不足',
|
||||
max:'已达最大限购数量',
|
||||
makebtn:' ',
|
||||
makebtn:'价格电议',
|
||||
sales:'销量',
|
||||
stock:'库存',
|
||||
kefu:'客服',
|
||||
|
||||
@@ -6,6 +6,6 @@ export const lang = {
|
||||
Price:'价格',
|
||||
Filter:'筛选',
|
||||
Search:'请输入您要搜索的商品',
|
||||
Make:'查看详情',
|
||||
Make:'立即询底价',
|
||||
|
||||
}
|
||||
|
||||
@@ -137,10 +137,8 @@
|
||||
</uni-popup>
|
||||
</view>
|
||||
<hover-nav :need="true"></hover-nav>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<!-- 小程序隐私协议 -->
|
||||
<!-- 隐私协议 -->
|
||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||
<!-- #endif -->
|
||||
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
|
||||
<ns-login ref="login"></ns-login>
|
||||
</view>
|
||||
|
||||
@@ -90,7 +90,10 @@
|
||||
<view class="goods-tag-list" v-if="goodsSkuDetail.label_name">
|
||||
<text class="tag-item">{{ goodsSkuDetail.label_name }}</text>
|
||||
</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">
|
||||
<text class="iconfont icon-huiyuan"></text>
|
||||
|
||||
@@ -319,9 +319,8 @@ export default {
|
||||
@import './public/css/list.scss';
|
||||
</style>
|
||||
<style scoped>
|
||||
.uni-tag--primary.uni-tag--inverted {
|
||||
>>>.uni-tag--primary.uni-tag--inverted {
|
||||
background-color: #f5f5f5 !important;
|
||||
|
||||
}
|
||||
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view @click="test()">Test</view> -->
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="view_ul view_ul_one clearfix">
|
||||
@@ -43,6 +44,7 @@
|
||||
<view class="text" style="font-size: 40rpx;font-weight: 600;color:#333">
|
||||
{{ item.realname }}</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="contact_name" v-if="item.mobile"
|
||||
style="padding-top:30rpx;padding-bottom:0rpx;border-top: solid 1px #eee;font-size:28rpx;display: flex;">
|
||||
@@ -63,6 +65,20 @@
|
||||
</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"
|
||||
style="width: 100%; height:400rpx" scale="12" :markers="markers" bindupdated="bindupdated"
|
||||
:longitude="shop.longitude" :latitude="shop.latitude" show-location>
|
||||
@@ -74,6 +90,14 @@
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- <view wx:if="landline !=0">
|
||||
<button bindtap="contact">
|
||||
<view class="message">
|
||||
<image mode="widthFix" src="{{contactbg}}"></image>
|
||||
</view>
|
||||
</button>
|
||||
</view> -->
|
||||
</view>
|
||||
<!--留言弹窗-->
|
||||
<view class="goods-sku">
|
||||
@@ -89,43 +113,20 @@
|
||||
<view class="fui-cell ">
|
||||
<view class="fui-cell-label ">{{ $lang('name') }}</view>
|
||||
<view class="fui-cell-info">
|
||||
<input
|
||||
id="input-realname"
|
||||
:value="Form.realname"
|
||||
@input="e => Form.realname = e.detail.value"
|
||||
class="fui-input"
|
||||
:placeholder="$lang('pleaseEnterName')"
|
||||
:key="formKey"
|
||||
/>
|
||||
<input v-model="Form.realname" class="fui-input" :placeholder="$lang('pleaseEnterName')" value=""></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fui-cell ">
|
||||
<view class="fui-cell-label">{{ $lang('contactInfo') }}</view>
|
||||
<view class="fui-cell-info">
|
||||
<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"
|
||||
/>
|
||||
<input v-model="Form.mobile" class="fui-input" maxlength="11" :placeholder="$lang('pleaseEnterMobile')" type="number"></input>
|
||||
</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;">
|
||||
<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>
|
||||
<!-- <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>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -148,20 +149,28 @@ export default {
|
||||
mixins: [scroll],
|
||||
data() {
|
||||
return {
|
||||
minScrollTop: 100,
|
||||
minScrollTop: 100, // 设置回到顶端按钮显示要求,最小页面滚动距离
|
||||
dataList: [],
|
||||
ismessage: 0,
|
||||
Form: {
|
||||
realname: '',
|
||||
mobile: '',
|
||||
remark: ''
|
||||
|
||||
},
|
||||
formKey: Date.now(),
|
||||
markers: [
|
||||
{
|
||||
id: 1,
|
||||
/* width:20, //宽度
|
||||
height:20, //高度*/
|
||||
// iconPath: '../../static/goal_weizhi.png', //目标位置图标路径
|
||||
//这里的经纬度是 目的地 的经纬度
|
||||
latitude: 0,
|
||||
longitude: 0,
|
||||
callout: {
|
||||
/* title:123,
|
||||
content:'123' */
|
||||
}
|
||||
}
|
||||
],
|
||||
landline: 0,
|
||||
@@ -173,125 +182,87 @@ 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: {
|
||||
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;
|
||||
}
|
||||
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() {
|
||||
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();
|
||||
|
||||
// 微信小程序:延迟清空原生输入框(确保 DOM 已更新)
|
||||
// #ifdef MP-WEIXIN
|
||||
setTimeout(() => {
|
||||
this.clearInputValues();
|
||||
}, 100);
|
||||
// #endif
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({ title: '提交失败,请重试', icon: 'none' });
|
||||
fail: res => {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
change(e) {
|
||||
this.ismessage = e.show ? 1 : 0;
|
||||
console.log(e)
|
||||
this.ismessage = e.show ? 1 : 0
|
||||
},
|
||||
|
||||
//留言打开
|
||||
tapMessage() {
|
||||
// 重置数据
|
||||
this.Form = { realname: '', mobile: '', remark: '' };
|
||||
this.formKey = Date.now();
|
||||
this.ismessage = 1;
|
||||
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',
|
||||
@@ -299,6 +270,8 @@ export default {
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('复制失败');
|
||||
// 可以添加错误处理或用户友好的提示
|
||||
uni.showToast({
|
||||
title: err.message || err.errMsg || this.$lang('copyFailed'),
|
||||
icon: 'none',
|
||||
@@ -307,13 +280,12 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
tomap() {
|
||||
uni.openLocation({
|
||||
latitude: parseFloat(this.shop.latitude),
|
||||
longitude: parseFloat(this.shop.longitude),
|
||||
name: this.$lang('oneClickNavigation'),
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -467,6 +439,14 @@ image {
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
image {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.bl {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.line1 {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -504,12 +484,18 @@ image {
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.view_ul_100 .fl {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.view_ul_100 .fr {
|
||||
/* padding-left: 30rpx;*/
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.view_ul_100>view {
|
||||
background: #fff;
|
||||
// box-shadow: 5rpx 5rpx 10rpx #dcdcdc;
|
||||
}
|
||||
|
||||
.view_ul_100 .text {
|
||||
@@ -526,6 +512,26 @@ image {
|
||||
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 {
|
||||
color: rgba(71, 71, 71, .79);
|
||||
font-size: 24rpx;
|
||||
@@ -547,7 +553,7 @@ image {
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
border-radius: 50rpx;
|
||||
width: 160rpx;
|
||||
width: 160rpx; // 足够容纳4个汉字(8个字符)
|
||||
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);
|
||||
@@ -559,6 +565,7 @@ image {
|
||||
}
|
||||
|
||||
.message {
|
||||
/* background-color: rgba(0,0,0,.8); */
|
||||
border-radius: 50%;
|
||||
bottom: 50%;
|
||||
height: 90rpx;
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
|
||||
<view class="lineheight-clear">
|
||||
<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 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>
|
||||
@@ -39,7 +39,7 @@
|
||||
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text>{{ showMarketPrice(item) }}</text>
|
||||
</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>
|
||||
|
||||
@@ -96,6 +96,7 @@ export default {
|
||||
this.$store.commit('setMemberInfo', '');
|
||||
this.$store.dispatch('emptyCart');
|
||||
uni.removeStorageSync('authInfo');
|
||||
uni.removeStorageSync('privacyAgreed');
|
||||
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||
}
|
||||
}
|
||||
@@ -118,7 +119,9 @@ export default {
|
||||
this.$store.commit('setMemberInfo', '');
|
||||
this.$store.dispatch('emptyCart');
|
||||
uni.removeStorageSync('authInfo');
|
||||
uni.removeStorageSync('privacyAgreed');
|
||||
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: rres.message
|
||||
|
||||
Reference in New Issue
Block a user