商品商城优化

This commit is contained in:
mengxiaolong
2020-09-08 14:13:09 +08:00
parent 158d477385
commit 35a49b2461
2 changed files with 49 additions and 47 deletions

View File

@@ -77,7 +77,7 @@ export default {
share() {
let url =
location.origin +
'/#/productStore/storeDetail?token=' +
`/#/productStore/storeDetail/${this.mallId}/商城?token=` +
localStorage.getItem('token') +
'&aname=' +
encodeURI(this.loginInfo.aname) +

View File

@@ -4,50 +4,54 @@
<div v-if="isWeixin">
<van-notice-bar wrapable :scrollable="false" text="温馨提示:您即将离开本站,访问的链接来源于第三方网站,可能存在风险,请谨慎操作!" />
</div>
<!-- <div class="img-store clearfix" ref="imgContainer">
<div v-if="!isWeixin"><img v-if="loaded" :src="$assetsUrl + detail.topImgUrl" alt="" width="100%" /></div>
<div v-if="!isWeixin">
<img v-if="loaded" @load="imageLoaded($event)" :src="$assetsUrl + detail.middleImgUrl" alt="" width="100%" />
<div class="mindle-img" :style="{ 'background-color': detail.color }" ref="fillContent"></div>
</div>
<div v-if="mallId === '1'">
<div class="img-store clearfix" ref="imgContainer">
<div v-if="!isWeixin"><img v-if="loaded" :src="$assetsUrl + detail.topImgUrl" alt="" width="100%" /></div>
<div v-if="!isWeixin">
<img v-if="loaded" @load="imageLoaded($event)" :src="$assetsUrl + detail.middleImgUrl" alt="" width="100%" />
<div class="mindle-img" :style="{ 'background-color': detail.color }" ref="fillContent"></div>
</div>
<div class="bottom-img">
<img v-if="loaded && !isWeixin" :src="$assetsUrl + detail.footerImgUrl" alt="" width="100%" />
<div v-if="isWeixin">
<van-field
v-model="loginInfo.aname"
readonly
required
:label="`${detail.name.replace(/商城/, '')}特约账号:`"
v-validate="'required'"
name="特约账号"
placeholder="请输入"
clearable
/>
<van-field
v-model="loginInfo.password"
readonly
required
:label="`${detail.name.replace(/商城/, '')}特约账号密码:`"
v-validate="'required'"
name="特约账号密码"
placeholder="请输入"
clearable
/>
</div>
<div v-if="isWeixin" class="buttonGrounp">
<van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14">
<van-radio name="1">
<span @click.stop="enterProtocol">国富客户权益卡简介</span>
</van-radio>
</van-radio-group>
<van-button v-if="isWeixin" :disabled="!isCanCheck1 || !isCanCheck2" class="btn-bottom" type="danger" @click="check" v-no-more-click="1000"
>查看</van-button
>
<div class="bottom-img">
<img v-if="loaded && !isWeixin" :src="$assetsUrl + detail.footerImgUrl" alt="" width="100%" />
<div v-if="isWeixin">
<van-field
v-model="loginInfo.aname"
readonly
required
:label="`${detail.name.replace(/商城/, '')}特约账号:`"
v-validate="'required'"
name="特约账号"
placeholder="请输入"
clearable
/>
<van-field
v-model="loginInfo.password"
readonly
required
:label="`${detail.name.replace(/商城/, '')}特约账号密码:`"
v-validate="'required'"
name="特约账号密码"
placeholder="请输入"
clearable
/>
</div>
<div v-if="isWeixin" class="buttonGrounp">
<van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14">
<van-radio name="1">
<span @click.stop="enterProtocol">国富客户权益卡简介</span>
</van-radio>
</van-radio-group>
<van-button v-if="isWeixin" :disabled="!isCanCheck1 || !isCanCheck2" class="btn-bottom" type="danger" @click="check" v-no-more-click="1000"
>查看</van-button
>
</div>
</div>
</div>
</div> -->
<img id="detailImg" v-if="detailImg" :src="$assetsUrl + detailImg" alt="" />
</div>
<div v-else>
<img id="detailImg" v-if="detailImg" :src="$assetsUrl + detailImg" />
</div>
<van-button class="bottom-btn" v-if="isWeixin && bottomBtnShow" type="danger" @click="forward" v-no-more-click="1000">查看</van-button>
<van-button class="bottom-btn" v-if="!isWeixin && bottomBtnShow" type="danger" @click="forward" v-no-more-click="1000">一键转发</van-button>
<!-- <van-popup v-model="pdfPop" closeable position="bottom">
@@ -148,7 +152,6 @@ export default {
async getShopList(data) {
try {
const res = await getShopList(data)
console.dir(res)
if (!res) return
if (res.result == '0') {
if (res.content.rightBtnShow && !this.isWeixin) {
@@ -164,10 +167,10 @@ export default {
}
this.detailImg = res.content.detailImgUrl
this.bottomBtnShow = res.content.bottomBtnShow
// this.detail = res.content[0]
// this.pdfUrl = this.$assetsUrl + res.content[0].pdfUrl
this.detail = res.content
this.pdfUrl = this.$assetsUrl + res.content.pdfUrl
this.loaded = true
// this.isCanCheck2 = true
this.isCanCheck2 = true
} else {
this.$toast(res.resultMessage)
}
@@ -241,7 +244,6 @@ export default {
<style lang="scss" scoped>
#detailImg {
max-width: 100vw;
margin-bottom: 40px;
}
.store-detail-container {