修复可能的undefined调用
This commit is contained in:
parent
9fff9b6eb3
commit
7ac5846bcc
|
@ -34,7 +34,7 @@
|
|||
v-for="(item, index) in data"
|
||||
:id="'item' + index"
|
||||
:key="index"
|
||||
:style="{ height: index == data.length - 1 ? wrapHeight + $utils.rpx2px(110) + 'px' : 'auto' }"
|
||||
:style="{ height: index == data.length - 1 ? wrapHeight + utils.rpx2px(110) + 'px' : 'auto' }"
|
||||
>
|
||||
<cate-tmpl v-if="cateType === 'cate'" :data="item" @clickItem="clickItem"></cate-tmpl>
|
||||
<list-tmpl v-if="cateType === 'list'" :data="item" @clickItem="clickItem"></list-tmpl>
|
||||
|
@ -53,6 +53,7 @@ export default {
|
|||
name: "component-cate",
|
||||
data() {
|
||||
return {
|
||||
utils: this.$utils,
|
||||
scrollTop: 0, //tab标题的滚动条位置
|
||||
oldScrollTop: 0, // tab标题的滚动条旧位置
|
||||
current: 0, // 预设当前项的值
|
||||
|
|
|
@ -2,31 +2,31 @@
|
|||
<view class="order-action">
|
||||
<block
|
||||
v-if="
|
||||
order.state == $models.order.state.NO_PAY ||
|
||||
order.state == $models.order.state.NO_PRICE ||
|
||||
order.state == $models.order.state.NO_SELECT_WORKER
|
||||
order.state == models.order.state.NO_PAY ||
|
||||
order.state == models.order.state.NO_PRICE ||
|
||||
order.state == models.order.state.NO_SELECT_WORKER
|
||||
"
|
||||
>
|
||||
<view class="btn" @click.stop="cancelOrder" :class="{ active: true }">
|
||||
<text>取消订单</text>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="order.state == $models.order.state.NO_APPRAISE">
|
||||
<block v-if="order.state == models.order.state.NO_APPRAISE">
|
||||
<view class="btn" v-if="false" @click.stop="appraiseOrder">
|
||||
<text>评价师傅</text>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="order.state == $models.order.state.NO_SERVICE">
|
||||
<block v-if="order.state == models.order.state.NO_SERVICE">
|
||||
<view class="btn" v-if="false" @click.stop="drawbackOrder">
|
||||
<text>申请退款</text>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="order.state == $models.order.state.ORDER_CLOSE">
|
||||
<block v-if="order.state == models.order.state.ORDER_CLOSE">
|
||||
<view class="btn" v-if="false" @click.stop="reapplyOrder">
|
||||
<text>重新申请</text>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="order.state == $models.order.state.ORDER_CLOSE || order.state == $models.order.state.ALL_FINISH">
|
||||
<block v-if="order.state == models.order.state.ORDER_CLOSE || order.state == models.order.state.ALL_FINISH">
|
||||
<view class="del" v-if="true" @click.stop="delOrder">
|
||||
<text class="iconfont icon-shanchu"></text>
|
||||
</view>
|
||||
|
@ -38,7 +38,9 @@
|
|||
export default {
|
||||
name: "order-action",
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
models: this.$models,
|
||||
};
|
||||
},
|
||||
props: {
|
||||
order: {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<view class="order-item" @click="toDetail">
|
||||
<view class="order-header">
|
||||
<view class="state-text" :style="{ color: $models.order.getOrderStateTextColor(order.state) }">
|
||||
<text>{{ $models.order.getOrderStateText(order.state) }}</text>
|
||||
<view class="state-text" :style="{ color: models.order.getOrderStateTextColor(order.state) }">
|
||||
<text>{{ models.order.getOrderStateText(order.state) }}</text>
|
||||
</view>
|
||||
<view class="more">
|
||||
<text class="text">详情</text>
|
||||
|
@ -34,9 +34,9 @@
|
|||
<view class="worker-box">
|
||||
<block
|
||||
v-if="
|
||||
order.orderType == $models.order.type.NORMAL ||
|
||||
order.orderType == $models.order.type.CUSTOM_PRICE ||
|
||||
(order.orderType == $models.order.type.WORKER_PRICE && order.state == $models.order.state.NO_SERVICE)
|
||||
order.orderType == models.order.type.NORMAL ||
|
||||
order.orderType == models.order.type.CUSTOM_PRICE ||
|
||||
(order.orderType == models.order.type.WORKER_PRICE && order.state == models.order.state.NO_SERVICE)
|
||||
"
|
||||
>
|
||||
<view class="worker-item-box">
|
||||
|
@ -71,6 +71,7 @@ export default {
|
|||
name: "order-order-item",
|
||||
data() {
|
||||
return {
|
||||
models: this.$models,
|
||||
previewWorkerList: [],
|
||||
};
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="checkbox" :class="{ active: checked }" :style="{ fontSize: $utils.rpx2px(size) + 'px' }">
|
||||
<view class="checkbox" :class="{ active: checked }" :style="{ fontSize: utils.rpx2px(size) + 'px' }">
|
||||
<text class="iconfont" :class="[checked ? 'icon-xuanzeyixuanze' : 'icon-xuanzeweixuanze']"></text>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -8,7 +8,9 @@
|
|||
export default {
|
||||
name: "widget-checkbox",
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
utils: this.$utils,
|
||||
};
|
||||
},
|
||||
props: {
|
||||
size: {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<view class="switch" :class="{ active: open }" :style="{ fontSize: $utils.rpx2px(size) + 'px' }">
|
||||
<view class="switch" :class="{ active: open }" :style="{ fontSize: utils.rpx2px(size) + 'px' }">
|
||||
<text class="iconfont" :class="[open ? 'icon-kaiguan-kai' : 'icon-kaiguan-guan']"></text>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -8,7 +8,9 @@
|
|||
export default {
|
||||
name: "widget-switch",
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
utils: this.$utils,
|
||||
};
|
||||
},
|
||||
props: {
|
||||
size: {
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<view class="name">
|
||||
<text>{{ data.name }}</text>
|
||||
</view>
|
||||
<view class="type" :style="{ color: $models.worker.getWorkerTypeTextColor(data.type) }">
|
||||
<text>{{ $models.worker.getWorkerTypeText(data.type) }}</text>
|
||||
<view class="type" :style="{ color: models.worker.getWorkerTypeTextColor(data.type) }">
|
||||
<text>{{ models.worker.getWorkerTypeText(data.type) }}</text>
|
||||
</view>
|
||||
<view class="detail">
|
||||
<text class="section-text">服务{{ data.times }}次</text>
|
||||
|
@ -24,7 +24,9 @@
|
|||
export default {
|
||||
name: "worker-item",
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
models: this.$models,
|
||||
};
|
||||
},
|
||||
props: {
|
||||
showPrice: {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<view class="btn get-wechat-address" @click="getWechatAddress">
|
||||
<text class="text">获取微信收货地址</text>
|
||||
</view>
|
||||
<view class="btn add-address" @click="$utils.toPage('/pages/address/edit')">
|
||||
<view class="btn add-address" @click="utils.toPage('/pages/address/edit')">
|
||||
<text class="text">新增地址</text>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -44,6 +44,7 @@ export default {
|
|||
name: "member-address",
|
||||
data() {
|
||||
return {
|
||||
utils: this.$utils,
|
||||
pageTitle: "我的地址",
|
||||
openType: "list",
|
||||
chooseAddressId: 0,
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
class="service-item"
|
||||
v-for="(item, index) in aftermarketServiceList"
|
||||
:key="index"
|
||||
@click="$utils.toPage(item.page)"
|
||||
@click="utils.toPage(item.page)"
|
||||
>
|
||||
<image class="service-icon" :src="item.icon" mode="scaleToFill" />
|
||||
<text class="service-name limit-line clamp-1">
|
||||
|
@ -64,7 +64,7 @@
|
|||
class="service-item"
|
||||
v-for="(item, index) in bussinessServiceList"
|
||||
:key="index"
|
||||
@click="$utils.toPage(item.page)"
|
||||
@click="utils.toPage(item.page)"
|
||||
>
|
||||
<image class="service-icon" :src="item.icon" mode="scaleToFill" />
|
||||
</view>
|
||||
|
@ -81,6 +81,7 @@ export default {
|
|||
name: "index",
|
||||
data() {
|
||||
return {
|
||||
utils: this.$utils,
|
||||
bannerList: [
|
||||
{
|
||||
id: 1,
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</view>
|
||||
<view class="menu-container">
|
||||
<view class="form-widget-group">
|
||||
<view class="widget-item" @click="$utils.toPage('/pages/address/address?openType=list')">
|
||||
<view class="widget-item" @click="utils.toPage('/pages/address/address?openType=list')">
|
||||
<text class="iconfont icon-dingwei icon"></text>
|
||||
<text class="title limit-line clamp-1">我的地址</text>
|
||||
<text class="iconfont icon-jinru more"></text>
|
||||
|
@ -40,12 +40,12 @@
|
|||
<text class="title limit-line clamp-1">我是师傅</text>
|
||||
<text class="iconfont icon-jinru more"></text>
|
||||
</view>
|
||||
<view class="widget-item" @click="$utils.toPage('/pages/single/project')">
|
||||
<view class="widget-item" @click="utils.toPage('/pages/single/project')">
|
||||
<text class="iconfont icon-cailiaogongcheng icon"></text>
|
||||
<text class="title limit-line clamp-1">工程安装</text>
|
||||
<text class="iconfont icon-jinru more"></text>
|
||||
</view>
|
||||
<view class="widget-item" @click="$utils.toPage('/pages/single/business')">
|
||||
<view class="widget-item" @click="utils.toPage('/pages/single/business')">
|
||||
<text class="iconfont icon-qiye icon"></text>
|
||||
<text class="title limit-line clamp-1">企业安装合作</text>
|
||||
<text class="iconfont icon-jinru more"></text>
|
||||
|
@ -62,6 +62,7 @@ export default {
|
|||
name: "member",
|
||||
data() {
|
||||
return {
|
||||
utils: this.$utils,
|
||||
info: {
|
||||
nickname: "微信用户",
|
||||
mobile: "131****6080",
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
direction="all"
|
||||
:x="position.x"
|
||||
:y="position.y"
|
||||
@click="$utils.toPage('/pages/service/cart')"
|
||||
@click="utils.toPage('/pages/service/cart')"
|
||||
>
|
||||
<view class="cart-icon">
|
||||
<text class="iconfont icon-gouwuche"></text>
|
||||
|
@ -34,6 +34,7 @@ export default {
|
|||
name: "service-cate",
|
||||
data() {
|
||||
return {
|
||||
utils: this.$utils,
|
||||
position: { x: 300, y: 1000 },
|
||||
data: [
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<app-cate :offsetHeight="0" :data="data" cateType="list" @clickItem="clickItem" />
|
||||
</view>
|
||||
<view class="bottom-components" :style="{ bottom: config.safeAreaInsets.bottom + 'px' }">
|
||||
<view class="cart" @click="$utils.toPage('/pages/service/cart')">
|
||||
<view class="cart" @click="utils.toPage('/pages/service/cart')">
|
||||
<view class="cart-icon">
|
||||
<text class="iconfont icon-gouwuche"></text>
|
||||
</view>
|
||||
|
@ -27,6 +27,7 @@ export default {
|
|||
name: "service-list",
|
||||
data() {
|
||||
return {
|
||||
utils: this.$utils,
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
|
|
Loading…
Reference in New Issue