[FIX]【商品商城】详情页样式修改、显示文字修改;登录页显示文字修改

This commit is contained in:
yuweiqi
2020-06-29 13:29:14 +08:00
parent 5f872e8358
commit f55b40da0d
4 changed files with 4224 additions and 4147 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="product-store-agreement"> <div class="product-store-agreement">
<iframe :src="src + pdfUrl" class="iframe"></iframe> <iframe :src="src + pdfUrl" class="iframe"></iframe>
<van-button type="danger" @click="goNext" v-no-more-click="1000" size="large">下一步</van-button> <van-button type="danger" @click="goNext" v-no-more-click="1000" size="large" class="bottom-btn">下一步</van-button>
</div> </div>
</template> </template>
@@ -27,7 +27,7 @@ export default {
extra: { extra: {
url: location.origin + `#/productStore/storeList` url: location.origin + `#/productStore/storeList`
}, },
router: '/productStore/storeList' routerInfo: '/productStore/storeList'
}) })
}, },
getShopList() { getShopList() {

View File

@@ -2,8 +2,24 @@
<template> <template>
<div class="login-msg-container"> <div class="login-msg-container">
<div class="p5 pb0"> <div class="p5 pb0">
<van-field v-model="loginInfo.aname" required label="双钱登陆账号:" v-validate="'required'" name="登录账号" placeholder="请输入" clearable /> <van-field
<van-field v-model="loginInfo.password" required label="双钱登陆密码:" v-validate="'required'" name="登录密码" placeholder="请输入" clearable /> v-model="loginInfo.aname"
required
:label="`${name.replace(/商城/, '')}登陆账号:`"
v-validate="'required'"
name="登录账号"
placeholder="请输入"
clearable
/>
<van-field
v-model="loginInfo.password"
required
:label="`${name.replace(/商城/, '')}登陆密码:`"
v-validate="'required'"
name="登录密码"
placeholder="请输入"
clearable
/>
</div> </div>
<van-button type="danger" class="bottom-btn" @click="nextStep" v-no-more-click="1000">确认并转发</van-button> <van-button type="danger" class="bottom-btn" @click="nextStep" v-no-more-click="1000">确认并转发</van-button>
</div> </div>
@@ -27,6 +43,7 @@ export default {
shareId: '', //分享id shareId: '', //分享id
mallId: '', //商城id mallId: '', //商城id
name: '' //商品名称 name: '' //商品名称
// bname: ''
} }
}, },
created() {}, created() {},
@@ -34,10 +51,11 @@ export default {
document.getElementsByTagName('body')[0].classList.add('bg-white') document.getElementsByTagName('body')[0].classList.add('bg-white')
this.mallId = this.$route.query.mallId this.mallId = this.$route.query.mallId
this.name = this.$route.query.name this.name = this.$route.query.name
// this.bname = this.$route.query.name.replace(/商城/, '')
getPassword({ getPassword({
mallId: this.mallId mallId: this.mallId
}).then(res => { }).then(res => {
if(res.result == '0'){ if (res.result == '0') {
this.loginInfo.aname = res.content.userName ? res.content.userName : '' this.loginInfo.aname = res.content.userName ? res.content.userName : ''
this.loginInfo.password = res.content.passWord ? res.content.passWord : '' this.loginInfo.password = res.content.passWord ? res.content.passWord : ''
} }
@@ -88,7 +106,7 @@ export default {
let data = { let data = {
mallId: this.mallId, mallId: this.mallId,
userName: this.loginInfo.aname, userName: this.loginInfo.aname,
passWord: this.loginInfo.password, passWord: this.loginInfo.password
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
saveShareTrack(data).then( saveShareTrack(data).then(
@@ -115,7 +133,7 @@ export default {
div:last-child.van-cell { div:last-child.van-cell {
border-bottom: 1px solid #ebedf0; border-bottom: 1px solid #ebedf0;
} }
/deep/ .van-field__label{ /deep/ .van-field__label {
width: 110px; width: 110px;
} }
} }

View File

@@ -4,15 +4,37 @@
<div v-if="isWeixin"> <div v-if="isWeixin">
<van-notice-bar wrapable :scrollable="false" text="温馨提示:您即将离开本站,访问的链接来源于第三方网站,可能存在风险,请谨慎操作!" /> <van-notice-bar wrapable :scrollable="false" text="温馨提示:您即将离开本站,访问的链接来源于第三方网站,可能存在风险,请谨慎操作!" />
</div> </div>
<div> <div class="img-store">
<img :src="$assetsUrl + detail.imgUrl" alt="" width="100%" /> <div><img :src="$assetsUrl + detail.topImgUrl" alt="" width="100%" /></div>
<div><img :src="$assetsUrl + detail.middleImgUrl" alt="" width="100%" /></div>
<div class="bottom-img">
<img :src="$assetsUrl + detail.footerImgUrl" alt="" width="100%" />
<van-button v-if="isWeixin" type="danger" @click="check" v-no-more-click="1000">查看</van-button>
<van-button v-else type="danger" @click="forward" v-no-more-click="1000">一键转发</van-button>
</div>
</div> </div>
<div class="p5 pb0 mb40" v-if="isWeixin"> <div class="p5 pb0 mb40" v-if="isWeixin">
<van-field v-model="loginInfo.aname" readonly required label="登录账号:" v-validate="'required'" name="登录账号" placeholder="请输入" clearable /> <van-field
<van-field v-model="loginInfo.password" readonly required label="登录密码:" v-validate="'required'" name="登录密码" placeholder="请输入" clearable /> 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>
<van-button v-if="isWeixin" type="danger" class="bottom-btn" @click="check" v-no-more-click="1000">查看</van-button>
<van-button v-else type="danger" class="bottom-btn" @click="forward" v-no-more-click="1000">一键转发</van-button>
</div> </div>
</template> </template>
@@ -30,6 +52,7 @@ export default {
data() { data() {
let isWeixin = this.$utils.device().isWeixin //判断环境 let isWeixin = this.$utils.device().isWeixin //判断环境
return { return {
bgc: '', //
isWeixin, //是否在微信 isWeixin, //是否在微信
mallId: '', //商城id mallId: '', //商城id
shareId: '', //分享id shareId: '', //分享id
@@ -39,14 +62,16 @@ export default {
password: '' password: ''
}, },
detail: { detail: {
imgUrl: '', //商城简介图片地址 topImgUrl: '', //商城简介图片地址
middleImgUrl: '', //商城简介图片地址
footerImgUrl: '', //商城简介图片地址
linkUrl: '', //商城外链地址 linkUrl: '', //商城外链地址
name: '' //商城名称 name: '', //商城名称
color: '' //背景色
} }
} }
}, },
created() { created() {
document.getElementsByTagName('body')[0].classList.add('bg-white')
if (!this.isWeixin) { if (!this.isWeixin) {
setTimeout(() => { setTimeout(() => {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
@@ -69,30 +94,40 @@ export default {
this.name = decodeURI(this.$route.query.name) this.name = decodeURI(this.$route.query.name)
this.saveShareTrack({ id: this.shareId, mallId: this.mallId }) this.saveShareTrack({ id: this.shareId, mallId: this.mallId })
} }
this.getShopList({ id: this.mallId })
}, },
mounted() { async mounted() {
await this.getShopList({ id: this.mallId })
window['appCallBack'] = this.appCallBack window['appCallBack'] = this.appCallBack
document.getElementsByTagName('body')[0].style.backgroundColor = this.detail.color
this.bgc = document.getElementsByTagName('body')[0].style.backgroundColor
}, },
destroyed() { destroyed() {
document.getElementsByTagName('body')[0].classList.remove('bg-white') // document.getElementsByTagName('body')[0].classList.remove('bg-white')
document.getElementsByTagName('body')[0].style.backgroundColor = this.bgc
}, },
methods: { methods: {
//获取商城详情 //获取商城详情
getShopList(data) { getShopList(data) {
getShopList(data).then(res => { return new Promise((resolve, reject) => {
this.$toast.clear() getShopList(data).then(
if (res.result == '0') { res => {
this.detail = res.content[0] this.$toast.clear()
this.isCanCheck = false if (res.result == '0') {
} else { this.detail = res.content[0]
this.$toast(res.resultMessage) this.isCanCheck = false
} resolve()
} else {
reject(this.$toast(res.resultMessage))
}
},
error => {
reject(this.$toast(error))
}
)
}) })
}, },
//查看 //查看
check() { check() {
//TODO
window.location.href = this.detail.linkUrl window.location.href = this.detail.linkUrl
}, },
//一键转发 //一键转发
@@ -137,4 +172,27 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.store-detail-container {
/deep/.van-field__label {
width: 40%;
}
.img-store {
height: 100%;
img {
display: block;
}
/deep/.van-button {
width: 100%;
}
.bottom-img {
display: block;
position: fixed;
left: 0;
bottom: 0;
width: 100%;
z-index: 999;
}
}
}
</style> </style>