|
@@ -299,7 +299,9 @@
|
|
|
<view class="ladder-item-td">
|
|
|
<view class="te-text last">{{ product.qualificationLink }}</view>
|
|
|
<view class="te-copy">
|
|
|
- <text class="clipboard" @click.stop="clipboard(product.qualificationLink)">复制</text>
|
|
|
+ <text class="clipboard" @click.stop="clipboard(product.qualificationLink)"
|
|
|
+ >复制</text
|
|
|
+ >
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -655,19 +657,15 @@
|
|
|
:maskClosable="false"
|
|
|
>
|
|
|
</tui-modal>
|
|
|
- <!-- 限制医疗器械商品查看限制 -->
|
|
|
- <tui-modal
|
|
|
- :show="modal1"
|
|
|
- @click="handleClick1"
|
|
|
- @cancel="hideMobel1"
|
|
|
- :content="contentModalText1"
|
|
|
- :button="modalButton1"
|
|
|
- color="#333"
|
|
|
- :size="32"
|
|
|
- shape="circle"
|
|
|
- :maskClosable="false"
|
|
|
- >
|
|
|
- </tui-modal>
|
|
|
+ <!-- 商品详情可见度弹窗提醒 -->
|
|
|
+ <cm-product-modal
|
|
|
+ v-if="showModal"
|
|
|
+ :showModal="showModal"
|
|
|
+ :commodityDetailsFlag="product.commodityDetailsFlag"
|
|
|
+ :isShareType="isShareType"
|
|
|
+ :userIdentity="userIdentity"
|
|
|
+ :firstClubType="firstClubType"
|
|
|
+ />
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -681,6 +679,7 @@ import cmRecommend from './components/recommend' //相关推荐
|
|
|
import cmParameter from './components/cm-parameter' //相关参数
|
|
|
import cmService from './components/cm-service' //服务项目
|
|
|
import cmProductDoc from './components/cm-product-doc.vue'
|
|
|
+import cmProductModal from './components/cm-product-modal.vue'
|
|
|
import couponTabs from '@/components/cm-module/coupon/tui-tabs.vue'
|
|
|
import authorize from '@/common/config/authorize.js'
|
|
|
import wxLogin from '@/common/config/wxLogin.js'
|
|
@@ -699,7 +698,8 @@ export default {
|
|
|
cmParameter,
|
|
|
cmService,
|
|
|
couponTabs,
|
|
|
- cmProductDoc
|
|
|
+ cmProductDoc,
|
|
|
+ cmProductModal
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -791,9 +791,7 @@ export default {
|
|
|
supportingList: [],
|
|
|
supportingNum: 0, // 组合商品总数
|
|
|
contentModalText: '', //操作文字提示语句
|
|
|
- contentModalText1: '', //操作文字提示语句
|
|
|
modal: false,
|
|
|
- modal1: false,
|
|
|
modalButton: [
|
|
|
{
|
|
|
text: '取消',
|
|
@@ -809,21 +807,7 @@ export default {
|
|
|
plain: false
|
|
|
}
|
|
|
],
|
|
|
- modalButton1: [
|
|
|
- {
|
|
|
- text: '取消',
|
|
|
- type: 'gray',
|
|
|
- plain: true //是否空心
|
|
|
- },
|
|
|
- {
|
|
|
- text: '去升级',
|
|
|
- customStyle: {
|
|
|
- color: '#fff',
|
|
|
- bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
|
|
|
- },
|
|
|
- plain: false
|
|
|
- }
|
|
|
- ],
|
|
|
+ showModal: false,
|
|
|
isShowCaimeiShop: false
|
|
|
}
|
|
|
},
|
|
@@ -864,7 +848,7 @@ export default {
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
this.productId = this.couponParam.productId = option.id //获取商品ID
|
|
|
- this.typeId = option.typeId
|
|
|
+ this.typeId = option.typeId
|
|
|
this.opentype = option.open
|
|
|
this.isShareType = option.type
|
|
|
this.linkPath = option.path
|
|
@@ -915,7 +899,7 @@ export default {
|
|
|
userId: this.userId,
|
|
|
productId: this.productId,
|
|
|
identity: this.identity,
|
|
|
- typeId:this.typeId
|
|
|
+ typeId: this.typeId
|
|
|
})
|
|
|
.then(response => {
|
|
|
this.productImage = []
|
|
@@ -1003,9 +987,7 @@ export default {
|
|
|
// setTimeout(() => {
|
|
|
// this.getSectionProps()
|
|
|
// }, 2000)
|
|
|
- if (this.product.productType === 2 && (this.userIdentity != 1 || this.userIdentity != 3)) {
|
|
|
- this.handleShowProductType()
|
|
|
- }
|
|
|
+ this.handleShowProductType(this.product.commodityDetailsFlag)
|
|
|
if ((this.hasLogin && this.userIdentity == 2) || this.userIdentity == 4) {
|
|
|
this.ProductCartNumber()
|
|
|
}
|
|
@@ -1020,90 +1002,39 @@ export default {
|
|
|
this.$util.msg(error.msg, 2000)
|
|
|
})
|
|
|
},
|
|
|
- handleShowProductType() {
|
|
|
- // 根据用户弹窗提示
|
|
|
+ handleShowProductType(flag = '') {
|
|
|
+ // 根据商品详情可见度显示弹窗 flag 1.所有人可见 2.所有机构可见 3.仅会员机构可见 4.仅医美机构可见
|
|
|
+ const flagMap = {
|
|
|
+ '2': true,
|
|
|
+ '3': true,
|
|
|
+ '4': true
|
|
|
+ }
|
|
|
if (!this.hasLogin) {
|
|
|
- //游客
|
|
|
- this.modal1 = true
|
|
|
- this.contentModalText1 =
|
|
|
- '该商品仅限医美类机构查看,请注册医美机构后继续查看。有采美账号的,请直接登录。'
|
|
|
- this.modalButton1 = [
|
|
|
- { text: '关闭', type: 'gray', plain: true },
|
|
|
- {
|
|
|
- text: '去注册/登录',
|
|
|
- customStyle: { color: '#fff', bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)' },
|
|
|
- plain: false
|
|
|
- }
|
|
|
- ]
|
|
|
+ this.showModal = flagMap[flag]
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.vipFlag === 1) {
|
|
|
+ this.showModal = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (flag === 3 && this.userIdentity === 4) {
|
|
|
+ this.showModal = true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (flag === 4 && this.userIdentity === 4) {
|
|
|
+ this.showModal = true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (flag === 4 && this.userIdentity === 2 && this.firstClubType !== 1) {
|
|
|
+ this.showModal = true
|
|
|
return
|
|
|
- } else {
|
|
|
- if (this.userIdentity === 4) {
|
|
|
- // 普通机构
|
|
|
- this.modal1 = true
|
|
|
- this.contentModalText1 = '该商品仅限医美类机构查看,请升级为医美机构后继续查看。'
|
|
|
- this.modalButton1 = [
|
|
|
- { text: '关闭', type: 'gray', plain: true },
|
|
|
- {
|
|
|
- text: '去升级',
|
|
|
- customStyle: { color: '#fff', bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)' },
|
|
|
- plain: false
|
|
|
- }
|
|
|
- ]
|
|
|
- return
|
|
|
- } else if (this.userIdentity === 2) {
|
|
|
- //会员机构
|
|
|
- if (this.firstClubType != 1) {
|
|
|
- this.modal1 = true
|
|
|
- this.contentModalText1 =
|
|
|
- '该商品仅限医美类机构查看,您暂无权限。您可去机构资料页面查看机构类型。'
|
|
|
- this.modalButton1 = [
|
|
|
- { text: '关闭', type: 'gray', plain: true },
|
|
|
- {
|
|
|
- text: '去查看资料',
|
|
|
- customStyle: {
|
|
|
- color: '#fff',
|
|
|
- bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
|
|
|
- },
|
|
|
- plain: false
|
|
|
- }
|
|
|
- ]
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
},
|
|
|
hideMobel1() {
|
|
|
this.modal1 = false
|
|
|
this.$api.navigateBack(1)
|
|
|
},
|
|
|
- handleClick1(e) {
|
|
|
- // 医美器械弹窗跳转
|
|
|
- if (e.index == 1) {
|
|
|
- if (!this.hasLogin) {
|
|
|
- //游客跳转登录页
|
|
|
- this.$api.navigateTo('/pages/login/login')
|
|
|
- } else {
|
|
|
- if (this.userIdentity === 4) {
|
|
|
- // 个人机构跳转升级页面
|
|
|
- this.$api.navigateTo('/pages/login/apply')
|
|
|
- } else if (this.userIdentity === 2) {
|
|
|
- //会员机构
|
|
|
- if (this.firstClubType != 1) {
|
|
|
- // 会员非医美机构跳转资料页
|
|
|
- this.$api.navigateTo('/pages/login/information')
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- this.modal1 = false
|
|
|
- } else {
|
|
|
- this.modal1 = false
|
|
|
- if (this.isShareType == 'share') {
|
|
|
- this.$api.switchTabTo('/pages/tabBar/home/index')
|
|
|
- } else {
|
|
|
- this.$api.navigateBack(1)
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+
|
|
|
adaptRichTextImg(product) {
|
|
|
// 商品详情
|
|
|
let defaulHtml = '<div style="text-align: center;color:#333333;">暂无内容</div>'
|
|
@@ -1689,19 +1620,19 @@ export default {
|
|
|
),
|
|
|
debounce(fn, delay) {
|
|
|
let timer = null //借助闭包
|
|
|
- return function() {
|
|
|
+ return function() {
|
|
|
if (timer) {
|
|
|
- clearTimeout(timer)
|
|
|
+ clearTimeout(timer)
|
|
|
}
|
|
|
timer = setTimeout(fn, delay) // 简化写法
|
|
|
}
|
|
|
},
|
|
|
clipboard(data) {
|
|
|
- thorui.getClipboardData(data, (res) => {
|
|
|
+ thorui.getClipboardData(data, res => {
|
|
|
if (res) {
|
|
|
- this.$util.msg("复制成功",2000,true,'success');
|
|
|
+ this.$util.msg('复制成功', 2000, true, 'success')
|
|
|
} else {
|
|
|
- this.$util.msg("复制失败",2000,true,'none');
|
|
|
+ this.$util.msg('复制失败', 2000, true, 'none')
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -2359,29 +2290,29 @@ page {
|
|
|
min-height: 856rpx;
|
|
|
box-sizing: border-box;
|
|
|
padding: 0 24rpx;
|
|
|
- .product-details-table{
|
|
|
+ .product-details-table {
|
|
|
width: 100%;
|
|
|
min-height: 160rpx;
|
|
|
- border: 1px solid #E1E1E1;
|
|
|
+ border: 1px solid #e1e1e1;
|
|
|
border-radius: 10rpx;
|
|
|
- .ladder-tr{
|
|
|
+ .ladder-tr {
|
|
|
display: flex;
|
|
|
width: 100%;
|
|
|
justify-content: center;
|
|
|
height: 80rpx;
|
|
|
align-items: center;
|
|
|
- border-bottom: 1px solid #E1E1E1;
|
|
|
- &:last-child{
|
|
|
+ border-bottom: 1px solid #e1e1e1;
|
|
|
+ &:last-child {
|
|
|
border-bottom: none;
|
|
|
}
|
|
|
- .ladder-item-td{
|
|
|
+ .ladder-item-td {
|
|
|
height: 80rpx;
|
|
|
justify-content: center;
|
|
|
text-align: center;
|
|
|
box-sizing: border-box;
|
|
|
padding: 10rpx;
|
|
|
float: left;
|
|
|
- .te-text{
|
|
|
+ .te-text {
|
|
|
line-height: 28rpx;
|
|
|
font-size: $font-size-24;
|
|
|
text-overflow: ellipsis;
|
|
@@ -2391,29 +2322,29 @@ page {
|
|
|
-webkit-line-clamp: 2;
|
|
|
overflow: hidden;
|
|
|
color: #999999;
|
|
|
- &.last{
|
|
|
+ &.last {
|
|
|
width: 60%;
|
|
|
float: left;
|
|
|
}
|
|
|
}
|
|
|
- .te-copy{
|
|
|
+ .te-copy {
|
|
|
width: 40%;
|
|
|
float: right;
|
|
|
font-size: $font-size-24;
|
|
|
padding-top: 10rpx;
|
|
|
- .clipboard{
|
|
|
+ .clipboard {
|
|
|
width: 84rpx;
|
|
|
height: 36rpx;
|
|
|
background: #4688fa;
|
|
|
text-align: center;
|
|
|
font-size: $font-size-24;
|
|
|
- color: #FFFFFF;
|
|
|
+ color: #ffffff;
|
|
|
border-radius: 18rpx;
|
|
|
line-height: 36rpx;
|
|
|
display: inline-block;
|
|
|
}
|
|
|
}
|
|
|
- &.th{
|
|
|
+ &.th {
|
|
|
display: flex;
|
|
|
height: 80rpx;
|
|
|
align-items: center;
|
|
@@ -2421,16 +2352,16 @@ page {
|
|
|
font-size: 26rpx;
|
|
|
color: #666;
|
|
|
}
|
|
|
- &:nth-child(1){
|
|
|
- width:25%;
|
|
|
- border-right: 1px solid #E1E1E1;
|
|
|
+ &:nth-child(1) {
|
|
|
+ width: 25%;
|
|
|
+ border-right: 1px solid #e1e1e1;
|
|
|
}
|
|
|
- &:nth-child(2){
|
|
|
- width:35%;
|
|
|
- border-right: 1px solid #E1E1E1;
|
|
|
+ &:nth-child(2) {
|
|
|
+ width: 35%;
|
|
|
+ border-right: 1px solid #e1e1e1;
|
|
|
}
|
|
|
- &:nth-child(3){
|
|
|
- width:40%;
|
|
|
+ &:nth-child(3) {
|
|
|
+ width: 40%;
|
|
|
}
|
|
|
}
|
|
|
}
|