格式化代码

This commit is contained in:
TOP糯米 2023-02-22 23:18:41 +08:00
parent d0386fd24c
commit f7cbc78f3e
25 changed files with 130 additions and 503 deletions

View File

@ -11,11 +11,7 @@
>
<swiper-item v-for="(item, index) in list" :key="index">
<view class="swiper-item" @click="clickItem(item)">
<image
class="banner-image"
:src="item.image"
mode="scaleToFill"
/>
<image class="banner-image" :src="item.image" mode="scaleToFill" />
</view>
</swiper-item>
</swiper>

View File

@ -13,9 +13,7 @@
class="component-tab-item"
v-for="(item, index) in data"
:key="index"
:class="[
current == index ? 'component-tab-item-active' : '',
]"
:class="[current == index ? 'component-tab-item-active' : '']"
@tap.stop="swichMenu(index)"
>
<text class="component-line-1">{{ item.name }}</text>
@ -36,23 +34,10 @@
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>
<cate-tmpl v-if="cateType === 'cate'" :data="item" @clickItem="clickItem"></cate-tmpl>
<list-tmpl v-if="cateType === 'list'" :data="item" @clickItem="clickItem"></list-tmpl>
</view>
</view>
</scroll-view>
@ -205,10 +190,7 @@ export default {
await this.getElRect("component-tab-item", "menuItemHeight");
}
// item
this.scrollTop =
index * this.menuItemHeight +
this.menuItemHeight / 2 -
this.menuHeight / 2;
this.scrollTop = index * this.menuItemHeight + this.menuItemHeight / 2 - this.menuHeight / 2;
},
/**
* 点击左边的栏目切换
@ -245,10 +227,7 @@ export default {
for (let i = 0; i < this.arr.length; i++) {
let height1 = this.arr[i];
let height2 = this.arr[i + 1];
if (
!height2 ||
(scrollHeight >= height1 && scrollHeight < height2)
) {
if (!height2 || (scrollHeight >= height1 && scrollHeight < height2)) {
this.leftMenuStatus(i);
return;
}

View File

@ -4,18 +4,9 @@
<text>{{ data.name }}</text>
</view>
<view class="item-container">
<view
class="thumb-box"
v-for="(child, index1) in data.child"
:key="index1"
@click="clickItem(child.id)"
>
<image
class="item-menu-image"
:src="child.icon"
mode=""
></image>
<view class="item-menu-name limit-line clamp-1">{{ child.name }}</view>
<view class="thumb-box" v-for="(item, index) in data.child" :key="index" @click="clickItem(item.id)">
<image class="item-menu-image" :src="item.icon" mode=""></image>
<view class="item-menu-name limit-line clamp-1">{{ item.name }}</view>
</view>
</view>
</view>

View File

@ -4,13 +4,9 @@
<text>{{ data.name }}</text>
</view>
<view class="item-container">
<view
class="thumb-box"
v-for="(child, index1) in data.child"
:key="index1"
>
<service-preview-item :data="child" @clickItem="clickItem" />
<widget-count-modify class="component-add" :initNumber="child.buyNumber" />
<view class="thumb-box" v-for="(item, index) in data.child" :key="index">
<service-preview-item :data="item" @clickItem="clickItem" />
<widget-count-modify class="component-add" :initNumber="item.buyNumber" />
</view>
</view>
</view>

View File

@ -1,8 +1,5 @@
<template>
<view
class="page-layout"
:style="{ backgroundColor: backgroundColor, minHeight: minHeight }"
>
<view class="page-layout" :style="{ backgroundColor: backgroundColor, minHeight: minHeight }">
<view
class="page-header"
:class="[textColor]"
@ -14,31 +11,19 @@
>
<!-- 首页选择地址 -->
<block v-if="btnType === 'city'">
<view
class="page-index-btn change-city"
:style="{ height: header.height + 'px' }"
@click="changeCity"
>
<view class="page-index-btn change-city" :style="{ height: header.height + 'px' }" @click="changeCity">
<text class="iconfont icon-31dingwei"></text>
<text class="city">成都市</text>
</view>
</block>
<!-- 正常返回按钮 -->
<block v-if="btnType === 'back'">
<view
class="page-index-btn back"
:style="{ height: header.height + 'px' }"
@click="onClick"
>
<view class="page-index-btn back" :style="{ height: header.height + 'px' }" @click="onClick">
<text class="iconfont icon-fanhui"></text>
</view>
</block>
<view class="page-title">
<text
class="title-text"
:style="{ lineHeight: header.height + 'px' }"
>{{ title }}</text
>
<text class="title-text" :style="{ lineHeight: header.height + 'px' }">{{ title }}</text>
</view>
</view>
<view class="page-body" :style="{ paddingTop: bodyPt + 'px' }">

View File

@ -1,5 +1,5 @@
<template>
<view class="insurance" :style="{padding: padding}">
<view class="insurance" :style="{ padding: padding }">
<view class="title-box">
<view class="title" @click="insuranceModal">
<text class="text">意外保</text>
@ -51,8 +51,7 @@ export default {
insuranceModal() {
uni.showModal({
title: "什么是意外保?",
content:
"意外保是中国人寿的保险产品,全面保证您的人身财产安全。",
content: "意外保是中国人寿的保险产品,全面保证您的人身财产安全。",
showCancel: false,
});
},

View File

@ -1,16 +1,8 @@
<template>
<view>
<view class="preview-item">
<image
class="cover-image"
mode="aspectFill"
:src="data.icon"
@click="clickItem(data.id)"
></image>
<view
class="item-box"
@click="clickItem(data.id)"
>
<image class="cover-image" mode="aspectFill" :src="data.icon" @click="clickItem(data.id)"></image>
<view class="item-box" @click="clickItem(data.id)">
<view class="title limit-line clamp-1">{{ data.name }}</view>
<view class="text-box">
{{ "已服务113256次" }}

View File

@ -1,9 +1,5 @@
<template>
<view
class="checkbox"
:class="[checked ? 'active' : '']"
:style="{ fontSize: $utils.rpx2px(size) + 'px' }"
>
<view class="checkbox" :class="[checked ? 'active' : '']" :style="{ fontSize: $utils.rpx2px(size) + 'px' }">
<text v-if="checked" class="iconfont icon-xuanzeyixuanze"></text>
<text v-if="!checked" class="iconfont icon-xuanzeweixuanze"></text>
</view>

View File

@ -1,9 +1,5 @@
<template>
<view
class="switch"
:class="[open ? 'active' : '']"
:style="{ fontSize: $utils.rpx2px(size) + 'px' }"
>
<view class="switch" :class="[open ? 'active' : '']" :style="{ fontSize: $utils.rpx2px(size) + 'px' }">
<text v-if="!open" class="iconfont icon-kaiguan-guan"></text>
<text v-if="open" class="iconfont icon-kaiguan-kai"></text>
</view>

View File

@ -1,10 +1,6 @@
<template>
<view class="tips" :style="{ background: backgroundColor }">
<text
class="iconfont icon-tixing"
:class="[icon]"
:style="{ color: iconColor }"
></text>
<text class="iconfont icon-tixing" :class="[icon]" :style="{ color: iconColor }"></text>
<text class="text-container" :style="{ color: textColor }">
{{ text }}
</text>

View File

@ -1,31 +1,14 @@
<template>
<app-layout
headerBackgroundColor="#F6F6F6"
:title="pageTitle"
textColor="dark"
backgroundColor="#F6F6F6"
>
<app-layout headerBackgroundColor="#F6F6F6" :title="pageTitle" textColor="dark" backgroundColor="#F6F6F6">
<view class="address-group">
<view
class="address-item"
v-for="(item, index) in list"
:key="index"
>
<view
class="address-box"
@click="selectAddress(item)"
@longpress="deleteAddress(item.id, index)"
>
<view class="address-item" v-for="(item, index) in list" :key="index">
<view class="address-box" @click="selectAddress(item)" @longpress="deleteAddress(item.id, index)">
<view v-if="openType == 'choose'" class="checkbox">
<widget-check-box
:size="52"
:checked="chooseAddressId == item.id"
/>
<widget-check-box :size="52" :checked="chooseAddressId == item.id" />
</view>
<view class="item-box">
<view class="address-text limit-line clamp-1">
<text v-if="item.isDefault" class="default-icon"
>默认</text
<text v-if="item.isDefault" class="default-icon">默认</text
><text class="text">{{ item.address }}</text>
</view>
<view class="address-detail limit-line clamp-1">
@ -42,17 +25,11 @@
</view>
</view>
</view>
<view
class="bottom-components"
:style="{ bottom: config.safeAreaInsets.bottom + 'px' }"
>
<view class="bottom-components" :style="{ bottom: config.safeAreaInsets.bottom + 'px' }">
<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>
@ -139,8 +116,7 @@ export default {
let wechatAddress = {};
uni.chooseAddress({
success: (data) => {
wechatAddress.address =
data.provinceName + data.cityName + data.countyName;
wechatAddress.address = data.provinceName + data.cityName + data.countyName;
wechatAddress.detail = data.detailInfo;
wechatAddress.mobile = data.telNumber;
wechatAddress.name = data.userName;

View File

@ -1,15 +1,7 @@
<template>
<app-layout
headerBackgroundColor="#F6F6F6"
textColor="dark"
:title="pageTitle"
backgroundColor="#F6F6F6"
>
<app-layout headerBackgroundColor="#F6F6F6" textColor="dark" :title="pageTitle" backgroundColor="#F6F6F6">
<view class="tips-container">
<widget-tips
text="个人信息仅用于发布需求,隐私信息完全保密"
textColor="#ffa800"
/>
<widget-tips text="个人信息仅用于发布需求,隐私信息完全保密" textColor="#ffa800" />
</view>
<view class="form-container">
<view class="input-item">
@ -17,10 +9,7 @@
<text>服务地址</text>
</view>
<view class="input-box map" @click="chooseLocation">
<view
class="address-text limit-line clamp-1"
:class="{ active: address }"
>
<view class="address-text limit-line clamp-1" :class="{ active: address }">
{{ address ? address : "点击选择服务地址" }}
</view>
<text class="iconfont icon-dingwei"></text>
@ -44,12 +33,7 @@
<text>联系人</text>
</view>
<view class="input-box">
<input
class="input"
v-model="name"
placeholder="请输入姓名"
placeholder-class="form-input-placeholder"
/>
<input class="input" v-model="name" placeholder="请输入姓名" placeholder-class="form-input-placeholder" />
</view>
</view>
<view class="input-item">
@ -58,18 +42,10 @@
</view>
<view class="input-box">
<view class="checkbox">
<view
class="checkbox-item"
:class="[gender == 1 ? 'active' : '']"
@click="gender = 1"
>
<view class="checkbox-item" :class="[gender == 1 ? 'active' : '']" @click="gender = 1">
<text>先生</text>
</view>
<view
class="checkbox-item"
:class="[gender == 2 ? 'active' : '']"
@click="gender = 2"
>
<view class="checkbox-item" :class="[gender == 2 ? 'active' : '']" @click="gender = 2">
<text>女士</text>
</view>
</view>

View File

@ -9,9 +9,7 @@
>
<view class="step-desc">
<text class="text active">发布需求</text>
<text class="text normal">
多位师傅报价/议价 选择师傅 师傅上门
</text>
<text class="text normal"> 多位师傅报价/议价 选择师傅 师傅上门 </text>
</view>
<view class="demand-container step-1" v-if="step == 1">
<view class="tips-container">
@ -37,14 +35,9 @@
]"
:key="index"
>
<view
class="category-item"
@click.stop="delCategory(index)"
>
<view class="category-item" @click.stop="delCategory(index)">
<text class="text">{{ item.name }}</text>
<text
class="iconfont icon-guanbishixin"
></text>
<text class="iconfont icon-guanbishixin"></text>
</view>
</block>
</view>
@ -61,18 +54,10 @@
</view>
<view class="input-box">
<view class="checkbox">
<view
class="checkbox-item"
:class="[type == 1 ? 'active' : '']"
@click="type = 1"
>
<view class="checkbox-item" :class="[type == 1 ? 'active' : '']" @click="type = 1">
<text>多位师傅报价</text>
</view>
<view
class="checkbox-item"
:class="[type == 2 ? 'active' : '']"
@click="type = 2"
>
<view class="checkbox-item" :class="[type == 2 ? 'active' : '']" @click="type = 2">
<text>议价</text>
</view>
</view>
@ -96,11 +81,7 @@
<view class="upload-item">
<block v-for="(item, index) in uploadImages" :key="index">
<view class="image-box">
<image
class="image"
:src="item.src"
mode="aspectFill"
/>
<image class="image" :src="item.src" mode="aspectFill" />
</view>
</block>
<view class="image-box upload" @click="chooseImage">
@ -115,11 +96,7 @@
</view>
<view class="demand-container step-2" v-if="step == 2">
<view class="tips-container">
<widget-tips
backgroundColor="unset"
textColor="#FFA800"
text="选择上门时间,请确保货物在该时间段之前到家"
/>
<widget-tips backgroundColor="unset" textColor="#FFA800" text="选择上门时间,请确保货物在该时间段之前到家" />
</view>
<view class="step-2-main">
<view class="form-container explain">
@ -132,16 +109,9 @@
</view>
</view>
<view class="upload-item">
<block
v-for="(item, index) in uploadImages"
:key="index"
>
<block v-for="(item, index) in uploadImages" :key="index">
<view class="image-box">
<image
class="image"
:src="item.src"
mode="aspectFill"
/>
<image class="image" :src="item.src" mode="aspectFill" />
</view>
</block>
</view>
@ -154,45 +124,21 @@
<text class="desc">隐私信息完全保密</text>
</view>
<view class="input-box">
<view
class="widget-item"
@click="selectAddress"
>
<text
class="iconfont icon-dingwei icon"
></text>
<view class="widget-item" @click="selectAddress">
<text class="iconfont icon-dingwei icon"></text>
<text class="title limit-line clamp-1">
{{
addressText
? addressText
: "请选择上门地址"
}}
{{ addressText ? addressText : "请选择上门地址" }}
</text>
<text
class="iconfont icon-jinru more"
></text>
<text class="iconfont icon-jinru more"></text>
</view>
<view class="widget-item">
<text
class="iconfont icon-shijian icon"
></text>
<picker
mode="date"
:value="datetime"
@change="bindDateChange"
class="picker"
>
<text class="iconfont icon-shijian icon"></text>
<picker mode="date" :value="datetime" @change="bindDateChange" class="picker">
<text class="title limit-line clamp-1">
{{
datetime
? datetime
: "选择期望上门时间"
}}
{{ datetime ? datetime : "选择期望上门时间" }}
</text>
</picker>
<text
class="iconfont icon-jinru more"
></text>
<text class="iconfont icon-jinru more"></text>
</view>
</view>
</view>
@ -202,33 +148,19 @@
<view v-if="type == 2" class="custom-price">
<view class="title-box">
<text>需求价格</text>
<text class="desc">
请勿填写过低价格避免无师傅接单
</text>
<text class="desc"> 请勿填写过低价格避免无师傅接单 </text>
</view>
<text class="input-desc">
请填写您的心理价位等待师傅接单
</text>
<view
class="custom-input-box"
@click="editPrice = true"
>
<text class="input-desc"> 请填写您的心理价位等待师傅接单 </text>
<view class="custom-input-box" @click="editPrice = true">
<text class="iconfont icon-bianji"></text>
<text class="price">¥ {{ parsePrice(price) }}</text>
</view>
</view>
<view class="insurance-box">
<service-insurance
padding="38rpx 30rpx"
:insurance="insurance"
@change="changeInsuranceState"
/>
<service-insurance padding="38rpx 30rpx" :insurance="insurance" @change="changeInsuranceState" />
</view>
</view>
<view
class="bottom-components"
:style="{ bottom: config.safeAreaInsets.bottom + 'px' }"
>
<view class="bottom-components" :style="{ bottom: config.safeAreaInsets.bottom + 'px' }">
<text class="price">¥ {{ parsePrice(total) }}</text>
<view v-if="type == 1" class="btn" @click="submit">
<div class="text">立即发布</div>
@ -239,11 +171,7 @@
</view>
</view>
</view>
<widget-modal
:show="editPrice"
title="输入心理价位"
@close="editPrice = false"
>
<widget-modal :show="editPrice" title="输入心理价位" @close="editPrice = false">
<view class="price-box">
<view class="price-input">
<view class="input-box">
@ -254,10 +182,7 @@
placeholder="请输入心理价位"
placeholder-class="form-input-placeholder"
/>
<text
class="iconfont icon-qingchu"
@click="price = 0"
></text>
<text class="iconfont icon-qingchu" @click="price = 0"></text>
</view>
<text class="util"></text>
</view>
@ -322,7 +247,7 @@ export default {
onLoad() {
// #ifdef MP-WEIXIN
uni.enableAlertBeforeUnload({
message: "需求尚未发布,确定离开?"
message: "需求尚未发布,确定离开?",
});
// #endif
},
@ -368,17 +293,14 @@ export default {
},
selectAddress() {
const that = this;
this.$utils.toPage(
"/pages/address/address?openType=choose&id=" + that.addressId,
{
this.$utils.toPage("/pages/address/address?openType=choose&id=" + that.addressId, {
events: {
setAddress(address) {
that.addressId = address.id;
that.addressText = address.address + address.detail;
},
},
}
);
});
},
bindDateChange(e) {
this.datetime = e.detail.value;

View File

@ -1,10 +1,5 @@
<template>
<app-layout
headerBackgroundColor="#4B65ED"
textColor="light"
btnType="city"
title="熊熊安装队"
>
<app-layout headerBackgroundColor="#4B65ED" textColor="light" btnType="city" title="熊熊安装队">
<view class="search-component">
<widget-search />
</view>
@ -25,10 +20,7 @@
interval="3000"
duration="1000"
>
<swiper-item
v-for="(item, index) in notifyList"
:key="index"
>
<swiper-item v-for="(item, index) in notifyList" :key="index">
<view class="swiper-item notify-item">
<text class="limit-line clamp-1">
{{ item.title }}
@ -41,16 +33,8 @@
<view class="service-group">
<text class="section-title">建材安装服务</text>
<view class="group g1">
<view
class="service-item"
v-for="(item, index) in installServiceList"
:key="index"
>
<image
class="service-icon"
:src="item.icon"
mode="scaleToFill"
/>
<view class="service-item" v-for="(item, index) in installServiceList" :key="index">
<image class="service-icon" :src="item.icon" mode="scaleToFill" />
<text class="service-name limit-line clamp-1">
{{ item.title }}
</text>
@ -66,11 +50,7 @@
:key="index"
@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">
{{ item.title }}
</text>
@ -86,11 +66,7 @@
:key="index"
@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>
</view>

View File

@ -1,11 +1,5 @@
<template>
<app-layout
headerBackgroundColor="#F6F6F6"
backgroundColor="#F6F6F6"
textColor="dark"
title="我的"
btnType="unset"
>
<app-layout headerBackgroundColor="#F6F6F6" backgroundColor="#F6F6F6" textColor="dark" title="我的" btnType="unset">
<view class="member-header">
<view class="headimg">
<image class="img-src" :src="info.headimg" mode="aspectFill" />
@ -46,18 +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>

View File

@ -1,10 +1,5 @@
<template>
<app-layout
headerBackgroundColor="#F6F6F6"
title="确认订单"
textColor="dark"
backgroundColor="#F6F6F6"
>
<app-layout headerBackgroundColor="#F6F6F6" title="确认订单" textColor="dark" backgroundColor="#F6F6F6">
<view class="tips-container">
<widget-tips text="保险公司承保,人身财产,双重保障,下单无忧!" />
</view>
@ -19,12 +14,7 @@
</view>
<view class="widget-item">
<text class="iconfont icon-shijian icon"></text>
<picker
mode="date"
:value="datetime"
@change="bindDateChange"
class="picker"
>
<picker mode="date" :value="datetime" @change="bindDateChange" class="picker">
<text class="title limit-line clamp-1">
{{ datetime ? datetime : "选择期望上门时间" }}
</text>
@ -33,12 +23,7 @@
</view>
</view>
<view class="service-view">
<service-preview-item
class="service-item"
v-for="(item, idx) in serviceList"
:key="idx"
:data="item"
/>
<service-preview-item class="service-item" v-for="(item, idx) in serviceList" :key="idx" :data="item" />
</view>
<view class="insurance-box">
<service-insurance :insurance="insurance" @change="changeInsuranceState" />
@ -56,10 +41,7 @@
<agreement :agree="agree" @change="changeAgreeState" />
</view>
</view>
<view
class="bottom-components"
:style="{ bottom: config.safeAreaInsets.bottom + 'px' }"
>
<view class="bottom-components" :style="{ bottom: config.safeAreaInsets.bottom + 'px' }">
<text class="price">¥306.00</text>
<view class="pay" @click="pay">
<div class="text">去支付</div>
@ -106,7 +88,7 @@ export default {
ServicePreviewItem,
Agreement,
WidgetTips,
ServiceInsurance
ServiceInsurance,
},
computed: {
...mapState({
@ -124,17 +106,14 @@ export default {
},
selectAddress() {
const that = this;
this.$utils.toPage(
"/pages/address/address?openType=choose&id=" + that.addressId,
{
this.$utils.toPage("/pages/address/address?openType=choose&id=" + that.addressId, {
events: {
setAddress(address) {
that.addressId = address.id;
that.addressText = address.address + address.detail;
},
},
}
);
});
},
selectDateTime() {
console.log("选择时间");

View File

@ -12,7 +12,13 @@
</view>
</view>
<view class="order-list-group">
<swiper class="list-tab-list" :current="tabIndex" :duration="300" @change="changeTab" :style="{ height: tabHeight + 'px' }">
<swiper
class="list-tab-list"
:current="tabIndex"
:duration="300"
@change="changeTab"
:style="{ height: tabHeight + 'px' }"
>
<block v-for="(tabItem, tabIdx) in tabList" :key="tabIdx">
<swiper-item>
<view class="tab-item" :class="['tab' + tabIdx]">

View File

@ -1,19 +1,9 @@
<template>
<app-layout
headerBackgroundColor="#F6F6F6"
backgroundColor="#F6F6F6"
title="购物车"
textColor="dark"
>
<widget-tips
text="为什么会拆成多个订单?根据师傅服务能力与服务类型进行订单拆分"
/>
<app-layout headerBackgroundColor="#F6F6F6" backgroundColor="#F6F6F6" title="购物车" textColor="dark">
<widget-tips text="为什么会拆成多个订单?根据师傅服务能力与服务类型进行订单拆分" />
<view class="cart-container">
<view class="cart-group" v-for="(item, index) in list" :key="index">
<view
class="group-title limit-line clamp-1"
@click="clickGroup(index)"
>
<view class="group-title limit-line clamp-1" @click="clickGroup(index)">
<view class="group-checkbox">
<widget-check-box :size="50" :checked="item.checked" />
</view>
@ -22,15 +12,8 @@
</view>
</view>
<view class="group-items">
<view
class="cart-item"
v-for="(v, i) in item.list"
:key="i"
>
<view
class="item-checkbox"
@click="clickItem(index, i)"
>
<view class="cart-item" v-for="(v, i) in item.list" :key="i">
<view class="item-checkbox" @click="clickItem(index, i)">
<widget-check-box :size="50" :checked="v.checked" />
</view>
<view class="item-box">
@ -38,12 +21,7 @@
<widget-count-modify
class="component-add"
:initNumber="v.buyNumber"
@change="
changeNumber($event, {
parentIndex: index,
index: i,
})
"
@change="changeNumber($event, { parentIndex: index, index: i })"
/>
</view>
</view>
@ -150,9 +128,7 @@ export default {
//
checkedItem(parentIndex, itemIndex, state) {
this.list[parentIndex].list[itemIndex].checked =
typeof state === "undefined"
? !this.list[parentIndex].list[itemIndex].checked
: state;
typeof state === "undefined" ? !this.list[parentIndex].list[itemIndex].checked : state;
//
let allChecked = true;
this.list[parentIndex].list.forEach((item, index) => {

View File

@ -1,21 +1,10 @@
<template>
<app-layout
minHeight="unset"
btnType="unset"
title="分类"
backgroundColor="#F6F6F6"
headerBackgroundColor="#F6F6F6"
>
<app-layout minHeight="unset" btnType="unset" title="分类" backgroundColor="#F6F6F6" headerBackgroundColor="#F6F6F6">
<view class="search-component">
<widget-search />
</view>
<view class="cate">
<app-cate
:offsetHeight="95"
:data="data"
cateType="cate"
@clickItem="clickItem"
/>
<app-cate :offsetHeight="95" :data="data" cateType="cate" @clickItem="clickItem" />
</view>
<movable-area class="cart-icon-box">
<movable-view

View File

@ -1,23 +1,10 @@
<template>
<app-layout
headerBackgroundColor="#F6F6F6"
:title="pageTitle"
textColor="dark"
backgroundColor="#F6F6F6"
>
<app-layout headerBackgroundColor="#F6F6F6" :title="pageTitle" textColor="dark" backgroundColor="#F6F6F6">
<view class="service-detail-select-group">
<view
class="select-item"
:class="[tabIndex == 0 ? 'active' : '']"
@click="tabIndex = 0"
>
<view class="select-item" :class="[tabIndex == 0 ? 'active' : '']" @click="tabIndex = 0">
<text class="text">详情</text>
</view>
<view
class="select-item"
:class="[tabIndex == 1 ? 'active' : '']"
@click="tabIndex = 1"
>
<view class="select-item" :class="[tabIndex == 1 ? 'active' : '']" @click="tabIndex = 1">
<text class="text">评价</text>
</view>
</view>
@ -32,21 +19,9 @@
<swiper-item>
<view class="tab-item tab0">
<view class="service-section banner-box">
<swiper
class="service-banner-swiper"
circular
autoplay
@change="changeBanner"
>
<swiper-item
v-for="(item, index) in detail.images"
:key="index"
>
<image
class="img"
:src="item"
mode="aspectFill"
/>
<swiper class="service-banner-swiper" circular autoplay @change="changeBanner">
<swiper-item v-for="(item, index) in detail.images" :key="index">
<image class="img" :src="item" mode="aspectFill" />
</swiper-item>
</swiper>
<view class="swiper-number">
@ -74,9 +49,7 @@
<text class="text">商品详情</text>
</view>
<view class="rich-box">
<rich-text
:nodes="detail.content"
></rich-text>
<rich-text :nodes="detail.content"></rich-text>
</view>
</div>
</view>
@ -88,11 +61,7 @@
</view>
</swiper-item>
</swiper>
<view
class="bottom-components"
v-if="tabIndex == 0"
:style="{ bottom: config.safeAreaInsets.bottom + 'px' }"
>
<view class="bottom-components" v-if="tabIndex == 0" :style="{ bottom: config.safeAreaInsets.bottom + 'px' }">
<view class="price">
<text class="text">¥306.00</text>
</view>
@ -184,7 +153,7 @@ export default {
</script>
<style lang="less" scoped>
.service-detail-select-group{
.service-detail-select-group {
width: 100%;
display: flex;
align-items: center;

View File

@ -1,23 +1,9 @@
<template>
<app-layout
minHeight="unset"
btnType="back"
title="服务列表"
headerBackgroundColor="#FFFFFF"
backgroundColor="#FFFFFF"
>
<app-layout minHeight="unset" btnType="back" title="服务列表" headerBackgroundColor="#FFFFFF" backgroundColor="#FFFFFF">
<view class="cate">
<app-cate
:offsetHeight="0"
:data="data"
cateType="list"
@clickItem="clickItem"
/>
<app-cate :offsetHeight="0" :data="data" cateType="list" @clickItem="clickItem" />
</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-icon">
<text class="iconfont icon-gouwuche"></text>

View File

@ -1,11 +1,5 @@
<template>
<app-layout
headerBackgroundColor="#F6F6F6"
title="联保"
textColor="dark"
backgroundColor="#F6F6F6"
btnType="unset"
>
<app-layout headerBackgroundColor="#F6F6F6" title="联保" textColor="dark" backgroundColor="#F6F6F6" btnType="unset">
<view class="background">
<image class="image" :src="background" mode="widthFix" />
</view>
@ -41,12 +35,7 @@
<text>联系人</text>
</view>
<view class="input-box">
<input
class="input"
v-model="name"
placeholder="请输入姓名"
placeholder-class="form-input-placeholder"
/>
<input class="input" v-model="name" placeholder="请输入姓名" placeholder-class="form-input-placeholder" />
</view>
</view>
<view class="input-item">

View File

@ -1,10 +1,5 @@
<template>
<app-layout
headerBackgroundColor="#F6F6F6"
title="企业合作安装"
textColor="dark"
backgroundColor="#F6F6F6"
>
<app-layout headerBackgroundColor="#F6F6F6" title="企业合作安装" textColor="dark" backgroundColor="#F6F6F6">
<view class="background">
<image class="image" :src="background" mode="widthFix" />
</view>
@ -27,12 +22,7 @@
<text>联系人</text>
</view>
<view class="input-box">
<input
class="input"
v-model="name"
placeholder="请输入姓名"
placeholder-class="form-input-placeholder"
/>
<input class="input" v-model="name" placeholder="请输入姓名" placeholder-class="form-input-placeholder" />
</view>
</view>
<view class="input-item">

View File

@ -1,10 +1,5 @@
<template>
<app-layout
headerBackgroundColor="#F6F6F6"
title="工程安装"
textColor="dark"
backgroundColor="#F6F6F6"
>
<app-layout headerBackgroundColor="#F6F6F6" title="工程安装" textColor="dark" backgroundColor="#F6F6F6">
<view class="background">
<image class="image" :src="background" mode="widthFix" />
</view>
@ -40,12 +35,7 @@
<text>联系人</text>
</view>
<view class="input-box">
<input
class="input"
v-model="name"
placeholder="请输入姓名"
placeholder-class="form-input-placeholder"
/>
<input class="input" v-model="name" placeholder="请输入姓名" placeholder-class="form-input-placeholder" />
</view>
</view>
<view class="input-item">
@ -66,10 +56,7 @@
<text>需要师傅数量</text>
</view>
<view class="input-box">
<widget-count-modify
:initNumber="number"
@change="changeNumber"
/>
<widget-count-modify :initNumber="number" @change="changeNumber" />
</view>
</view>
<view class="input-item carry-style">
@ -78,18 +65,10 @@
</view>
<view class="input-box">
<view class="checkbox">
<view
class="checkbox-item"
:class="[needCarry == 1 ? 'active' : '']"
@click="needCarry = 1"
>
<view class="checkbox-item" :class="[needCarry == 1 ? 'active' : '']" @click="needCarry = 1">
<text></text>
</view>
<view
class="checkbox-item"
:class="[needCarry == 0 ? 'active' : '']"
@click="needCarry = 0"
>
<view class="checkbox-item" :class="[needCarry == 0 ? 'active' : '']" @click="needCarry = 0">
<text></text>
</view>
</view>

View File

@ -10,7 +10,7 @@ export default {
},
mutations: {
setConfig(state, data) {
state.config = {...state.config, ...data};
state.config = { ...state.config, ...data };
},
},
actions: {