页面完善
This commit is contained in:
parent
38b2438ff7
commit
3e0b1593c5
|
|
@ -48,13 +48,13 @@ const subCategories = [{
|
|||
cuIcon: 'shopfill',
|
||||
color: 'red',
|
||||
name: '空调清洗',
|
||||
badge: '69洗'
|
||||
badge: ''
|
||||
}, {
|
||||
id: 2,
|
||||
cuIcon: 'shopfill',
|
||||
color: 'orange',
|
||||
name: '家庭维修',
|
||||
badge: '新品'
|
||||
badge: ''
|
||||
}, {
|
||||
id: 3,
|
||||
cuIcon: 'shopfill',
|
||||
|
|
@ -111,25 +111,25 @@ const subCategories = [{
|
|||
badge: ''
|
||||
}, {
|
||||
id: 12,
|
||||
cuIcon: 'deliver',
|
||||
cuIcon: 'shopfill',
|
||||
color: 'green',
|
||||
name: '手机维修',
|
||||
badge: ''
|
||||
}, {
|
||||
id: 13,
|
||||
cuIcon: 'deliver',
|
||||
cuIcon: 'shopfill',
|
||||
color: 'pink',
|
||||
name: '洗衣洗鞋',
|
||||
badge: ''
|
||||
}, {
|
||||
id: 14,
|
||||
cuIcon: 'deliver',
|
||||
cuIcon: 'shopfill',
|
||||
color: 'pink',
|
||||
name: '上门安装',
|
||||
badge: ''
|
||||
}, {
|
||||
id: 15,
|
||||
cuIcon: 'deliver',
|
||||
cuIcon: 'shopfill',
|
||||
color: 'pink',
|
||||
name: '奢品养护',
|
||||
badge: ''
|
||||
|
|
@ -744,21 +744,21 @@ const myInfo = {
|
|||
isVip: false,
|
||||
level: 'V3'
|
||||
},
|
||||
balance: '162.83',
|
||||
balance: 0,
|
||||
integrate: 0,
|
||||
cartNum: 3,
|
||||
cartNum: 0,
|
||||
servCircle: {
|
||||
id: 1,
|
||||
name: '保利云景',
|
||||
news: [{
|
||||
newBuy: [{
|
||||
id: 1,
|
||||
avatarUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big33000.jpg',
|
||||
avatarUrl: '',
|
||||
userName: 'tsda9',
|
||||
action: '购买了家政/修理/门窗/滑轮更换服务',
|
||||
type: 0 // 0表示立即下单,1表示学家政
|
||||
}, {
|
||||
id: 2,
|
||||
avatarUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big33001.jpg',
|
||||
avatarUrl: '',
|
||||
userName: '心da8',
|
||||
action: '发布了清洗/空调/挂机清洗服务 高温蒸清全拆',
|
||||
type: 1 // 0表示立即下单,1表示学家政
|
||||
|
|
@ -1605,83 +1605,83 @@ const servCategory = [{
|
|||
}]
|
||||
|
||||
const categoryList = [{
|
||||
id: 1,
|
||||
name: '家电清洗',
|
||||
children: [{
|
||||
goodsCategoryId: 1,
|
||||
goodsCategoryName: '家电清洗',
|
||||
child: [{
|
||||
pId: 1,
|
||||
id: 2,
|
||||
name: '空调',
|
||||
children: [{
|
||||
id: 3,
|
||||
name: '单台清洗'
|
||||
goodsCategoryId: 2,
|
||||
goodsCategoryName: '空调',
|
||||
child: [{
|
||||
goodsCategoryId: 3,
|
||||
goodsCategoryName: '单台清洗'
|
||||
}, {
|
||||
id: 4,
|
||||
name: '套餐清洗'
|
||||
goodsCategoryId: 4,
|
||||
goodsCategoryName: '套餐清洗'
|
||||
}, {
|
||||
id: 5,
|
||||
name: '空调加氧'
|
||||
goodsCategoryId: 5,
|
||||
goodsCategoryName: '空调加氧'
|
||||
}]
|
||||
}, {
|
||||
pId: 1,
|
||||
id: 6,
|
||||
name: '烟灶',
|
||||
children: [{
|
||||
id: 7,
|
||||
name: '单台清洗'
|
||||
goodsCategoryId: 6,
|
||||
goodsCategoryName: '烟灶',
|
||||
child: [{
|
||||
goodsCategoryId: 7,
|
||||
goodsCategoryName: '单台清洗'
|
||||
}, {
|
||||
id: 8,
|
||||
name: '套餐清洗'
|
||||
goodsCategoryId: 8,
|
||||
goodsCategoryName: '套餐清洗'
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
id: 9,
|
||||
name: '衣物洗护',
|
||||
children: [{
|
||||
goodsCategoryId: 9,
|
||||
goodsCategoryName: '衣物洗护',
|
||||
child: [{
|
||||
pId: 9,
|
||||
id: 10,
|
||||
name: '丝绸服装',
|
||||
children: [{
|
||||
id: 11,
|
||||
name: '单件清洗'
|
||||
goodsCategoryId: 10,
|
||||
goodsCategoryName: '丝绸服装',
|
||||
child: [{
|
||||
goodsCategoryId: 11,
|
||||
goodsCategoryName: '单件清洗'
|
||||
}, {
|
||||
id: 12,
|
||||
name: '套餐清洗'
|
||||
goodsCategoryId: 12,
|
||||
goodsCategoryName: '套餐清洗'
|
||||
}]
|
||||
}, {
|
||||
pId: 9,
|
||||
id: 14,
|
||||
name: '呢绒服装',
|
||||
children: [{
|
||||
id: 15,
|
||||
name: '单件清洗'
|
||||
goodsCategoryId: 14,
|
||||
goodsCategoryName: '呢绒服装',
|
||||
child: [{
|
||||
goodsCategoryId: 15,
|
||||
goodsCategoryName: '单件清洗'
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
id: 16,
|
||||
name: 'Tab3',
|
||||
children: [{
|
||||
id: 17,
|
||||
name: 'Tab3-0',
|
||||
children: [{
|
||||
id: 18,
|
||||
name: 'Tab3-0-0'
|
||||
goodsCategoryId: 16,
|
||||
goodsCategoryName: 'Tab3',
|
||||
child: [{
|
||||
goodsCategoryId: 17,
|
||||
goodsCategoryName: 'Tab3-0',
|
||||
child: [{
|
||||
goodsCategoryId: 18,
|
||||
goodsCategoryName: 'Tab3-0-0'
|
||||
}, {
|
||||
id: 19,
|
||||
name: 'Tab3-0-1'
|
||||
goodsCategoryId: 19,
|
||||
goodsCategoryName: 'Tab3-0-1'
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
id: 20,
|
||||
name: 'Tab4',
|
||||
children: [{
|
||||
id: 21,
|
||||
name: 'Tab4-0',
|
||||
children: [{
|
||||
id: 22,
|
||||
name: 'Tab4-0-0'
|
||||
goodsCategoryId: 20,
|
||||
goodsCategoryName: 'Tab4',
|
||||
child: [{
|
||||
goodsCategoryId: 21,
|
||||
goodsCategoryName: 'Tab4-0',
|
||||
child: [{
|
||||
goodsCategoryId: 22,
|
||||
goodsCategoryName: 'Tab4-0-0'
|
||||
}, {
|
||||
id: 23,
|
||||
name: 'Tab4-0-1'
|
||||
goodsCategoryId: 23,
|
||||
goodsCategoryName: 'Tab4-0-1'
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ export default {
|
|||
title: '加载中'
|
||||
})
|
||||
// request 触发前拼接 url
|
||||
// args.url = 'https://www.opsoul.com' + args.url;
|
||||
args.url = 'https://www.opsoul.com' + args.url;
|
||||
// args.url = 'http://192.168.2.42:80' + args.url;
|
||||
args.url = 'http://127.0.0.1:80' + args.url;
|
||||
// args.url = 'http://127.0.0.1:80' + args.url;
|
||||
if (args.data) {
|
||||
args.data.deptId = globalData.deptId;
|
||||
args.data.from = globalData.from;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<view>
|
||||
<view class="padding-xl text-gray text-center">
|
||||
<view class="big-icon padding-tb" :class="'cuIcon-' + icon"></view>
|
||||
<view class="text-lg">开发中,敬请期待</view>
|
||||
<view class="text-lg">功能开发中,暂无法使用</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -33,13 +33,11 @@
|
|||
<text class="cuIcon-apps text-main-color"></text>
|
||||
<text class="cuIcon-triangledownfill"></text>
|
||||
</view>
|
||||
<view>
|
||||
<scroll-view scroll-x class="nav">
|
||||
<view class="flex text-center">
|
||||
<view class="cu-item flex-sub" :class="index==tabCur?'text-main-color cur':''"
|
||||
v-for="(item,index) in categories" :key="item.id" @tap="tabSelect" :data-id="index">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="flex-twice">
|
||||
<scroll-view scroll-x class="nav text-right" :scroll-with-animation="true" :scroll-left="scrollLeft">
|
||||
<view class="cu-item" :class="index==tabCur?'text-main-color cur':''"
|
||||
v-for="(item,index) in categories" :key="item.goodsCategoryId" @tap="tabSelect($event, item)" :data-index="index">
|
||||
{{item.goodsCategoryName}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
|
@ -53,7 +51,7 @@
|
|||
<block v-if="item.badge!=1">{{item.badge}}</block>
|
||||
</view>
|
||||
</view>
|
||||
<text>{{item.name}}</text>
|
||||
<text>{{item.goodsCategoryName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 细类 -->
|
||||
|
|
@ -65,7 +63,7 @@
|
|||
<block v-if="item.badge!=1">{{item.badge}}</block>
|
||||
</view>
|
||||
</view>
|
||||
<text>{{item.name}}</text>
|
||||
<text>{{item.goodsCategoryName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 超值服务 -->
|
||||
|
|
@ -119,6 +117,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
scrollLeft: 0,
|
||||
dotStyle: true,
|
||||
swiperList: [],
|
||||
tabCur: 0,
|
||||
|
|
@ -171,10 +170,12 @@
|
|||
pageSize: 50
|
||||
});
|
||||
this.hotGoods = hotGoodsRes.rows;
|
||||
// 加载品类
|
||||
this.loadCategoryList();
|
||||
|
||||
this.swiperList = await this.$api.data('swiperList');
|
||||
this.categories = await this.$api.data('categories');
|
||||
this.subCategories = await this.$api.data('subCategories');
|
||||
// this.categories = await this.$api.data('categories');
|
||||
// this.subCategories = await this.$api.data('subCategories');
|
||||
this.moduleBarInfos = await this.$api.data('moduleBarInfos');
|
||||
// this.hotGoods = await this.$api.data('hotGoods');
|
||||
// this.discountGoods = await this.$api.data('discountGoods');
|
||||
|
|
@ -185,6 +186,16 @@
|
|||
offBindEvent() {
|
||||
uni.$off('index_showProductDetail');
|
||||
},
|
||||
async loadCategoryList() {
|
||||
let typeList = await this.$request.listByStep();
|
||||
typeList = typeList.data;
|
||||
let subTypeList = await this.$request.listByStep({
|
||||
goodsCategoryId: typeList[0].goodsCategoryId
|
||||
});
|
||||
subTypeList = subTypeList.data;
|
||||
this.categories = subTypeList;
|
||||
this.tabSelect(null, this.categories[0]);
|
||||
},
|
||||
async loadRegionList() {
|
||||
let regionList = await this.$request.areaListByStep();
|
||||
regionList = regionList.data;
|
||||
|
|
@ -247,13 +258,19 @@
|
|||
this.areaMultiIndex = [this.areaMultiIndex[0], colObj.value, 0];
|
||||
}
|
||||
},
|
||||
async tabSelect(e) {
|
||||
this.tabCur = e.currentTarget.dataset.id;
|
||||
// 获取大类信息
|
||||
let categoryId = this.categories[this.tabCur].id;
|
||||
console.log("切换细类, 大类id=" + categoryId);
|
||||
let allSubCategories = await this.$api.data('subCategories');
|
||||
this.subCategories = allSubCategories.slice(0, (4 - categoryId) * 5);
|
||||
async tabSelect(e, item) {
|
||||
this.tabCur = e == null ? 0 : e.currentTarget.dataset.index;
|
||||
this.scrollLeft = (this.tabCur - 1) * 60;
|
||||
let subSubTypeList = await this.$request.listByStep({
|
||||
goodsCategoryId: item.goodsCategoryId
|
||||
});
|
||||
subSubTypeList = subSubTypeList.data;
|
||||
let subCategoryOpt = await this.$api.data('subCategories');
|
||||
for(let i = 0; i < subSubTypeList.length; i++) {
|
||||
subSubTypeList[i]['cuIcon'] = subCategoryOpt[i].cuIcon;
|
||||
subSubTypeList[i]['color'] = subCategoryOpt[i].color;
|
||||
}
|
||||
this.subCategories = subSubTypeList;
|
||||
},
|
||||
chooseCategory(item) {
|
||||
this.searchInfo.category = item;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="padding-top serv-news">
|
||||
<view class="flex justify-between padding-bottom" v-for="(item, index) in myInfo.servCircle.news">
|
||||
<view class="flex justify-between padding-bottom" v-for="(item, index) in myInfo.servCircle.newBuy">
|
||||
<view class="flex justify-start">
|
||||
<view class="cu-avatar round margin-right-sm"
|
||||
:style="'background-image:url(' + item.avatarUrl + ');'"></view>
|
||||
|
|
@ -287,19 +287,19 @@
|
|||
}],
|
||||
servOrderType: 0,
|
||||
productOrderTabList: [{
|
||||
type: 'pdOrdersWait2Pay',
|
||||
// type: -1,
|
||||
name: '待付款'
|
||||
}, {
|
||||
type: 'pdOrdersBought',
|
||||
type: -1,
|
||||
name: '买到的'
|
||||
}, {
|
||||
type: 'pdOrdersSaled',
|
||||
type: -1,
|
||||
name: '卖出的'
|
||||
}, {
|
||||
type: 'pdOrdersAfterServ',
|
||||
type: -1,
|
||||
name: '售后中'
|
||||
}, {
|
||||
type: 'pdOrdersFinish',
|
||||
type: -1,
|
||||
name: '已完成'
|
||||
}],
|
||||
productOrderType: 1
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
},
|
||||
methods: {
|
||||
async loadData() {
|
||||
this.pickedProductList = await this.$api.data('pickedProductList');
|
||||
// this.pickedProductList = await this.$api.data('pickedProductList');
|
||||
},
|
||||
bindEvent() {
|
||||
uni.$on('changePickedNum', this.changePickedNum);
|
||||
|
|
@ -140,9 +140,9 @@
|
|||
this.allChecked = !this.allChecked;
|
||||
},
|
||||
submit() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/order/order-detail'
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/order/order-detail'
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
<view class="cu-bar">
|
||||
<view class="action bar-first-action">
|
||||
<text class="cuIcon-shopfill text-main-color"></text>
|
||||
{{item.shopName}}
|
||||
{{item.name}}
|
||||
<view>
|
||||
<view class="cuIcon-right"></view>
|
||||
</view>
|
||||
|
|
@ -177,12 +177,18 @@
|
|||
},
|
||||
methods: {
|
||||
async loadData(params) {
|
||||
console.log(params)
|
||||
// this.pickedProductList = await this.$api.data('pickedProductList');
|
||||
this.pickedProductList = params.pickedProductList;
|
||||
this.loadTotalPrice();
|
||||
this.timeRangeList = this.$globalData.timeRangeList;
|
||||
this.timeRange = this.timeRangeList[0];
|
||||
},
|
||||
loadTotalPrice() {
|
||||
// 计算totalprice
|
||||
this.pickedProductList.forEach((obj) => {
|
||||
this.totalPrice += Number(obj.totalMoney)
|
||||
})
|
||||
},
|
||||
bindEvent() {
|
||||
uni.$on(this.$globalFun.CHOOSE_ADDRESS, this.chooseAddress);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 顶部操作条 -->
|
||||
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">支付结果</block>
|
||||
<cu-custom :bgColor="'bg-main-color'" :isBack="true" :isBackHome="true" :homePageUrl="'/pages/index/index'">
|
||||
<!-- <block slot="backText">返回</block>
|
||||
<block slot="content">支付结果</block> -->
|
||||
</cu-custom>
|
||||
<view class="padding-lg margin-xl text-center">
|
||||
<view class="text-xxl" v-if="customTip">{{customTip}}</view>
|
||||
|
|
|
|||
|
|
@ -38,21 +38,21 @@
|
|||
<text class="text-sl text-price">{{curProductSpecs.goodsPrice}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="text-df">已售:{{curProductSpecs.saledCount}}</text>
|
||||
<!-- <text class="text-df">已售:{{curProductSpecs.saledCount}}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
<view id="pageAnchor0" class="flex justify-between align-end">
|
||||
<view class="text-df">
|
||||
佣金:<text class="text-price margin-right-sm">{{curProductSpecs.groupPrice}}</text>
|
||||
<!-- 佣金:<text class="text-price margin-right-sm">{{curProductSpecs.groupPrice}}</text> -->
|
||||
<!-- <text class="cuIcon-share"></text> -->
|
||||
</view>
|
||||
<!-- <view class="text-df">
|
||||
距结束:<uni-countdown style="float: right;" :day="1" :hour="1" :minute="12" :second="40" background-color="#fff" splitorColor="#fff"></uni-countdown>
|
||||
</view> -->
|
||||
<view class="flex justify-end text-df align-center">
|
||||
<view>距结束:</view>
|
||||
<uni-countdown style="float: right;" :day="1" :hour="1" :minute="12" :second="40"
|
||||
background-color="#fff" splitorColor="#fff"></uni-countdown>
|
||||
<!-- <view>距结束:</view> -->
|
||||
<!-- <uni-countdown style="float: right;" :day="1" :hour="1" :minute="12" :second="40"
|
||||
background-color="#fff" splitorColor="#fff"></uni-countdown> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@
|
|||
let params = {
|
||||
pickedProductList: [{
|
||||
...this.shopInfo,
|
||||
totalMoney: this.totalPrice,
|
||||
product: [{
|
||||
...this.productInfo,
|
||||
discountPrice: this.specsList[0].discountPrice,
|
||||
|
|
|
|||
|
|
@ -236,7 +236,8 @@
|
|||
searchGoods() {
|
||||
let params = {
|
||||
areaId: this.searchInfo.area[2].areaId,
|
||||
goodsName: this.searchInfo.goodsName
|
||||
goodsName: this.searchInfo.goodsName,
|
||||
workerId: this.shopInfo.workerId
|
||||
};
|
||||
this.loadProductData(params);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -233,6 +233,10 @@
|
|||
this.categoryList = await this.$api.data('categoryList');
|
||||
this.areaList = await this.$api.data('areaList');
|
||||
this.defaultAddress = await this.$api.data('defaultAddress');
|
||||
uni.showToast({
|
||||
title: '功能开发中,暂无法使用',
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
nextStep() {
|
||||
this.curStep = this.curStep === this.stepList.length - 1 ? this.curStep : ++this.curStep
|
||||
|
|
|
|||
Loading…
Reference in New Issue