| | |
| | | <view class="pagetopBar-container colCen"> |
| | | <view class="topbarbox"></view> |
| | | </view> |
| | | <view class="currentbox rowCenCen" v-if="optionsInfo.imageList || pageInfo.showImgs"> |
| | | <view>{{currentIndex+1}}/{{pageType=='jd'?optionsInfo.imgs.length:pageInfo.showImgs.length}}</view> |
| | | <view class="currentbox rowCenCen" v-if="pageInfo.imgs&&pageInfo.imgs.length>0"> |
| | | <view>{{currentIndex+1}}/{{pageInfo.imgs.length}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | if(!getApp().globalData.hasinit) |
| | | { |
| | | console.log("初始化") |
| | | getApp().getAppInfo(); |
| | | } |
| | | //console.log("2222222222222222-"+getApp().globalData.hasbcinit); |
| | | if(!getApp().globalData.hasbcinit) |
| | | { |
| | | getApp().bcInit(); |
| | |
| | | this.frompage=options.frompage; |
| | | } |
| | | if (options.id) { |
| | | |
| | | this.optionsInfo.goodsId = options.id |
| | | this.pageType = this.optionsInfo.sourceType ? this.optionsInfo.sourceType : 'tb'; |
| | | this.faction = this.optionsInfo.faction ? this.optionsInfo.faction : 't'; |
| | | } else { |
| | | this.optionsInfo = JSON.parse(options.info); |
| | | console.log(this.optionsInfo); |
| | | this.pageInfo = JSON.parse(options.info); |
| | | this.pageType = this.optionsInfo.sourceType; |
| | | if (!this.optionsInfo.faction) { |
| | |
| | | } else if (this.pageType == 'wph') { |
| | | |
| | | } |
| | | else if(this.pageType=='dy') |
| | | { |
| | | //this.optionsInfo.imgs=[] |
| | | } |
| | | }, |
| | | methods: { |
| | | closeMdl() { |
| | |
| | | goodsId: this.optionsInfo.goodsId, |
| | | goods: JSON.stringify(this.optionsInfo) |
| | | }).then(e => { |
| | | console.log(e); |
| | | var res = e.data.detailPics; |
| | | this.JdDetails = that.JdDetails.concat(res) |
| | | that.$forceUpdate() |
| | |
| | | this.$u.api.getGoodsDetail({ |
| | | goodsId: this.optionsInfo.goodsId |
| | | }).then(e => { |
| | | console.log(e) |
| | | if (e.code != 0) return that.$alert(e.msg) |
| | | var res = e.data.info; |
| | | this.pageInfo = res |
| | | this.pageInfo.showImgs = [] |
| | | console.log(this.pageInfo) |
| | | this.pageInfo.imgs.map(items => { |
| | | var a = {} |
| | | a.url = items |
| | | this.pageInfo.showImgs.push(a) |
| | | }) |
| | | this.optionsInfo = res |
| | | console.log(this.pageInfo); |
| | | }).catch(function(err) {}) |
| | | } else if (this.faction == 'p') { |
| | | var that = this; |
| | |
| | | a.url = items |
| | | this.pageInfo.showImgs.push(a) |
| | | }) |
| | | console.log(this.pageInfo); |
| | | }) |
| | | }else if(this.faction == 'd'){ |
| | | |
| | | var that = this; |
| | | console.log(this.optionsInfo.goodsId); |
| | | var that = this; |
| | | this.$u.api.getDyGoodsDetail({ |
| | | goodsId: this.optionsInfo.goodsId |
| | | }).then(e => { |
| | |
| | | }, |
| | | |
| | | updataUser() { |
| | | console.log('更新') |
| | | var that = this; |
| | | this.$u.api.getUserInfo({}).then(e => { |
| | | utils.setCache('userInfo', e.data.userinfo) |
| | | that.user = e.data.userinfo; |
| | | console.log(that.user) |
| | | }).catch(function(err) {}) |
| | | }, |
| | | |
| | |
| | | goodsId: this.optionsInfo.goodsId, |
| | | type: 0 |
| | | }).then(e => { |
| | | console.log(e) |
| | | if (e.code != 0) return that.$alert(e.msg) |
| | | if(that.frompage=='freebuy') |
| | | {//0元购的记录商品id |