作者 Rico

等待公众号批下来测试

... ... @@ -93,6 +93,33 @@
}
}
,{
"path" : "pages/after/installDetails/installDetails",
"style" :
{
"navigationBarTitleText": "工单详情",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/after/service/service",
"style" :
{
"navigationBarTitleText": "维修",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/after/maintain/maintain",
"style" :
{
"navigationBarTitleText": "维护",
"enablePullDownRefresh": false
}
}
],
// 分包加载
// 不要接受编辑器的组件放置分包建议。因为那些不是在单个分包内使用的,也不知道为啥老报错。
... ...
... ... @@ -13,7 +13,7 @@
<block v-if="current === 0">
<!-- 地址 -->
<view class="home">
<image src="../../../static/all.png"></image>
<image src="../../../static/address.png"></image>
<view>
<text>1111 444444</text>
<text>2222</text>
... ... @@ -35,8 +35,8 @@
</block>
<block v-else>
<view class="No-" v-for="(item,index) in list2">
<image src="../../../static/imgs/kefu/sys_head.png" mode=""></image>
<view @click="toMsg(item.id)" class="No-" v-for="(item,index) in list2">
<!-- <image src="../../../static/imgs/kefu/sys_head.png" mode=""></image> -->
<view class="msg-wrp">
<text>{{item.consignee}} {{item.phone}}</text>
<text>{{item.province_name}}{{item.city_name}}{{item.area_name}}</text>
... ... @@ -67,6 +67,11 @@
};
},
methods:{
toMsg(e){
uni.navigateTo({
url:`/pages/after/installDetails/installDetails?id=${e}`
})
},
changeIndex(e){
this.current = parseInt(e.currentTarget.dataset.index)
if(this.current === 1){
... ... @@ -75,7 +80,7 @@
// }
request.post('/api/aftersale/installList').then(r=>{
if(r.code == 1){
console.log(3)
console.log(r)
this.list2 = r.data.data
}
})
... ... @@ -122,8 +127,9 @@
}
}
.home{
.home{
background-image:url("../../../static/border.png");
background-size: contain;
width: 686rpx;
padding-top: 32rpx;
padding-bottom: 32rpx;
... ... @@ -131,7 +137,8 @@
border-radius: 16rpx;
margin: 0 auto;
display: flex;
justify-content: center;
padding-left: 16rpx;
// justify-content:space-between;
align-items: center;
>image{
width: 48rpx;
... ... @@ -190,9 +197,11 @@
background-color: white;
border-radius: 16rpx;
padding-right: 24rpx;
justify-content:space-around;
// justify-content:space-around;
display: flex;
align-items: flex-start;
background-image: url("../../../static/installbg.png");
background-size: cover;
>image:first-child{
width: 96rpx;
height: 176rpx;
... ... @@ -204,6 +213,10 @@
}
.msg-wrp{
width: 486rpx;
margin: 0 auto;
padding-left: 20rpx;
justify-content: space-between;
display: flex;
flex-direction: column;
>text:nth-child(2){
... ... @@ -213,6 +226,8 @@
margin-top: 8rpx;
font-size: 24rpx;
font-weight: 400;
display: flex;
justify-content: space-between;
>text:last-child{
color: #969799;
}
... ...
<template>
<view class="install-wrp">
<!-- 收货地址 -->
<view class="address-wrp">
<image src="../../../static/address.png" mode=""></image>
<view>
<text>{{list.consignee}} {{list.phone}}</text>
<text>{{list.province_name + list.city_name + list.area_name +list.address}}</text>
</view>
</view>
<!-- 设备 -->
<view class="msg-wrp">
<image src="../../../static/style1.png" mode=""></image>
<text>设备</text>
</view>
<!-- 设备信息 -->
<view class="equipment">
<image :src="list.equipment_image" mode=""></image>
<text>{{list.equipment_name}}</text>
</view>
<!-- 购买信息title -->
<view class="msg-wrp">
<image src="../../../static/style1.png" mode=""></image>
<text>工单信息</text>
</view>
<!-- 工单信息 -->
<view class="order">
<view>
<text>工单编号:</text>
<text>{{list.order_sn}}</text>
</view>
<view>
<text>开始时间:</text>
<text>{{list.createtime}}</text>
</view>
<view>
<text>处理时间:</text>
<text>{{list.updatetime}}</text>
</view>
<view>
<text>工单进度:</text>
<text>{{list.status_msg}}</text>
</view>
</view>
</view>
</template>
<script>
import request from "../../../App.vue"
export default {
data() {
return {
list:''
};
},
onLoad: function(option) {
const data = {
id: option.id
}
request.post('/api/aftersale/installInfo',data,'GET').then(r => {
if (r.code == 1) {
this.list = r.data
}
})
},
}
</script>
<style lang="scss" scoped>
.install-wrp {
width: 686rpx;
margin: 0 auto;
}
.address-wrp {
display: flex;
padding-top: 32rpx;
padding-bottom: 32rpx;
margin-top: 32rpx;
background-color: white;
border-radius: 16rpx;
padding-left: 16rpx;
align-items: center;
background-image: url('../../../static/border.png');
background-size:contain;
>image{
width: 48rpx;
height: 48rpx;
}
>view{
padding-left: 18rpx;
display: flex;
flex-direction: column;
>text:first-child{
color: #323233;
}
>text:last-child{
color:#969799;
font-size: 24rpx;
padding-top: 16rpx;
}
}
}
.msg-wrp{
display: flex;
margin-top: 40rpx;
align-items: center;
>image{
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
>text{
color: #000000;
font-size: 28rpx;
font-weight: 600;
}
}
.equipment{
display: flex;
align-items: flex-start;
padding-top: 24rpx;
padding-bottom: 24rpx;
padding-left: 24rpx;
border-radius: 16rpx;
background-color: white;
margin-top: 32rpx;
>image{
width: 160rpx;
height: 160rpx;
margin-right: 24rpx;
}
}
.order{
padding: 32rpx;
background-color: white;
border-radius: 16rpx;
margin-top: 32rpx;
font-size: 24rpx;
>view{
display: flex;
justify-content: space-between;
>text:last-child{
color: #969799;
}
margin-bottom: 24rpx;
}
>view:last-child{
margin-bottom: 0;
}
}
</style>
... ...
<template>
<view>
<view class="all" >
<view
:class="[current === index ? 'Tong' : '']"
@click="changeIndex"
:data-index="index"
v-for="(item,index) in list">
{{item}}
</view>
</view>
<block v-if="current === 0">
<!-- 地址 -->
<view class="home">
<image src="../../../static/address.png"></image>
<view>
<text>1111 444444</text>
<text>3333</text>
</view>
</view>
<!-- 设备 -->
<view class="title-wrp">
<image src="../../../static/style1.png" mode=""></image>
<text>设备</text>
</view>
<!-- 设备详情 -->
<view class="xiangxi">
<text>产品类型</text>
<view>
<picker :value=0 mode="selector" :range="listSelect" @change="change">
<view>{{value_ || '请选择'}}</view>
</picker>
<image src="../../../static/back.png" mode=""></image>
</view>
</view>
<!-- 设备 -->
<view class="title-wrp">
<image src="../../../static/style1.png" mode=""></image>
<text>维护包</text>
</view>
<view class="bottom-wrp">
<text @click="callPhone">联系电话: 11111111111111</text>
<view>维护</view>
</view>
<view class="equipment">
<view class="equipment-wrp">
<checkbox checked="true" />
<image src="../../../static/imgs/app_icon/icon1.png" mode=""></image>
<view>
<text>1111111</text>
<text>222222</text>
</view>
</view>
</view>
</block>
<block v-else>
<view @click="toMsg(item.id)" class="No-" v-for="(item,index) in list2">
<!-- <image src="../../../static/imgs/kefu/sys_head.png" mode=""></image> -->
<view class="msg-wrp">
<text>{{item.consignee}} {{item.phone}}</text>
<text>{{item.province_name}}{{item.city_name}}{{item.area_name}}</text>
<view class="msg">
<text>工单编号</text>
<text>{{item.order_sn}}</text>
</view>
<view class="msg">
<text>开始时间</text>
<text>{{item.createtime}}</text>
</view>
</view>
<image src="../../../static/back.png"></image>
</view>
</block>
</view>
</template>
<script>
import request from "../../../App.vue"
export default {
data() {
return {
list:['预约维修','历史工单'],
current:0,
list2:'',
listSelect:['dnkmsqjodjioqw','fjiwjio'],
value_:'',
};
},
methods:{
change(e){
this.value_ = this.listSelect[e.detail.value]
},
toMsg(e){
uni.navigateTo({
url:`/pages/after/installDetails/installDetails?id=${e}`
})
},
changeIndex(e){
this.current = parseInt(e.currentTarget.dataset.index)
if(this.current === 1){
// const data = {
// page:0
// }
request.post('/api/aftersale/installList').then(r=>{
if(r.code == 1){
console.log(r)
this.list2 = r.data.data
}
})
}
}
},
onLoad:function(option){
const data = {
user_address_id : option.id
}
request.post('/api/aftersale/repairView').then(r=>{
if(r.code == 1){
console.log(r)
}
})
},
}
</script>
<style lang="scss" scoped>
.equipment{
background-color: white;
border-radius: 16rpx;
width: 686rpx;
margin: 0 auto;
padding-left: 32rpx;
padding-right: 32rpx;
}
.equipment-wrp{
display: flex;
align-items: center;
// justify-content: space-between;
padding-top: 32rpx;
padding-bottom: 32rpx;
>image{
width: 160rpx;
height: 160rpx;
margin: 0 24rpx;
}
>view{
display: flex;
flex-direction: column;
>text:first-child{
margin-bottom:38rpx;
}
>text:last-child{
color: #EE0A24;
font-size: 24rpx;
font-weight: 600;
}
}
}
.bottom-wrp{
width: 686rpx;
text-align: center;
position: absolute;
bottom: 64rpx;
// top:50%;
left:50%;
transform:translate(-50%, -50%);
>text{
color: #576B95;
text-decoration: underline;
font-size: 24rpx;
}
>view{
margin-top: 32rpx;
background: linear-gradient(135deg,#08a3e3, #0ac6d2);
border-radius: 16rpx;
color: white;
padding-top: 24rpx;
padding-bottom: 24rpx;
}
}
.all{
display: flex;
justify-content: space-around;
color:#323233 ;
font-size: 28rpx;
padding-top: 24rpx;
padding-bottom: 24rpx;
background-color: white;
position: relative;
margin-bottom: 48rpx;
>view{
display: flex;
justify-content: center;
}
>.Tong::after{
bottom: 0rpx;
content: '';
display: block;
width: 25rpx;
height: 7rpx;
background: linear-gradient(135deg,#0cdbc7, #06c3d9);
border-radius: 200rpx;
position: absolute;
}
}
.home{
background-image:url("../../../static/border.png");
background-size: contain;
width: 686rpx;
padding-top: 32rpx;
padding-bottom: 32rpx;
background-color: white;
border-radius: 16rpx;
margin: 0 auto;
display: flex;
padding-left: 16rpx;
// justify-content:space-between;
align-items: center;
>image{
width: 48rpx;
height: 48rpx;
}
>view{
display: flex;
flex-direction: column;
margin-left: 27rpx;
}
}
.title-wrp{
display: flex;
align-items: center;
width: 686rpx;
padding-top: 32rpx;
padding-bottom: 32rpx;
margin: 0 auto;
>image{
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
>text{
font-size: 28rpx;
font-weight: 600;
}
}
.xiangxi{
background-color: white;
display: flex;
align-items: flex-start;
justify-content:space-between;
width: 686rpx;
margin: 0 auto;
padding: 24rpx 32rpx;
border-radius: 16rpx;
>view{
color: #C8C9CC;
font-size: 28rpx;
display: flex;
align-items: center;
}
image{
width: 32rpx;
height: 32rpx;
margin-left: 24rpx;
}
}
.No-{
margin: 0 auto;
width: 686rpx;
padding-top: 32rpx;
padding-bottom: 32rpx;
background-color: white;
border-radius: 16rpx;
padding-right: 24rpx;
// justify-content:space-around;
display: flex;
align-items: flex-start;
background-image: url("../../../static/installbg.png");
background-size: cover;
>image:first-child{
width: 96rpx;
height: 176rpx;
}
>image:last-child{
width: 32rpx;
height: 32rpx;
}
}
.msg-wrp{
width: 486rpx;
margin: 0 auto;
padding-left: 20rpx;
justify-content: space-between;
display: flex;
flex-direction: column;
>text:nth-child(2){
margin-top: 8rpx;
}
.msg{
margin-top: 8rpx;
font-size: 24rpx;
font-weight: 400;
display: flex;
justify-content: space-between;
>text:last-child{
color: #969799;
}
}
}
</style>
... ...
<template>
<view>
<view class="all" >
<view
:class="[current === index ? 'Tong' : '']"
@click="changeIndex"
:data-index="index"
v-for="(item,index) in list">
{{item}}
</view>
</view>
<block v-if="current === 0">
<!-- 地址 -->
<view class="home">
<image src="../../../static/address.png"></image>
<view>
<text>1111 444444</text>
<text>3333</text>
</view>
</view>
<!-- 设备 -->
<view class="title-wrp">
<image src="../../../static/style1.png" mode=""></image>
<text>设备</text>
</view>
<!-- 设备详情 -->
<view class="xiangxi">
<text>产品类型</text>
<view>
<picker :value=0 mode="selector" :range="listSelect" @change="change">
<view>{{value_ || '请选择'}}</view>
</picker>
<image src="../../../static/back.png" mode=""></image>
</view>
</view>
<view class="bottom-wrp">
<text @click="callPhone">联系电话: 11111111111111</text>
<view>维修</view>
</view>
</block>
<block v-else>
<view @click="toMsg(item.id)" class="No-" v-for="(item,index) in list2">
<!-- <image src="../../../static/imgs/kefu/sys_head.png" mode=""></image> -->
<view class="msg-wrp">
<text>{{item.consignee}} {{item.phone}}</text>
<text>{{item.province_name}}{{item.city_name}}{{item.area_name}}</text>
<view class="msg">
<text>工单编号</text>
<text>{{item.order_sn}}</text>
</view>
<view class="msg">
<text>开始时间</text>
<text>{{item.createtime}}</text>
</view>
</view>
<image src="../../../static/back.png"></image>
</view>
</block>
</view>
</template>
<script>
import request from "../../../App.vue"
export default {
data() {
return {
list:['预约维修','历史工单'],
current:0,
list2:'',
listSelect:['dnkmsqjodjioqw','fjiwjio'],
value_:'',
};
},
methods:{
change(e){
this.value_ = this.listSelect[e.detail.value]
},
toMsg(e){
uni.navigateTo({
url:`/pages/after/installDetails/installDetails?id=${e}`
})
},
changeIndex(e){
this.current = parseInt(e.currentTarget.dataset.index)
if(this.current === 1){
// const data = {
// page:0
// }
request.post('/api/aftersale/installList').then(r=>{
if(r.code == 1){
console.log(r)
this.list2 = r.data.data
}
})
}
}
},
onLoad:function(option){
const data = {
user_address_id : option.id
}
request.post('/api/aftersale/repairView').then(r=>{
if(r.code == 1){
console.log(r)
}
})
},
}
</script>
<style lang="scss" scoped>
.bottom-wrp{
width: 686rpx;
text-align: center;
position: absolute;
bottom: 64rpx;
// top:50%;
left:50%;
transform:translate(-50%, -50%);
>text{
color: #576B95;
text-decoration: underline;
font-size: 24rpx;
}
>view{
margin-top: 32rpx;
background: linear-gradient(135deg,#08a3e3, #0ac6d2);
border-radius: 16rpx;
color: white;
padding-top: 24rpx;
padding-bottom: 24rpx;
}
}
.all{
display: flex;
justify-content: space-around;
color:#323233 ;
font-size: 28rpx;
padding-top: 24rpx;
padding-bottom: 24rpx;
background-color: white;
position: relative;
margin-bottom: 48rpx;
>view{
display: flex;
justify-content: center;
}
>.Tong::after{
bottom: 0rpx;
content: '';
display: block;
width: 25rpx;
height: 7rpx;
background: linear-gradient(135deg,#0cdbc7, #06c3d9);
border-radius: 200rpx;
position: absolute;
}
}
.home{
background-image:url("../../../static/border.png");
background-size: contain;
width: 686rpx;
padding-top: 32rpx;
padding-bottom: 32rpx;
background-color: white;
border-radius: 16rpx;
margin: 0 auto;
display: flex;
padding-left: 16rpx;
// justify-content:space-between;
align-items: center;
>image{
width: 48rpx;
height: 48rpx;
}
>view{
display: flex;
flex-direction: column;
margin-left: 27rpx;
}
}
.title-wrp{
display: flex;
align-items: center;
width: 686rpx;
padding-top: 32rpx;
padding-bottom: 32rpx;
margin: 0 auto;
>image{
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
>text{
font-size: 28rpx;
font-weight: 600;
}
}
.xiangxi{
background-color: white;
display: flex;
align-items: flex-start;
justify-content:space-between;
width: 686rpx;
margin: 0 auto;
padding: 24rpx 32rpx;
border-radius: 16rpx;
>view{
color: #C8C9CC;
font-size: 28rpx;
display: flex;
align-items: center;
}
image{
width: 32rpx;
height: 32rpx;
margin-left: 24rpx;
}
}
.No-{
margin: 0 auto;
width: 686rpx;
padding-top: 32rpx;
padding-bottom: 32rpx;
background-color: white;
border-radius: 16rpx;
padding-right: 24rpx;
// justify-content:space-around;
display: flex;
align-items: flex-start;
background-image: url("../../../static/installbg.png");
background-size: cover;
>image:first-child{
width: 96rpx;
height: 176rpx;
}
>image:last-child{
width: 32rpx;
height: 32rpx;
}
}
.msg-wrp{
width: 486rpx;
margin: 0 auto;
padding-left: 20rpx;
justify-content: space-between;
display: flex;
flex-direction: column;
>text:nth-child(2){
margin-top: 8rpx;
}
.msg{
margin-top: 8rpx;
font-size: 24rpx;
font-weight: 400;
display: flex;
justify-content: space-between;
>text:last-child{
color: #969799;
}
}
}
</style>
... ...
... ... @@ -10,8 +10,8 @@
<view>请选择服务类型</view>
<!-- 安装 维修 维护 -->
<image @click="toinsl" src="../../static/insall.png" mode="widthFix"></image>
<image src="../../static/service.png" mode="widthFix"></image>
<image src="../../static/maintenance.png" mode="widthFix"></image>
<image @click="toserve" src="../../static/service.png" mode="widthFix"></image>
<image @click="tomaintain" src="../../static/maintenance.png" mode="widthFix"></image>
</view>
... ... @@ -126,6 +126,16 @@ export default {
url:'/pages/after/install/install'
})
},
toserve(){
uni.navigateTo({
url:'/pages/after/service/service'
})
},
tomaintain(){
uni.navigateTo({
url:'/pages/after/maintain/maintain'
})
},
getViewData() {
let that = this;
that.$api('custom', {
... ...