|
@@ -94,7 +94,7 @@
|
|
|
<!-- <view class="cm-product-cover" v-if="product.appletsActType === 1"
|
|
|
>云上美博会</view
|
|
|
> -->
|
|
|
- <view class="cm-product-type">医疗器械</view>
|
|
|
+ <view class="cm-product-type" v-if="product.productType == 2">医疗器械</view>
|
|
|
<view class="cm-product-cover" v-if="product.appletsActType === 1"></view>
|
|
|
</view>
|
|
|
|
|
@@ -597,6 +597,19 @@
|
|
|
: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>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -718,7 +731,9 @@ export default {
|
|
|
supportingList: [],
|
|
|
supportingNum: 0 ,// 组合商品总数
|
|
|
contentModalText: '', //操作文字提示语句
|
|
|
+ contentModalText1: '', //操作文字提示语句
|
|
|
modal: false,
|
|
|
+ modal1: false,
|
|
|
modalButton: [
|
|
|
{
|
|
|
text: '取消',
|
|
@@ -734,6 +749,21 @@ export default {
|
|
|
plain: false
|
|
|
}
|
|
|
],
|
|
|
+ modalButton1: [
|
|
|
+ {
|
|
|
+ text: '取消',
|
|
|
+ type: 'gray',
|
|
|
+ plain: true //是否空心
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: '去升级',
|
|
|
+ customStyle: {
|
|
|
+ color: '#fff',
|
|
|
+ bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
|
|
|
+ },
|
|
|
+ plain: false
|
|
|
+ }
|
|
|
+ ],
|
|
|
isShowCaimeiShop:false
|
|
|
}
|
|
|
},
|
|
@@ -781,9 +811,6 @@ export default {
|
|
|
if (option.page == 2) {
|
|
|
this.backPage = option.page
|
|
|
}
|
|
|
- if (this.isShareType == 'share') {
|
|
|
- wxLogin.wxLoginAuthorize()
|
|
|
- }
|
|
|
this.getWinHeight()
|
|
|
},
|
|
|
onReady() {
|
|
@@ -801,8 +828,7 @@ export default {
|
|
|
console.log('是iPhoneX', this.isIphoneX)
|
|
|
},
|
|
|
methods: {
|
|
|
- async initGetStotage() {
|
|
|
- // 初始化
|
|
|
+ async initGetStotage() {// 初始化
|
|
|
const userInfo = await this.$api.getStorage()
|
|
|
this.userId = this.couponParam.userId = userInfo.userId ? userInfo.userId : 0
|
|
|
this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
|
|
@@ -815,7 +841,7 @@ export default {
|
|
|
this.isShowButton = false
|
|
|
}
|
|
|
if (isPreviewImg) {
|
|
|
- isPreviewImg = false
|
|
|
+ isPreviewImg = false
|
|
|
return
|
|
|
} else {
|
|
|
this.initData()
|
|
@@ -833,7 +859,7 @@ export default {
|
|
|
this.shop = response.data.shop
|
|
|
this.shopId = response.data.shopId
|
|
|
this.product = response.data
|
|
|
- if(this.shopId == 10235){
|
|
|
+ if(this.shopId == 10255){
|
|
|
this.isShowCaimeiShop = true
|
|
|
}
|
|
|
if (this.product.userLike && this.product.userLike == 1) {
|
|
@@ -914,6 +940,10 @@ export default {
|
|
|
// setTimeout(() => {
|
|
|
// this.getSectionProps()
|
|
|
// }, 2000)
|
|
|
+ if(this.product.productType === 2 && (this.userIdentity != 1 || this.userIdentity != 3)){
|
|
|
+ this.handleShowProductType()
|
|
|
+ return
|
|
|
+ }
|
|
|
if ((this.hasLogin && this.userIdentity == 2) || this.userIdentity == 4) {
|
|
|
this.ProductCartNumber()
|
|
|
}
|
|
@@ -928,6 +958,68 @@ export default {
|
|
|
this.$util.msg(error.msg, 2000)
|
|
|
})
|
|
|
},
|
|
|
+ handleShowProductType(){// 根据用户弹窗提示
|
|
|
+ this.modal1 = true
|
|
|
+ if(!this.hasLogin){//游客
|
|
|
+ this.contentModalText1 = '该商品仅限医美类机构查看,请注册医美机构后继续查看。有采美账号的,请直接登录。'
|
|
|
+ this.modalButton1 = [
|
|
|
+ { text: '关闭', type: 'gray',plain: true },
|
|
|
+ { text: '去注册/登录',
|
|
|
+ customStyle: { color: '#fff', bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'},
|
|
|
+ plain: false
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }else{
|
|
|
+ if(this.userIdentity === 4 ){// 普通机构
|
|
|
+ this.contentModalText1 = '该商品仅限医美类机构查看,请升级为医美机构后继续查看。'
|
|
|
+ this.modalButton1 = [
|
|
|
+ { text: '关闭', type: 'gray',plain: true },
|
|
|
+ { text: '去升级',
|
|
|
+ customStyle: { color: '#fff', bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'},
|
|
|
+ plain: false
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }else if( this.userIdentity === 2 ){//会员机构
|
|
|
+ if(this.firstClubType != 1){
|
|
|
+ this.contentModalText1 = '该商品仅限医美类机构查看,您暂无权限。您可去机构资料页面查看机构类型。'
|
|
|
+ this.modalButton1 = [
|
|
|
+ { text: '关闭', type: 'gray',plain: true },
|
|
|
+ { text: '去查看资料',
|
|
|
+ customStyle: { color: '#fff', bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'},
|
|
|
+ plain: false
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ 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>'
|
|
@@ -1551,13 +1643,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
+ wxLogin.wxLoginAuthorize()
|
|
|
// 是否开启图片预览 true 不刷新调用接口 false刷新调用接口
|
|
|
if (!this.isPreviewImage) {
|
|
|
this.initGetStotage()
|
|
|
}
|
|
|
this.isPreviewImage = false
|
|
|
- },
|
|
|
- created() {}
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|