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