123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227 |
- <!-- 商品详情 -->
- <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
- <home-base :show="false" ><view class="div">
- <scroll-view class="div product-detail-wrapper" v-if="ifLoad" style="height: 2000px;">
- <!-- header -->
- <detail-header @setnav="setnav" :navid="navid"></detail-header>
- <!-- body -->
- <detail-body :isStock="productDetail.goods_storage" @mbBodyposition="getmbBodyposition" @reviewposition="getreviewposition"></detail-body>
- <!-- footer -->
- <detail-footer></detail-footer>
- <!-- 预览图片 -->
- <preview-picture
- :defaultindex="swipeId"
- ></preview-picture>
- <!-- 促销信息 -->
- <promotion-popup
- ></promotion-popup>
- </scroll-view>
- <view class="div pre-load-wrapper" v-else><image mode="aspectFit" src="data:image/gif;base64,R0lGODlh9AF5A+YAAO7u7v7+/u/x9PHz9u/x9e/y9e7w8/P19/P09/j5+vL09/r6+u3t7e/v7/39/fT2+PX2+Pv7/Pn6+/Hz9ff4+v3+/vr7/Pr7+/L09vr6+/v8/fT1+Pb3+fz9/fz8/fX3+fb4+fHy9f39/vP09PX19/7+//v8/P7///T19/X2+fj5+/Lz9vf4+fv7/fDx9fDy9vDz9vn5+/j6+/j4+vb2+ff5+vX3+O7w9O7x9fb4+vLz9+7x9Pb3+vH09u7w9fr6/PT3+fHy9vL19+3v8//+//n5+vDz9fb3+Pz9/u/x8/Lz9fL09fDx9PDy9Pj6+vT29/P1+O3v8vX4+efp6/////Dy9QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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Fp1H37M6FdgVf1h8t+CVQioCYEQVnEggsooWGGDlzy4oISZUAjhhRgioyGEHFriYYEgYiLigiSWaMyJC6ZYyYoAtnjJiwXGKCMxNBZoIyU47qejJTwC6OP/j8IECeCQkxRZ35GVJLnfkkwC4+R+UEoiJXxUUmJlfVhm6cuW9XUZyZfshTnJmPCVaSYvaMKnJiRsmuemJHCyJ+ecutTJ3p2P5BnenpH0ad6fgOIiqHmEOmIod4hComh4jDZqSwUuEODpp6CGKuqopJZqaqmRNtLTqay26iqrOAiRlgGv1mqrqwYUpmkxAUDg66/ABivssMQWa6yxFYy0wbHMNusssw9QwNOyz1ZrbbMbyLDrttx26+234IYr7rjklmvuueimq+667Lbr7rvwxivvvPTWa++9+Oar77789uvvvwBX0sHABBds8MEOJKzwwgw37PDDEEcs8cQUV2zx/8UYZ6zxxhx37PHHIIcs8sgkl1zxCCinrPLKLCdhwMswxyzzzDTXbPPNOOes88489+zzz0AHLfTQRBdt9NFIJ6300jqT4PTTUEcdNQoVVm311VhnrfXWXHft9ddghy322GSXbfbZaKet9tpst+3223DHLffcdNdt991456333nz37fffgAcu+OCEF2744YgnrvjijDfu+OOQRy755JRXbvnlmGeu+eacd+7556CHLvropJdu+umop6766qy37vrrsMcu++y012777bjnrvvuvPfu++/ABy/88MQXb/zxyCev/PLMN+/889BHL/301Fdv/fXYZ6/99tx37/334Icv/v/45Jdv/vnop6/++uy37/778Mcv//z012///fjnr//+/Pfv//8ADKAAB0jAAhrwgAhMoAIXyMAGOvCBEIygBCdIwQpa8IIYzKAGN8jBDnrwgyAMoQhHSMISmvCEKEyhClfIwha68IUwjKEMZ0jDGtrwhjjMoQ53yMMe+vCHQAyiEIdIxCIa8YhITKISl8jEJjrxiVCMohSnSMUqWvGKWMyiFrfIxS568YtgDKMYx0jGMprxjGhMoxrXyMY2uvGNcIyjHOdIxzra8Y54zKMe98jHPvrxj4AMpCAHSchCGvKQiEykIhfJyEY68pGQjKQkJ0nJSlrykpjMpCY3yclOevL/k6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SCn+6QkAMSjwEBXghWLxs5fggf4Oxkkac/P9eTX+2R4ABGkBhZ3gjvPhjxTghzzxcCUO9c/92lH+x80u8E3wgX0O8ojAg20O+Yf+p/zzqBf/vBveWG3xcEkOdUQPPMX/e3vgKy0eKEMPqKjfyUHwlhzhcEQAOQEADLLxwIkPmHYAGgz+DfzvaSr/0hHyWDnmaS0AFMPucrsOyNoAKJnvCRAAgQBFWEhYaHiImKi4yNjo+QkZKTlIYCU5iZmpucnZ6foKGio6Slpqeom1SrrK2urxIvBZMEKSWvuK8dGLOSBQoOucJUMlW9kQQcw8OClf/Oz9DR0tPPl6nX2Nna29zYy8saCoOPgxTfwwEQxo8FBSkB57gRK+OOBC8q8bjN1P3+/wADFrLWraDBgwgTZtKXqwSFAQSOIRoEwQNDYRIUFKg3sYoCCxdfBWABUeIhih1CtuInsKXLlzAHKpxJs6ZNTipFFjkwwJiAn4QUgLCYM5cFCD0L/BQwawAEkEVdiUhwgBCBn+MU5EgZlQrLmGDDiqVE8KbZs2hTdXVVwYSEBBQSZOhwa22uABrexpWgAZ7dVyIiyKhBQcWFDif+fh3LuLHjKmXTSp5MGdPfy5gza361+LHnzwIjVx5Neubm06hTM+wMurVraKJLy56tTbWY7du4Wb/ezdtRbNrAg4/CTbx4Zt29kysn9Fu48+cLjUufrhL58uuvm0PfDpy69+/LrGMf71k79/Okwatfv0o8+fdjzaOfL5m9fe/u4euHKZ++/5v3BWhcfvsVGFB//yWokIAM3kaggRBSg6CCFBbU4IWoPRjhhtVU6CGAGIaImYYclijJhB+miIqILNpFookwNoKiijSOEggAOw==" class="img pre-load"></view>
- <view class="div livebox" v-if="productDetail.live_apply_info" @click="goLive(productDetail.live_apply_info.live_apply_id)"><view class="div icon"><image mode="aspectFit" class="img living" src="../../../static/image/live/on-live.gif"></view>直播中</view>
- </view></home-base>
- </template>
- <script>
- import {getFontSize} from '@/util/common'
- import { urlencode } from '@/util/common'
- import HomeBase from '../HomeBase'
- import DetailHeader from './DetailHeader'
- import DetailBody from './DetailBody'
- import DetailFooter from './DetailFooter'
- import PreviewPicture from './child/PreviewPicture'
- import PromotionPopup from './child/PromotionPopup'
- // import { scoreGet } from '../../api/score'
- import { mapState, mapMutations, mapActions } from 'vuex'
- export default {
- data () {
- return {
- option:{},
- cartNumber: 0,
- productId: '',
- hideFooter: false,
- popupVisible: true,
- currentScore: 0,
- bargain_id: 0,
- ifLoad:false,
- mbBodyposition:0,
- reviewposition:0,
- navid:1,
- scrollTimer : null
- }
- },
- components:{
- HomeBase,
- DetailHeader,
- DetailBody,
- DetailFooter,
- PreviewPicture,
- PromotionPopup
- },
- onShareAppMessage(res) {
- return {
- title: this.productDetail.goods_name,
- path: "/pages/home/goodsdetail/Goodsdetail?"+urlencode(this.option),
- imageUrl:this.productDetail.photos[0]
- }
- },
- onShareTimeline(res) {
- return {
- title: this.productDetail.goods_name,
- path: "/pages/home/goodsdetail/Goodsdetail?"+urlencode(this.option),
- imageUrl:this.productDetail.photos[0]
- }
- },
- onLoad: function (option) {
- this.option=option
- this.productId=option.goods_id ? option.goods_id : ''
- this.bargain_id=option.bargain_id
- let extra = {}
- if (this.bargain_id) {
- extra['bargain_id'] = this.bargain_id
- }
- this.getGoodsDetail({ goods_id: this.productId, token: this.token, extra: extra }).then(res=>{
- this.ifLoad=true
- uni.setNavigationBarTitle({
- title: this.productDetail.goods_name
- })
- }).catch(error => {
- uni.showToast({icon:'none',title: error.message})
- })
- this.saveCartState(false)
- },
- computed: {
- fontSize(){
- return getFontSize()
- },
- ...mapState({
- productDetail: state => state.goodsdetail.detailInfo,
- currentProductId: state => state.goodsdetail.currentProductId,
- token: state => state.member.token,
- swipeId: state => state.goodsdetail.swipeId,
- config: state => state.config.config
- })
- },
- mounted () {
- this.$nextTick(() => {
- })
- },
- onPageScroll(res){
- // if(res.scrollTop > this.reviewposition && res.scrollTop < this.mbBodyposition){
- // this.navid = 2
- // }else if(res.scrollTop > this.mbBodyposition){
- // this.navid = 3
- // }else if(res.scrollTop < this.reviewposition){
- // this.navid = 1
- // }
- const that = this
- if(this.scrollTimer != null){
- clearTimeout(this.scrollTimer);
- }
- this.scrollTimer = setTimeout(()=>{
- let navid = 1
- if(res.scrollTop >= that.mbBodyposition) {
- navid = 3
- }else if(res.scrollTop >= that.reviewposition) {
- navid = 2
- }
- console.log('滚动触发了!')
- that.navid = navid
- }, 100)
- },
- methods: {
- setnav(id){
- let scrollTop = 0
- if(id == '#review'){
- scrollTop = this.reviewposition
- }else if(id == '#mbBody'){
- scrollTop = this.mbBodyposition
- }
- uni.pageScrollTo({
- duration: 300, //过渡时间
- scrollTop: scrollTop
- })
- },
- ...mapMutations({
- saveCartState: 'saveCartState'
- }),
- ...mapActions({
- fetchConfig: 'fetchConfig',
- getGoodsDetail: 'getGoodsDetail'
- }),
- getmbBodyposition(top){
- this.mbBodyposition = top
- console.log(this.mbBodyposition)
- },
- getreviewposition(top){
- this.reviewposition = top
- },
- goLive(live_apply_id){
- uni.navigateTo({ url: '/pages/member/live/LiveDetail'+'?'+urlencode( { 'live_apply_id': live_apply_id } )})
- },
- loadConfig (imgUrl, desc, link) {
- this.fetchConfig().then(
- response => {
- let wechat = response.config['wechat.web']
- // 微信已授权
- if (wechat) {
- this.setWechatConfig(wechat, imgUrl, desc, link)
- }
- },
- error => {}
- )
- },
- setWechatConfig (config, imgUrl, desc, link) {
- this.wxApi.wxRegister(config, '商品详情', imgUrl, desc, link)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .product-detail-wrapper {
- height: 100%;
- width: auto;
- }
- .pre-load-wrapper{position:fixed;top:0;bottom:0;left:0;right:0}
- .pre-load{width:100%;height:100%}
- .livebox {
- position: fixed;
- right: 10px;
- top: 159px;
- width: 56px;
- height: 57px;
- border-radius: 10px;
- border: 1px solid #e5e5e5;
- background: hsla(0,0%,100%,.9);
- z-index: 11;
- display: flex;
- align-items: center;
- text-align: center;
- flex-direction: column;
- font-size:$fontSize;
- color: #000;
- }
- .livebox .icon {
- display: flex;
- align-items: center;
- width: 20px;
- height: 20px;
- background-image: linear-gradient(270deg,#ff4142,#ff4b2b);
- border-radius: 50%;
- margin-bottom: 5px;
- margin-top: 10px;
- }
- .livebox .icon .living {
- margin: 0 auto;
- width: 14px;
- height: 14px;
- }
- </style>
|