| | |
| | | <image src="@/static/ic_img@2x.png" mode="widthFix" @click="openImg(index)"></image> |
| | | <image src="@/static/ic_copy@2x.png" mode="widthFix" @click="copyItem(item)"></image> |
| | | <image src="@/static/ic_delete@2x.png" mode="widthFix" @click="deleItem(index)"></image> |
| | | <image src="@/static/ic_pk2@2x.png" mode="widthFix" @click="clickItem(-1, item.categoryId, item.categoryName,2,item)"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | class="productCategory_list_item" |
| | | v-for="(item, index) in category" |
| | | :key="index" |
| | | @click="clickItem(index, item.id, item.name)"> |
| | | @click="clickItem(index, item.id, item.name,1)"> |
| | | <image :src="item.imgurl ? item.prefixUrl + item.imgurl : ''" mode="widthFix"></image> |
| | | <text>{{item.name}}</text> |
| | | <text :style="{'font-size': !configuration || !configuration.listname?'16px':((configuration.listname.fontSize||16) +'px'),color: !configuration || !configuration.listname? '#ffffff' : configuration.listname.selType === 1 ? percentage(configuration.listname.selColor, configuration.listname.selAlpha) : '#ffffff'}">{{item.name}}</text> |
| | | </view> |
| | | <view class="productCategory_list_zw"></view> |
| | | <view class="productCategory_list_zw"></view> |
| | |
| | | <view class="productPage_shop_item_img"> |
| | | <image :src="item.imgurl ? item.prefixUrl + item.imgurl : ''" mode="widthFix"></image> |
| | | </view> |
| | | <text>{{item.name}}</text> |
| | | <text :style="{'font-size': !configuration || !configuration.listproname ?'16px':((configuration.listproname.fontSize||16) +'px'),color: !configuration || !configuration.listproname ? '#ffffff' : configuration.listproname.selType === 1 ? percentage(configuration.listproname.selColor, configuration.listproname.selAlpha) : '#ffffff',color: !configuration ||!configuration.listproname ? '#ffffff' : configuration.listproname.selType === 1 ? percentage(configuration.listproname.selColor, configuration.listproname.selAlpha) : '#ffffff'}">{{item.name}}</text> |
| | | </view> |
| | | <view class="productPage_shop_zw"></view> |
| | | <view class="productPage_shop_zw"></view> |
| | |
| | | import search from '@/components/search.vue' |
| | | import searchShopList from '@/components/searchShopList.vue' |
| | | import { categoryList, goodsList, brandList, h5Image, logout, getByLoginNew, listForH5 } from '@/apis/index.js' |
| | | import { ANCHOR_PAGE_V3, getAnchorHomePath, normalizeAnchorPageVersion } from '@/utils/anchorHome.js' |
| | | import { mapState } from 'vuex' |
| | | export default { |
| | | data() { |
| | | return { |
| | | status: 0, // 0首页 1商品列表 2pk页 |
| | | |
| | | backPageNum:1,//返回页数 |
| | | img: '', |
| | | |
| | | opacity: 1, |
| | |
| | | zdj: 0, |
| | | |
| | | select: [], // 已选 |
| | | configuration: null, |
| | | bgImg: '', |
| | | topImg: '', |
| | | pkImg: '', |
| | |
| | | onLoad() { |
| | | getByLoginNew({}) |
| | | .then(res => { |
| | | if (!res.data) { |
| | | const data = (res && res.data) || res |
| | | if (!data) { |
| | | return |
| | | } |
| | | this.configuration = JSON.parse(res.data.newParam) |
| | | const version = normalizeAnchorPageVersion(data.anchorPageVersion) |
| | | if (version === ANCHOR_PAGE_V3) { |
| | | uni.redirectTo({ url: getAnchorHomePath(version) }) |
| | | return |
| | | } |
| | | const paramStr = data.newParam |
| | | if (!paramStr) { |
| | | return |
| | | } |
| | | this.configuration = JSON.parse(paramStr) |
| | | this.fontColor = this.configuration.pull.selType === 1 ? this.percentage(this.configuration.pull.selColor, this.configuration.pull.selAlpha) : 'rgba(255, 220, 108, 1)' |
| | | if (this.configuration.bgImg.type === 0) { |
| | | this.bgImg = require('@/static/mb.png') |
| | |
| | | } else { |
| | | this.pkImg = this.configuration.pkImg.imgurl |
| | | } |
| | | console.log(this.configuration.listname) |
| | | }) |
| | | var that = this |
| | | // 监听键盘组合键 |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | jumpPKNew(){ |
| | | this.status = 1 |
| | | }, |
| | | aaa(index) { |
| | | this.fontColorIndex = index |
| | | }, |
| | |
| | | if (this.status === 0) return |
| | | this.$refs.search.close() |
| | | this.$refs.searchShopListRef.close() |
| | | this.status = this.status - 1 |
| | | this.status = this.status -(this.backPageNum>0?this.backPageNum:1) |
| | | if (this.status === 0) { |
| | | this.leftShop = {} |
| | | this.rightShop = {} |
| | |
| | | }, |
| | | // 点击加入pk商品 |
| | | openSearch(type) { |
| | | if (type === 'left') { |
| | | this.$refs.search.open(type) |
| | | /* if (type === 'left') { |
| | | this.$refs.search.open('left') |
| | | } else if (type === 'right') { |
| | | this.$refs.search.open('right') |
| | | } |
| | | } */ |
| | | }, |
| | | // 点击商品列表页面查询 |
| | | clickShopPageCheck(item, type) { |
| | |
| | | this.$forceUpdate() |
| | | }, |
| | | // 点击类别 |
| | | clickItem(index, id, name) { |
| | | clickItem(index, id, name,status,proItem) { |
| | | this.categoryId = id |
| | | this.categoryName = name |
| | | this.isSOU = false |
| | |
| | | }) |
| | | |
| | | this.category.forEach((item, num) => { |
| | | if (index === num) { |
| | | if (item.id === id) { |
| | | item.active = true |
| | | |
| | | this.attrSecondList = [] |
| | |
| | | this.shopPageData = this.shopData.filter(item => { |
| | | return item.categoryId === id |
| | | }) |
| | | if(status ==2){ |
| | | this.leftShop=proItem |
| | | this.backPageNum =2 |
| | | }else{ |
| | | this.backPageNum=1 |
| | | } |
| | | console.log(this.shopPageData) |
| | | // this.shopData.forEach(item => { |
| | | // if (item.categoryId === id) { |
| | |
| | | id: '', |
| | | name: '' |
| | | }, |
| | | this.status = 1 |
| | | this.status = status || 1 |
| | | }, |
| | | mousemove(e) { |
| | | if (e === this.index) return |