|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <view class="content">
|
|
|
+ <view class="content" :class="hasShopiing?'bg-1':'bg-0'">
|
|
|
<!-- 头部栏 -->
|
|
|
<view class="header-box">
|
|
|
<UniStatusBar></UniStatusBar>
|
|
@@ -11,95 +11,129 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="cbody">
|
|
|
- <view class="body-box bg-blue">
|
|
|
- <!-- 滚动区域 -->
|
|
|
- <view class="scroll-list">
|
|
|
- <scrollBox v-if="list.length&&!hasRedPacket" :list="list"></scrollBox>
|
|
|
- <scrollBox v-if="slist.length&&hasRedPacket" :list="slist"></scrollBox>
|
|
|
- </view>
|
|
|
- <!-- 保证金 -->
|
|
|
- <view class="notices flex align_center" v-if="bondRecord" @click="toPayBondAmount">
|
|
|
- <view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 您有一笔保证金待支付 ¥{{bondRecord.bondAmount}}</view>
|
|
|
- <!-- <text class="text">立即支付>></text> -->
|
|
|
- </view>
|
|
|
- <!-- 待取货提醒 -->
|
|
|
- <view class="notices flex align_center" v-if="!bondRecord&&orderTodo" @click="toOrder">
|
|
|
- <view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 您有待取货的货架订单哦!</view> <text class="text">立即处理>></text>
|
|
|
- </view>
|
|
|
- <!-- 门店审核不通过 -->
|
|
|
- <view class="notices flex justify_between" v-if="storeApply&&storeApply.auditStatus=='REFUSE'&&storeApply.readFlag=='0'">
|
|
|
- <view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 门店认证资料审核不通过,请重新提交审核!</view> <text class="text" @click="toKnow">知道了</text>
|
|
|
- </view>
|
|
|
- <!-- 名片 -->
|
|
|
- <view class="userCard flex align_center justify_between">
|
|
|
- <view class="userCard-info flex align_center">
|
|
|
- <view>
|
|
|
- <u-image shape='circle' v-if="!hasLogin" src="/static/def_personal_avatar.png" width="90" height="90"></u-image>
|
|
|
- <u-image shape='circle' v-else :src="avatarUrl||'/static/def_personal_avatar.png'" width="90" height="90"></u-image>
|
|
|
- </view>
|
|
|
- <view class="user-info" @click="toUser">
|
|
|
- <view v-if="!hasLogin" style="font-size: 40rpx;">
|
|
|
- 请点击登录
|
|
|
+ <view :class="hasShopiing?'shopping bg-blue':'body-box bg-blue'">
|
|
|
+ <!-- 滚动区域 -->
|
|
|
+ <view class="scroll-list" v-if="!hasShopiing">
|
|
|
+ <scrollBox v-if="list.length&&!hasRedPacket" :list="list"></scrollBox>
|
|
|
+ <scrollBox v-if="slist.length&&hasRedPacket" :list="slist"></scrollBox>
|
|
|
+ </view>
|
|
|
+ <!-- 保证金 -->
|
|
|
+ <view class="notices flex align_center" v-if="bondRecord" @click="toPayBondAmount">
|
|
|
+ <view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 您有一笔保证金待支付 ¥{{bondRecord.bondAmount}}</view>
|
|
|
+ <!-- <text class="text">立即支付>></text> -->
|
|
|
+ </view>
|
|
|
+ <!-- 待取货提醒 -->
|
|
|
+ <view class="notices flex align_center" v-if="!bondRecord&&orderTodo" @click="toOrder">
|
|
|
+ <view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 您有待取货的货架订单哦!</view> <text class="text">立即处理>></text>
|
|
|
+ </view>
|
|
|
+ <!-- 门店审核不通过 -->
|
|
|
+ <view class="notices flex justify_between" v-if="storeApply&&storeApply.auditStatus=='REFUSE'&&storeApply.readFlag=='0'">
|
|
|
+ <view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 门店认证资料审核不通过,请重新提交审核!</view> <text class="text" @click="toKnow">知道了</text>
|
|
|
+ </view>
|
|
|
+ <!-- 名片 -->
|
|
|
+ <view class="userCard flex align_center justify_between" v-if="!hasShopiing">
|
|
|
+ <view class="userCard-info flex align_center">
|
|
|
+ <view>
|
|
|
+ <u-image shape='circle' v-if="!hasLogin" src="/static/def_personal_avatar.png" width="90" height="90"></u-image>
|
|
|
+ <u-image shape='circle' v-else :src="avatarUrl||'/static/def_personal_avatar.png'" width="90" height="90"></u-image>
|
|
|
</view>
|
|
|
- <view v-else>
|
|
|
- <view class="user-name">{{userInfo.userNameCN || userInfo.mobile}}</view>
|
|
|
- <view v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'">
|
|
|
- <u-tag text="个人用户" mode="dark" type="warning" shape="circle" size="mini" />
|
|
|
+ <view class="user-info" @click="toUser">
|
|
|
+ <view v-if="!hasLogin" style="font-size: 40rpx;">
|
|
|
+ 请点击登录
|
|
|
+ </view>
|
|
|
+ <view v-else>
|
|
|
+ <view class="user-name">{{userInfo.userNameCN || userInfo.mobile}}</view>
|
|
|
+ <view v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'">
|
|
|
+ <u-tag text="个人用户" mode="dark" type="warning" shape="circle" size="mini" />
|
|
|
+ </view>
|
|
|
+ <view v-else>{{userInfo.orgName}}</view>
|
|
|
</view>
|
|
|
- <view v-else>{{userInfo.orgName}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view @click="toUser">
|
|
|
+ <text v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'" class="user-rz">
|
|
|
+ {{storeApply&&storeApply.auditStatus=='WAIT'?'认证门店审核中':'认证成为门店'}}
|
|
|
+ </text>
|
|
|
+ <u-icon name="arrow-right"></u-icon>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view @click="toUser">
|
|
|
- <text v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'" class="user-rz">
|
|
|
- {{storeApply&&storeApply.auditStatus=='WAIT'?'认证门店审核中':'认证成为门店'}}
|
|
|
- </text>
|
|
|
- <u-icon name="arrow-right"></u-icon>
|
|
|
+ <!-- 搜索 -->
|
|
|
+ <view class="search-head" v-if="hasShopiing">
|
|
|
+ <uni-search-bar radius="100" placeholder="请输入产品名称/轮胎规格" clearButton="auto" cancelButton="none" @confirm="toSearch"/>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="body-box">
|
|
|
- <!-- 扫描按钮 -->
|
|
|
- <view class="action-button flex" v-if="userInfo.sysUserFlag == '1'">
|
|
|
- <view class="f1" @click="openTakeGood(1)">
|
|
|
- <view class="icons"><u-icon name="bianmachaxun" custom-prefix="custom-icon"></u-icon></view>
|
|
|
- <view class="tits">产品编码取货</view>
|
|
|
+ <view :class="hasShopiing?'body-box1':'body-box'">
|
|
|
+ <!-- 扫描按钮 -->
|
|
|
+ <view class="action-button flex" v-if="userInfo.sysUserFlag == '1'&&!hasShopiing">
|
|
|
+ <view class="f1" @click="openTakeGood(1)">
|
|
|
+ <view class="icons"><u-icon name="bianmachaxun" custom-prefix="custom-icon"></u-icon></view>
|
|
|
+ <view class="tits">产品编码取货</view>
|
|
|
+ </view>
|
|
|
+ <view class="f2" @click="openTakeGood(0)">
|
|
|
+ <view class="icons"><u-icon name="saoma" custom-prefix="custom-icon"></u-icon></view>
|
|
|
+ <view class="tits">二维码/条形码取货</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="f2" @click="openTakeGood(0)">
|
|
|
- <view class="icons"><u-icon name="saoma" custom-prefix="custom-icon"></u-icon></view>
|
|
|
- <view class="tits">二维码/条形码取货</view>
|
|
|
+ <!-- banner -->
|
|
|
+ <view class="banner">
|
|
|
+ <u-swiper mode="dot" bg-color="" img-mode="widthFix" @click="clickBanner" :interval="3000" :height="hasShopiing?280:374" :list="imgList"></u-swiper>
|
|
|
+ </view>
|
|
|
+ <!-- 快捷导航 -->
|
|
|
+ <view class="quick-nav pa-box" v-if="hasShopiing">
|
|
|
+ <iconItemsList :list="navList" @callback="onNavFun"></iconItemsList>
|
|
|
+ </view>
|
|
|
+ <!-- 产品分类 -->
|
|
|
+ <view class="ptype-nav pa-box" v-if="hasShopiing">
|
|
|
+ <swiper class="swiper" @change="e=>{currentPtypeDot=e.detail.current}">
|
|
|
+ <swiper-item v-for="(item, idx) in productTypeList" :index="idx" :key="item.id">
|
|
|
+ <iconItemsList :list="item.list" type="img" @callback="onNavFun"></iconItemsList>
|
|
|
+ </swiper-item>
|
|
|
+ </swiper>
|
|
|
+ <view class="indicator-dots">
|
|
|
+ <view v-for="(item,idx) in productTypeList" :key="idx" :class="currentPtypeDot==idx?'indicator-dots-active':''" ></view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 产品列表 -->
|
|
|
+ <view class="product-box" v-if="hasShopiing">
|
|
|
+ <u-divider bg-color="">热门推荐</u-divider>
|
|
|
+ <view class="product-list">
|
|
|
+ <!-- 产品列表 -->
|
|
|
+ <productItem
|
|
|
+ v-for="(item,index) in productList"
|
|
|
+ :key="index"
|
|
|
+ :list="item"
|
|
|
+ :index="index"
|
|
|
+ :itemWidth="(screenWidth-30)*0.5"
|
|
|
+ :gap="10"
|
|
|
+ ></productItem>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- banner -->
|
|
|
- <view style="margin-top: 20upx;">
|
|
|
- <u-swiper mode="dot" bg-color="" img-mode="widthFix" @click="clickBanner" :interval="3000" :height="374" :list="imgList"></u-swiper>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <!-- 扫描记录 -->
|
|
|
- <view class="list-box">
|
|
|
<!-- 扫描记录 -->
|
|
|
- <u-cell-group :border="false">
|
|
|
- <u-cell-item title="VIN查询历史" @click="toAllRecord" :title-style="{fontSize:'1em'}" value="全部">
|
|
|
- <u-icon slot="icon" size="38" color="#066cff" style="margin-right: 0.3em;" name="order"></u-icon>
|
|
|
- </u-cell-item>
|
|
|
- </u-cell-group>
|
|
|
- <u-cell-group :border="false" v-if="hasLogin">
|
|
|
- <u-cell-item v-for="item in vinList"
|
|
|
- @click="toChoosePart(item)"
|
|
|
- :key="item.id"
|
|
|
- :title="item.vinCode"
|
|
|
- :title-style="{fontSize:'1em'}"
|
|
|
- :label="userInfo&&userInfo.sysUserFlag == '0' ? item.createDate : (item.brandName +' '+item.modelName)">
|
|
|
- <text slot="icon"></text>
|
|
|
- </u-cell-item>
|
|
|
- <view style="padding: 20upx;">
|
|
|
- <u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="vinList.length==0 && status!='loading'" mode="list"></u-empty>
|
|
|
- <u-loadmore v-if="status=='loading'" :status="status" />
|
|
|
- </view>
|
|
|
- </u-cell-group>
|
|
|
- <view class="des" v-if="vinList.length&&hasLogin">仅展示最近5条记录,点击“全部”查看更多</view>
|
|
|
- <view class="des" v-if="!hasLogin">请登录后查看历史记录</view>
|
|
|
- </view>
|
|
|
+ <view class="list-box" v-if="!hasShopiing">
|
|
|
+ <!-- 扫描记录 -->
|
|
|
+ <u-cell-group :border="false">
|
|
|
+ <u-cell-item title="VIN查询历史" @click="toAllRecord" :title-style="{fontSize:'1em'}" value="全部">
|
|
|
+ <u-icon slot="icon" size="38" color="#066cff" style="margin-right: 0.3em;" name="order"></u-icon>
|
|
|
+ </u-cell-item>
|
|
|
+ </u-cell-group>
|
|
|
+ <u-cell-group :border="false" v-if="hasLogin">
|
|
|
+ <u-cell-item v-for="item in vinList"
|
|
|
+ @click="toChoosePart(item)"
|
|
|
+ :key="item.id"
|
|
|
+ :title="item.vinCode"
|
|
|
+ :title-style="{fontSize:'1em'}"
|
|
|
+ :label="userInfo&&userInfo.sysUserFlag == '0' ? item.createDate : (item.brandName +' '+item.modelName)">
|
|
|
+ <text slot="icon"></text>
|
|
|
+ </u-cell-item>
|
|
|
+ <view style="padding: 20upx;">
|
|
|
+ <u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="vinList.length==0 && status!='loading'" mode="list"></u-empty>
|
|
|
+ <u-loadmore v-if="status=='loading'" :status="status" />
|
|
|
+ </view>
|
|
|
+ </u-cell-group>
|
|
|
+ <view class="des" v-if="vinList.length&&hasLogin">仅展示最近5条记录,点击“全部”查看更多</view>
|
|
|
+ <view class="des" v-if="!hasLogin">请登录后查看历史记录</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- tab栏 -->
|
|
@@ -114,6 +148,8 @@
|
|
|
} from 'vuex'
|
|
|
import scrollBox from '@/components/scrollBox.vue'
|
|
|
import UniStatusBar from '@/components/uni-status-bar/uni-status-bar.vue'
|
|
|
+ import iconItemsList from '@/components/icon-items-list/icon-items-list.vue'
|
|
|
+ import productItem from './productItem.vue'
|
|
|
import { shelfBondRecordWaitPayRecord, findStoreShelf, shelfGetTotalWaitQty, getProductfindByScanCode, queryQplsConfig } from '@/api/shelf.js'
|
|
|
import { xprhStoreApplyRead } from '@/api/xprh.js'
|
|
|
import { findCurrentRewardRule } from '@/api/rewardRule.js'
|
|
@@ -124,13 +160,17 @@
|
|
|
import { openWebView } from "@/utils/index.js"
|
|
|
export default {
|
|
|
components: {
|
|
|
+ iconItemsList, // 图标网格
|
|
|
scrollBox, // 无缝滚动组件
|
|
|
- UniStatusBar // 状态栏组件
|
|
|
+ UniStatusBar, // 状态栏组件
|
|
|
+ productItem // 产品列表
|
|
|
},
|
|
|
data() {
|
|
|
+ const _this = this
|
|
|
return {
|
|
|
status: 'loading',
|
|
|
noDataText: '暂无数据',
|
|
|
+ hasShopiing: false, // 是否开通商城
|
|
|
bondRecord: null, // 保证金
|
|
|
list:[], // 扫描记录滚动
|
|
|
slist:[], // 红包滚动
|
|
@@ -139,7 +179,11 @@
|
|
|
avatarUrl:'', // 用户图像
|
|
|
navHeight: '44', // 头部高度
|
|
|
scanMaxNums: 10, // 扫描VIN仅限10次
|
|
|
- carouselList: [] // 修理厂促销活动列表
|
|
|
+ carouselList: [] ,// 修理厂促销活动列表
|
|
|
+ productTypeList: [], // 产品分类
|
|
|
+ currentPtypeDot: 0,
|
|
|
+ screenWidth: 325,
|
|
|
+ productList:[]
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -170,25 +214,67 @@
|
|
|
imgList(){
|
|
|
let list = [
|
|
|
{
|
|
|
- image: '/static/banner1.png',
|
|
|
+ image: this.hasShopiing ? '/static/banner1.jpg':'/static/banner1.png',
|
|
|
activeType: ''
|
|
|
}
|
|
|
]
|
|
|
+ // 红包
|
|
|
if(this.hasRedPacket&&this.hasShelf){
|
|
|
list.push(
|
|
|
{
|
|
|
- image: '/static/banner2.png',
|
|
|
+ image: this.hasShopiing ? '/static/banner2.jpg':'/static/banner2.png',
|
|
|
activeType: 'redPacket'
|
|
|
})
|
|
|
}
|
|
|
return list.concat(this.carouselList)
|
|
|
+ },
|
|
|
+ // 快捷导航
|
|
|
+ navList(){
|
|
|
+ const list = [
|
|
|
+ {
|
|
|
+ id:'n0',
|
|
|
+ auth: this.hasLogin&&this.userInfo.sysUserFlag == '1',
|
|
|
+ icon:'bianmachaxun',
|
|
|
+ name: '产品编码取货',
|
|
|
+ color:'#2196f3',
|
|
|
+ url: 'openTakeGood0',
|
|
|
+ target: 'fun'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id:'n1',
|
|
|
+ auth: this.hasLogin&&this.userInfo.sysUserFlag == '1',
|
|
|
+ icon:'saoma',
|
|
|
+ name: '二维/条码取货',
|
|
|
+ color:'#FF9800',
|
|
|
+ url:'openTakeGood1',
|
|
|
+ target: 'fun'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id:'n3',
|
|
|
+ auth: this.hasLogin,
|
|
|
+ icon:'shipin1',
|
|
|
+ name: '视频讲堂',
|
|
|
+ color:'#55aa00',
|
|
|
+ url:'/pagesB/videos/index',
|
|
|
+ target: 'page'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id:'n2',
|
|
|
+ auth: this.hasLogin,
|
|
|
+ icon:'chaxunjilu',
|
|
|
+ name: 'VIN查询历史',
|
|
|
+ color:'#55557f',
|
|
|
+ url:'/pagesA/vinRecord/vinRecord',
|
|
|
+ target: 'page'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ return list.filter(item=> item.auth)
|
|
|
}
|
|
|
},
|
|
|
onReady() {
|
|
|
- // 滚动扫描记录
|
|
|
- this.getScrollLog()
|
|
|
// 获取导航栏高度
|
|
|
const res = uni.getSystemInfoSync()
|
|
|
+ this.screenWidth = res.windowWidth
|
|
|
const system = res.platform
|
|
|
if (system === 'android') {
|
|
|
this.navHeight = 48
|
|
@@ -200,6 +286,8 @@
|
|
|
this.orderTodo = null
|
|
|
this.bondRecord = null
|
|
|
this.vinList = []
|
|
|
+ // 推荐产品列表
|
|
|
+ this.getProductList()
|
|
|
// 视频类型
|
|
|
this.getLookUpList('CONTENT_CATEGORY', 'vuex_videoTypeList');
|
|
|
// 检测是否登录
|
|
@@ -248,6 +336,8 @@
|
|
|
}else{
|
|
|
// 隐藏促销模块
|
|
|
this.hidePromoTab()
|
|
|
+ // 滚动扫描记录
|
|
|
+ this.getScrollLog()
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -263,44 +353,74 @@
|
|
|
return true
|
|
|
}
|
|
|
},
|
|
|
- // 轮播图片
|
|
|
- getCarousel(){
|
|
|
- this.carouselList = []
|
|
|
- // 获取所有促销活动数据
|
|
|
- promoTerminalList({}).then(res => {
|
|
|
- if(res.status == 200){
|
|
|
- res.data&&res.data.map(item => {
|
|
|
- item.image = item.imageSet&&item.imageSet[0] // 默认取第一张图片
|
|
|
- })
|
|
|
- // 过滤掉产品促销活动
|
|
|
- // this.carouselList = res.data.filter(item => item.content.indexOf("pages/promo/index") < 0)
|
|
|
- // 所有数据
|
|
|
- this.carouselList = res.data
|
|
|
- }
|
|
|
+ // 去搜索产品
|
|
|
+ toSearch(event){
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pagesB/shopiing/searchProduct?queryWord='+event.value+'&clzId='
|
|
|
})
|
|
|
},
|
|
|
+ // 获取产品列表
|
|
|
+ getProductList(){
|
|
|
+ const cacheList = this.$store.state.vuex_cartList.find(k => k.sn == '693459699332595712')
|
|
|
+ this.productList = cacheList ? JSON.parse(JSON.stringify(cacheList.list)) : []
|
|
|
+ },
|
|
|
+ // 初始化页面
|
|
|
pageInit(flag){
|
|
|
this.carouselList = []
|
|
|
if(this.hasLogin){
|
|
|
- // 获取扫描记录
|
|
|
- this.getVinLog()
|
|
|
// 非游客
|
|
|
if(this.userInfo.sysUserFlag == '1'){
|
|
|
- // 查询是否有数字货架
|
|
|
- this.getStoreShelf(flag)
|
|
|
+ // 查询是否有商城
|
|
|
+ this.getHasShopping(flag)
|
|
|
}else{
|
|
|
+ // 游客
|
|
|
// 获取扫描次数
|
|
|
this.$store.dispatch("getScanNums")
|
|
|
// 获取最大扫描次数
|
|
|
this.getMaxQty()
|
|
|
// 查询门店认证信息
|
|
|
this.findLastApply()
|
|
|
+ // 获取扫描记录
|
|
|
+ this.getVinLog()
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
uni.removeStorageSync('token')
|
|
|
}
|
|
|
},
|
|
|
+ // 轮播图片
|
|
|
+ getCarousel(){
|
|
|
+ this.carouselList = []
|
|
|
+ // 获取所有促销活动数据
|
|
|
+ promoTerminalList({}).then(res => {
|
|
|
+ if(res.status == 200){
|
|
|
+ res.data&&res.data.map(item => {
|
|
|
+ item.image = item.imageSet&&item.imageSet[0] // 默认取第一张图片
|
|
|
+ })
|
|
|
+ // 过滤掉产品促销活动
|
|
|
+ // this.carouselList = res.data.filter(item => item.content.indexOf("pages/promo/index") < 0)
|
|
|
+ // 所有数据
|
|
|
+ this.carouselList = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 快速导航单击
|
|
|
+ onNavFun(item){
|
|
|
+ // 编码取货
|
|
|
+ if(item.url=='openTakeGood1'){
|
|
|
+ this.openTakeGood(1)
|
|
|
+ }
|
|
|
+ // 扫码取货
|
|
|
+ if(item.url=='openTakeGood0'){
|
|
|
+ this.openTakeGood(0)
|
|
|
+ }
|
|
|
+ // 产品分类跳转
|
|
|
+ if(item.url=='ptypeNav'){
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pagesB/shopiing/searchProduct?clzId='+item.sn+'&clzName='+item.name
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取数据字典
|
|
|
getListLookUp() {
|
|
|
const _this = this;
|
|
@@ -402,6 +522,147 @@
|
|
|
this.status = 'nomore'
|
|
|
})
|
|
|
},
|
|
|
+ // 商城信息, flag: true 再次刷新,false 首次加载
|
|
|
+ getHasShopping(flag){
|
|
|
+ if(!flag){
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.hasShopiing = true
|
|
|
+ // 有商城
|
|
|
+ if(this.hasShopiing){
|
|
|
+ // 隐藏tab 视频,显示购物车tab
|
|
|
+ this.showCatTab()
|
|
|
+ // 商品分类
|
|
|
+ const list = [
|
|
|
+ {
|
|
|
+ id:'0',
|
|
|
+ sn:'0',
|
|
|
+ name:'轮胎',
|
|
|
+ icon:'',
|
|
|
+ url: 'ptypeNav',
|
|
|
+ target: 'fun'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id:'1',
|
|
|
+ sn:'1',
|
|
|
+ name:'滤清器',
|
|
|
+ icon:'',
|
|
|
+ url: 'ptypeNav',
|
|
|
+ target: 'fun'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id:'2',
|
|
|
+ sn:'3',
|
|
|
+ name:'刹车片',
|
|
|
+ icon:'',
|
|
|
+ url: 'ptypeNav',
|
|
|
+ target: 'fun'
|
|
|
+ },{
|
|
|
+ id:'4',
|
|
|
+ sn:'4',
|
|
|
+ name:'油品',
|
|
|
+ icon:'',
|
|
|
+ url: 'ptypeNav',
|
|
|
+ target: 'fun'
|
|
|
+ },{
|
|
|
+ id:'5',
|
|
|
+ sn:'5',
|
|
|
+ name:'雨刮',
|
|
|
+ icon:'',
|
|
|
+ url: 'ptypeNav',
|
|
|
+ target: 'fun'
|
|
|
+ },{
|
|
|
+ id:'6',
|
|
|
+ sn:'6',
|
|
|
+ name:'火花塞',
|
|
|
+ icon:'',
|
|
|
+ url: 'ptypeNav',
|
|
|
+ target: 'fun'
|
|
|
+ },{
|
|
|
+ id:'7',
|
|
|
+ sn:'7',
|
|
|
+ name:'电火线圈',
|
|
|
+ icon:'',
|
|
|
+ url: 'ptypeNav',
|
|
|
+ target: 'fun'
|
|
|
+ },{
|
|
|
+ id:'8',
|
|
|
+ sn:'8',
|
|
|
+ name:'照明系列',
|
|
|
+ icon:'',
|
|
|
+ url: 'ptypeNav',
|
|
|
+ target: 'fun'
|
|
|
+ },{
|
|
|
+ id:'9',
|
|
|
+ sn:'9',
|
|
|
+ name:'空气滤',
|
|
|
+ icon:'',
|
|
|
+ url: 'ptypeNav',
|
|
|
+ target: 'fun'
|
|
|
+ },{
|
|
|
+ id:'10',
|
|
|
+ sn:'10',
|
|
|
+ name:'机油率',
|
|
|
+ icon:'',
|
|
|
+ url: 'ptypeNav',
|
|
|
+ target: 'fun'
|
|
|
+ },{
|
|
|
+ id:'11',
|
|
|
+ sn:'11',
|
|
|
+ name:'电瓶电池',
|
|
|
+ icon:'',
|
|
|
+ url: 'ptypeNav',
|
|
|
+ target: 'fun'
|
|
|
+ },{
|
|
|
+ id:'12',
|
|
|
+ sn:'12',
|
|
|
+ name:'洗美养护',
|
|
|
+ icon:'',
|
|
|
+ url: 'ptypeNav',
|
|
|
+ target: 'fun'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ // 转成二维数组
|
|
|
+ for(let i=0;i<list.length;i=i+8){
|
|
|
+ this.productTypeList.push({
|
|
|
+ id: 'swiper-item-'+i,
|
|
|
+ list: list.slice(i,(i+8)>list.length?list.length:(i+8))
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }else{ // 没有商城
|
|
|
+ // 滚动扫描记录
|
|
|
+ this.getScrollLog()
|
|
|
+ // 获取扫描记录
|
|
|
+ this.getVinLog()
|
|
|
+ }
|
|
|
+ // 查询是否有数字货架
|
|
|
+ this.getStoreShelf(flag)
|
|
|
+ },150)
|
|
|
+ }else{
|
|
|
+ if(!this.hasShopiing){
|
|
|
+ // 滚动扫描记录
|
|
|
+ this.getScrollLog()
|
|
|
+ // 获取扫描记录
|
|
|
+ this.getVinLog()
|
|
|
+ }
|
|
|
+ // 查询是否有数字货架
|
|
|
+ this.getStoreShelf(flag)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 显示购物车tab
|
|
|
+ showCatTab(){
|
|
|
+ const videoIndex = this.$store.state.vuex_tabBarList.findIndex(item => item.text == '视频')
|
|
|
+ const catIndex = this.$store.state.vuex_tabBarList.findIndex(item => item.text == '购物车')
|
|
|
+ if(catIndex<0 && videoIndex >= 0){
|
|
|
+ // 替换视频为购物车
|
|
|
+ this.$store.state.vuex_tabBarList.splice(videoIndex,1,{
|
|
|
+ "pagePath": "/pages/cart/index",
|
|
|
+ "iconPath": "/static/tab/tab_cart_normal.png",
|
|
|
+ "selectedIconPath": "/static/tab/tab_cart_pressed.png",
|
|
|
+ "text": "购物车",
|
|
|
+ 'customIcon': false,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
// 查询是否支持数字货架, flag: true 再次刷新,false 首次加载
|
|
|
getStoreShelf(flag){
|
|
|
findStoreShelf().then(res => {
|
|
@@ -650,13 +911,18 @@
|
|
|
page{
|
|
|
background-color: #ffffff;
|
|
|
}
|
|
|
+ .bg-0{
|
|
|
+ background-image: linear-gradient(#86defa 0%,#cdeff9 25%,#ffffff 40%);
|
|
|
+ }
|
|
|
+ .bg-1{
|
|
|
+ background-image: linear-gradient(#86defa 0%, #cdeff9 15%, #f8f8f8 60%);
|
|
|
+ }
|
|
|
.content {
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
height: 100vh;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
- background-image: linear-gradient(#86defa 0%,#cdeff9 25%,#ffffff 40%);
|
|
|
.header-box{
|
|
|
z-index: 5;
|
|
|
padding: 0em 1em;
|
|
@@ -674,23 +940,57 @@
|
|
|
flex-grow: 1;
|
|
|
overflow-y: auto;
|
|
|
overflow-x: hidden;
|
|
|
- }
|
|
|
- .body-box{
|
|
|
- padding: 0em 1em 0.8em;
|
|
|
- z-index: 4;
|
|
|
.notices{
|
|
|
padding: 0.5em 0 0;
|
|
|
font-size: 0.9em;
|
|
|
margin-top: 0.5rem;
|
|
|
view{
|
|
|
color: #ffaf46;
|
|
|
- max-width: 80%;
|
|
|
+ flex-grow: 1;
|
|
|
}
|
|
|
.text{
|
|
|
color: #ffffff;
|
|
|
margin-left: 1em;
|
|
|
}
|
|
|
}
|
|
|
+ .pa-box{
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 6px;
|
|
|
+ margin: 10px 0;
|
|
|
+ }
|
|
|
+ .product-box{
|
|
|
+ margin: 10px 0;
|
|
|
+ }
|
|
|
+ .ptype-nav{
|
|
|
+ padding: 10px 0;
|
|
|
+ position: relative;
|
|
|
+ .indicator-dots{
|
|
|
+ width: 100%;
|
|
|
+ height: 3px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ bottom:5px;
|
|
|
+ }
|
|
|
+ .indicator-dots > view{
|
|
|
+ width: 10px;
|
|
|
+ height: 3px;
|
|
|
+ background: #e7e7e7;
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+ .indicator-dots >.indicator-dots-active{
|
|
|
+ background: #00aaff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .body-box{
|
|
|
+ padding: 0em 1em 0.8em;
|
|
|
+ z-index: 4;
|
|
|
+ .banner{
|
|
|
+ margin-top: 20rpx;
|
|
|
+ }
|
|
|
.action-button{
|
|
|
padding:40upx 0 0 0;
|
|
|
justify-content: space-between;
|
|
@@ -724,35 +1024,9 @@
|
|
|
font-size:28rpx;
|
|
|
}
|
|
|
}
|
|
|
- .scanButton{
|
|
|
- margin: 0.8em 0 0.5em;
|
|
|
- padding: 0.5em;
|
|
|
- background: #066cff;
|
|
|
- color: #fff;
|
|
|
- font-size: 1.5em;
|
|
|
- border-radius: 5em;
|
|
|
- justify-content: center;
|
|
|
- &:active{
|
|
|
- opacity: 0.8;
|
|
|
- }
|
|
|
- }
|
|
|
- .quickButton{
|
|
|
- margin: 0.8em 0 0.5em;
|
|
|
- padding: 0.5em;
|
|
|
- background: #fff;
|
|
|
- color: #333;
|
|
|
- font-size: 1.5em;
|
|
|
- border-radius: 5em;
|
|
|
- justify-content: center;
|
|
|
- border:0.1rpx solid #eee;
|
|
|
- box-shadow: 1rpx 2rpx 5rpx #f8f8f8;
|
|
|
- &:active{
|
|
|
- opacity: 0.8;
|
|
|
- }
|
|
|
- }
|
|
|
- .ml10{
|
|
|
- margin-left: 0.4em;
|
|
|
- }
|
|
|
+ }
|
|
|
+ .body-box1{
|
|
|
+ padding: 0em 10px 0.8em;
|
|
|
}
|
|
|
.bg-blue{
|
|
|
position: relative;
|
|
@@ -774,6 +1048,9 @@
|
|
|
border-radius: 0 0 50% 50%;
|
|
|
/*分别对应 左上 右上 右下 左下 可以修改成其它颜色*/
|
|
|
background: linear-gradient(to bottom, #066cff, #1d77ff);
|
|
|
+ }
|
|
|
+ .search-head{
|
|
|
+
|
|
|
}
|
|
|
.userCard{
|
|
|
position:relative;
|
|
@@ -807,6 +1084,16 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .shopping{
|
|
|
+ padding: 0;
|
|
|
+ .notices{
|
|
|
+ padding: 0.5em 10px 0
|
|
|
+ }
|
|
|
+ &::after{
|
|
|
+ top: -25px;
|
|
|
+ border-radius: 0 0 150px 150px;
|
|
|
+ }
|
|
|
+ }
|
|
|
.list-box{
|
|
|
padding: 0 1em;
|
|
|
overflow: auto;
|