Browse Source

上传

master
前端-胡立永 3 months ago
parent
commit
d5b2c60fa5
7 changed files with 301 additions and 47 deletions
  1. +16
    -1
      components/base/navbar.vue
  2. +15
    -9
      components/config/customerServicePopup.vue
  3. +22
    -3
      components/user/productList.vue
  4. +139
    -0
      components/user/shopMain.vue
  5. +29
    -0
      mixins/share.js
  6. +7
    -4
      pages/index/index.vue
  7. +73
    -30
      pages_order/order/orderDetail.vue

+ 16
- 1
components/base/navbar.vue View File

@ -4,8 +4,14 @@
<view class="title"
:style="{backgroundColor : bgColor}">
<view class="left">
<uv-icon name="home"
v-if="leftClick && length == 1"
@click="toHome"
color="#333" size="46rpx"></uv-icon>
<uv-icon name="arrow-left"
v-if="leftClick"
v-else-if="leftClick"
@click="$emit('leftClick')"
color="#333" size="46rpx"></uv-icon>
</view>
@ -72,9 +78,18 @@
},
data() {
return {
length : getCurrentPages().length
};
},
methods : {
toHome(){
if(this.length != 1){
return
}
uni.reLaunch({
url: '/pages/index/index'
})
}
}
}
</script>


+ 15
- 9
components/config/customerServicePopup.vue View File

