服务调用

dev
shuxiaoquan 10 months ago
parent 775dc191c8
commit b7aa5b1b05
  1. 28
      api/newFun.js
  2. 2
      pages.json
  3. 127
      pages/activity/intimate.vue
  4. 1
      pages/address/index.vue
  5. 2
      pages/news/article/add.vue
  6. 2
      pages/news/article/classify.vue
  7. 41
      pages/news/goods/list.vue
  8. 472
      pages/news/recycling/confirm - 副本.vue
  9. 265
      pages/news/recycling/confirm.vue
  10. 106
      pages/news/recycling/detail.vue
  11. 85
      pages/news/recycling/index.vue
  12. 68
      pages/serve/index.vue
  13. BIN
      static/news/icon-recyling-tab-04.png

@ -1,17 +1,27 @@
import request from '@/utils/request'
// api地址
const api = {
list: 'shop/list',
detail: 'shop/detail'
// 服务 服务列表 查询优惠券
export const serverCheckOrder = (param) => {
return request.post('server/checkOrder', param)
}
// 服务 服务列表
export const serverList = (param) => {
return request.post('server/list', param)
}
// 服务 服务分类
export const serverCategoryList = (param) => {
return request.post('server/categoryList', param)
}
// 自提门店列表
export const inviteList = (param) => {
return request.get(api.list, param)
// 店长 商品列表
export const storeKeeperList = (param) => {
return request.get('storeKeeper/list', param)
}
// 门店详情
export const detail = (shopId) => {
return request.get(api.detail, { shopId })
export const storeKeeperDetail = (shopId) => {
return request.get('shop/detail', { shopId })
}

@ -746,7 +746,7 @@
{
"path": "recycling/detail",
"style": {
"navigationBarTitleText": "上门回收",
"navigationBarTitleText": "",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}

@ -3,28 +3,21 @@
<view class="intimate-navbar">
<u-navbar title="贴心服务" :border-bottom="false" :background="isScroll?background:background1"></u-navbar>
</view>
<view class="intimate-hd">
<image src="@/static/home/phone.jpg"></image>
<view class="a">大白兔维修<u-icon style="margin-left: 10rpx;" name="arrow-right"></u-icon></view>
<view class="b">上门服务 细心周到</view>
<view class="intimate-hd" @click="openPage(1)">
<image :src="storeInfo.image_url"></image>
<view class="a">{{storeInfo.store_name}}<u-icon style="margin-left: 10rpx;" name="arrow-right"></u-icon></view>
<view class="b">{{storeInfo.describe}}</view>
</view>
<scroll-view scroll-x class="intimate-menu">
<!-- <scroll-view scroll-x class="intimate-menu">
<view class="item" @click="tabItem1(i)" v-for="i in 10" :key="i" :class="tabIndex1==i?'item-on':''">
<image src="@/static/home/phone.jpg"></image>
<view class="p">手机</view>
</view>
</scroll-view>
</scroll-view> -->
<view class="intimate-bd">
<scroll-view scroll-y class="a">
<view class="item" @click="tabItem(0)" :class="tabIndex==0?'item-on':''">全部商品</view>
<view class="item" @click="tabItem(1)" :class="tabIndex==1?'item-on':''">TCL</view>
<view class="item" @click="tabItem(2)" :class="tabIndex==2?'item-on':''">创维</view>
<view class="item" @click="tabItem(3)" :class="tabIndex==3?'item-on':''">海尔</view>
<view class="item" @click="tabItem(4)" :class="tabIndex==4?'item-on':''">长虹</view>
<view class="item" @click="tabItem(5)" :class="tabIndex==5?'item-on':''">小米</view>
<view class="item" @click="tabItem(6)" :class="tabIndex==6?'item-on':''">东芝</view>
<view class="item" @click="tabItem(7)" :class="tabIndex==7?'item-on':''">华为</view>
<view class="item" @click="tabItem(8)" :class="tabIndex==8?'item-on':''">雷鸟</view>
<view class="item" @click="tabItem(-1)" :class="tabIndex==-1?'item-on':''">全部商品</view>
<view class="item" @click="tabItem(i)" v-for="(a,i) in list" :key="i" :class="tabIndex==i?'item-on':''">{{a.name}}</view>
</scroll-view>
<view class="b">
<view class="t">
@ -34,26 +27,29 @@
<view class="item" @click="tabFilter(3)" :class="filterIndex==3?'item-on':''">综合</view>
</view>
<scroll-view scroll-y class="l">
<view class="item" v-for="i in 10" :key="i" @click="tabFilter(0)">
<image src="@/static/home/phone.jpg"></image>
<view class="title">
<text>自营</text>iphone13 绿色 128GB
<view class="item" v-for="(a,i) in list1" :key="i" @click="openPage(2,a)">
<image :src="a.server_image"></image>
<view class="title">
<!-- <text>自营</text> -->
{{a.server_name}}
</view>
<view class="price">
<view class="n"><text>7595</text>到手价</view>
<view class="o">7595</view>
<view class="n"><text>{{a.server_price}}</text>到手价</view>
<view class="o">{{a.line_price}}</view>
</view>
<view class="desc">
200+条评论 99%好评率
{{a.comment_num}}条评论 {{a.comment_rate}}好评率
</view>
</view>
</view>
<u-empty v-if="isShow" text="暂无信息" mode="list"></u-empty>
</scroll-view>
</view>
</view>
</view>
</template>
<script>
<script>
import * as newFunApi from '@/api/newFun'
import img from "@/static/news/refund-bg1.png"
export default {
data() {
@ -66,26 +62,21 @@
background: 'transparent',
backgroundSize: '100%',
},
isShow: true,
isShow: false,
tabIndex1: 1,
tabIndex: 0,
tabIndex: -1,
filterIndex: 0,
keyword: "",
list: [{
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
},
{
image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
title: '身无彩凤双飞翼,心有灵犀一点通'
},
{
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
}
],
list: [],
list1: [],
filterFlag: true,
}
},
onLoad(o) {
this.tabIndex = o.index?(o.index): -1
this.getList();
this.storeInfo = uni.getStorageSync("Store").storeInfo
},
onPageScroll(e){
if(e.scrollTop <= 44){
this.isScroll = true;
@ -93,15 +84,57 @@
this.isScroll = false;
}
},
methods: {
tabItem(index){
this.tabIndex = index;
methods: {
/**
* 获取列表
*/
async getList() {
let {status, message, data} = await newFunApi.serverCategoryList({});
if(status == 200){
this.list = data.list
this.getGoodsList();
}
},
/**
* 获取商品列表
*/
async getGoodsList() {
let {status, message, data} = await newFunApi.serverList({
server_name: "",
category_id: this.tabIndex == -1?"":(this.list.length > 0?this.list[this.tabIndex].category_id:""),
order_field: this.filterIndex == 0?"server_price":this.filterIndex == 1?"line_price":this.filterIndex == 2?"sold":"",
order_sort: this.filterFlag?"desc":"asc"
});
if(status == 200){
this.list1 = data.list
this.isShow = data.total == 0?true:false
}
},
openPage(index,a){
if(index == 1){
uni.navigateBack({
delta:1
})
}else if(index == 2){
uni.setStorageSync("getInfo",a)
uni.navigateTo({
url: "/pages/news/recycling/detail?type=1"
})
}
},
tabItem1(index){
this.tabIndex1 = index;
tabItem(index){
this.tabIndex = index;
this.filterIndex = 0;
this.getGoodsList();
},
tabFilter(index){
this.filterIndex = index;
tabFilter(index){
if(index == this.filterIndex){
this.filterFlag = !this.filterFlag
}else{
this.filterFlag = true
}
this.filterIndex = index;
this.getGoodsList();
}
}
}
@ -176,7 +209,7 @@
&-bd{
padding: 30rpx 0 0;
display: flex;
height: calc(100vh - 500rpx);
height: calc(100vh - 280rpx);
box-sizing: border-box;
overflow: hidden;
.a{

@ -82,7 +82,6 @@
},
methods: {
//
getPageData() {
const app = this

@ -89,7 +89,7 @@
if(status == 200){
this.detail = data.detail
}
}
},
//
async getCategoryList(categoryId) {
const {status, message, data} = await CategoryApi.list();

@ -42,7 +42,7 @@
methods: {
//
async toSubmit(){
await
},
}

@ -2,8 +2,8 @@
<view class="goods">
<view class="search">
<view class="box">
<image src="/static/news/icon-search.png"></image>
<input type="search" placeholder="商品名称/编码" />
<image src="/static/news/icon-search.png" @click="getList()"></image>
<input v-model="keyword" type="search" placeholder="商品名称/编码" />
</view>
</view>
<view class="goods-bd">
@ -34,15 +34,46 @@
</view>
</template>
<script>
<script>
import * as newFunApi from '@/api/newFun'
export default {
data() {
return {
list: [],
keyword: "",
total: 1,
pageNum: 1,
};
},
onReady() {
this.getList();
},
onReachBottom() {
if(this.articleList.length <= this.total){
this.pageNum ++;
this.getList();
}
},
methods: {
/**
* 获取列表
*/
async getList() {
uni.showLoading({
title:"加载中"
})
let {status, message, data} = await newFunApi.storeKeeperList({
goodsNo: "",
page: this.pageNum,
listType: "all",
goodsName: this.keyword
});
if(status == 200){
uni.hideLoading();
this.list = this.list.concat(data.list.data)
this.total = data.list.total
}
},
}
}
</script>

@ -0,0 +1,472 @@
<template>
<view class="recycling">
<view class="recycling-hd">
<image src="@/static/news/recyling-banner-01.png"></image>
</view>
<view class="recycling-bd">
<view class="tab">
<view class="a" v-if="type == 2">
<view class="item" @click="tabItem(1)"></view>
<view class="item" @click="tabItem(2)"></view>
<view class="item" @click="tabItem(3)"></view>
</view>
<view class="b" v-if="type == 2">
<image v-if="tabIndex == 1" src="@/static/news/icon-recyling-tab-01.png"></image>
<image v-if="tabIndex == 2" src="@/static/news/icon-recyling-tab-02.png"></image>
<image v-if="tabIndex == 3" src="@/static/news/icon-recyling-tab-03.png"></image>
</view>
<view class="b" v-else>
<image src="@/static/news/icon-recyling-tab-04.png"></image>
</view>
</view>
<view class="goods">
<view class="a">
<image src="@/static/news/icon-mall.jpg"></image>京送家电武隆路店
</view>
<view class="b">
<view class="l">
<image class="pic" src="@/static/home/phone.jpg"></image>
<view class="info">
<view class="tel">13770577307</view>
<view class="address">杭州市萧山区宏达路234号 国际中心</view>
<view class="time">营业时间10:00-18:00</view>
</view>
<view class="do">
<view class="tel">
<image src="@/static/news/tel.png"></image>电话
</view>
<view class="tel">
<image src="@/static/news/address.png"></image>导航
</view>
</view>
</view>
<view class="r">
<image class="pic" src="@/static/home/phone.jpg"></image>
<view class="info">
<view class="tel">手机回收</view>
<view class="price">¥<text>4189234</text></view>
</view>
<view class="num">
x1
</view>
</view>
</view>
</view>
<view class="form">
<view class="item">
<view class="a">服务时间</view>
<view class="b" @click="openPage(1)">
<view class="select">请选择预约到店时间</view>
<u-icon style="margin-left: 10rpx;" name="arrow-right"></u-icon>
</view>
</view>
<view class="item">
<view class="a">联系人</view>
<view class="b">
<input class="box1" type="text" placeholder="联系人姓名" />
<view class="radio">
<u-radio-group v-model="radioValue" active-color="red">
<u-radio name="先生">先生</u-radio>
<u-radio name="女士">女士</u-radio>
</u-radio-group>
</view>
</view>
</view>
<view class="item">
<view class="a">联系电话</view>
<view class="b">
<input class="box" type="text" placeholder="联系人手机号码" />
</view>
</view>
<view class="item" v-if="tabIndex == 3">
<view class="a">联系人微信</view>
<view class="b">
<input class="box" type="text" placeholder="联系人微信号码" />
</view>
</view>
<view class="item" v-if="tabIndex == 3">
<view class="a">发件地址</view>
<view class="b">
<picker mode="region">
<view class="select">请选择所在人城市</view>
</picker>
</view>
</view>
<view class="item" v-if="tabIndex == 3">
<view class="a">门牌号</view>
<view class="b">
<input class="box" type="text" placeholder="详细地址 例:12幢1单元102室" />
</view>
</view>
<view class="item">
<view class="a">期待卖价</view>
<view class="b">
<input class="box" type="text" placeholder="请输入您期待的售卖价格(元)" />
</view>
</view>
<view class="photo">
<u-upload :action="action" width="160" height="160" :file-list="fileList" :custom-btn="true" max-count="5">
<template v-slot:addBtn>
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image src="/static/news/icon-upload.png"></image>
<view class="1">上传图片</view>
<view class="1">1/8</view>
</view>
</template>
</u-upload>
</view>
<view class="remark">
<view class="name">留言 </view>
<view class="xu">
<view class="li">可提前来</view>
<view class="li">来之前打电话</view>
<view class="li">请尽快联系我</view>
</view>
<view class="content">
<u-input v-model="value" height="260" type="textarea" placeholder="请输入您的留言,最多可留言100字" :border="true" />
</view>
</view>
</view>
</view>
<view class="recycling-fd">
<view class="a" v-if="type==2">免支付预购</view>
<view class="c" v-else>{{info.server_price}}</view>
<view class="b" @click="openPage(2)">提交订单</view>
</view>
</view>
</template>
<script>
export default{
data(){
return {
info: {},
type: 1,
radioValue: "男士",
tabIndex: 1,
fileList: [
{
url: 'http://pics.sc.chinaz.com/files/pic/pic9/201912/hpic1886.jpg',
}
],
}
},
onLoad(o) {
this.info = uni.getStorageSync("getInfo")
this.type = o.type
},
methods: {
tabItem(i) {
this.tabIndex = i
},
openPage(i){
if(i == 1){
uni.navigateTo({
url: "/pages/news/recycling/timer"
})
}else {
uni.redirectTo({
url: "/pages/news/recycling/order"
})
}
},
}
}
</script>
<style lang="scss" scoped>
.recycling{
min-height: 100vh;
background-color: #FFFFFF;
padding-bottom: 130rpx;
overflow: hidden;
.slot-btn{
width: 80px;
height: 80px;
background: #FFFFFF;
border-radius: 10rpx;
border: 1px solid #C0C0C0;
text-align: center;
font-size: 24rpx;
font-weight: 500;
color: #D1D1D1;
image{
width: 50rpx;
height: 50rpx;
margin-top: 20rpx;
}
}
&-hd{
width: 686rpx;
height: 152rpx;
border-radius: 8rpx;
overflow: hidden;
margin: 0 auto;
margin-top: 30rpx;
image{
width: 100%;
height: 100%;
}
}
&-bd{
width: 690rpx;
min-height: 280rpx;
overflow: hidden;
margin: 0 auto;
margin-top: 30rpx;
position: relative;
.tab{
width: 690rpx;
height: 280rpx;
.b{
width: 100%;
height: 100%;
display: block;
image{
width: 100%;
height: 100%;
display: block;
}
}
.a{
width: 100%;
height: 98rpx;
position: absolute;
left: 0;
top: 0;
z-index: 2;
display: flex;
align-items: center;
.item{
flex: 1;
height: 100%;
}
}
}
.goods{
padding: 30rpx 35rpx;
overflow: hidden;
border-left: 1px solid #F1F1F1;
border-right: 1px solid #F1F1F1;
.a{
display: flex;
align-items: center;
image{
width: 50rpx;
height: 50rpx;
margin-right: 10rpx;
}
font-size: 28rpx;
font-weight: 500;
color: #000000;
}
.b{
padding: 20rpx 0;
overflow: hidden;
.l{
display: flex;
align-items: center;
overflow: hidden;
.pic{
width: 182rpx;
height: 146rpx;
border-radius: 6rpx;
margin-right: 10rpx;
}
.info{
width: 305rpx;
margin-right: 20rpx;
.title{
font-size: 24rpx;
font-weight: 400;
color: #5C5C5C;
}
.address{
font-size: 24rpx;
font-weight: 400;
color: #5C5C5C;
height: 80rpx;
line-height: 40rpx;
overflow: hidden;
}
.time{
font-size: 24rpx;
font-weight: 400;
color: #5C5C5C;
}
}
.do{
flex: 1;
text-align: center;
font-size: 20rpx;
font-weight: 400;
color: #989898;
display: flex;
align-items: center;
justify-content: space-between;
image{
width: 30rpx;
height: 30rpx;
display: block;
margin: 0 auto;
margin-bottom: 20rpx;
}
}
}
.r{
display: flex;
align-items: flex-start;
overflow: hidden;
margin-top: 30rpx;
.pic{
width: 182rpx;
height: 146rpx;
border-radius: 6rpx;
margin-right: 10rpx;
}
.info{
width: 305rpx;
margin-right: 20rpx;
.title{
font-size: 28rpx;
font-weight: 400;
color: #212121;
}
.price{
font-size: 32rpx;
font-weight: 500;
color: #FF584D;
margin-top: 20rpx;
}
}
.num{
flex: 1;
text-align: center;
font-size: 30rpx;
font-weight: 400;
color: #989898;
text-align: right;
}
}
}
}
.form {
padding: 0 40rpx;
overflow: hidden;
border-left: 1px solid #F1F1F1;
border-right: 1px solid #F1F1F1;
border-bottom: 1px solid #F1F1F1;
.remark{
.name{
font-size: 28rpx;
font-weight: 400;
color: #313131;
}
.xu{
display: flex;
flex-wrap: wrap;
overflow: hidden;
.li{
line-height: 52rpx;
background: #FFFFFF;
border-radius: 6rpx;
border: 1px solid #EDEDED;
padding: 0 20rpx;
margin-right: 20rpx;
text-align: center;
font-size: 24rpx;
font-weight: 400;
color: #949494;
margin-top: 20rpx;
}
}
.content{
padding: 20rpx 0 50rpx;
font-size: 28rpx;
color: #212121;
}
}
.photo{
padding: 20rpx 0;
overflow: hidden;
}
.item{
padding: 20rpx 0;
border-bottom: 1px solid #F4F4F4;
display: flex;
align-items: center;
.a{
width: 160rpx;
font-size: 28rpx;
font-weight: 400;
color: #313131;
line-height: 45rpx;
}
.b{
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
.select{
flex: 1;
font-size: 28rpx;
font-weight: 400;
line-height: 45rpx;
color: #949494;
&-on{
color: #212121;
}
}
.box{
flex: 1;
font-size: 28rpx;
color: #212121;
line-height: 45rpx;
}
.box1{
width: 160rpx;
font-size: 28rpx;
color: #212121;
line-height: 45rpx;
}
.radio{
display: flex;
align-items: center;
justify-content: flex-end;
flex: 1;
border-left: 1px solid #E6E6E6;
}
}
}
}
}
&-fd{
width: 100%;
height: 120rpx;
background-color: #FFFFFF;
padding: 25rpx 25rpx;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
position: fixed;
left: 0;
bottom: 0;
z-index: 99;
.a{
font-size: 28rpx;
font-weight: 400;
color: #727272;
}
.b{
width: 502rpx;
height: 88rpx;
line-height: 88rpx;
background: #FE483B;
border-radius: 88rpx;
text-align: center;
font-size: 28rpx;
font-weight: 600;
color: #FFFFFF;
}
}
}
</style>

@ -5,23 +5,26 @@
</view>
<view class="recycling-bd">
<view class="tab">
<view class="a">
<view class="a" v-if="type == 2">
<view class="item" @click="tabItem(1)"></view>
<view class="item" @click="tabItem(2)"></view>
<view class="item" @click="tabItem(3)"></view>
</view>
<view class="b">
<view class="b" v-if="type == 2">
<image v-if="tabIndex == 1" src="@/static/news/icon-recyling-tab-01.png"></image>
<image v-if="tabIndex == 2" src="@/static/news/icon-recyling-tab-02.png"></image>
<image v-if="tabIndex == 3" src="@/static/news/icon-recyling-tab-03.png"></image>
</view>
<view class="b" v-else>
<image src="@/static/news/icon-recyling-tab-04.png"></image>
</view>
</view>
<view class="goods">
<view class="a">
<!-- <view class="a">
<image src="@/static/news/icon-mall.jpg"></image>京送家电武隆路店
</view>
</view> -->
<view class="b">
<view class="l">
<!-- <view class="l">
<image class="pic" src="@/static/home/phone.jpg"></image>
<view class="info">
<view class="tel">13770577307</view>
@ -36,12 +39,12 @@
<image src="@/static/news/address.png"></image>导航
</view>
</view>
</view>
</view> -->
<view class="r">
<image class="pic" src="@/static/home/phone.jpg"></image>
<image class="pic" :src="info.server_image"></image>
<view class="info">
<view class="tel">手机回收</view>
<view class="price">¥<text>4189234</text></view>
<view class="tel">{{info.server_name}}</view>
<view class="price">¥<text>{{info.line_price}}</text></view>
</view>
<view class="num">
x1
@ -53,26 +56,33 @@
<view class="item">
<view class="a">服务时间</view>
<view class="b" @click="openPage(1)">
<view class="select">请选择预约到店时间</view>
<view class="select">{{server_time?server_time:'请选择预约到店时间'}}</view>
<u-icon style="margin-left: 10rpx;" name="arrow-right"></u-icon>
</view>
</view>
<view class="item">
<view class="a">优惠券</view>
<view class="b" @click="openPage(2)">
<view class="select" :class="couponIndex >= 0?'select-on':''">{{couponIndex >= 0? couponList[couponIndex].name:'暂无优惠券'}}</view>
<u-icon style="margin-left: 10rpx;" name="arrow-right"></u-icon>
</view>
</view>
<view class="item">
<view class="a">联系人</view>
<view class="b">
<input class="box1" type="text" placeholder="联系人姓名" />
<view class="radio">
<input class="box1" v-model="username" type="text" placeholder="联系人姓名" />
<!-- <view class="radio">
<u-radio-group v-model="radioValue" active-color="red">
<u-radio name="先生">先生</u-radio>
<u-radio name="女士">女士</u-radio>
</u-radio-group>
</view>
</view> -->
</view>
</view>
<view class="item">
<view class="a">联系电话</view>
<view class="b">
<input class="box" type="text" placeholder="联系人手机号码" />
<input class="box" v-model="mobile" type="number" placeholder="联系人手机号码" />
</view>
</view>
<view class="item" v-if="tabIndex == 3">
@ -88,20 +98,28 @@
<view class="select">请选择所在人城市</view>
</picker>
</view>
</view>
<view class="item" v-if="type == 1">
<view class="a">发件地址</view>
<view class="b">
<picker :value="region" @change="changeRegion" mode="region">
<view class="select">请选择所在人城市</view>
</picker>
</view>
</view>
<view class="item" v-if="tabIndex == 3">
<view class="a">门牌号</view>
<view class="b">
<input class="box" type="text" placeholder="详细地址 例:12幢1单元102室" />
<input class="box" v-model="address" type="text" placeholder="详细地址 例:12幢1单元102室" />
</view>
</view>
<view class="item">
<view class="item" v-if="type == 2">
<view class="a">期待卖价</view>
<view class="b">
<input class="box" type="text" placeholder="请输入您期待的售卖价格(元)" />
</view>
</view>
<view class="photo">
<view class="photo" v-if="type==2">
<u-upload :action="action" width="160" height="160" :file-list="fileList" :custom-btn="true" max-count="5">
<template v-slot:addBtn>
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
@ -112,48 +130,126 @@
</template>
</u-upload>
</view>
<view class="remark">
<view class="name">留言 </view>
<view class="remark" style="margin-top: 20rpx;">
<view class="name">备注 </view>
<view class="xu">
<view class="li">可提前来</view>
<view class="li">来之前打电话</view>
<view class="li">请尽快联系我</view>
</view>
<view class="content">
<u-input v-model="value" height="260" type="textarea" placeholder="请输入您的留言,最多可留言100字" :border="true" />
<u-input v-model="remake" height="260" type="textarea" placeholder="请输入您的留言,最多可留言100字" :border="true" />
</view>
</view>
</view>
</view>
<view class="recycling-fd">
<view class="a">免支付预购</view>
<view class="a" v-if="type==2">免支付预购</view>
<view class="c" v-else style="color: #FE483B;font-size: 30rpx;">{{pay_price}}</view>
<view class="b" @click="openPage(2)">提交订单</view>
</view>
</view>
<!-- 选择优惠券 -->
<u-popup v-model="isShow" mode="bottom" border-radius="12" mask-close-able="false" closeable>
<view class="recycling-classify">
<view class="recycling-classify-hd">优惠券列表</view>
<view class="recycling-classify-bd">
<scroll-view scroll-y class="m">
<view class="item" @click="tabMItem('-9999')"><view :class="couponIndex == -9999?'item-on':''">不使用</view></view>
<view class="item" v-for="(a,i) in couponList" @click="tabMItem(i)"><view :class="couponIndex == i?'item-on':''">{{a.name}}</view></view>
</scroll-view>
</view>
</view>
</u-popup>
<!-- 时间选择器 -->
<u-picker mode="time" :params="params" v-model="show" confirm-color="#FE483B" :show-time-tag="false" @confirm="confirm"></u-picker>
</view>
</template>
<script>
<script>
import * as newFunApi from '@/api/newFun'
export default{
data(){
return {
value: "",
radioValue: "女士",
return {
params: {
year: true,
month: true,
day: true,
hour: true,
minute: true,
second: true
},
pay_price: 0,
isShow: false,
show: false,
info: {},
type: 1,
radioValue: "男士",
couponIndex: -9999,
tabIndex: 1,
fileList: [
{
url: 'http://pics.sc.chinaz.com/files/pic/pic9/201912/hpic1886.jpg',
}
],
],
tabMIndex: 0,
address: "",
coupon_id: "",
remake: "",
username: "",
mobile: "",
server_time: "",
region: [],
couponList: [],
server_id: ""
}
},
onLoad(o) {
this.type = o.type;
this.server_id = o.id;
if(this.type == 1 && o.id){
this.getServerCheckOrder()
}
},
methods: {
methods: {
tabMItem(i) {
this.couponIndex = i
this.isShow = false;
this.getServerCheckOrder(1)
},
//
async getServerCheckOrder(type) {
const { status, data } = await newFunApi.serverCheckOrder({
server_id: this.server_id,
coupon_id: this.coupon_id
})
if(status == 200){
this.info = data.info
this.couponList= data.coupon_list;
if(data.coupon_list && data.coupon_list.length > 0){
if(!type){
this.couponIndex = 0
}
}else{
this.couponIndex = -9999
}
this.coupon_id= data.coupon_id
this.coupon_money= data.coupon_money
this.pay_price= data.pay_price
}
},
confirm(e){
this.server_time = e.year+"-"+e.month+'-'+e.day+" "+e.hour+"-"+e.minute+'-'+e.second
},
changeRegion(e) {
this.region = e
},
tabItem(i) {
this.tabIndex = i
},
openPage(i){
if(i == 1){
uni.navigateTo({
url: "/pages/news/recycling/timer"
})
this.show = true
}else if(i == 2) {
this.isShow = true
}else {
uni.redirectTo({
url: "/pages/news/recycling/order"
@ -168,7 +264,98 @@
min-height: 100vh;
background-color: #FFFFFF;
padding-bottom: 130rpx;
overflow: hidden;
overflow: hidden;
&-classify{
width: 100%;
overflow: hidden;
&-hd{
padding: 30rpx 60rpx;
position: relative;
font-size: 32rpx;
font-weight: 500;
color: #303030;
text-align: center;
.a{
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 500;
color: #FF624F;
position: absolute;
top: 30rpx;
left: 40rpx;
z-index: 2;
}
}
&-bd{
overflow: hidden;
display: flex;
align-items: flex-start;
.l{
width: 210rpx;
height: 560rpx;
background-color: #F7F8FA;
.item{
text-overflow: ellipsis;
overflow: hidden;
height: 70rpx;
font-size: 28rpx;
font-weight: 400;
color: #303030;
white-space: nowrap;
line-height: 70rpx;
padding-left: 30rpx;
box-sizing: border-box;
text-align: left;
&-on{
background-color: #fff;
font-weight: 500;
}
}
}
.m{
width: 100%;
text-align: center;
max-height: 560rpx;
.item{
text-overflow: ellipsis;
overflow: hidden;
height: 70rpx;
font-size: 28rpx;
font-weight: 400;
color: #303030;
white-space: nowrap;
line-height: 70rpx;
padding-left: 80rpx;
box-sizing: border-box;
text-align: left;
&-on{
color: #FF624F;
}
}
}
.r{
width: 540rpx;
height: 560rpx;
.item{
text-overflow: ellipsis;
overflow: hidden;
height: 70rpx;
font-size: 28rpx;
font-weight: 400;
color: #303030;
white-space: nowrap;
line-height: 70rpx;
padding-left: 80rpx;
box-sizing: border-box;
&-on{
color: #FF624F;
}
}
}
}
}
.slot-btn{
width: 80px;
height: 80px;
@ -204,16 +391,17 @@
margin: 0 auto;
margin-top: 30rpx;
position: relative;
border: 1px solid #F1F1F1;
.tab{
width: 690rpx;
height: 280rpx;
.b{
width: 100%;
height: 100%;
height: 100%;
display: block;
image{
width: 100%;
height: 100%;
height: 100%;
display: block;
}
}
.a{
@ -234,6 +422,8 @@
.goods{
padding: 30rpx 35rpx;
overflow: hidden;
border-left: 1px solid #F1F1F1;
border-right: 1px solid #F1F1F1;
.a{
display: flex;
align-items: center;
@ -338,7 +528,10 @@
}
.form {
padding: 0 40rpx;
overflow: hidden;
overflow: hidden;
border-left: 1px solid #F1F1F1;
border-right: 1px solid #F1F1F1;
border-bottom: 1px solid #F1F1F1;
.remark{
.name{
font-size: 28rpx;

@ -1,15 +1,16 @@
<template>
<view class="recycling">
<view class="recycling-swiper">
<u-swiper :list="list" mode="number" height="750" indicator-pos="bottomRight"></u-swiper>
<!-- <u-swiper :list="list" mode="number" height="750" indicator-pos="bottomRight"></u-swiper> -->
<image :src="info.server_image" style="width: 100%; height: 750rpx;"></image>
</view>
<view class="recycling-hd">
<view class="a">
<view class="price"><text>112</text></view>
<view class="exchange">已售1890</view>
<view class="price"><text>{{type== 1?info.server_price:'待评估'}}</text></view>
<view class="exchange">已售{{info.sold}}</view>
</view>
<view class="b">家用电器上门回收</view>
<view class="c">专业上门回收</view>
<view class="b">{{info.server_name}}</view>
<view class="c">{{info.server_category}}</view>
<view class="d">
<view class="l">
<image src="@/static/news/icon-recycling-05.png"></image>24小时客服
@ -28,18 +29,19 @@
<view class="recycling-select">
<view class="item">
<view class="a">已选</view>
<view class="b" @click="openPage(2)">{{selector[tabIndex]}}<u-icon name="arrow-right"></u-icon></view>
<view class="b" v-if="type == 1">上门服务</view>
<view class="b" v-else @click="openPage(2)">{{selector[tabIndex]}}<u-icon name="arrow-right"></u-icon></view>
</view>
<view class="item">
<!-- <view class="item">
<view class="a">送至</view>
<view class="b">河北省秦皇岛市某某区</view>
</view>
<view class="b" @click="openPage(4)">{{addressInfo.phone?addressInfo.region.province+addressInfo.region.city+addressInfo.region.region+addressInfo.detail:'请选择地址'}}<u-icon name="arrow-right"></u-icon></view>
</view> -->
<view class="item">
<view class="a">服务</view>
<view class="b">优质服务全程跟踪</view>
</view>
</view>
<view class="recycling-chat">
<view class="recycling-chat" hidden>
<view class="a">
<view class="l">用户评价<text>30</text></view>
<view class="r">查看更多 <u-icon name="arrow-right"></u-icon></view>
@ -59,54 +61,88 @@
</view>
<view class="recycling-bd">
<view class="title">产品详情</view>
<view class="conten">
<image mode="widthFix" src="@/static/news/pic1.png"></image>
</view>
<view class="conten" v-html="info.content"></view>
</view>
<view class="recycling-fd">
<view class="a">
<image src="@/static/news/icon-recycling-06.png"></image>客服
<button open-type="contact"></button>
</view>
<view class="a">
<!-- <view class="a">
<image src="@/static/news/icon-recycling-07.png"></image>收藏
</view>
<view class="a">
<image src="@/static/news/icon-recycling-08.png"></image>购物车
</view>
<view class="b">加入购物车</view>
<view class="c">立即预约</view>
</view> -->
<!-- <view class="b">加入购物车</view> -->
<view class="c" @click="openPage(3)">立即预约</view>
</view>
<u-picker v-model="isShow" mode="selector" :range="selector" @confirm="confirm"></u-picker>
</view>
</template>
<script>
// import * as AddressApi from '@/api/address'
export default{
data(){
return {
tabIndex: 0,
addressInfo: {},
tabIndex: 1,
isShow: false,
selector: ["门店回收","上门回收","邮寄回收"],
list: [
{
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
},
{
image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
title: '身无彩凤双飞翼,心有灵犀一点通'
},
{
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
}
]
type: 1,
info: {}
}
},
onLoad(o) {
let info = uni.getStorageSync("getInfo");
info.content.replace(/style=""/g,'').replace(/<img src=/g,'<img style="width: 100%; display:block" src=');
this.info = info;
this.type = o.type
uni.setNavigationBarTitle({
title: o.type == 1?"服务详情": '上门回收'
})
},
// onShow(){
// if(uni.getStorageSync("token")){
// // if(uni.getStorageSync("addressInfo")){
// // this.addressInfo = uni.getStorageSync("addressInfo")
// // uni.removeStorageSync("addressInfo")
// // }else{
// // this.getAddressList();
// // }
// }
// },
methods: {
//
// async getAddressList() {
// const { status, data } = await AddressApi.list()
// if(status == 200){
// this.addressInfo = data.list.length > 0?data.list[0]:{}
// }
// },
openPage(index) {
if(index == 2){
this.isShow = true;
}else if(index == 3){
if(!uni.getStorageSync("token")){
uni.navigateTo({
url: "/pages/login/index"
})
return ;
}
uni.navigateTo({
url: "/pages/news/recycling/confirm?tabIndex="+this.tabIndex+"&id="+this.info.server_id+"&type="+this.type
})
}else if(index == 4){
if(!uni.getStorageSync("token")){
uni.navigateTo({
url: "/pages/login/index"
})
return ;
}
uni.navigateTo({
url: "/pages/address/index?type="+this.type
})
}
},
confirm(e){
@ -319,14 +355,14 @@
padding: 25rpx 20rpx;
display: flex;
align-items: center;
justify-content: center;
justify-content: space-between;
box-sizing: border-box;
position: fixed;
left: 0;
bottom: 0;
z-index: 99;
.a{
flex: 1;
width: 100rpx;
text-align: center;
font-size: 20rpx;
font-weight: 400;
@ -351,7 +387,7 @@
margin-left: 20rpx;
}
.c{
width: 200rpx;
width: 500rpx;
height: 78rpx;
line-height: 78rpx;
background: linear-gradient(102deg, #FE5E06 0%, #F3221A 100%);

@ -11,36 +11,20 @@
</view>
</view>
<view class="recycling-bd">
<view class="tab">
<view class="item" :class="tabIndex==0?'item-on':''" @click="tabItem(0)">
<image v-if="tabIndex==0" src="@/static/news/icon-recycling-01-on.png"></image>
<image v-else src="@/static/news/icon-recycling-01.png"></image>
家电回收
<scroll-view scroll-x class="tab">
<view class="item" v-for="(a,i) in list1" :class="tabIndex==i?'item-on':''" @click="tabItem(i,a)">
<image :src="a.image_url"></image>
{{a.name}}
</view>
<view class="item" :class="tabIndex==1?'item-on':''" @click="tabItem(1)">
<image v-if="tabIndex==1" src="@/static/news/icon-recycling-02-on.png"></image>
<image v-else src="@/static/news/icon-recycling-02.png"></image>
手机回收
</view>
<view class="item" :class="tabIndex==2?'item-on':''" @click="tabItem(2)">
<image v-if="tabIndex==2" src="@/static/news/icon-recycling-03-on.png"></image>
<image v-else src="@/static/news/icon-recycling-03.png"></image>
电脑回收
</view>
<view class="item" :class="tabIndex==3?'item-on':''" @click="tabItem(3)">
<image v-if="tabIndex==3" src="@/static/news/icon-recycling-04-on.png"></image>
<image v-else src="@/static/news/icon-recycling-04.png"></image>
平板回收
</view>
</view>
</scroll-view>
<view class="list">
<view class="item" v-for="i in 10" :key="i" @click="openPage()">
<image src="@/static/home/phone.jpg"></image>
<view class="item" v-for="(a,i) in list2" :key="i" @click="openPage()">
<image :src="a.server_image"></image>
<view class="info">
<view class="title">苹果手机上门回收</view>
<view class="desc">专业上门回收</view>
<view class="title">{{a.server_name}}</view>
<view class="desc">{{a.server_category}}</view>
<view class="price">
<view class="btn">免支付预约</view>
<view class="btn">免支付预约{{a.line_price}}</view>
<view class="num">已售400+ 好评87%</view>
</view>
</view>
@ -51,7 +35,7 @@
</template>
<script>
import * as newFunApi from '@/api/newFun'
import img from "@/static/news/recycling-bg.png"
export default {
data() {
@ -64,12 +48,15 @@
background1: {
background: '#fff',
},
list: ['寒雨连江夜入吴',
'平明送客楚山孤',
'洛阳亲友如相问',
'一片冰心在玉壶'],
list: [],
list1: [],
list2: [],
}
},
onLoad(o) {
this.tabIndex = o.index?o.index:0
this.getList();
},
onPageScroll(e){
if(e.scrollTop <= 44){
this.isScroll = true;
@ -78,19 +65,36 @@
}
},
methods: {
/**
* 获取列表
*/
async getList() {
let {status, message, data} = await newFunApi.serverCategoryList({});
if(status == 200){
this.list1 = data.list
this.getGoodsList();
}
},
/**
* 获取商品列表
*/
async getGoodsList() {
let {status, message, data} = await newFunApi.serverList({
server_name: "",
category_id: this.list1.length > 0?this.list1[this.tabIndex].category_id:""
});
if(status == 200){
this.list2 = data.list
}
},
openPage() {
uni.navigateTo({
url: "/pages/news/recycling/detail"
})
},
tabItem(index){
this.tabIndex = index;
},
tabItem1(index){
this.tabIndex1 = index;
},
tabFilter(index){
this.filterIndex = index;
this.tabIndex = index;
this.getGoodsList();
}
}
}
@ -124,9 +128,10 @@
background-color: #fff;
.tab{
width: 100%;
white-space: nowrap;
.item{
width: 25%;
float: left;
width: 165rpx;
display: inline-block;
text-align: center;
font-size: 24rpx;
font-weight: 500;

@ -17,38 +17,14 @@
<view class="serveTitle">
我的服务
</view>
<view class="serveList">
<view class="listItem">
<scroll-view scroll-x class="serveList">
<view class="listItem" v-for="(a,i) in list" :key="i" @click="openPage(i)">
<view class="itemImage">
<image src="/static/serve/unkeep.png" class="itemImage"></image>
<image :src="a.image_url" class="itemImage"></image>
</view>
<text lines="1" class="itemText">家电维修</text>
<text lines="1" class="itemText">{{a.name}}</text>
</view>
<view class="listItem">
<view class="itemImage">
<image src="/static/serve/clean.png" class="itemImage"></image>
</view>
<text lines="1" class="itemText">家电清洗</text>
</view>
<view class="listItem">
<view class="itemImage">
<image src="/static/serve/install.png" class="itemImage"></image>
</view>
<text lines="1" class="itemText">家电安装</text>
</view>
<view class="listItem">
<view class="itemImage">
<image src="/static/serve/dredge.png" class="itemImage"></image>
</view>
<text lines="1" class="itemText">家电疏通</text>
</view>
<view class="listItem">
<view class="itemImage">
<image src="/static/serve/maintenance.png" class="itemImage"></image>
</view>
<text lines="1" class="itemText">水电维修</text>
</view>
</view>
</scroll-view>
</view>
<view class="flowPath">
<view class="flowTitle">
@ -84,13 +60,31 @@
</view>
</template>
<script>
import * as newFunApi from '@/api/newFun'
export default{
data (){
return{
list: []
}
},
onReady() {
this.getList();
},
methods:{
openPage(a){
uni.navigateTo({
url: "/pages/activity/intimate?index="+a
})
},
/**
* 获取列表
*/
async getList() {
let {status, message, data} = await newFunApi.serverCategoryList({});
if(status == 200){
this.list = data.list
}
},
goMember(){
uni.navigateTo({
url:'/pages/member/index'
@ -147,7 +141,7 @@
right: 0;
margin: auto;
padding: 26rpx;
margin-top: 20rpx;
.serveTitle {
height: 40rpx;
font-size: 28rpx;
@ -159,17 +153,17 @@
.serveList {
margin-top: 36rpx;
display: flex;
justify-content: space-around;
white-space: nowrap;
.listItem {
width: 100rpx;
height: 100rpx;
display: flex;
flex-direction: column;
display: inline-block;
text-align: center;
align-items: center;
margin-left: 20rpx;
&:first-child{
margin-left: 0;
}
.itemImage {
width: 56rpx;
height: 56rpx;

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Loading…
Cancel
Save