Browse Source

feat: 添加客服组件并优化多个页面功能

- 新增 `kefu.vue` 客服组件,支持用户联系客服
- 优化 `createOrder.vue` 页面,移除 `num` 字段并调整价格计算逻辑
- 在 `productDetail.vue` 页面中注释掉部分服务信息展示
- 更新 `userShopCommission.vue` 组件,将“佣金”改为“积分”
- 在 `QuickOrderEntry.vue` 组件中新增 `bottom` 属性,支持自定义底部位置
- 优化 `individualTeam.vue` 页面,将“佣金”改为“积分”
- 在 `runningWater.vue` 页面中调整标题和内容,将“佣金”改为“积分”
- 更新 `store.js`,恢复退出登录的确认弹窗功能
- 在 `firmOrder.vue` 页面中优化商品图片和名称的展示逻辑
- 新增 `productList.vue` 页面的搜索功能,支持按材料名称搜索
- 优化 `tree.js` 工具函数,调整代码格式
- 在 `category.vue` 页面中新增分类标签切换功能
- 更新 `center.vue` 页面,移除部分功能入口并优化布局
- 优化 `productItem.vue` 组件,调整样式并支持隐藏按钮
- 在 `submit.vue` 组件中新增客服按钮并优化提交按钮样式
- 更新 `index.vue` 页面,优化搜索框交互并移除地址展示
- 在 `systemSet.vue` 页面中调整样式和布局
- 新增 `kefu.svg` 图标文件,用于客服按钮展示
master
前端-胡立永 5 months ago
parent
commit
dd6409b4d2
21 changed files with 615 additions and 354 deletions
  1. +7
    -2
      components/QuickOrderEntry.vue
  2. +63
    -0
      components/base/kefu.vue
  3. +40
    -51
      components/productItem.vue
  4. +3
    -3
      components/userShop/userShopCommission.vue
  5. +2
    -0
      main.js
  6. +60
    -11
      pages/index/category.vue
  7. +28
    -11
      pages/index/center.vue
  8. +24
    -45
      pages/index/index.vue
  9. +119
    -107
      pages_order/center/systemSet.vue
  10. +130
    -50
      pages_order/components/product/submit.vue
  11. +2
    -1
      pages_order/mine/address.vue
  12. +1
    -1
      pages_order/mine/individualTeam.vue
  13. +3
    -3
      pages_order/mine/runningWater.vue
  14. +1
    -2
      pages_order/order/createOrder.vue
  15. +6
    -5
      pages_order/order/firmOrder.vue
  16. +2
    -2
      pages_order/product/productDetail.vue
  17. +42
    -5
      pages_order/product/productList.vue
  18. +27
    -0
      static/image/base/kefu.svg
  19. BIN
      static/image/center/logout.png
  20. +19
    -19
      store/store.js
  21. +36
    -36
      utils/tree.js

+ 7
- 2
components/QuickOrderEntry.vue View File

