|
@@ -14,6 +14,10 @@
|
|
|
<div class="copyText" @click="copyVin"><span>复制</span></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-if="dealerPhone" style="text-align: center;width: 5em;" @click="callPhone()">
|
|
|
+ <u-icon size="18" name="phone" color="dodgerblue"></u-icon>
|
|
|
+ <view style="font-size: 0.6em;color: dodgerblue;"><text>联系汽配商</text></view>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!-- 配件列表 -->
|
|
|
<div class="cpb_middle flex">
|
|
@@ -80,8 +84,11 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 其它配件 -->
|
|
|
- <view class="nav-right-title" style="margin-top: 20rpx;">其它配件</view>
|
|
|
- <view class="nav-right-item flex" v-for="(item, index) in partList" :key="item.productSn">
|
|
|
+ <view class="nav-right-title flex align_center justify_between" @click="showOther=!showOther" style="margin-top: 20rpx;">
|
|
|
+ 其它配件
|
|
|
+ <text>{{showOther?'隐藏':'展开'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="nav-right-item flex" v-if="showOther" v-for="(item, index) in partList" :key="item.productSn">
|
|
|
<view class="uni-col-2">
|
|
|
<u-image :src="item.images+'?x-oss-process=image/resize,m_fixed,h_120,w_120,color_ffffff'" @click="viewImg(item)" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
|
|
|
</view>
|
|
@@ -182,10 +189,10 @@
|
|
|
|
|
|
<script>
|
|
|
import { getShelfProductList, getShelfProductType, queryPartCodeByVin, getShelfQueryList, saveShelfOrder } from '@/api/shelf'
|
|
|
- import clipboard from "@/js_sdk/dc-clipboard/clipboard.js"
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ showOther: false,
|
|
|
theme: '',
|
|
|
vinNumber: '',
|
|
|
leve2Data: [], // 二级菜单数据
|
|
@@ -204,7 +211,6 @@
|
|
|
partListData: [], // 已选配件
|
|
|
vinPartList: [],
|
|
|
isIphoneXup: false,
|
|
|
- dealerPhone: '',
|
|
|
saveLoading: false
|
|
|
}
|
|
|
},
|
|
@@ -218,6 +224,10 @@
|
|
|
ret = ret + item.qty
|
|
|
})
|
|
|
return ret
|
|
|
+ },
|
|
|
+ dealerPhone(){
|
|
|
+ const shelfInfo = this.$store.state.vuex_storeShelf
|
|
|
+ return shelfInfo&&shelfInfo.contactMobile ? shelfInfo.contactMobile : ''
|
|
|
}
|
|
|
},
|
|
|
onLoad(opts) {
|
|
@@ -227,28 +237,17 @@
|
|
|
// 获取vin 对应code
|
|
|
this.getCarCodeByVin()
|
|
|
},
|
|
|
- onReady() {
|
|
|
- const shelfInfo = this.$store.state.vuex_storeShelf
|
|
|
- this.dealerPhone = shelfInfo&&shelfInfo.contactMobile ? shelfInfo.contactMobile : ''
|
|
|
- // #ifdef APP-PLUS
|
|
|
- var webView = this.$mp.page.$getAppWebview();
|
|
|
- if(this.dealerPhone==''){
|
|
|
- webView.setTitleNViewButtonStyle(0,{text:"",color:"#FFFFFF"});
|
|
|
- }
|
|
|
- // #endif
|
|
|
- },
|
|
|
- // 点击导航栏按钮
|
|
|
- onNavigationBarButtonTap() {
|
|
|
- if(this.dealerPhone!=''){
|
|
|
- uni.makePhoneCall({
|
|
|
- phoneNumber: this.dealerPhone
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
onShow() {
|
|
|
this.$store.state.vuex_shelfChoosePart = []
|
|
|
},
|
|
|
methods: {
|
|
|
+ callPhone() {
|
|
|
+ if(this.dealerPhone!=''){
|
|
|
+ uni.makePhoneCall({
|
|
|
+ phoneNumber: this.dealerPhone
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
viewImg(item){
|
|
|
uni.previewImage({
|
|
|
urls: [item.images]
|
|
@@ -256,10 +255,8 @@
|
|
|
},
|
|
|
// 复制
|
|
|
copyVin(){
|
|
|
- clipboard.setText(this.vinNumber);
|
|
|
- uni.showToast({
|
|
|
- icon: 'none',
|
|
|
- title: 'vin码已复制成功'
|
|
|
+ uni.setClipboardData({
|
|
|
+ data: this.vinNumber||'',
|
|
|
})
|
|
|
},
|
|
|
// 格式化标签数据和配件分类数据一样
|
|
@@ -610,6 +607,10 @@
|
|
|
.nav-right-title{
|
|
|
font-weight: bold;
|
|
|
padding: 5upx 25upx;
|
|
|
+ > text{
|
|
|
+ color: #9E9E9E;
|
|
|
+ font-weight: normal;
|
|
|
+ }
|
|
|
}
|
|
|
.nav-right-item{
|
|
|
padding: 15upx 25upx;
|