@ -1,10 +1,12 @@
<template>
<!-- 联系客服弹框 -->
<uv-overlay :show="show" @click="close">
<uv-popup ref="popup"
:safeAreaInsetBottom="false"
:round="30">
<view class="warp">
<view class="rect" @tap.stop>
<view class="title">联系客服</view>
<view class="center">确定拨打客服电话?</view>
<view class="title">联系{{ bTitle || title }}</view>
<view class="center">确定拨打{{ bTitle || title }}电话?</view>
<view class="bottom">
<view class="btn1"
@click="close">
@ -17,15 +19,17 @@
</view>
</view>
</view>
</uv-overlay>
</uv-popup>
</template>
<script>
export default {
data() {
return {
show: false,
phone:'',
title : '客服',
bPhone : '',
bTitle : '',
}
},
mounted() {
@ -37,17 +41,19 @@
this.phone = res.result.phone
})
},
open() {
this.show = true
open(phone, title) {
this.bPhone = phone || this.phone
this.bTitle = title || this.title
this.$refs.popup.open()
},
close() {
this.show = false
this.$refs.popup.close()
},
//
confirm() {
this.show = false
uni.makePhoneCall({
phoneNumber: this.phone,
phoneNumber: this.bPhone || this.phone,
success() {
console.log('安卓拨打成功');
},


+ 22
- 3
components/user/productList.vue View File

@ -11,7 +11,7 @@
<view class="title">
{{ item.name }}
</view>
<view class="price">
<!-- <view class="price">
<text>{{ item.originalPrice }}</text>/
</view>
<view class="favorable" v-if="item.goodsSku">
@ -21,9 +21,23 @@
<view class="p">
{{ item.goodsSku.price }}
</view>
</view> -->
<view class="price">
租金<text>{{ item.goodsSku.price }}</text>/
</view>
<view class="favorable" v-if="item.goodsSku">
<view class="t">
原价
</view>
<view class="p">
{{ item.originalPrice }}
</view>
</view>
<view class="num">
已售卖{{ item.soldNum }}+
已售卖{{ item.soldNum || 0 }}+
</view>
</view>
<view class="btn">
@ -86,12 +100,17 @@
background-image: url(/static/image/product/favorable.png);
background-size: 100% 100%;
width: fit-content;
padding: 5rpx 10rpx;
font-size: 18rpx;
margin-top: 6rpx;
.t{
padding: 5rpx 10rpx;
}
.p{
padding: 5rpx 10rpx;
color: #fff;
margin-left: 10rpx;
background-color: #F03F25;
height: 100%;
}
}
.num{


+ 139
- 0
components/user/shopMain.vue View File

@ -0,0 +1,139 @@
<template>
<view class="shopbox" v-if="bindShop && bindShop.name">
<view class="shop">
<image class="image" :src="bindShop.pic" mode="aspectFill"></image>
<view class="shopInfo">
<view class="title">
{{bindShop.name}}
</view>
<view class="tags">
<view class="tag">
桌布水洗
</view>
<view class="tag">
桌布租赁
</view>
</view>
<view class="time">
9:00-18:00
</view>
<view class="address text-ellipsis-2">
{{bindShop.address}}
</view>
</view>
<view class="tips">
关联门店主信门店
</view>
</view>
<view class="btns">
<view class="btn" @click="$utils.navigateTo('/pages_order/order/createWash')">
我要水洗
</view>
</view>
</view>
</template>
<script>
import { mapGetters, mapState } from 'vuex'
export default {
computed : {
...mapGetters(['userShop']),
...mapState(['bindShop', 'statistics']),
},
data() {
return {
};
}
}
</script>
<style lang="scss">
.shopbox{
position: relative;
background-color: #fff;
margin-top: 20rpx;
border-radius: 20rpx;
padding-bottom: 30rpx;
.btns {
margin-left: auto;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
padding: 0 20rpx;
.btn {
background-color: $uni-color;
color: #fff;
box-shadow: 0 0 5rpx 5rpx #FFAC6E;
padding: 20rpx 0;
text-align: center;
flex-shrink: 0;
border-radius: 35rpx;
flex: 1;
}
}
}
.shop {
padding: 30rpx;
padding-top: 50rpx;
position: relative;
display: flex;
align-items: center;
border-radius: 20rpx;
padding: 20rpx;
overflow: hidden;
.image {
width: 220rpx;
height: 220rpx;
margin-right: 20rpx;
border-radius: 20rpx;
flex-shrink: 0;
}
.shopInfo {
font-size: 24rpx;
.title {
font-size: 32rpx;
}
.tags {
display: flex;
.tag {
padding: 4rpx 6rpx;
border: 1rpx solid #FFAC6E;
color: #FFAC6E;
margin-right: 10rpx;
margin-top: 10rpx;
font-size: 22rpx;
border-radius: 10rpx;
}
}
.time {
margin-top: 10rpx;
display: flex;
}
.address {
margin-top: 10rpx;
display: flex;
}
}
.tips {
position: absolute;
top: 0;
right: 0;
font-size: 24rpx;
color: #FFAC6E;
background-color: #FEF5EE;
padding: 10rpx 20rpx;
border-radius: 10rpx;
}
}
</style>

+ 29
- 0
mixins/share.js View File

@ -0,0 +1,29 @@
export default {
data() {
return {
// 默认的全局分享内容
share: {
title: '补周到',
path: '/pages/index/index', // 全局分享的路径,比如 首页
// imageUrl: '/static/image/login/logo.png', // 全局分享的图片(可本地可网络)
}
}
},
// 定义全局分享
// 1.发送给朋友
onShareAppMessage(res) {
return {
title: this.share.title,
path: this.share.path,
imageUrl: this.share.imageUrl,
}
},
//2.分享到朋友圈
onShareTimeline(res) {
return {
title: this.share.title,
path: this.share.path,
imageUrl: this.share.imageUrl,
}
},
}

+ 7
- 4
pages/index/index.vue View File

@ -73,7 +73,7 @@
fontSize="28rpx"
:text="notice"></uv-notice-bar>
<view class="shop" v-if="bindShop && bindShop.name">
<!-- <view class="shop" v-if="bindShop && bindShop.name">
<image
class="image"
:src="bindShop.pic"
@ -92,10 +92,9 @@
</view>
<view class="time">
9:00-18:00
<!-- {{bindShop.address}} -->
</view>
<view class="address text-ellipsis-2">
<!-- 长沙市天心区桂花坪街道231号 -->
长沙市天心区桂花坪街道231号
{{bindShop.address}}
</view>
</view>
@ -109,7 +108,9 @@
<view class="tips">
关联门店主信门店
</view>
</view>
</view> -->
<shopMain />
<view class="productList">
<productList :productList="productList.records"/>
@ -130,12 +131,14 @@
import tabber from '@/components/base/tabbar.vue'
import productList from '@/components/user/productList.vue'
import { mapGetters, mapState } from 'vuex'
import shopMain from '@/components/user/shopMain.vue'
// import selectArea from '../../components/selectArea.vue';
export default {
components : {
tabber,
productList,
PrivacyAgreementPoup,
shopMain,
},
data() {
return {


+ 73
- 30
pages_order/order/orderDetail.vue View File

@ -30,7 +30,7 @@
<view @click.stop="confirmReceiveGoods(order)">
确认收货
</view>
<view @click.stop="" class="b1">
<view @click.stop="" class="btn2">
查看物流
</view>
</template>
@ -280,17 +280,38 @@
<!-- 下单须知 -->
<view class="line">
<view class="t min_tips">
<!-- <view class="t min_tips">
<view class="">
下单须知
</view>
</view>
<view class="min_tips" style="line-height: 40rpx;">
<!-- {{msgShop.projectExplain}} -->
{{msgShop.projectExplain}}
</view> -->
<view class="btns">
<view
v-if="!userShop"
@click="$utils.navigateTo('/pages_order/order/createWash')"
class="btnS">
我要水洗
</view>
</view>
<view class="btns">
<view @click="$refs.customerServicePopup.open()" class="btn">
联系客服
联系平台客服
</view>
<view
v-if="userShop"
@click="$refs.customerServicePopup.open(order.userPhone, '客户')" class="btn">
联系客户
</view>
<view
v-else
@click="$refs.customerServicePopup.open(bindShop.phone, '水洗店')" class="btn">
联系水洗店
</view>
</view>
</view>
@ -310,7 +331,8 @@
<script>
import {
mapGetters
mapGetters,
mapState
} from 'vuex'
import mixinOrder from '@/mixins/order.js'
import customerServicePopup from '@/components/config/customerServicePopup.vue'
@ -323,6 +345,7 @@
mixins : [mixinOrder],
computed: {
...mapGetters(['userShop']),
...mapState(['bindShop']),
},
data() {
return {
@ -379,10 +402,16 @@
if(this.userShop){
this.typeText[0].name = '租赁订单'
this.$forceUpdate()
}else{
this.$store.commit('getBindShop')
}
},
onPullDownRefresh() {
this.getData()
if(this.userShop){
}else{
this.$store.commit('getBindShop')
}
},
methods: {
@ -447,7 +476,6 @@
.btns {
margin-top: 50rpx;
display: flex;
view {
margin: 0 20rpx;
display: flex;
@ -481,29 +509,29 @@
}
}
.box {
padding: 20px;
.btns {
display: flex;
justify-content: center;
align-items: center;
margin-top: 10px;
.btn {
color: #fff;
padding: 10rpx 50rpx;
background-color: #ffb300;
border-radius: 30rpx;
font-size: 25rpx;
margin-right: 10rpx;
}
.btc {
background: #ccc;
}
}
}
// .box {
// padding: 20px;
// .btns {
// display: flex;
// justify-content: center;
// align-items: center;
// margin-top: 10px;
// .btn {
// color: #fff;
// padding: 10rpx 50rpx;
// background-color: #ffb300;
// border-radius: 30rpx;
// font-size: 25rpx;
// margin-right: 10rpx;
// }
// .btc {
// background: #ccc;
// }
// }
// }
.info {
margin: 10px;
@ -718,13 +746,28 @@
.btns {
display: flex;
justify-content: center;
justify-content: space-around;
margin: 20rpx 0;
.btnS{
background-color: $uni-color;
color: #fff;
box-shadow: 0 0 5rpx 5rpx #FFAC6E;
padding: 20rpx 0;
flex-shrink: 0;
border-radius: 35rpx;
flex: 1;
text-align: center;
}
.btn {
color: $uni-color;
border: 1px solid $uni-color;
padding: 10rpx 20rpx;
border-radius: 30rpx;
flex: 1;
margin: 10rpx;
text-align: center;
}
}
}

Loading…
Cancel
Save