@ -1,5 +1,7 @@
<template>
<view class="quick-order-container" @click="handleClick">
<view class="quick-order-container"
:style="{bottom}"
@click="handleClick">
<view class="new-message" v-if="innerHasNewMessage">
你有新的快捷下单信息
</view>
@ -30,7 +32,10 @@ export default {
autoFetch: {
type: Boolean,
default: true
}
},
bottom : {
default : '30vh',
}
},
data() {
return {


+ 63
- 0
components/base/kefu.vue View File

@ -0,0 +1,63 @@
<template>
<view class="float-button">
<!-- <button type="default" open-type="contact" class="kf-btn">
<img src="../../static/images/details/kefu.svg" style="width: 26px;height: 36px;" alt="kefu"
srcset="">
</button> -->
<button open-type="contact" class="kf-btn">
<img src="@/static/image/base/kefu.svg" style="width: 26px;height: 36px;" alt="kefu" srcset="">
</button>
</view>
</template>
<script>
export default {
data() {
return {
};
},
methods: {
// openCustomerService() {
// uni.openCustomerServiceChat({
// //id
// corpId: 'wwccd9a21f09fed62d',
// extInfo: {
// //
// url: 'https://work.weixin.qq.com/kfid/kfc09f128696578f66d'
// },
// success: (e) => {
// console.log('e', e)
// },
// fail: (err) => {
// console.log('err', err)
// }
// })
// }
}
}
</script>
<style lang="scss">
.float-button {
position: fixed;
bottom: 150px;
/* 距离底部的距离 */
right: 10px;
/* 距离右侧的距离 */
width: 50px;
/* 按钮的宽度 */
height: 50px;
/* 按钮的高度 */
/* 其他样式 */
.kf-btn {
background-color: rgba(255, 255, 255, 1);
height: 52px;
width: 52px;
border-radius: 50%;
display: flex;
align-items: center;
}
}
</style>

+ 40
- 51
components/productItem.vue View File

@ -1,21 +1,19 @@
<template>
<view class="productItem" @click="$emit('click')">
<view class="picture-shop">
<image :src="item.image" mode=""></image>
<image :src="item.image && item.image.split(',')[0]" mode="aspectFill"></image>
</view>
<view class="price-shop">
<view class="top-shop">
<text>{{item.name}}</text>
<view class="tag-shop">
<uv-tags :text="item.categoryName || '建材'" type="warning" plain size="mini"></uv-tags>
<uv-tags text="快速下单" type="warning" plain size="mini"></uv-tags>
</view>
</view>
<view class="title">{{item.name}}</view>
<view class="tag-shop">
<uv-tags :text="item.categoryName || '建材'" type="warning" plain size="mini"></uv-tags>
<uv-tags text="快速下单" type="warning" plain size="mini"></uv-tags>
</view>
<view class="bottom-price">
<text style="font-size: 40rpx; ">{{item.price}}</text>/{{item.unit}}
<text style="font-size: 30rpx; ">{{item.price}}</text>/{{item.unit}}
</view>
</view>
<view class="buy-shop">
<view class="buy-shop" v-if="btn">
<uv-button
type="primary"
shape="circle"
@ -27,7 +25,14 @@
<script>
export default {
name:"productItem",
props : ['item'],
props : {
item : {
default : {}
},
btn : {
default : true
}
},
data() {
return {
@ -40,13 +45,13 @@
.productItem {
width: 95%;
height: 222rpx;
display: flex;
margin: 30rpx auto;
background-color: #ffffff;
border-radius: 20rpx;
box-shadow: 0 5rpx 15rpx rgba(0, 0, 0, 0.05);
transition: transform 0.3s, box-shadow 0.3s;
padding: 20rpx;
&:active {
transform: translateY(2rpx);
@ -55,59 +60,43 @@
// /deep/
.picture-shop {
width: 240rpx;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
image {
width: 200rpx;
height: 150rpx;
border-radius: 10rpx;
}
}
.price-shop {
width: 250rpx;
height: 100%;
.top-shop {
height: 100rpx;
width: 100%;
font-size: 32rpx;
margin-top: 20rpx;
text-align: center;
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.tag-shop {
display: flex;
justify-content: space-around;
margin-top: 10rpx;
}
.bottom-price {
display: inline-block;
font-size: 28rpx;
color: #666;
text {
color: #DC2828;
font-weight: 700;
}
}
}
flex: 1;
.title{
font-size: 28rpx;
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tag-shop {
display: flex;
gap: 10rpx;
margin-top: 10rpx;
}
.bottom-price {
margin-top: 10rpx;
font-size: 26rpx;
color: #DC2828;
text {
font-weight: 700;
}
}
}
.buy-shop {
height: 100%;
width: 250rpx;
display: flex;
justify-content: center;
align-items: center;
:deep(.uv-button) {
transition: transform 0.2s;
&:active {


+ 3
- 3
components/userShop/userShopCommission.vue View File

@ -3,10 +3,10 @@
<image src="/static/image/center/10.png" mode=""></image>
<view class="price">
<view class="title">
佣金
积分
</view>
<view class="num">
{{ userInfo.money }}
{{ userInfo.money }}
</view>
</view>
@ -43,7 +43,7 @@
name : '提现记录',
},
{
name : '佣金记录',
name : '积分记录',
},
],
};


+ 2
- 0
main.js View File

@ -21,9 +21,11 @@ Vue.mixin(mixinConfigList)
//组件注册
import configPopup from '@/components/config/configPopup.vue'
import navbar from '@/components/base/navbar.vue'
import kefu from '@/components/base/kefu.vue'
Vue.component('configPopup',configPopup)
Vue.component('navbar',navbar)
Vue.component('kefu',kefu)
const app = new Vue({
...App,


+ 60
- 11
pages/index/category.vue View File

@ -3,16 +3,31 @@
<navbar bgColor="#DC2828"/>
<view class="category">
<view class="tabs">
<uv-tabs
:list="category"
:activeStyle="{color : '#f00', fontWeight : 600}"
lineColor="#f00"
:inactiveStyle="{color: 'rgba(0,0,0,.8)'}"
lineHeight="8rpx"
lineWidth="50rpx"
keyName="title"
:current="current"
@click="clickTabs"></uv-tabs>
</view>
<uv-vtabs
:chain="chain"
:list="category"
:list="category[current].children"
keyName="title"
:barItemBadgeStyle="{right:'20px',top:'12px'}"
@change="change">
<uv-vtabs-item>
<!-- <view class="category-title">
租赁
</view> -->
</view>
<view class="list">
<view class="item" v-for="(item,index) in list" :key="index"
@click="$utils.navigateTo(`/pages_order/product/productDetail?id=${item.id}`)">
@ -25,10 +40,24 @@
<text class="text">{{item.name}}</text>
</view>
</view>
</view>
</view> -->
<productItem
:btn="false"
@click="$utils.navigateTo(`/pages_order/product/productDetail?id=${item.id}`)"
:item="item" v-for="(item, index) in list" :key="index"/>
</uv-vtabs-item>
</uv-vtabs>
</view>
<quick-order-entry
ref="quickOrderEntry"
/>
<kefu/>
<tabber select="category" />
</view>
@ -36,36 +65,54 @@
<script>
import tabber from '@/components/base/tabbar.vue'
import productItem from '@/components/productItem.vue'
import QuickOrderEntry from '@/components/QuickOrderEntry.vue'
export default {
components: {
tabber,
productItem,
QuickOrderEntry,
},
data() {
return {
current : 0,
currentChildren : 0,
category: [],
list: [],
chain: false,
value: 0
value: 0,
}
},
computed: {
list2() {
const _list = this.list[this.value]?.childrens;
return _list ? _list : [];
}
categoryList(){
return this.category[this.current].children[this.currentChildren]
},
},
onLoad() {
this.getCategory()
},
onShow() {
if(uni.getStorageSync('token')){
//
this.refreshQuickOrder()
}
},
methods: {
clickTabs({index}){
this.current = index
this.currentChildren = 0
},
//
getCategory() {
this.$api('getClassify', res => {
if(res.code == 200) {
this.category = res.result
if(this.category.length > 0) {
this.getProductList(this.category[0].id)
this.$nextTick(() => {
this.getProductList(this.categoryList.id)
})
}
}
})
@ -84,9 +131,11 @@
},
change(index) {
console.log('选项改变:', index)
this.value = index;
this.currentChildren = index;
if(this.category[index]) {
this.getProductList(this.category[index].id)
this.$nextTick(() => {
this.getProductList(this.categoryList.id)
})
}
}
}


+ 28
- 11
pages/index/center.vue View File

@ -40,7 +40,7 @@
<image src="/static/image/center/1.png" mode=""></image>
</view>
<view class="">
我的佣金
我的积分
<p style="color:#DC2828; font-weight: 700;">{{ userInfo.money || 0 }}</p>
</view>
</view>
@ -83,26 +83,25 @@
<text class="grid-text">我的地址</text>
</uv-grid-item>
<uv-grid-item @click="$utils.redirectTo('/pages_order/mine/individualTeam')">
<uv-grid-item @click="$utils.navigateTo('/pages_order/mine/individualTeam')">
<image class="image" src="/static/image/center/8.png" mode=""></image>
<text class="grid-text">我的团队</text>
</uv-grid-item>
<uv-grid-item @click="$utils.navigateTo('/pages_order/order/firmOrder')">
<!-- <uv-grid-item @click="$utils.navigateTo('/pages_order/order/firmOrder')">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">快捷订单</text>
</uv-grid-item>
</uv-grid-item> -->
<uv-grid-item @click="$utils.navigateTo('/pages_order/mine/promotion')">
<image class="image" src="/static/image/center/9.png" mode=""></image>
<text class="grid-text">邀请好友</text>
</uv-grid-item>
<uv-grid-item @click="$utils.navigateTo('/pages_order/center/systemSet')">
<!-- <uv-grid-item @click="$utils.navigateTo('/pages_order/center/systemSet')">
<image class="image" src="/static/image/center/6.png" mode=""></image>
<text class="grid-text">系统设置</text>
</uv-grid-item>
</uv-grid-item> -->
<uv-grid-item @click="$utils.navigateTo('/pages_order/mine/help')">
<image class="image" src="/static/image/center/7.png" mode=""></image>
@ -115,15 +114,28 @@
<text class="grid-text">关于本程序</text>
</uv-grid-item>
<uv-grid-item>
<uv-grid-item @click="$store.commit('logout')">
<image class="image" src="/static/image/center/logout.png" mode=""></image>
<text class="grid-text">退出登录</text>
</uv-grid-item>
<!-- <uv-grid-item>
<button open-type="contact" class="share">
<image class="image" src="/static/image/center/5.png" mode=""></image>
<text class="grid-text">联系客服</text>
</button>
</uv-grid-item>
</uv-grid-item> -->
</uv-grid>
</view>
</view>
<quick-order-entry
ref="quickOrderEntry"
bottom="50vh"
/>
<kefu/>
<tabber select="center" />
</view>
@ -131,23 +143,28 @@
<script>
import tabber from '@/components/base/tabbar.vue'
import QuickOrderEntry from '@/components/QuickOrderEntry.vue'
export default {
components: {
tabber,
QuickOrderEntry,
},
computed: {
isLogin(){
return this.userInfo && this.userInfo.id
}
},
data() {
return {
list: [],
isLogin: false, //
bannerList : [],
}
},
onShow() {
if(uni.getStorageSync('token')){
//
this.refreshQuickOrder()
this.$store.commit('getUserInfo')
this.isLogin = true;
}
this.getBanner()
},


+ 24
- 45
pages/index/index.vue View File

@ -10,17 +10,19 @@
</view>
</view>
<view class="building-search">
<view class="address">
<!-- <view class="address">
<image src="../../static/image/home/1.png" mode=""></image>
<view class="eare">
<text>深圳</text>
</view>
<view class="down-arrow"></view>
</view>
</view> -->
<view class="search">
<!-- DC2828 -->
<uv-search bgColor="#ffffff" placeholder="搜索材料" inputAlign="left" height="70"
showAction="false"></uv-search>
<uv-search bgColor="#ffffff"
placeholder="搜索材料"
disabled
@click="$utils.navigateTo(`/pages_order/product/productList?search=true`)"
showAction="false"></uv-search>
</view>
</view>
</view>
@ -58,10 +60,10 @@
<PrivacyAgreementPoup />
<quick-order-entry
@click="handleQuickOrderClick"
@order-loaded="handleOrderLoaded"
ref="quickOrderEntry"
/>
<kefu/>
<tabber select="home" />
</view>
@ -99,6 +101,7 @@ export default {
if(uni.getStorageSync('token')){
//
this.refreshQuickOrder()
this.$store.commit('getUserInfo')
}
},
methods: {
@ -145,20 +148,6 @@ export default {
this.$refs.quickOrderEntry.refresh();
}
},
//
handleQuickOrderClick() {
console.log('快捷下单按钮点击');
//
},
//
handleOrderLoaded(orderList) {
console.log('获取到快捷下单列表', orderList);
if (Array.isArray(orderList) && orderList.length > 0) {
//
//
}
},
}
}
</script>
@ -170,7 +159,6 @@ export default {
background: linear-gradient(to bottom, $uni-color, #f05a45);
border-bottom-left-radius: 100rpx;
border-bottom-right-radius: 100rpx;
z-index: -1;
.building-title {
position: absolute;
@ -201,54 +189,45 @@ export default {
height: 100rpx;
width: 100%;
margin-top: 200rpx;
// background-color: black;
display: flex;
justify-content: center;
align-items: center;
gap: 20rpx;
.address {
height: 100rpx;
width: 150rpx;
position: relative;
display: flex;
align-items: center;
justify-content: center;
gap: 10rpx;
image {
position: absolute;
height: 20rpx;
width: 15rpx;
line-height: 20rpx;
left: 40rpx;
top: 42rpx;
width: 20rpx;
}
.eare {
width: 100rpx;
height: 100rpx;
line-height: 100rpx;
margin-left: 60rpx;
color: $uni-bg-color;
}
.down-arrow:after {
.down-arrow {
content: "";
display: inline-block;
display: block;
width: 0;
height: 0;
border-left: 10rpx solid transparent;
border-right: 10rpx solid transparent;
border-top: 15rpx solid $uni-bg-color;
margin-top: 5rpx;
position: absolute;
top: 42rpx;
left: 130rpx;
}
}
.search {
display: inline-block;
position: absolute;
top: 16rpx;
left: 26%;
width: 70%;
background-color: #fff;
border-radius: 40rpx;
display: flex;
padding: 20rpx;
:deep(.uv-search__content) {
box-shadow: 0 5rpx 15rpx rgba(0, 0, 0, 0.1);
}


+ 119
- 107
pages_order/center/systemSet.vue View File

@ -1,115 +1,127 @@
<template>
<view class="page">
<navbar title='系统设置' leftClick @leftClick="$utils.navigateBack"/>
<view class="frame">
<view class="content" v-for="(item, index) in list" :key="index">
<view class="title">{{ item.title }}</view>
<view class="item" v-for="(item2, index) in item.itemList" :key="index" @click="tapItem(item2, index)">
<view class="key">
<view class="img">
<img :src="item2.leftIcon" style="width: 100%; height: 100%;"/>
</view>
<view class="text">
{{ item2.text }}
</view>
</view>
<view class="value">
{{ item2.rightIcon }}
</view>
</view>
</view>
</view>
</view>
<view class="page">
<navbar title='系统设置' leftClick @leftClick="$utils.navigateBack" />
<view class="frame">
<view class="content" v-for="(item, index) in list" :key="index">
<view class="title">{{ item.title }}</view>
<view class="item" v-for="(item2, index) in item.itemList" :key="index" @click="tapItem(item2, index)">
<view class="key">
<view class="img">
<img :src="item2.leftIcon" style="width: 100%; height: 100%;" />
</view>
<view class="text">
{{ item2.text }}
</view>
</view>
<view class="value">
{{ item2.rightIcon }}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
// import topbar from "@/components/base/topbar.vue";
// import tabber from "@/components/base/tabbar.vue";
export default {
name: "systemSet",
// components: {tabber, topbar},
data() {
return {
list: [
{
title: `账号设置`,
itemList: [
{leftIcon: "../static/center/1.svg", text: `切换账号`, rightIcon: ">"},
]
},
{
title: `系统设置`,
itemList: [
{leftIcon: "../static/center/1.svg", text: `清理缓存`, rightIcon: ">"},
{leftIcon: "../static/center/2.svg", text: `版本更新`, rightIcon: ">"},
{leftIcon: "../static/center/2.svg", text: `退出登录`, rightIcon: ">"},
]
},
],
}
},
methods: {
tapItem(item, index) {
}
},
}
// import topbar from "@/components/base/topbar.vue";
// import tabber from "@/components/base/tabbar.vue";
export default {
name: "systemSet",
// components: {tabber, topbar},
data() {
return {
list: [
{
title: `账号设置`,
itemList: [{
leftIcon: "../static/center/1.svg",
text: `切换账号`,
rightIcon: ">"
}, ]
},
{
title: `系统设置`,
itemList: [{
leftIcon: "../static/center/1.svg",
text: `清理缓存`,
rightIcon: ">"
},
{
leftIcon: "../static/center/2.svg",
text: `版本更新`,
rightIcon: ">"
},
{
leftIcon: "../static/center/2.svg",
text: `退出登录`,
rightIcon: ">"
},
]
},
],
}
},
methods: {
tapItem(item, index) {
}
},
}
</script>
<style scoped lang="scss">
.page {
background-color: #FFF;
height: 100vh;
.frame {
padding: 40rpx;
.content {
margin-bottom: 40rpx;
.title {
font-size: 30rpx;
color: #b0b0b0;
}
.item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 40rpx;
.key {
display: flex;
justify-content: center;
align-items: center;
color: #333333;
font-size: 32rpx;
.img {
width: 40rpx;
height: 40rpx;
}
.text {
margin-left: 20rpx;
}
}
.value {
color: #999999;
font-size: 36rpx;
}
}
}
}
}
.page {
background-color: #FFF;
height: 100vh;
.frame {
padding: 40rpx;
.content {
margin-bottom: 40rpx;
.title {
font-size: 30rpx;
color: #b0b0b0;
}
.item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 40rpx;
.key {
display: flex;
justify-content: center;
align-items: center;
color: #333333;
font-size: 32rpx;
.img {
width: 40rpx;
height: 40rpx;
}
.text {
margin-left: 20rpx;
}
}
.value {
color: #999999;
font-size: 36rpx;
}
}
}
}
}
</style>

+ 130
- 50
pages_order/components/product/submit.vue View File

@ -1,77 +1,157 @@
<template>
<view class="submit">
<view class=""
@click="$emit('share')">
<uv-icon
size="40rpx"
name="share-square"></uv-icon>
<view class="">
<!-- 联系客服 -->
<!-- <view @click="$emit('service')" class="service-icon">
<image src="@/pages_order/static/productDetail/service.png" mode="widthFix" class="service-icon-img">
</image>
<view class="title">
客服
</view>
</view>
<!-- <view class=""
@click="$utils.navigateTo('/index/cart')">
<uv-icon
size="40rpx"
name="shopping-cart"></uv-icon>
<view class="">
购物车
</view>
</view> -->
<view class="btn"
@click="$emit('submit')">
{{ submiitTitle }}
<button
open-type="contact"
class="service-icon">
<uv-icon
name="kefu-ermai"
size="45rpx"
></uv-icon>
<view class="title">
客服
</view>
</button>
<view class="submit-btn">
<!-- <view class="l"
@click="!disabled && $emit('addCart')"
:class="{'disabled': disabled}">
{{ disabled ? '库存不足' : '加入购物车' }}
</view> -->
<view class="r"
@click="!disabled && $emit('submit')"
:class="{'disabled': disabled}">
{{ disabled ? '库存不足' : submiitTitle }}
</view>
</view>
</view>
</template>
<script>
export default {
name:"submit",
props : {
submiitTitle : {
default : '立即购买',
type : String,
name: "submit",
props: {
submiitTitle: {
default: '立即购买',
type: String,
},
detail: {
default: {}
},
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.submit{
position: fixed;
bottom: 0;
left: 0;
width: 100vw;
background-color: #fff;
height: 100rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 24rpx;
.btn{
background: $uni-color;
width: 600rpx;
height: 80rpx;
color: #fff;
border-radius: 40rpx;
font-size: 28rpx;
}
view{
width: 100rpx;
margin: 0 10rpx;
.submit {
position: fixed;
bottom: 0;
left: 0;
width: 100vw;
background-color: #fff;
height: 120rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
font-size: 24rpx;
padding: 0rpx 20rpx;
box-sizing: border-box;
//
.service-icon {
padding: 0;
margin: 0;
background-color: transparent;
display: flex;
flex-direction: column;
justify-content: center;
margin: 0 20rpx;
flex-shrink: 0;
align-items: center;
&::after{
border: 0;
}
.service-icon-img {
width: 45rpx;
height: 45rpx;
}
.title {
font-size: 26rpx;
color: #666666;
line-height: 40rpx;
}
}
.give{
background: rgba($uni-color, 0.1);
padding: 6rpx 20rpx;
border-radius: 15rpx;
.title{
color: $uni-color;
}
}
.submit-btn {
width: calc(100% - 140rpx);
height: 80rpx;
color: #fff;
border-radius: 40rpx;
font-size: 28rpx;
margin-left: 40rpx;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
border: 1rpx solid $uni-color;
.l {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
color: $uni-color;
}
.r {
background: $uni-color;
flex: 1;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
&.disabled {
background: #cccccc;
cursor: not-allowed;
}
}
.l.disabled {
color: #999999;
cursor: not-allowed;
}
}
}
}
</style>
</style>

+ 2
- 1
pages_order/mine/address.vue View File

@ -168,7 +168,7 @@
margin: 0rpx auto;
background: #F5F5F5;
box-sizing: border-box;
min-height: 100vh;
padding-bottom: env(safe-area-inset-bottom);
.address-list {
padding: 40rpx 20rpx 120rpx 20rpx;
@ -176,6 +176,7 @@
.add-btn {
position: fixed;
padding-bottom: env(safe-area-inset-bottom);
display: flex;
justify-content: center;
align-items: center;


+ 1
- 1
pages_order/mine/individualTeam.vue View File

@ -54,7 +54,7 @@
{{ item.nickName }}{{ item.phone ? item.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') : '' }}
</view>
<view class="headBtn">
下单量<text>{{item.orderNum}}</text> | 佣金 <text style="color: darkorange;">{{item.commission}}</text>
下单量<text>{{item.orderNum}}</text> | 积分 <text style="color: darkorange;">{{item.commission}}</text>
</view>
<view class="tips">
加入<text>{{ $dayjs().diff($dayjs(item.createTime), 'day') }}</text>


+ 3
- 3
pages_order/mine/runningWater.vue View File

@ -12,13 +12,13 @@
<view class="card-wrapper">
<view class="card">
<view class="card-section">
<view class="amount-title">佣金()</view>
<view class="amount-title">积分</view>
<view class="amount-value">¥ {{ info.lj_money }}</view>
<!-- <view class="action-btn" @click="goWithdraw">提现</view> -->
</view>
<view class="card-divider"></view>
<view class="card-section">
<view class="amount-title">累计提现()</view>
<view class="amount-title">累计提现</view>
<view class="amount-value">¥ {{ info.lj_price }}</view>
</view>
</view>
@ -70,7 +70,7 @@
year: '',
month: ''
},
title: ['余额记录', '提现记录', '佣金记录'],
title: ['余额记录', '提现记录', '积分记录'],
agentFlow: {
total: 1,
records: []


+ 1
- 2
pages_order/order/createOrder.vue View File

@ -225,7 +225,6 @@
},
addressTotal: 0,
remark: '',
num: 1,
agreement: false,
coupon: {},
payMethod : 1,
@ -245,7 +244,7 @@
let price = 0
this.payOrderProduct.forEach(n => {
price += n.price * n.num
price += n.price * (n.selectNum || 1)
})
if (this.coupon.id) {


+ 6
- 5
pages_order/order/firmOrder.vue View File

@ -15,16 +15,17 @@
</view>
<view class="product-card">
<image class="product-image" :src="productInfo.image" mode="aspectFit"></image>
<image class="product-image" :src="productInfo.image &&
productInfo.image.split(',')[0]" mode="aspectFit"></image>
<view class="product-details">
<view class="product-name">{{productInfo.name || '泰山工装石膏板'}}</view>
<view class="product-name">{{productInfo.name || ''}}</view>
<view class="product-tags">
<text class="tag">{{productInfo.categoryName || '建材材料'}}</text>
<text class="tag">{{productInfo.categoryName || ''}}</text>
<text class="tag">快速下单</text>
</view>
<view class="product-price">
<text class="price-value">¥{{productInfo.price || '38.00'}}</text>
<text class="price-unit">/{{productInfo.unit || ''}}</text>
<text class="price-value">¥{{productInfo.price || ''}}</text>
<text class="price-unit">/{{productInfo.unit || ''}}</text>
</view>
</view>
</view>


+ 2
- 2
pages_order/product/productDetail.vue View File

@ -32,7 +32,7 @@
</view> -->
</view>
<view class="info-unit">
<!-- <view class="info-unit">
<uv-cell title="免费上门退·7天无理由退货·快递发货" isLink>
<template #icon>
<text class="text">服务</text>
@ -50,7 +50,7 @@
<text>品牌适应人群</text>
</template>
</uv-cell>
</view>
</view> -->
<view class="content">
<view class="title">


+ 42
- 5
pages_order/product/productList.vue View File

@ -1,6 +1,17 @@
<template>
<view class="page">
<navbar :title="title" leftClick @leftClick="$utils.navigateBack" />
<view class="search" v-if="search">
<uv-search bgColor="#ffffff"
placeholder="搜索材料"
inputAlign="left"
@search="handleSearch"
v-model="keyword"
@change="searchChange"
showAction="false"></uv-search>
</view>
<view class="productList">
<productItem
@click="$utils.navigateTo(`/pages_order/product/productDetail?id=${item.id}`)"
@ -22,21 +33,47 @@
title : '',
iconId : 0,
mixinsListApi: 'getProductList',
search : false,
keyword : '',
}
},
onLoad({title, iconId}) {
this.title = title
this.iconId = iconId
this.queryParams.shopIconId = iconId
onLoad({title, iconId, search}) {
if(iconId){
this.title = title
this.iconId = iconId
this.queryParams.shopIconId = iconId
}else if(search){
this.search = search
this.title = '搜素材料'
}
},
methods: {
handleSearch(value){
this.queryParams.name = this.keyword
this.getData()
},
searchChange(){
if(!this.keyword){
this.queryParams.name = this.keyword
this.getData()
}
},
}
}
</script>
<style scoped lang="scss">
.page{
.search {
background-color: #fff;
border-radius: 40rpx;
display: flex;
padding: 20rpx;
margin: 20rpx;
:deep(.uv-search__content) {
box-shadow: 0 5rpx 15rpx rgba(0, 0, 0, 0.1);
}
}
.productList{
}


+ 27
- 0
static/image/base/kefu.svg View File

@ -0,0 +1,27 @@
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="36" viewBox="0 0 26 36" fill="none">
<path d="M16.7473 21.7889L13.252 24.5688L9.75669 21.7889C9.75669 21.7889 1.2894 18.4022 3.0651 8.16351C4.1866 1.70318 9.7193 0.0195768 13.0464 0C16.3735 0 21.9062 1.6836 23.009 8.14394C24.7847 18.4022 16.7473 21.7889 16.7473 21.7889Z" fill="#484848"/>
<path d="M13.2148 2.0179C13.3831 2.0179 13.4765 2.03748 13.4765 2.03748C13.4765 2.03748 20.4298 1.01948 22.4859 11.3169C23.1588 11.4147 23.3644 10.8666 23.3644 10.8666C23.3644 10.8666 22.5793 1.03906 13.4765 1.03906H13.2148V2.0179Z" fill="#74797D"/>
<path d="M22.8597 12.1529C23.4204 12.3095 23.5886 13.2101 23.2335 14.1497C22.8784 15.0894 22.112 15.7159 21.5512 15.5397C20.9905 15.3831 20.8223 14.4825 21.1774 13.5429C21.5326 12.6228 22.2802 11.9963 22.8597 12.1529Z" fill="#FFDDB8"/>
<path d="M3.5698 12.1169C3.00906 12.2735 2.84083 13.1936 3.19597 14.1333C3.5698 15.073 4.31747 15.719 4.87821 15.5428C5.43896 15.3862 5.60719 14.4661 5.25205 13.5264C4.9156 12.5867 4.14924 11.9407 3.5698 12.1169Z" fill="#F5D4B1"/>
<path d="M13.0278 36.0007H25.9437C25.9437 36.0007 25.3082 28.2091 16.4858 26.9954C14.0746 26.8388 13.0278 26.8975 13.0278 26.8975V36.0007Z" fill="#3B5E7C"/>
<path d="M12.9721 36.0007H0.112305C0.112305 36.0007 0.747819 28.2091 9.55156 26.9954C11.9441 26.8388 12.9908 26.8975 12.9908 26.8975V36.0007H12.9721Z" fill="#283F53"/>
<path d="M9.79443 21.9453H16.5982V32.8887H9.79443V21.9453Z" fill="#FFDDB8"/>
<path d="M9.79443 22.0254H16.5982V23.846L9.79443 27.409V22.0254Z" fill="#E5C6A5"/>
<path d="M13.0278 35.9807H15.1774C15.4577 35.5892 18.8222 27.6801 18.8035 27.5627C18.7848 27.4844 14.3923 28.3066 14.3923 28.3066L13.0278 27.4844V35.9807Z" fill="white"/>
<path d="M14.187 34.6906C14.187 34.6906 14.2805 35.6499 15.0095 34.7689C15.7384 33.888 13.2524 29.9922 13.2524 29.9922L14.187 34.6906Z" fill="#3B5E7C"/>
<path d="M13.2714 35.98H11.1219C10.8415 35.5689 7.47699 27.6795 7.49568 27.562C7.51437 27.4837 12.019 28.2864 12.019 28.2864L13.2714 27.6207V35.98Z" fill="#E0ECFF"/>
<path d="M16.7475 25.5078L19.0652 27.1523C19.0652 27.1523 19.1213 31.792 19.0652 31.6158C19.0092 31.4396 13.1587 27.6025 13.1587 27.6025L16.7475 25.5078Z" fill="white"/>
<path d="M13.4013 29.9922C13.4013 29.9922 10.9341 33.888 11.663 34.7689C12.392 35.6499 12.4855 34.6906 12.4855 34.6906L13.4013 29.9922Z" fill="#283F53"/>
<path d="M9.58877 25.5078L7.27102 27.1523C7.27102 27.1523 7.21494 31.792 7.27102 31.6158C7.32709 31.4396 13.1776 27.6025 13.1776 27.6025L9.58877 25.5078Z" fill="white"/>
<path d="M13.1777 30.4014C13.1777 30.4014 16.5235 32.9072 16.5609 31.2628V28.4437C16.5609 28.4437 16.2805 27.6607 15.0282 28.4437C13.2712 29.4617 13.1777 29.54 13.1777 29.54V30.4014Z" fill="#3B5E7C"/>
<path d="M13.3641 30.3819C13.3641 30.3819 10.0183 32.9073 9.98096 31.2629V28.4047C9.98096 28.4047 10.2613 27.6216 11.5137 28.4047C13.2707 29.4422 13.3641 29.501 13.3641 29.501V30.3819Z" fill="#283F53"/>
<path d="M3.5514 29.5195V35.9994H0C0.0186916 35.9994 0.35514 32.2603 3.5514 29.5195ZM26 35.9994H22.4486V29.5195C25.6449 32.2603 26 35.9994 26 35.9994Z" fill="#E0ECFF"/>
<path d="M5.66355 18.8499C7.15887 21.4928 11.9439 23.2155 13.1215 23.2742V5.2832C8.11214 5.2832 4.46729 9.31602 4.46729 14.2885C4.46729 15.9721 4.91588 17.4991 5.66355 18.8499Z" fill="#F5D4B1"/>
<path d="M20.5605 18.8499C19.0465 21.4928 14.2054 23.2155 13.0278 23.2742V5.2832C18.0933 5.2832 21.7755 9.31602 21.7755 14.2885C21.7755 15.9721 21.3269 17.5187 20.5605 18.8499Z" fill="#FFDDB8"/>
<path d="M16.4107 4.54303C16.4107 4.54303 12.0181 9.94622 4.59757 12.3737C2.95271 9.86791 3.32655 7.2642 3.32655 7.2642C3.32655 7.2642 9.77514 2.48747 16.4107 4.54303Z" fill="#484848"/>
<path d="M17.0091 20.1831C17.0091 20.1831 21.2334 18.4016 22.3175 16.1895C23.0278 16.3265 22.8409 16.6789 22.8409 16.6789C22.8409 16.6789 21.2708 18.8127 17.2895 20.7117C15.7194 21.1032 17.0091 20.1831 17.0091 20.1831Z" fill="#91959B"/>
<path d="M23.1773 10.808C21.4577 10.6123 21.6446 12.3546 21.4203 14.371C21.196 16.3874 20.6539 17.9535 22.3548 18.1493C24.0745 18.3451 25.6446 16.8377 25.8689 14.8017C26.1119 12.7853 24.8969 11.0038 23.1773 10.808Z" fill="#484848"/>
<path d="M2.95314 10.808C4.67276 10.6123 4.48585 12.3546 4.71015 14.371C4.93445 16.3874 5.49519 17.9535 3.77557 18.1493C2.05594 18.3451 0.485849 16.8377 0.261549 14.8017C0.0372504 12.7853 1.2522 11.0038 2.95314 10.808Z" fill="#333333"/>
<path d="M15.5332 19.4589C16.4865 19.3023 17.365 19.6547 17.5145 20.2811C17.664 20.888 17.0098 21.5341 16.0566 21.6907C15.1033 21.8473 14.2248 21.4949 14.0753 20.8684C13.9444 20.2616 14.5986 19.6351 15.5332 19.4589Z" fill="#484848"/>
<path d="M13.2711 2.0179C13.1029 2.0179 13.0094 2.03748 13.0094 2.03748C13.0094 2.03748 6.03747 0.999908 4.00009 11.3169C3.32719 11.4147 3.12158 10.8666 3.12158 10.8666C3.12158 10.8666 3.90663 1.03906 13.0094 1.03906H13.2711V2.0179Z" fill="#5F6366"/>
</svg>

BIN
static/image/center/logout.png View File

Before After
Width: 150  |  Height: 156  |  Size: 1.9 KiB

+ 19
- 19
store/store.js View File

@ -135,27 +135,27 @@ const store = new Vuex.Store({
},
// 退出登录
logout(state, reLaunch = false) {
// uni.showModal({
// title: '确认退出登录吗',
// success(r) {
// if (r.confirm) {
// state.userInfo = {}
// uni.removeStorageSync('token')
// uni.reLaunch({
// url: '/pages/index/index'
// })
// }
// }
// })
uni.showModal({
title: '确认退出登录吗',
success(r) {
if (r.confirm) {
state.userInfo = {}
uni.removeStorageSync('token')
uni.reLaunch({
url: '/pages/index/index'
})
}
}
})
state.userInfo = {}
uni.removeStorageSync('token')
// state.userInfo = {}
// uni.removeStorageSync('token')
if(reLaunch){
uni.reLaunch({
url: '/pages/index/index'
})
}
// if(reLaunch){
// uni.reLaunch({
// url: '/pages/index/index'
// })
// }
},
getQrCode(state) {


+ 36
- 36
utils/tree.js View File

@ -1,43 +1,43 @@
export function handleTree(data, id, parentId, children) {
let config = {
id: id || 'id',
parentId: parentId || 'parentId',
childrenList: children || 'children'
};
let config = {
id: id || 'id',
parentId: parentId || 'parentId',
childrenList: children || 'children'
};
var childrenListMap = {};
var nodeIds = {};
var tree = [];
var childrenListMap = {};
var nodeIds = {};
var tree = [];
for (let d of data) {
let parentId = d[config.parentId];
if (childrenListMap[parentId] == null) {
childrenListMap[parentId] = [];
}
nodeIds[d[config.id]] = d;
childrenListMap[parentId].push(d);
}
for (let d of data) {
let parentId = d[config.parentId];
if (childrenListMap[parentId] == null) {
childrenListMap[parentId] = [];
}
nodeIds[d[config.id]] = d;
childrenListMap[parentId].push(d);
}
for (let d of data) {
let parentId = d[config.parentId];
if (nodeIds[parentId] == null) {
tree.push(d);
}
}
for (let d of data) {
let parentId = d[config.parentId];
if (nodeIds[parentId] == null) {
tree.push(d);
}
}
for (let t of tree) {
adaptToChildrenList(t);
}
for (let t of tree) {
adaptToChildrenList(t);
}
function adaptToChildrenList(o) {
if (childrenListMap[o[config.id]] !== null) {
o[config.childrenList] = childrenListMap[o[config.id]];
}
if (o[config.childrenList]) {
for (let c of o[config.childrenList]) {
adaptToChildrenList(c);
}
}
}
return tree;
function adaptToChildrenList(o) {
if (childrenListMap[o[config.id]] !== null) {
o[config.childrenList] = childrenListMap[o[config.id]];
}
if (o[config.childrenList]) {
for (let c of o[config.childrenList]) {
adaptToChildrenList(c);
}
}
}
return tree;
}

Loading…
Cancel
Save