|
@@ -20,7 +20,8 @@ import {
|
|
|
Badge,
|
|
|
Toast,
|
|
|
Popup,
|
|
|
- SubmitBar
|
|
|
+ SubmitBar,
|
|
|
+ Card
|
|
|
} from 'vant'
|
|
|
import { defineComponent } from 'vue'
|
|
|
import styles from './index.module.less'
|
|
@@ -47,7 +48,7 @@ export default defineComponent({
|
|
|
selectGoodsItem: {},
|
|
|
cartCount: 0,
|
|
|
showType: 'cart',
|
|
|
- shareShow: false, // 分享弹窗
|
|
|
+ shareShow: false // 分享弹窗
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -93,9 +94,10 @@ export default defineComponent({
|
|
|
return 0
|
|
|
},
|
|
|
|
|
|
- shareUrl(){ // 分享链接
|
|
|
+ shareUrl() {
|
|
|
+ // 分享链接
|
|
|
const productId = this.product.id as any
|
|
|
- if (browser().isApp){
|
|
|
+ if (browser().isApp) {
|
|
|
return `${location.origin}/teacher/#/shareMall?bizId=${productId}&userId=${state.user.data.userId}`
|
|
|
} else {
|
|
|
return `${location.origin}/teacher.html#/shareMall?bizId=${productId}&userId=${state.user.data.userId}`
|
|
@@ -103,7 +105,6 @@ export default defineComponent({
|
|
|
}
|
|
|
},
|
|
|
async mounted() {
|
|
|
-
|
|
|
try {
|
|
|
this.loading = true
|
|
|
const res = await request.get(
|
|
@@ -191,7 +192,7 @@ export default defineComponent({
|
|
|
this.cartCount = data.length
|
|
|
}
|
|
|
} catch (err) {}
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
render() {
|
|
|
const product = this.product
|
|
@@ -201,7 +202,8 @@ export default defineComponent({
|
|
|
<ColHeader
|
|
|
v-slots={{
|
|
|
right: () => {
|
|
|
- if (state.platformType === 'TEACHER') {
|
|
|
+ console.log(state.platformType)
|
|
|
+ if (state.platformType === 'STUDENT') {
|
|
|
return (
|
|
|
<div
|
|
|
class={styles.shareBtn}
|
|
@@ -385,8 +387,16 @@ export default defineComponent({
|
|
|
/>
|
|
|
</Popup>
|
|
|
|
|
|
- <Popup style={{background: 'transparent'}} show={this.shareShow} onClose={() => (this.shareShow = false)}>
|
|
|
- <ColShare shareUrl={this.shareUrl} teacherId={state.user.data.userId} shareType="mall">
|
|
|
+ <Popup
|
|
|
+ style={{ background: 'transparent' }}
|
|
|
+ show={this.shareShow}
|
|
|
+ onClose={() => (this.shareShow = false)}
|
|
|
+ >
|
|
|
+ <ColShare
|
|
|
+ shareUrl={this.shareUrl}
|
|
|
+ teacherId={state.user.data.userId}
|
|
|
+ shareType="mall"
|
|
|
+ >
|
|
|
<div class={styles.shareWrap}>
|
|
|
<div class={styles.shareLeft}>
|
|
|
<img crossorigin="anonymous" class={styles.sharePic} src={this.product.pic}></img>
|
|
@@ -400,11 +410,14 @@ export default defineComponent({
|
|
|
<span class={styles.shareShopPrice}>
|
|
|
{moneyFormat(this.getPrice)}
|
|
|
</span>
|
|
|
- {/* <del class={styles.shareShopOldPrice}>
|
|
|
- {moneyFormat(product.originalPrice)}
|
|
|
- </del> */}
|
|
|
</div>
|
|
|
</div>
|
|
|
+ {/* <Card
|
|
|
+ price={this.getPrice}
|
|
|
+ desc={selectSku.sku}
|
|
|
+ title={this.product.name}
|
|
|
+ thumb={this.product.pic}
|
|
|
+ /> */}
|
|
|
</div>
|
|
|
</ColShare>
|
|
|
</Popup>
|