主管理员 11 months ago
parent
commit
a14cc536dc
1083 changed files with 54496 additions and 54020 deletions
  1. +0
    -14
      .gitignore
  2. +2
    -1
      App.vue
  3. +0
    -40
      common.scss
  4. +0
    -143
      components/base/navbar.vue
  5. +0
    -134
      components/base/tabbar.vue
  6. +0
    -169
      components/config/PrivacyAgreementPoup.vue
  7. +0
    -48
      components/config/configPopup.vue
  8. +0
    -122
      components/config/customerServicePopup.vue
  9. +0
    -112
      components/user/productList.vue
  10. +0
    -130
      components/userShop/userShopCommission.vue
  11. +6
    -6
      config.js
  12. +0
    -47
      mixins/configList.js
  13. +0
    -78
      mixins/list.js
  14. +0
    -70
      mixins/order.js
  15. +0
    -571
      pages/component/admin_home.vue
  16. +0
    -377
      pages/component/admin_my.vue
  17. +26
    -6
      pages/component/home.vue
  18. +0
    -337
      pages/component/role_management.vue
  19. +0
    -260
      pages/index/cart.vue
  20. +0
    -191
      pages/index/category.vue
  21. +0
    -353
      pages/index/center.vue
  22. +0
    -263
      pages/index/order.vue
  23. +0
    -312
      pages/subcomponent/admin_login.vue
  24. +9
    -68
      pages/subcomponent/promotion.vue
  25. +0
    -514
      pages_order/auth/loginAndRegisterAndForgetPassword.vue
  26. +0
    -155
      pages_order/auth/wxLogin.vue
  27. +0
    -133
      pages_order/auth/wxUserInfo.vue
  28. +0
    -244
      pages_order/components/address/addressList.vue
  29. +0
    -220
      pages_order/components/address/redactAddress.vue
  30. +0
    -77
      pages_order/components/product/submit.vue
  31. +0
    -367
      pages_order/components/product/submitUnitSelect.vue
  32. +0
    -213
      pages_order/mine/address.vue
  33. +0
    -172
      pages_order/mine/help.vue
  34. +0
    -283
      pages_order/mine/promotion.vue
  35. +0
    -109
      pages_order/mine/purse.vue
  36. +0
    -88
      pages_order/mine/runningWater.vue
  37. +0
    -567
      pages_order/order/orderDetail.vue
  38. +0
    -353
      pages_order/order/refundsOrExchange.vue
  39. +0
    -169
      pages_order/product/productDetail.vue
  40. BIN
      pages_order/static/address/icon.png
  41. BIN
      pages_order/static/address/selectIcon.png
  42. BIN
      pages_order/static/auth/headImage.png
  43. BIN
      pages_order/static/auth/wx.png
  44. BIN
      pages_order/static/help/uploading.png
  45. BIN
      pages_order/static/order/icon.png
  46. BIN
      pages_order/static/product/like.png
  47. BIN
      static/home/1745571336565.png
  48. BIN
      static/home/T 恤衬衣.png
  49. BIN
      static/home/① 在线预约.png
  50. BIN
      static/home/② 快递上门.png
  51. BIN
      static/home/③ 透明质检.png
  52. BIN
      static/home/④ 现金打款.png
  53. BIN
      static/home/不会下单.png
  54. BIN
      static/home/儿童羽绒服.png
  55. BIN
      static/home/关于我们.png
  56. BIN
      static/home/包包.png
  57. BIN
      static/home/品牌服饰.png
  58. BIN
      static/home/品牌羽绒服.png
  59. BIN
      static/home/床被.png
  60. BIN
      static/home/羽绒服.png
  61. BIN
      static/home/羽绒裤.png
  62. BIN
      static/home/鞋子.png
  63. BIN
      static/image/PrivacyAgreementPoup/icon.png
  64. BIN
      static/image/cart/1.png
  65. BIN
      static/image/cart/2.png
  66. BIN
      static/image/center/1.png
  67. BIN
      static/image/center/10.png
  68. +0
    -1
      static/image/center/11.svg
  69. BIN
      static/image/center/2.png
  70. BIN
      static/image/center/3.png
  71. BIN
      static/image/center/4.png
  72. BIN
      static/image/center/5.png
  73. BIN
      static/image/center/6.png
  74. BIN
      static/image/center/7.png
  75. BIN
      static/image/center/8.png
  76. BIN
      static/image/center/9.png
  77. BIN
      static/image/home/0.png
  78. BIN
      static/image/home/1.png
  79. BIN
      static/image/home/2.png
  80. BIN
      static/image/home/3.png
  81. BIN
      static/image/home/address-icon.png
  82. BIN
      static/image/home/arrow-icon.png
  83. BIN
      static/image/home/search-icon.png
  84. BIN
      static/image/product/favorable.png
  85. BIN
      static/image/tabbar/cart-a.png
  86. BIN
      static/image/tabbar/cart.png
  87. BIN
      static/image/tabbar/category-a.png
  88. BIN
      static/image/tabbar/category.png
  89. BIN
      static/image/tabbar/center-a.png
  90. BIN
      static/image/tabbar/center.png
  91. BIN
      static/image/tabbar/home-a.png
  92. BIN
      static/image/tabbar/home.png
  93. BIN
      static/image/tabbar/order-a.png
  94. BIN
      static/image/tabbar/order.png
  95. BIN
      static/logo.png
  96. BIN
      static/my/钱包流水.png
  97. +0
    -110
      store/store.js
  98. +0
    -7
      uni_modules/uv-action-sheet/changelog.md
  99. +0
    -50
      uni_modules/uv-action-sheet/components/uv-action-sheet/props.js
  100. +0
    -280
      uni_modules/uv-action-sheet/components/uv-action-sheet/uv-action-sheet.vue

+ 0
- 14
.gitignore View File

@ -1,14 +0,0 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
.idea
package-lock.json
node_modules/
unpackage/
.hbuilderx
.vite

+ 2
- 1
App.vue View File

@ -19,6 +19,7 @@
},
onLoad: function() {
this.getBannerList()
this.getConfigData()
console.log('App Show')
},
onHide: function() {
@ -47,7 +48,7 @@
this.$api('getConfig', {}, res => {
// console.log('Config data response:', JSON.parse(JSON.stringify(res)) )
if (res && res.success && Array.isArray(res.result)) {
getApp().globalData.configData = res.result
getApp().globalData.configData = res.result
// console.log('Config data set:', JSON.parse(JSON.stringify(this.configData)) )
}
})


+ 0
- 40
common.scss View File

@ -1,40 +0,0 @@
// 文字益处处理
.text-ellipsis{
overflow:hidden; //超出的文本隐藏
text-overflow:ellipsis; //溢出用省略号显示
white-space:nowrap; //溢出不换行
}
.text-ellipsis-2{
overflow: hidden;
text-overflow: ellipsis;
display:-webkit-box; //作为弹性伸缩盒子模型显示
-webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-webkit-line-clamp:2; //显示的行
}
.text-ellipsis-3{
overflow: hidden;
text-overflow: ellipsis;
display:-webkit-box; //作为弹性伸缩盒子模型显示
-webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-webkit-line-clamp:3; //显示的行
}
.share{
padding: 0;
margin: 0;
background-color: #fff;
display: flex !important;
flex-direction: column !important;
justify-content: center !important;
align-items: center !important;
font-size: 26rpx;
}
.share::after{
border: none;
padding: 0;
margin: 0;
width: 0;
height: 0;
}

+ 0
- 143
components/base/navbar.vue View File

@ -1,143 +0,0 @@
<template>
<!-- <view class="navbar"
:style="{backgroundColor : bgColor}"> -->
<view class="title"
:style="{backgroundColor : bgColor,color}">
<view class="left">
<uv-icon name="home"
v-if="leftClick && length == 1"
@click="toHome"
:color="color" size="46rpx"></uv-icon>
<uv-icon name="arrow-left"
v-else-if="leftClick"
@click="$emit('leftClick')"
:color="color" size="46rpx"></uv-icon>
</view>
<view>{{ title }}</view>
<view class="icon">
<uv-icon name="search"
v-if="isSearch"
:color="color" size="58rpx"></uv-icon>
<uv-icon name="plus-circle" :color="color"
v-if="isPlus"
@click="plusCircleShow = true"
size="46rpx" style="margin-left: 30rpx;"></uv-icon>
<view v-if="moreClick" style="margin-left: 30rpx;">
<uv-icon name="more-dot-fill" :color="color"
v-if="!moreText"
@click="moreClick()"
size="46rpx"></uv-icon>
<view v-else @click="moreClick"
style="font-weight: 400;font-size: 30rpx;">
{{ moreText }}
</view>
</view>
</view>
</view>
<!-- </view> -->
</template>
<script>
export default {
name:"navbar",
props : {
title : {
type : String,
default : ''
},
leftClick : {
type : Boolean,
},
moreClick : {
type : Function,
},
isSearch : {
type : Boolean,
default : false,
},
isPlus : {
type : Boolean,
default : false,
},
moreText : {
},
bgColor : {
default : '#fff'
},
color : {
default : '#333'
}
},
created() {
},
beforeDestroy() {
},
data() {
return {
length : getCurrentPages().length
};
},
methods : {
toHome(){
if(this.length != 1){
return
}
uni.reLaunch({
url: '/pages/index/index'
})
}
}
}
</script>
<style lang="scss" scoped>
// .navbar{
// width: 100%;
// height: 120rpx;
// padding-top: var(--status-bar-height);
// }
.title{
position: sticky;
top: 0;
left: 0;
padding-top: calc(var(--status-bar-height) + 20rpx);
width: 100%;
height: 100rpx;
background-color: #fff;
display: flex;
justify-content: center;
font-size: 32rpx;
align-items: center;
z-index: 999;
.left{
position: absolute;
left: 40rpx;
display: flex;
justify-content: flex-start;
}
.icon{
position: absolute;
right: 40rpx;
display: flex;
justify-content: flex-end;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
</style>

+ 0
- 134
components/base/tabbar.vue View File

@ -1,134 +0,0 @@
<template>
<view class="tabbar-box">
<view class="tabbar">
<view :class="{ 'tabbar-active' : select == item.key}" v-for="(item, index) in list" :key="index"
v-if="!item.isNotShop || !userShop" @click="toPath(item, index)" class="tabbar-item">
<view class="tabbar-icon">
<image :src="select == item.key ?
item.selectedIconPath :
item.iconPath" class="tabbar-icon-image" mode="aspectFill"></image>
</view>
<view class="tabbar-title">
{{ item.title }}
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapGetters
} from 'vuex'
export default {
name: "tabbar",
props: ['select'],
computed: {
...mapGetters(['userShop']),
},
data() {
return {
list: [{
"selectedIconPath": "/static/image/tabbar/home-a.png",
"iconPath": "/static/image/tabbar/home.png",
"pagePath": "/pages/index/index",
"title": "首页",
key: 'home',
},
{
"selectedIconPath": "/static/image/tabbar/category-a.png",
"iconPath": "/static/image/tabbar/category.png",
"pagePath": "/pages/index/category",
"title": "商品列表",
key: 'category',
},
{
"selectedIconPath": "/static/image/tabbar/order-a.png",
"iconPath": "/static/image/tabbar/order.png",
"pagePath": "/pages/index/order",
"title": "订单",
key: 'order',
},
{
"selectedIconPath": "/static/image/tabbar/cart-a.png",
"iconPath": "/static/image/tabbar/cart.png",
"pagePath": "/pages/index/cart",
"title": "购物车",
key: 'cart',
},
{
"selectedIconPath": "/static/image/tabbar/center-a.png",
"iconPath": "/static/image/tabbar/center.png",
"pagePath": "/pages/index/center",
"title": "我的",
key: 'center',
}
]
};
},
methods: {
toPath(item, index) {
if (item.key == this.select) {
return
}
uni.reLaunch({
url: item.pagePath
})
},
}
}
</script>
<style scoped lang="scss">
.tabbar-box {
height: 120rpx;
padding-bottom: env(safe-area-inset-bottom);
.tabbar {
position: fixed;
width: 750rpx;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
flex-direction: row;
height: 120rpx;
padding-bottom: env(safe-area-inset-bottom);
z-index: 999999;
bottom: 0;
left: 0;
color: #BCBCBC;
.tabbar-item {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.tabbar-icon {
width: 54rpx;
height: 54rpx;
.tabbar-icon-image {
width: 54rpx;
height: 54rpx;
}
}
.tabbar-title {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
font-size: 23rpx;
line-height: 35rpx;
}
}
.tabbar-active {
color: $uni-color !important;
}
}
}
</style>

+ 0
- 169
components/config/PrivacyAgreementPoup.vue View File

@ -1,169 +0,0 @@
<template>
<uv-popup ref="popup" z-index="99999" :closeOnClickOverlay="false" :customStyle="{ backgroundColor: 'transparent' }">
<view class="privacyPopup">
<view class="icon">
<image src="/static/image/PrivacyAgreementPoup/icon.png"
mode=""></image>
</view>
<view class="title">
<view>协议与隐私政策</view>
</view>
<view class="content_pri">
<view class="text">
欢迎来到酒店布草!我们根据最新的法律法规监管政策要求更新了用户协议隐私政策,请您认真阅读
</view>
</view>
<view class="config">
<uv-checkbox-group v-model="checkboxValue" shape="circle">
<view class="content">
<view style="display: flex;">
<!-- <uv-checkbox size="30rpx" :name="1"></uv-checkbox> -->
同意<text @click="goToPrivacy">酒店布草隐私政策</text>
</view>
<view class="">
以及<text @click="goToPrivacy">用户协议</text>
</view>
</view>
</uv-checkbox-group>
</view>
<view class="pri_btn">
<button class="confuse_btn" @click="confusePrivacy">拒绝</button>
<button
class="confirm_btn" id="agree-btn"
open-type="agreePrivacyAuthorization"
@agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</button>
</view>
</view>
</uv-popup>
</template>
<script>
export default {
name: 'PrivacyAgreementPoup',
data() {
return {
resolvePrivacyAuthorization: {},
checkboxValue : false
}
},
mounted() {
if(wx.getPrivacySetting){
wx.getPrivacySetting({
success: res => {
console.log(res)
if (res.needAuthorization) {
//
this.init()
}
},
fail: () => {}
})
}
},
methods: {
//
init(resolve) {
this.$refs.popup.open('center')
this.resolvePrivacyAuthorization = resolve
},
//
goToPrivacy() {
wx.openPrivacyContract({
success: () => {
console.log('打开成功');
}, //
fail: () => {
uni.showToast({
title: '打开失败,稍后重试',
icon: 'none'
})
} //
})
},
//
confusePrivacy() {
this.$refs.popup.close()
// this.resolvePrivacyAuthorization({
// event: 'disagree'
// })
},
//
handleAgreePrivacyAuthorization() {
// id
// this.resolvePrivacyAuthorization({
// buttonId: 'agree-btn',
// event: 'agree'
// })
this.$refs.popup.close()
}
}
}
</script>
<style lang="scss" scoped>
.privacyPopup {
width: 90%;
margin: 0rpx auto;
background: white;
border-radius: 20rpx;
box-sizing: border-box;
padding: 40rpx 30rpx;
.icon{
display: flex;
justify-content: center;
align-items: center;
padding-bottom: 30rpx;
image{
width: 90rpx;
height: 90rpx;
}
}
.title {
text-align: center;
font-size: 36rpx;
}
.content_pri {
padding: 30rpx 0rpx;
font-size: 28rpx;
}
.config {
font-size: 28rpx;
text-align: center;
line-height: 40rpx;
margin-bottom: 30rpx;
text {
color: $uni-color;
}
.content{
display: flex;
}
}
.pri_btn {
display: flex;
.confuse_btn{
background-color: #F2F2F2;
color: #BDBDBD;
}
button {
margin: 10rpx;
flex: 1;
background: $uni-color;
outline: none;
color: white;
font-size: 30rpx;
}
}
}
</style>

+ 0
- 48
components/config/configPopup.vue View File

@ -1,48 +0,0 @@
<template>
<view class="configPopup">
<uv-popup ref="popup" :round="30" :customStyle="{height: '50vh'}">
<view class="content">
<uv-parse :content="content"></uv-parse>
</view>
</uv-popup>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'configPoup',
data() {
return {
content : ''
}
},
onShow(){
},
methods: {
//
open(key){
this.content = this.configList[key]
this.$refs.popup.open('bottom');
}
},
computed : {
...mapState(['configList'])
}
}
</script>
<style lang="scss" scoped>
.configPopup {
.content{
padding: 30rpx 20rpx;
overflow: scroll;
height: 100%;
box-sizing: border-box;
}
}
</style>

+ 0
- 122
components/config/customerServicePopup.vue View File

@ -1,122 +0,0 @@
<template>
<!-- 联系客服弹框 -->
<uv-popup ref="popup"
:safeAreaInsetBottom="false"
:round="30">
<view class="warp">
<view class="rect" @tap.stop>
<view class="title">联系{{ bTitle || title }}</view>
<view class="center">确定拨打{{ bTitle || title }}电话?</view>
<view class="bottom">
<view class="btn1"
@click="close">
取消
</view>
<view class="btn2"
@click="confirm">
确定
</view>
</view>
</view>
</view>
</uv-popup>
</template>
<script>
export default {
data() {
return {
phone:'',
title : '客服',
bPhone : '',
bTitle : '',
}
},
mounted() {
this.getCustomPhone()
},
methods: {
getCustomPhone(){
this.$api('customUser', {}, res => {
this.phone = res.result.phone
})
},
open(phone, title) {
this.bPhone = phone || this.phone
this.bTitle = title || this.title
this.$refs.popup.open()
},
close() {
this.$refs.popup.close()
},
//
confirm() {
this.$refs.popup.close()
uni.makePhoneCall({
phoneNumber: this.bPhone || this.phone,
success() {
console.log('安卓拨打成功');
},
fail() {
console.log('安卓拨打失败');
}
})
},
}
}
</script>
<style scoped lang="scss">
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.rect {
width: 600rpx;
height: 300rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
.title {
padding: 10rpx 0 0 15rpx;
background-color: $uni-color;
color: #FFF;
text-align: left;
width: 100%;
height: 18%;
font-size: 36rpx;
}
.center {
height: 40%;
display: flex;
justify-content: center;
align-items: center;
font-size: 36rpx;
}
.bottom {
display: flex;
justify-content: center;
gap: 50rpx;
view{
height: 60rpx;
line-height: 60rpx;
padding: 0 50rpx;
border-radius: 30rpx;
}
.btn1{
background-color: #fff;
}
.btn2{
background-color: $uni-color;
color: #fff;
}
}
}
</style>

+ 0
- 112
components/user/productList.vue View File

@ -1,112 +0,0 @@
<template>
<view class="list">
<view class="item"
v-for="(item, index) in 10"
@click="$utils.navigateTo('/pages_order/product/productDetail?id=123')"
:key="index">
<image
class="image"
src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg" mode=""></image>
<view class="info">
<view class="title">
桌布租赁
</view>
<view class="price">
<text>58</text>/
</view>
<view class="favorable">
<view class="t">
限时优惠
</view>
<view class="p">
48
</view>
</view>
<view class="num">
已售卖5000+
</view>
</view>
<view class="btn">
<uv-icon name="shopping-cart"
color="#fff"></uv-icon>
</view>
</view>
</view>
</template>
<script>
export default {
name:"productList",
data() {
return {
};
},
methods : {
},
}
</script>
<style scoped lang="scss">
.list{
display: flex;
flex-wrap: wrap;
.item{
position: relative;
width: 300rpx;
padding: 20rpx;
background-color: #fff;
border-radius: 20rpx;
margin-top: 20rpx;
&:nth-child(odd){
margin-right: 20rpx;
}
.image{
width: 300rpx;
height: 250rpx;
border-radius: 20rpx;
}
.info{
font-size: 26rpx;
.title{
font-size: 30rpx;
}
.price{
color: #D03F25;
margin-top: 6rpx;
text{
font-size: 34rpx;
font-weight: 900;
}
}
.favorable{
display: flex;
background-image: url(/static/image/product/favorable.png);
background-size: 100% 100%;
width: fit-content;
padding: 5rpx 10rpx;
font-size: 18rpx;
margin-top: 6rpx;
.p{
color: #fff;
margin-left: 10rpx;
}
}
.num{
margin-top: 6rpx;
font-size: 22rpx;
color: #888;
}
}
.btn{
position: absolute;
right: 20rpx;
bottom: 20rpx;
padding: 10rpx;
border-radius: 50%;
background-color: $uni-color;
}
}
}
</style>

+ 0
- 130
components/userShop/userShopCommission.vue View File

@ -1,130 +0,0 @@
<template>
<view class="commission">
<image src="/static/image/center/10.png" mode=""></image>
<view class="price">
<view class="title">
总佣金
</view>
<view class="num">
7890.34
</view>
</view>
<view class="font-menu"
v-if="purse">
<view @click="toRunningWater(index)"
v-for="(item, index) in list"
:key="index">{{ item.name }}</view>
</view>
<view class="btn"
v-if="!purse"
@click="toPurse">
提现
</view>
</view>
</template>
<script>
export default {
name: "userShopCommission",
props : {
purse : {
default : false,
},
},
data() {
return {
list : [
{
name : '余额记录',
},
{
name : '提现记录',
},
{
name : '佣金记录',
},
],
};
},
methods : {
//
toPurse(){
uni.navigateTo({
url:'/pages_order/mine/purse'
})
},
//
toRunningWater(index){
uni.navigateTo({
url:'/pages_order/mine/runningWater?status=' + index
})
},
}
}
</script>
<style scoped lang="scss">
.commission {
width: 700rpx;
height: 300rpx;
position: relative;
margin: 20rpx auto;
color: #fff;
image {
width: 700rpx;
height: 300rpx;
position: absolute;
border-radius: 20rpx;
}
.price {
position: absolute;
left: 50rpx;
top: 80rpx;
font-weight: 900;
.title {
font-size: 32rpx;
}
.num {
font-size: 44rpx;
margin-top: 20rpx;
}
}
.font-menu {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 500;
text-align: center;
color: #ffffff;
line-height: 24rpx;
width: 710rpx;
position: absolute;
left: 0;
bottom: 25rpx;
display: flex;
view{
width: 160rpx;
}
}
.btn {
position: absolute;
right: 50rpx;
bottom: 50rpx;
background-color: #FDC440;
width: 160rpx;
height: 60rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 30rpx;
}
}
</style>

+ 6
- 6
config.js View File

@ -13,13 +13,13 @@ const config = {
const defaultConfig = {
mapKey: 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
aliOss: {
url: 'https://image.hhlm1688.com/',
url: 'https://oss.ddmhs.top/',
config: {
region: 'oss-cn-guangzhou',
accessKeyId: 'LTAI5tQSs47izVy8DLVdwUU9',
accessKeySecret: 'qHI7C3PaXYZySr84HTToviC71AYlFq',
bucket: 'hanhaiimage',
endpoint: 'oss-cn-shenzhen.aliyuncs.com',
region: 'oss-cn-hangzhou',
accessKeyId: 'LTAI5tDXgH5a42GbUZroVvio',
accessKeySecret: 'TK7jQ0KeXnFBHNxpEHzT83Spp81tl5',
bucket: 'ossddmhs',
endpoint: 'oss-cn-hangzhou.aliyuncs.com',
}
}
}


+ 0
- 47
mixins/configList.js View File

@ -1,47 +0,0 @@
import { mapState } from 'vuex'
export default {
data() {
return {
// 默认的全局分享内容
Gshare: {
// title: '三只青蛙',
path: '/pages/index/index', // 全局分享的路径,比如 首页
// imageUrl: '/static/image/login/logo.png', // 全局分享的图片(可本地可网络)
}
}
},
computed: {
...mapState(['configList', 'userInfo', 'riceInfo']),
},
// 定义全局分享
// 1.发送给朋友
onShareAppMessage(res) {
let o = {
title : this.configList.logo_name,
...this.Gshare,
}
if(this.userInfo.id){
if(this.Gshare.path.includes('?')){
o.path += '&shareId=' + this.userInfo.id
}else{
o.path += '?shareId=' + this.userInfo.id
}
}
return o
},
//2.分享到朋友圈
onShareTimeline(res) {
let o = {
...this.Gshare,
title : this.configList.logo_name,
}
if(this.userInfo.id){
o.path = this.Gshare.path + '?shareId=' + this.userInfo.id
}
return o
},
methods: {
}
}

+ 0
- 78
mixins/list.js View File

@ -1,78 +0,0 @@
/**
* 处理查询参数
* @param {Object} self - 组件实例
* @param {Object} queryParams - 额外的查询参数
* @returns {Object} 合并后的查询参数
*/
function query(self, queryParams){
// 深度合并对象
return self.$utils.deepMergeObject(
self.$utils.deepMergeObject(self.queryParams,
(self.beforeGetData && self.beforeGetData()) || {}),
queryParams)
}
/**
* 列表数据加载混入
* 提供列表数据的加载分页下拉刷新上拉加载更多等功能
*/
export default {
data() {
return {
queryParams: {
pageNo: 1,
pageSize: 10,
},
total : 0,
list : [],
}
},
// 下拉刷新
onPullDownRefresh() {
this.getData()
},
// 上拉加载更多
onReachBottom() {
this.loadMoreData()
},
// 页面显示时加载数据
onShow() {
this.getData()
},
methods: {
/**
* 获取列表数据
* @param {Object} queryParams - 查询参数
* @returns {Promise} 返回Promise对象
*/
getData(queryParams){
return new Promise((success, error) => {
if(!this.mixinsListApi){
return console.error('mixinsListApi 缺失');
}
this.$api(this.mixinsListApi,
query(this, queryParams), res => {
uni.stopPullDownRefresh()
if(res.code == 200){
success(res.result)
// 更新列表数据
this[this.mixinsListKey || 'list'] = res.result.records || res.result
// 更新总数
this.total = res.result.total || res.result.length
// 调用数据加载完成的回调
this.getDataThen && this.getDataThen(res.result.records, res.result.total, res.result)
}
})
})
},
/**
* 加载更多数据
*/
loadMoreData(){
if(this.queryParams.pageSize < this.total){
this.queryParams.pageSize += 10
this.getData()
}
},
}
}

+ 0
- 70
mixins/order.js View File

@ -1,70 +0,0 @@
export default {
data() {
return {
}
},
computed: {
},
methods: {
// 立即支付
toPayOrder(item){
let api = ''
// if([0, 1].includes(item.shopState)){
// api = 'createOrderTwo'
// }else{
api = 'createSumOrderAgain'
// }
this.$api(api, {
orderId : item.id,
addressId : item.addressId
}, res => {
if(res.code == 200){
uni.requestPaymentWxPay(res)
.then(res => {
uni.showToast({
title: '支付成功',
icon: 'none'
})
this.getData()
}).catch(n => {
this.getData()
})
}
})
},
// 确认收货
confirmOrder(item){
uni.showModal({
title: '您收到货了吗?',
success : e => {
if(e.confirm){
this.$api('confirmOrder', {
orderId : item.id,
}, res => {
this.getData()
})
}
}
})
},
// 取消订单
cancelOrder(item){
uni.showModal({
title: '确认取消订单吗?',
success : e => {
if(e.confirm){
this.$api('cancelOrder', {
orderId : item.id,
}, res => {
this.getData()
})
}
}
})
},
}
}

+ 0
- 571
pages/component/admin_home.vue View File

@ -1,571 +0,0 @@
<template>
<view class="container">
<!-- 顶部绿色区域包含用户信息和旧衣兑换现金 -->
<view class="top-section">
<!-- 顶部用户信息 -->
<view class="user-header">
<view class="user-info">
<image class="avatar" :src="userInfo.avatar || '/static/images/avatar.png'" mode="aspectFill"></image>
<text class="username">{{ userInfo.nickname || '未登录' }}</text>
<view class="role-tag">
<text>{{ userInfo.role === 'admin' ? '超级管理员' : '普通用户' }}</text>
</view>
</view>
<view class="header-right">
<uni-icons type="more-filled" size="24" color="#fff"></uni-icons>
<uni-icons type="circle" size="24" color="#fff"></uni-icons>
</view>
</view>
<!-- 旧衣换现金banner -->
<view class="exchange-banner">
<view class="banner-text">
<text class="title">旧衣换现金</text>
<text class="subtitle">旧衣有"金"绿色暖生活</text>
</view>
<image class="banner-image" src="/static/images/recycle.png" mode="aspectFit"></image>
</view>
</view>
<!-- 下半部分内容区域 -->
<view class="content-section">
<!-- 管理模块 -->
<view class="management-grid">
<view class="grid-item">
<view class="icon-badge">
<uni-icons type="person" size="24" color="#8B5CF6"></uni-icons>
<text class="badge">2</text>
</view>
<text>用户管理</text>
</view>
<view class="grid-item">
<view class="icon-badge">
<uni-icons type="list" size="24" color="#3B82F6"></uni-icons>
<text class="badge">99+</text>
</view>
<text>订单管理</text>
</view>
<view class="grid-item">
<view class="icon-badge">
<uni-icons type="staff" size="24" color="#10B981"></uni-icons>
</view>
<text>员工管理</text>
</view>
</view>
<!-- 订单管理 -->
<view class="section-card">
<view class="section-header">
<text class="title">订单管理</text>
<view class="view-all">
<text>全部</text>
<uni-icons type="right" size="14" color="#999"></uni-icons>
</view>
</view>
<view class="order-card">
<view class="order-info">
<text class="order-id">{{orderInfo.orderId}}</text>
<view class="info-item">
<text class="label">用户名称</text>
<text class="value">{{orderInfo.customerName}}</text>
</view>
<view class="info-item">
<text class="label">电话</text>
<text class="value">{{orderInfo.phone}}</text>
</view>
<view class="info-item">
<text class="label">预约时间</text>
<text class="value">{{orderInfo.appointmentTime}}</text>
</view>
</view>
<view class="order-actions">
<view class="action-btn">
<uni-icons type="undo" size="20" color="#666"></uni-icons>
<text>驳回</text>
</view>
<view class="action-btn">
<uni-icons type="person" size="20" color="#666"></uni-icons>
<text>审批</text>
</view>
</view>
<text class="status-tag">{{orderInfo.status}}</text>
</view>
</view>
<!-- 用户管理 -->
<view class="section-card">
<view class="section-header">
<text class="title">用户管理</text>
<view class="view-all">
<text>全部</text>
<uni-icons type="right" size="14" color="#999"></uni-icons>
</view>
</view>
<view class="user-card">
<view class="user-info">
<text class="title">{{promoterApplication.name}} 的推广官申请</text>
<text class="time">{{promoterApplication.time}}</text>
<view class="info-list">
<view class="info-item">
<text class="label">电话</text>
<text class="value">{{promoterApplication.phone}}</text>
</view>
<view class="info-item">
<text class="label">职业</text>
<text class="value">{{promoterApplication.occupation}}</text>
</view>
<view class="info-item">
<text class="label">年龄</text>
<text class="value">{{promoterApplication.age}}</text>
</view>
<view class="info-item">
<text class="label">每日可花推广时间</text>
<text class="value">{{promoterApplication.dailyPromotionHours}}小时</text>
</view>
</view>
</view>
<text class="status-tag">{{promoterApplication.status}}</text>
</view>
</view>
<!-- 员工管理 -->
<view class="section-card">
<view class="section-header">
<text class="title">员工管理</text>
<view class="view-all">
<text>全部</text>
<uni-icons type="right" size="14" color="#999"></uni-icons>
</view>
</view>
<view class="staff-table">
<view class="table-header">
<text class="col-rank">排名</text>
<text class="col-name">姓名</text>
<text class="col-orders">处理订单</text>
<text class="col-promoters">推广人数</text>
</view>
<view
class="table-row"
v-for="(item, index) in staffList"
:key="index"
>
<text class="col-rank" :class="'rank-' + (index + 1)">{{index + 1}}</text>
<text class="col-name">{{item.name}}</text>
<text class="col-orders">{{item.orders}}</text>
<text class="col-promoters">{{item.promoters}}</text>
</view>
</view>
</view>
</view>
<uv-tabbar
:value="value"
:fixed="true"
@change="changeTo"
>
<uv-tabbar-item text="首页" icon="home"></uv-tabbar-item>
<uv-tabbar-item text="角色管理" icon="photo"></uv-tabbar-item>
<uv-tabbar-item text="个人中心" icon="account"></uv-tabbar-item>
</uv-tabbar>
</view>
</template>
<script>
// import tabBarMixin from '../mixins/tabBarMixin.js'
// import {adminList} from '../mixins/list.js'
export default {
// mixins: [tabBarMixin],
data() {
return {
value : 0,
userInfo: {
nickname: '郑婷雅',
role: 'admin',
avatar: '/static/images/avatar.png'
},
orderInfo: {
orderId: 'RE827381278615226',
customerName: '周小艺',
phone: '138****1234',
appointmentTime: '周四 11:00~13:00',
status: '待质检'
},
promoterApplication: {
name: '周小艺',
time: '16:22',
phone: '139****1234',
occupation: '待业',
age: 32,
dailyPromotionHours: 6,
status: '待确认'
},
staffList: [
{ name: '钱君霖', orders: 237, promoters: 236 },
{ name: '吴彦谋', orders: 230, promoters: 230 },
{ name: '周小艺', orders: 180, promoters: 180 },
{ name: '郑文锦', orders: 166, promoters: 166 },
{ name: '何炜', orders: 150, promoters: 150 }
]
}
},
methods:{
changeTo(e){
this.value = e
console.log(e,'111')
if(e==1){
uni.reLaunch({
url: '/pages/component/role_management'
});
}else if(e == 2){
uni.reLaunch({
url: '/pages/component/admin_my'
});
}
}
},
// onLoad() {
// this.checkUserRole();
// uni.hideTabBar();
// },
// onShow() {
// this.checkUserRole();
// if (this.userRole !== 'admin') {
// uni.showToast({
// title: '访',
// icon: 'none'
// });
// uni.reLaunch({
// url: '/pages/index/index'
// });
// }
// }
}
</script>
<style lang="scss">
.container {
min-height: 100vh;
background: #f5f5f5;
padding-bottom: calc(var(--window-bottom) + 100rpx);
}
.top-section {
background: #00C853;
padding: 0 0 40rpx;
// border-radius: 0 0 30rpx 30rpx;
position: relative;
z-index: 1;
box-shadow: 0 16rpx 36rpx rgba(0, 200, 83, 0.9),
0 2rpx 8rpx rgba(0, 0, 0, 0.15);
.user-header {
padding: 60rpx 30rpx 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
.user-info {
display: flex;
align-items: center;
.avatar {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-right: 20rpx;
border: 2rpx solid rgba(255,255,255,0.3);
}
.username {
color: #fff;
font-size: 32rpx;
margin-right: 20rpx;
}
.role-tag {
background: rgba(255,255,255,0.2);
padding: 4rpx 16rpx;
border-radius: 30rpx;
text {
color: #fff;
font-size: 24rpx;
}
}
}
.header-right {
display: flex;
gap: 20rpx;
}
}
.exchange-banner {
margin: 20rpx 30rpx;
background: rgba(255,255,255,0.1);
border-radius: 20rpx;
padding: 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
.banner-text {
.title {
color: #fff;
font-size: 40rpx;
font-weight: bold;
margin-bottom: 10rpx;
display: block;
}
.subtitle {
color: rgba(255,255,255,0.8);
font-size: 28rpx;
}
}
.banner-image {
width: 180rpx;
height: 140rpx;
}
}
}
.content-section {
margin-top: -20rpx;
position: relative;
z-index: 2;
padding: 0 20rpx;
.management-grid {
background: #fff;
border-radius: 20rpx;
padding: 30rpx;
display: flex;
justify-content: space-around;
margin-bottom: 20rpx;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05);
.grid-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 10rpx;
.icon-badge {
position: relative;
width: 80rpx;
height: 80rpx;
background: #f8f8f8;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
.badge {
position: absolute;
top: -10rpx;
right: -10rpx;
background: #ff4d4f;
color: #fff;
font-size: 20rpx;
padding: 2rpx 10rpx;
border-radius: 20rpx;
min-width: 32rpx;
text-align: center;
}
}
text {
font-size: 28rpx;
color: #333;
}
}
}
}
.section-card {
margin: 20rpx;
background: #fff;
border-radius: 20rpx;
padding: 30rpx;
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
.title {
font-family: PingFang SC;
font-weight: 800;
font-size: 15px;
line-height: 140%;
letter-spacing: 0%;
text-align: center;
vertical-align: middle;
font-weight: 500;
color: #333;
}
.view-all {
display: flex;
align-items: center;
gap: 4rpx;
color: #999;
font-size: 28rpx;
}
}
}
.order-card {
background: #fff;
border-radius: 12rpx;
padding: 20rpx;
position: relative;
border: 1px solid #f0f0f0;
.order-info {
.order-id {
font-size: 32rpx;
color: #333;
margin-bottom: 10rpx;
display: block;
}
.info-item {
display: flex;
align-items: center;
margin-bottom: 10rpx;
.label {
font-size: 28rpx;
color: #999;
min-width: 80rpx;
}
.value {
font-size: 28rpx;
color: #333;
font-weight: 500;
}
}
}
.order-actions {
display: flex;
justify-content: center;
gap: 60rpx;
margin-top: 20rpx;
padding-top: 20rpx;
border-top: 1px solid #f5f5f5;
.action-btn {
display: flex;
align-items: center;
flex-direction: column;
gap: 10rpx;
color: #666;
font-size: 14rpx;
}
}
.status-tag {
position: absolute;
top: 55%;
right: 20rpx;
color: #ff9800;
font-size: 28rpx;
}
}
.user-card {
background: #fff;
border-radius: 12rpx;
padding: 20rpx;
position: relative;
border: 1px solid #f0f0f0;
.user-info {
.title {
font-family: PingFang SC;
font-weight: 400;
font-size: 18px;
line-height: 140%;
letter-spacing: 0%;
vertical-align: middle;
color: #333;
margin-bottom: 10rpx;
display: block;
padding-right: 120rpx;
}
.time {
position: absolute;
top: 20rpx;
right: 20rpx;
font-size: 28rpx;
color: #999;
}
.info-list {
.info-item {
display: flex;
align-items: center;
margin-bottom: 10rpx;
.label {
font-size: 28rpx;
color: #999;
min-width: 80rpx;
}
.value {
font-size: 28rpx;
color: #333;
font-weight: 500;
}
}
}
}
.status-tag {
position: absolute;
top: 75%;
right: 20rpx;
color: #ff9800;
font-size: 28rpx;
}
}
.staff-table {
background: #fff;
border-radius: 12rpx;
padding: 20rpx;
border: 1px solid #f0f0f0;
.table-header, .table-row {
display: flex;
padding: 20rpx;
font-size: 28rpx;
.col-rank { width: 15%; }
.col-name { width: 25%; }
.col-orders { width: 30%; }
.col-promoters { width: 30%; }
}
.table-header {
color: #999;
border-bottom: 1px solid #f5f5f5;
}
.table-row {
color: #333;
.rank-1 { color: #f5222d; }
.rank-2 { color: #fa8c16; }
.rank-3 { color: #52c41a; }
}
}
</style>

+ 0
- 377
pages/component/admin_my.vue View File

@ -1,377 +0,0 @@
<template>
<view class="my-bg">
<!-- 顶部绿色渐变背景及白色渐变过渡 -->
<view class="top-gradient-bg">
<view class="page-title">我的</view>
<view class="banner-card">
<view class="banner-content">
<view class="banner-texts">
<text class="banner-title">旧衣换现金</text>
<text class="banner-subtitle">旧衣有"金"绿色暖生活</text>
</view>
<image class="banner-img" src="/static/images/recycle-money.png" mode="aspectFit"></image>
</view>
</view>
</view>
<view class="user-cards" v-if="!login_status">
<view class="user-info">
<image class="avatars" src="/static/logo.png" mode="aspectFill"></image>
<view class="info">
<text class="names">暂未登录请先登录</text>
</view>
</view>
</view>
<view class="btns" v-if="!login_status">
<uv-button
class="btn"
type="primary"
text="立即登录"
color="linear-gradient(to right, #17f261,#13d755)"
shape="circle"
@click="logout"
></uv-button>
<text>暂未登录 请先登录</text>
</view>
<!-- 下半部分用户信息和功能列表 -->
<view class="content-section" v-if="login_status">
<view class="user-card">
<image class="avatar" src="/static/images/avatar.png" mode="aspectFill"></image>
<view class="user-info-text">
<text class="nickname">战斗世界</text>
<text class="user-id">ID: 5625354</text>
</view>
</view>
<view class="function-card">
<view class="function-item" @tap="navigateTo('/pages/component/promotion')">
<uni-icons custom-prefix="custom-icon" type="layers" size="24" color="#333"></uni-icons>
<text class="function-text">推广官</text>
<uni-icons type="right" size="16" color="#bbb"></uni-icons>
</view>
<view class="divider"></view>
<view class="function-item" @tap="navigateTo('/pages/component/admin_customer')">
<uni-icons custom-prefix="custom-icon" type="headphones" size="24" color="#333"></uni-icons>
<text class="function-text">联系客服</text>
<uni-icons type="right" size="16" color="#bbb"></uni-icons>
</view>
<view class="divider"></view>
<view class="function-item" @tap="navigateTo('/pages/component/admin_edit_profile')">
<uni-icons custom-prefix="custom-icon" type="edit" size="24" color="#333"></uni-icons>
<text class="function-text">修改信息</text>
<uni-icons type="right" size="16" color="#bbb"></uni-icons>
</view>
<view class="divider"></view>
<view class="function-item" @tap="handleLogout">
<uni-icons custom-prefix="custom-icon" type="logout" size="24" color="#333"></uni-icons>
<text class="function-text">退出登录</text>
<uni-icons type="right" size="16" color="#bbb"></uni-icons>
</view>
</view>
</view>
<!-- 底部导航栏区域不做修改 -->
<uv-tabbar
:value="value"
:fixed="true"
@change="changeTo"
>
<uv-tabbar-item text="首页" icon="home"></uv-tabbar-item>
<uv-tabbar-item text="角色管理" icon="photo"></uv-tabbar-item>
<uv-tabbar-item text="个人中心" icon="account"></uv-tabbar-item>
</uv-tabbar>
</view>
</template>
<script>
// import tabBarMixin from '../mixins/tabBarMixin.js'
export default {
// mixins: [tabBarMixin],
data() {
return {
value:2,
login_status:true,
userInfo: {
nickname: '战斗世界',
id: '5625354',
avatar: '/static/logo.png'
}
}
},
methods: {
changeTo(e){
this.value = e
if(e==1){
uni.reLaunch({
url: '/pages/component/role_management'
});
}else if(e==0){
console.log(e,'111')
uni.reLaunch({
url: '/pages/component/admin_home'
});
}
},
navigateTo(url) {
uni.navigateTo({ url })
},
handleLogout() {
uni.showModal({
title: '提示',
content: '确定要退出登录吗?',
success: (res) => {
if (res.confirm) {
//
uni.removeStorageSync('userInfo');
this.login_status = false;
//
this.userRole = 'user'
//
// uni.reLaunch({
// url: '/pages/component/admin_login'
// })
}
}
})
}
},
// onLoad() {
// console.log(this.isAdmin,'444')
// this.checkUserRole()
// },
// onShow() {
// this.checkUserRole()
// //
// if (this.userRole !== 'admin') {
// uni.showToast({
// title: '访',
// icon: 'none'
// })
// uni.reLaunch({
// url: '/pages/index/index'
// })
// }
// }
}
</script>
<style lang="scss" scoped>
.my-bg {
min-height: 100vh;
background: #f5f8fa;
padding-bottom: 120rpx;
box-sizing: border-box;
}
.top-gradient-bg {
width: 100%;
height: 420rpx;
background: linear-gradient(135deg, #00e676 0%, #00c853 100%);
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
z-index: 1;
overflow: visible;
}
.top-gradient-bg::after {
content: '';
display: block;
position: absolute;
left: 0; right: 0; bottom: -1rpx;
height: 60rpx;
background: linear-gradient(to bottom, rgba(0,200,83,0.15), #f5f8fa 90%);
z-index: 2;
}
.page-title {
margin-top: 80rpx;
font-size: 36rpx;
color: #fff;
font-weight: 500;
letter-spacing: 2rpx;
text-align: center;
z-index: 3;
}
.banner-card {
width: 92vw;
background: rgba(255,255,255,0.08);
border-radius: 32rpx;
border: 2rpx solid rgba(255,255,255,0.4);
box-shadow: 0 8rpx 32rpx 0 rgba(0, 200, 83, 0.10);
overflow: visible;
margin-top: 32rpx;
z-index: 4;
}
.banner-content {
display: flex;
align-items: center;
justify-content: space-between;
padding: 48rpx 40rpx 48rpx 48rpx;
margin-bottom: -30rpx;
}
.banner-texts {
display: flex;
flex-direction: column;
justify-content: center;
}
.banner-title {
font-size: 48rpx;
color: #fff;
font-weight: bold;
font-style: italic;
margin-bottom: 16rpx;
letter-spacing: 2rpx;
}
.banner-subtitle {
font-size: 28rpx;
color: #fff;
opacity: 0.85;
font-style: normal;
}
.banner-img {
width: 200rpx;
height: 130rpx;
margin-left: 32rpx;
}
.content-section {
margin: -40rpx 16rpx 0 16rpx;
background: #fff;
border-radius: 36rpx;
box-shadow: 0 8rpx 32rpx 0 rgba(0,0,0,0.04);
padding-bottom: 32rpx;
z-index: 10;
position: relative;
}
.user-card {
margin: 0 24rpx 32rpx 24rpx;
background: #fff;
border-radius: 28rpx;
box-shadow: 0 4rpx 24rpx 0 rgba(0,0,0,0.06);
display: flex;
align-items: center;
padding: 40rpx 32rpx 40rpx 32rpx;
}
.avatar {
width: 96rpx;
height: 96rpx;
border-radius: 50%;
margin-right: 24rpx;
object-fit: cover;
background: #f5f5f5;
}
.user-info-text {
display: flex;
flex-direction: column;
justify-content: center;
}
.nickname {
font-size: 32rpx;
color: #222;
font-weight: bold;
margin-bottom: 8rpx;
}
.user-id {
font-size: 26rpx;
color: #b0b0b0;
}
.function-card {
margin: 0 24rpx 32rpx 24rpx;
background: #fff;
border-radius: 28rpx;
box-shadow: 0 4rpx 24rpx 0 rgba(0,0,0,0.06);
padding: 0 0;
}
.function-item {
display: flex;
align-items: center;
height: 96rpx;
padding: 0 32rpx;
position: relative;
}
.function-text {
flex: 1;
margin-left: 20rpx;
font-family: PingFang SC;
font-weight: 400;
font-size: 14px;
line-height: 100%;
letter-spacing: 0%;
color: #222;
}
.divider {
height: 1rpx;
background: #f0f1f3;
margin: 0 32rpx;
}
.user-cards {
margin: -50rpx 30rpx 0;
background: #fff;
border-radius: 24rpx;
padding: 30rpx;
position: relative;
z-index: 2;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
.user-info {
display: flex;
align-items: center;
margin-bottom: 40rpx;
.avatars {
width: 110rpx;
height: 110rpx;
border-radius: 50%;
margin-right: 24rpx;
}
}
.info {
.name {
font-size: 34rpx;
font-weight: 600;
color: #222;
margin-bottom: 12rpx;
display: block;
}
}
}
.btns{
width: 70%;
margin: 0 auto;
margin-top: 30%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.btn{
width: 100%;
}
text{
margin-top: 30rpx;
font-family: PingFang SC;
font-weight: 400;
font-size: 13px;
line-height: 100%;
letter-spacing: 0%;
text-align: center;
}
}
</style>

+ 26
- 6
pages/component/home.vue View File

@ -49,7 +49,7 @@
<view class="Xiadan-section">
<image src="/static/home/不会下单.png" alt="" class="process-icon"/>
<image :src="addressCion" alt="" class="process-icon"/>
<text class="left-text">不会下单联系客服了解回收流程</text>
<view class="right" @click="goService">
<image src="/static/home/联系客服.png" mode=""></image>
@ -66,7 +66,7 @@
</view>
<view class="about-footer" @click="goAbout">
<view class="about-header">
<image src="/static/home/关于我们.png" mode="aspectFit" class="logo"></image>
<image :src="sbkCion" mode="aspectFit" class="logo"></image>
<!-- <text class="about-title">关于我们</text> -->
</view>
<view class="about-content">
@ -205,7 +205,9 @@ export default {
],
bannerList: [],
pricePreviewList: [],
cityList: []
cityList: [],
addressCion: '',
sbkCion: '',
}
},
computed: {
@ -218,6 +220,15 @@ export default {
}
return names.join('、')
},
address_cion() {
console.log(getApp().globalData.configData,'home-getApp().globalData.configData')
const item = getApp().globalData.configData.find(i => i.keyName === 'address_cion')
return item ? item.keyContent : ''
},
sbk_cion() {
const item = getApp().globalData.configData.find(i => i.keyName === 'sbk_cion')
return item ? item.keyContent : ''
}
},
methods: {
changeTo(e){
@ -326,7 +337,14 @@ export default {
this.cityList = []
}
})
}
},
updateCionData() {
const configData = getApp().globalData.configData || [];
const address = configData.find(i => i.keyName === 'address_cion');
const sbk = configData.find(i => i.keyName === 'sbk_cion');
this.addressCion = address ? address.keyContent : '';
this.sbkCion = sbk ? sbk.keyContent : '';
},
},
onLoad() {
this.getAreaList();
@ -346,10 +364,12 @@ export default {
onUnload() {
uni.$off('pricePreviewListUpdated')
uni.$off('bannerListUpdated')
uni.$off('configDataUpdated', this.updateCionData)
},
onShow() {
//
// uni.startPullDownRefresh()
this.updateCionData();
//
uni.$on('configDataUpdated', this.updateCionData);
this.getPricePreview();
}
}


+ 0
- 337
pages/component/role_management.vue View File

@ -1,337 +0,0 @@
<template>
<view class="container">
<!-- 顶部banner -->
<view class="banner">
<view class="banner-content">
<text class="title">账号角色管理</text>
<text class="subtitle">让管理更高效</text>
</view>
<image class="banner-image" src="/static/images/role-management.png" mode="aspectFit"></image>
</view>
<!-- 搜索栏 -->
<view class="search-bar">
<view class="tabs">
<view class="tab active">员工</view>
<view class="tab">用户</view>
</view>
<view class="search-input">
<uni-icons type="search" size="20" color="#999"></uni-icons>
<input type="text" placeholder="请输入要查询的内容" placeholder-class="placeholder" />
</view>
</view>
<!-- 用户列表 -->
<view class="user-list">
<view class="user-item" v-for="(item, index) in userList" :key="index">
<view class="user-info">
<text class="user-id">ID: {{item.id}}</text>
<view class="edit-btn" @tap="handleEdit(item)">
<text>去编辑</text>
<uni-icons type="right" size="14" color="#666"></uni-icons>
</view>
</view>
<view class="user-detail">
<image class="avatar" :src="item.avatar" mode="aspectFill"></image>
<view class="detail-info">
<view class="info-row">
<text class="label">昵称</text>
<text class="value">{{item.nickname}}</text>
</view>
<view class="info-row">
<text class="label">密码</text>
<text class="value">************</text>
</view>
<view class="info-row">
<text class="label">角色</text>
<view v-if="item.role" class="role-tag">{{item.role}}</view>
<text v-else>-</text>
</view>
</view>
</view>
<view class="delete-btn" @tap="handleDelete(item)">
<uni-icons type="trash" size="20" color="#666"></uni-icons>
<text>删除</text>
</view>
</view>
</view>
<uv-tabbar
:value="value"
:fixed="true"
@change="changeTo"
>
<uv-tabbar-item text="首页" icon="home"></uv-tabbar-item>
<uv-tabbar-item text="角色管理" icon="photo"></uv-tabbar-item>
<uv-tabbar-item text="个人中心" icon="account"></uv-tabbar-item>
</uv-tabbar>
</view>
</template>
<script>
// import tabBarMixin from '../mixins/tabBarMixin.js'
export default {
// mixins: [tabBarMixin],
data() {
return {
value:1,
userList: [
{
id: 'YG250428000001',
nickname: '吴彦谋',
avatar: '/static/images/avatar1.png',
role: '推广官'
},
{
id: 'YG250428000002',
nickname: '冯思钧',
avatar: '/static/images/avatar2.png',
role: ''
},
{
id: 'YG250428000003',
nickname: '何炜',
avatar: '/static/images/avatar3.png',
role: ''
},
{
id: 'YG250428000004',
nickname: '郑文锦',
avatar: '/static/images/avatar4.png',
role: '推广官'
}
]
}
},
methods: {
changeTo(e){
this.value = e
console.log(e,'111')
if(e==0){
uni.reLaunch({
url: '/pages/component/admin_home'
});
}else if(e == 2){
uni.reLaunch({
url: '/pages/component/admin_my'
});
}
},
handleEdit(user) {
if (this.userRole !== 'admin') {
uni.showToast({
title: '无权限操作',
icon: 'none'
})
return
}
uni.navigateTo({
url: `/pages/user-edit/user-edit?id=${user.id}`
})
},
handleDelete(user) {
if (this.userRole !== 'admin') {
uni.showToast({
title: '无权限操作',
icon: 'none'
})
return
}
uni.showModal({
title: '提示',
content: '确定要删除该用户吗?',
success: (res) => {
if (res.confirm) {
console.log('删除用户:', user.id)
}
}
})
}
},
// onShow() {
// this.checkUserRole()
// //
// if (this.userRole !== 'admin') {
// uni.showToast({
// title: '访',
// icon: 'none'
// })
// uni.reLaunch({
// url: '/pages/index/index'
// })
// }
// }
}
</script>
<style lang="scss" scoped>
.container {
min-height: 100vh;
background: #f5f5f5;
padding-bottom: 120rpx;
}
.banner {
background: #2196F3;
padding: 40rpx 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
.banner-content {
.title {
font-size: 40rpx;
color: #fff;
font-weight: bold;
margin-bottom: 10rpx;
display: block;
}
.subtitle {
font-size: 28rpx;
color: rgba(255,255,255,0.8);
}
}
.banner-image {
width: 200rpx;
height: 120rpx;
}
}
.search-bar {
background: #fff;
padding: 20rpx 30rpx;
.tabs {
display: flex;
margin-bottom: 20rpx;
.tab {
padding: 10rpx 30rpx;
font-size: 28rpx;
color: #666;
position: relative;
&.active {
color: #333;
font-weight: 500;
&::after {
content: '';
position: absolute;
left: 30rpx;
right: 30rpx;
bottom: -4rpx;
height: 4rpx;
background: #00C853;
border-radius: 2rpx;
}
}
}
}
.search-input {
display: flex;
align-items: center;
background: #f5f5f5;
border-radius: 35rpx;
padding: 15rpx 30rpx;
input {
flex: 1;
font-size: 28rpx;
margin-left: 20rpx;
}
}
}
.user-list {
padding: 20rpx;
.user-item {
background: #fff;
border-radius: 20rpx;
padding: 30rpx;
margin-bottom: 20rpx;
.user-info {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
.user-id {
font-size: 28rpx;
color: #333;
}
.edit-btn {
display: flex;
align-items: center;
color: #666;
font-size: 28rpx;
}
}
.user-detail {
display: flex;
margin-bottom: 20rpx;
.avatar {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.detail-info {
flex: 1;
.info-row {
display: flex;
align-items: center;
margin-bottom: 10rpx;
.label {
font-size: 28rpx;
color: #666;
width: 100rpx;
}
.value {
font-size: 28rpx;
color: #333;
}
.role-tag {
background: #fff5e6;
color: #ff9800;
font-size: 24rpx;
padding: 4rpx 16rpx;
border-radius: 20rpx;
}
}
}
}
.delete-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 10rpx;
color: #666;
font-size: 28rpx;
padding-top: 20rpx;
border-top: 1px solid #f5f5f5;
}
}
}
.placeholder {
color: #999;
font-size: 28rpx;
}
</style>

+ 0
- 260
pages/index/cart.vue View File

@ -1,260 +0,0 @@
<template>
<view class="page">
<navbar/>
<view class="user">
<uv-checkbox-group
shape="circle"
v-model="checkboxValue">
<uv-swipe-action>
<view
v-for="(item, index) in list"
:key="index">
<view style="margin-top: 20rpx;"></view>
<uv-swipe-action-item
:options="options">
<view class="item">
<view class="checkbox">
<uv-checkbox
:name="item.id"
activeColor="#FA5A0A"
size="40rpx"
icon-size="35rpx"
></uv-checkbox>
</view>
<image
class="image"
src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg"
mode=""></image>
<view class="info">
<view class="title">
<view class="">
{{ item.title }}
</view>
<view class="">
<uv-number-box v-model="item.num"
@change="valChange"></uv-number-box>
</view>
</view>
<view class="unit">
规格{{ item.unit }}
<uv-icon name="arrow-down"></uv-icon>
</view>
<view class="price">
<text>{{ item.price }}</text>
</view>
</view>
</view>
</uv-swipe-action-item>
</view>
</uv-swipe-action>
</uv-checkbox-group>
<view class="action">
<view class="icon">
<image src="/static/image/cart/1.png" mode=""></image>
<view class="num">
{{ checkboxValue.length }}
</view>
</view>
<view class="price">
<view class="count">
合计
<view class="">
<text>{{ totalPrice }}</text>
</view>
</view>
<view class="text">
{{ checkboxValue.length }}已享受更低优惠
</view>
</view>
<view class="btn">
去结算
</view>
</view>
</view>
<tabber select="cart" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
export default {
components: {
tabber,
},
data() {
return {
value : 0,
checkboxValue : [],
options: [
{
text: '删除',
style: {
backgroundColor: '#FA5A0A'
}
},
],
list : [
{
id : 1,
title : '桌布租赁',
num : 1,
price : 299,
unit : '120*40*75【桌子尺寸】',
},
{
id : 2,
title : '桌布租赁',
num : 1,
price : 299,
unit : '120*40*75【桌子尺寸】',
},
],
}
},
computed: {
totalPrice(){
if (!this.checkboxValue.length) {
return 0
}
let price = 0
this.list.forEach(n => {
if(this.checkboxValue.includes(n.id)){
price += n.price * n.num
}
})
return price
},
},
methods: {
valChange(){
},
}
}
</script>
<style scoped lang="scss">
.page {
padding-bottom: 200rpx;
/deep/ .uv-swipe-action{
width: 100%;
}
}
.user {
.item{
background-color: #fff;
display: flex;
padding: 30rpx;
.checkbox{
display: flex;
justify-content: center;
align-items: center;
}
.image{
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
}
.info{
flex: 1;
.title{
display: flex;
padding: 10rpx 20rpx;
justify-content: space-between;
}
.unit{
font-size: 24rpx;
padding: 10rpx 20rpx;
color: #717171;
display: flex;
align-items: center;
}
.price{
color: $uni-color;
font-size: 28rpx;
padding: 10rpx 20rpx;
text{
font-size: 36rpx;
font-weight: 900;
}
}
}
}
.action{
width: 700rpx;
position: fixed;
bottom: 220rpx;
left: 25rpx;
background-color: #fff;
height: 100rpx;
border-radius: 50rpx;
box-shadow: 0 0 6rpx 6rpx #00000010;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
z-index: 999;
.icon{
position: relative;
width: 80rpx;
height: 80rpx;
margin: 0 20rpx;
image{
width: 80rpx;
height: 80rpx;
}
.num{
position: absolute;
right: 10rpx;
top: 0rpx;
background-color: $uni-color;
color: #fff;
font-size: 18rpx;
border-radius: 50%;
height: 30rpx;
width: 30rpx;
display: flex;
justify-content: center;
align-items: center;
}
}
.price{
.count{
display: flex;
font-size: 26rpx;
align-items: center;
view{
color: $uni-color;
margin-left: 10rpx;
text{
font-size: 32rpx;
font-weight: 900;
}
}
}
.text{
font-size: 20rpx;
color: #717171;
}
}
.btn{
margin-left: auto;
background-color: $uni-color;
height: 100%;
padding: 0 50rpx;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
}
}
</style>

+ 0
- 191
pages/index/category.vue View File

@ -1,191 +0,0 @@
<template>
<view class="page">
<navbar/>
<view class="category">
<uv-vtabs
:chain="chain"
:list="category"
height="1000px"
:barItemBadgeStyle="{right:'20px',top:'12px'}"
@change="change">
<uv-vtabs-item>
<view class="category-title">
租赁
</view>
<view class="list">
<view class="item" v-for="(item,index) in list" :key="index"
@click="$utils.navigateTo('/pages_order/product/productDetail?id=123')">
<view class="item-image">
<image
:src="item.image"
mode="aspectFill"></image>
</view>
<view class="item-unit">
<text class="text">{{item.unit}}</text>
</view>
</view>
</view>
</uv-vtabs-item>
</uv-vtabs>
</view>
<tabber select="category" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
export default {
components: {
tabber,
},
data() {
return {
category: [
{
name : '桌布'
},
{
name : '桌布'
},
{
name : '桌布'
},
],
list : [
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
],
chain: false,
value: 0
}
},
computed: {
list2() {
const _list = this.list[this.value]?.childrens;
return _list ? _list : [];
}
},
onReady() {
},
methods: {
change(index) {
console.log('选项改变:', index)
this.value = index;
}
}
}
</script>
<style scoped lang="scss">
.page{
/deep/ .uv-vtabs{
height: calc(100vh - 360rpx) !important;
}
/deep/ .uv-vtabs__bar{
height: calc(100vh - 360rpx) !important;
}
/deep/ .uv-vtabs__content{
height: calc(100vh - 360rpx) !important;
}
}
.category {
font-size: 30rpx;
color: #333;
.category-title{
position: relative;
display: flex;
justify-content: center;
align-items: center;
height: 120rpx;
&::before,
&::after {
position: absolute;
top: 50%;
content: '';
width: 10%;
border-top: 2rpx solid black;
}
&::before {
left: 25%;
}
&::after {
right: 25%;
}
}
.list{
display: flex;
flex-wrap: wrap;
margin: 0 auto;
width: 490rpx;
.item {
padding: 10rpx 20rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 20rpx;
.item-image {
width: 120rpx;
height: 120rpx;
image{
height: 100%;
width: 100%;
border-radius: 50%;
}
}
.item-unit {
font-size: 24rpx;
margin-top: 15rpx;
color: #555;
}
}
.gap {
padding: 0 30rpx;
}
}
}
</style>

+ 0
- 353
pages/index/center.vue View File

@ -1,353 +0,0 @@
<template>
<view class="page">
<navbar title="个人中心" />
<view class="head">
<view class="headImage">
<image src="" mode=""></image>
</view>
<view class="info">
<view class="name">
倾心.
</view>
<!-- <view class="vip">
VIP1
</view> -->
<view class="tips">
今天是您来的的第32天
</view>
</view>
<!-- <view class="headBtn" @click="headBtn">
角色切换
</view> -->
<view class="setting">
<uv-icon name="setting" size="40rpx"></uv-icon>
</view>
</view>
<!-- 水洗店 -->
<view class="userShop" v-if="userShop">
<userShopCommission />
<view class="userList">
<view class="title">
我的用户
</view>
<view class="list">
<view class="item" v-for="(item, index) in 20" :key="index">
<view class="name">
客户王生
</view>
<view class="num">
剩余水洗布198
</view>
</view>
</view>
</view>
</view>
<!-- 酒店 -->
<view class="user" v-else>
<view class="line">
<view class="item">
<view class="image">
<image src="/static/image/center/1.png" mode=""></image>
</view>
<view class="">
余额3000
</view>
</view>
<view class="item">
<view class="image">
<image src="/static/image/center/4.png" mode=""></image>
</view>
<view class="">
押金30000
</view>
</view>
</view>
<view class="line grid">
<view class="title">
常用功能
</view>
<uv-grid :col="4" :border="false">
<uv-grid-item @click="$utils.navigateTo('/pages_order/mine/address')">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">地址管理</text>
</uv-grid-item>
<uv-grid-item @click="$utils.redirectTo('/index/order')">
<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/refundsOrExchange?index='+0)">
<image class="image" src="/static/image/center/5.png" mode=""></image>
<text class="grid-text">换货</text>
</uv-grid-item>
<uv-grid-item @click="$utils.navigateTo('/pages_order/order/refundsOrExchange?index='+1)">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">退货</text>
</uv-grid-item>
</uv-grid>
</view>
<view class="line grid">
<uv-grid :col="4" :border="false">
<uv-grid-item @click="contactUs">
<image class="image" src="/static/image/center/9.png" mode=""></image>
<text class="grid-text">联系客服</text>
</uv-grid-item>
<uv-grid-item>
<image class="image" src="/static/image/center/6.png" mode=""></image>
<text class="grid-text">我的租赁</text>
</uv-grid-item>
<uv-grid-item @click="$utils.redirectTo('/index/cart')">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">租赁车</text>
</uv-grid-item>
<uv-grid-item
@click="$utils.navigateTo('/pages_order/auth/loginAndRegisterAndForgetPassword?index='+2)">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">申请成为水洗店</text>
</uv-grid-item>
</uv-grid>
</view>
</view>
<tabber select="center" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import {
mapGetters
} from 'vuex'
import userShopCommission from '@/components/userShop/userShopCommission.vue'
export default {
components: {
tabber,
userShopCommission,
},
computed: {
...mapGetters(['userShop']),
},
data() {
return {
}
},
methods: {
headBtn() {
let self = this
uni.showModal({
title: '演示切换角色之后的效果',
success(res) {
if (res.confirm) {
self.$store.state.shop = !self.$store.state.shop
}
}
})
},
}
}
</script>
<style scoped lang="scss">
.page {
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.rect {
width: 600rpx;
height: 300rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
.title {
padding: 10rpx 0 0 15rpx;
background-color: #fd5100;
color: #FFF;
text-align: left;
width: 100%;
height: 18%;
font-size: 36rpx;
}
.center {
height: 40%;
display: flex;
justify-content: center;
align-items: center;
font-size: 36rpx;
}
.bottom {
display: flex;
justify-content: center;
gap: 50rpx;
}
}
}
image {
width: 100%;
height: 100%;
}
.head {
display: flex;
background-color: #fff;
padding: 40rpx 20rpx;
align-items: center;
position: relative;
.headImage {
width: 120rpx;
height: 120rpx;
background-image: url(/static/image/center/3.png);
background-size: 100% 100%;
overflow: hidden;
border-radius: 50%;
margin-right: 40rpx;
}
.info {
font-size: 28rpx;
.vip {
background-color: #FCCC92;
color: #FA6239;
width: 100rpx;
display: flex;
justify-content: center;
align-items: center;
height: 40rpx;
border-radius: 20rpx;
margin-top: 20rpx;
}
.name {
font-size: 32rpx;
}
.tips {
font-size: 26rpx;
color: #ABABAB;
}
}
.headBtn {
margin-left: auto;
padding: 15rpx 20rpx;
background-color: $uni-color;
color: #fff;
border-radius: 20rpx;
margin-top: 50rpx;
}
.setting {
position: absolute;
right: 50rpx;
top: 50rpx;
}
}
.userShop {
.userList {
.title {
font-size: 32rpx;
font-weight: 900;
padding: 20rpx;
}
.list {
display: flex;
flex-wrap: wrap;
.item {
width: 270rpx;
margin: 20rpx;
display: flex;
flex-direction: column;
padding: 40rpx 30rpx;
background-color: #fff;
border-radius: 30rpx;
line-height: 60rpx;
.name {}
.num {
color: $uni-color;
font-weight: 600;
font-size: 28rpx;
}
}
}
}
}
.user {
.line {
display: flex;
background-color: #fff;
margin-top: 20rpx;
padding: 20rpx 0;
.item {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
padding: 20rpx 0;
&:nth-child(1) {
border-right: 1px solid #00000013;
}
.image {
width: 100rpx;
height: 70rpx;
margin-right: 20rpx;
}
}
}
.grid {
flex-direction: column;
font-size: 26rpx;
padding: 20rpx;
.title {
margin-bottom: 30rpx;
font-size: 28rpx;
font-weight: 600;
}
.image {
width: 70rpx;
height: 70rpx;
margin-bottom: 10rpx;
}
text {
text-align: center;
width: 120rpx;
}
}
}
</style>

+ 0
- 263
pages/index/order.vue View File

@ -1,263 +0,0 @@
<template>
<view class="page">
<navbar
title="订单中心"
/>
<uv-tabs :list="tabs"
:activeStyle="{color : '#FD5100', fontWeight : 600}"
lineColor="#FD5100"
lineHeight="8rpx"
lineWidth="50rpx"
@click="clickTabs"></uv-tabs>
<view v-if="orderList.length > 0" class="list">
<view class="item"
v-for="(item, index) in orderList.records"
@click="toOrderDetail(item.id)"
:key="index">
<view class="top">
<view class="service">
<text>{{item.projectId_dictText}}</text>
<text>{{item.type_dictText}}</text>
</view>
<view class="status">
<text> {{item.state_dictText}}</text>
</view>
</view>
<view class="content">
<view class="left">
<image mode="aspectFill" :src="item.image"></image>
</view>
<view class="right">
<view class="text-hidden-1">
客户姓名{{item.name}}
</view>
<view class="text-hidden-1">
产品规格{{item.unit}}
</view>
<view class="text-hidden-1">
租赁地址{{item.address}}
</view>
<!-- <view class="text-hidden-1">
总计时间{{item.useTime}}分钟
</view> -->
</view>
</view>
<view class="bottom">
<view class="price">
总价格<text class="num">{{item.money}}</text>
</view>
<view class="b1">
查看物流
</view>
<!-- <view @click.stop="toPayOrder(item)" class="b2" v-if="item.state == 0">
立即付款
</view>
<view class="b1" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 3">
再来一单
</view>
<view class="b2" @click.stop="toEvaluate(item.id,item.projectId,item.technicianId)" v-if="item.state == 3">
立即评价
</view>
<view class="b2" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 4">
再来一单
</view> -->
</view>
</view>
</view>
<tabber select="order"/>
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import { mapGetters } from 'vuex'
export default {
components : {
tabber,
},
computed : {
...mapGetters(['userShop']),
},
data() {
return {
tabs: [{
name: '全部'
},
{
name: '租赁押金'
},
{
name: '水洗租赁'
},
{
name: '破损换货'
},
{
name: '退货退款'
}
],
queryParams: {
pageNo: 1,
pageSize: 10
},
// orderList: [
// {
// money : 99.99,
// address : '广广C32802',
// name : '**',
// phone : '150*****091',
// unit : '120*40*75',
// image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
// state_dictText : '',
// }
// ], //
orderList : {
records : [],
total : 0,
},
state : -1,
}
},
onShow() {
this.orderPage()
},
//
onReachBottom() {
if(this.queryParams.pageSize < this.orderList.total){
this.queryParams.pageSize += 10
this.orderPage()
}
},
methods: {
orderPage(){
let queryParams = {
...this.queryParams,
}
if(this.state != -1){
queryParams.state = this.state
}
this.$api('orderPage', queryParams, res => {
if(res.code == 200){
this.orderList = res.result
}
})
},
//tab
clickTabs(index) {
if (index == 0) {
this.state = -1;
} else {
this.state = index - 1;
}
this.queryParams.pageSize = 10
this.orderPage()
},
//
toOrderDetail(id) {
uni.navigateTo({
url: '/pages_order/order/orderDetail?id=' + id
})
},
getOrderList(){
},
}
}
</script>
<style scoped lang="scss">
.page{
}
.list {
.item {
width: calc(100% - 40rpx);
background-color: #fff;
margin: 20rpx;
box-sizing: border-box;
border-radius: 16rpx;
padding: 30rpx;
.top {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30rpx;
.service {}
.status {
font-size: 26rpx;
font-weight: 600;
}
}
.content {
display: flex;
margin: 10rpx 0;
.left {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
image {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
}
}
.right {
width: calc(100% - 160rpx);
color: #777;
font-size: 24rpx;
padding-left: 20rpx;
line-height: 40rpx;
background-color: #F8F8F8;
}
}
.bottom {
display: flex;
justify-content: space-between;
font-size: 25rpx;
.price {
font-weight: 900;
text {
color: #ff780099;
font-size: 30rpx;
}
}
.b1 {
border: 1px solid #777;
color: #777;
box-sizing: border-box;
}
.b2 {
background: linear-gradient(178deg, #4FD3BC, #60C285);
color: #fff;
}
view {
margin: 12rpx;
border-radius: 28rpx;
padding: 8rpx 28rpx;
margin-bottom: 0;
}
}
}
}
</style>

+ 0
- 312
pages/subcomponent/admin_login.vue View File

@ -1,312 +0,0 @@
<template>
<view class="login-container">
<!-- Logo和标题区域 -->
<image class="logo" src="/static/logo.png" mode="aspectFit"></image>
<text class="app-title">瀚海回收</text>
<!-- 登录表单 -->
<view class="login-form">
<text class="form-title">管理员登录</text>
<!-- 账号输入框 -->
<view class="input-group">
<text class="label">账号</text>
<input
type="text"
v-model="formData.username"
placeholder="请输入"
placeholder-class="placeholder"
/>
</view>
<!-- 密码输入框 -->
<view class="input-group">
<text class="label">密码</text>
<view class="password-input">
<input
:type="showPassword ? 'text' : 'password'"
v-model="formData.password"
placeholder="请输入"
placeholder-class="placeholder"
/>
<view class="eye-icon" @tap="togglePasswordVisibility">
<uni-icons :type="showPassword ? 'eye' : 'eye-slash'" size="20" color="#666"></uni-icons>
</view>
</view>
</view>
<!-- 登录按钮 -->
<button
class="login-btn"
:class="{'login-btn-active': isFormValid}"
@tap="handleLogin"
>登录</button>
<!-- 取消登录按钮 -->
<button
class="cancel-btn"
@tap="handleCancel"
>取消登录</button>
<!-- 协议勾选 -->
<view class="agreement">
<view class="checkbox" @tap="toggleAgreement">
<view v-if="formData.agreement" class="checkbox-checked">
<text class="checkmark"></text>
</view>
<view v-else class="checkbox-empty"></view>
</view>
<text class="agreement-text">
我已阅读并同意
<text class="link" @tap="openServiceAgreement">服务协议</text>
<text class="link" @tap="openPrivacyPolicy">隐私政策</text>
</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
formData: {
username: '',
password: '',
agreement: false
},
showPassword: false
}
},
computed: {
isFormValid() {
return this.formData.username &&
this.formData.password &&
this.formData.agreement
}
},
methods: {
togglePasswordVisibility() {
this.showPassword = !this.showPassword
},
toggleAgreement() {
this.formData.agreement = !this.formData.agreement
},
handleLogin() {
if (!this.isFormValid) {
uni.showToast({
title: '请完善登录信息',
icon: 'none'
})
return
}
//
console.log('登录信息:',JSON.parse(JSON.stringify(this.formData) ) )
if( JSON.parse(JSON.stringify(this.formData)).username == 'admin' && JSON.parse(JSON.stringify(this.formData) ).password == '123' ){
console.log(1)
uni.setStorageSync('userInfo', { role: 'admin' })
uni.reLaunch({
url: '/pages/component/admin_home'
})
}
},
handleCancel() {
uni.navigateBack()
},
openServiceAgreement() {
//
uni.navigateTo({
url: '/pages/agreement/service'
})
},
openPrivacyPolicy() {
//
uni.navigateTo({
url: '/pages/agreement/privacy'
})
}
}
}
</script>
<style lang="scss" scoped>
.login-container {
min-height: 100vh;
background-color: #00C853;
padding: 0 40rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 15vh;
.logo {
width: 160rpx;
height: 160rpx;
margin-bottom: 20rpx;
}
.app-title {
font-size: 44rpx;
color: #fff;
font-weight: 600;
margin-bottom: 60rpx;
}
.login-form {
width: 100%;
background: rgba(255, 255, 255, 0.95);
border-radius: 20rpx;
padding: 40rpx;
box-sizing: border-box;
.form-title {
font-family: PingFang SC;
font-weight: 500;
font-size: 32rpx;
line-height: 140%;
letter-spacing: 0%;
color: #333;
font-weight: 500;
margin-bottom: 40rpx;
}
.input-group {
margin-bottom: 30rpx;
position: relative;
.label {
font-family: PingFang SC;
font-weight: 400;
font-size: 13px;
line-height: 140%;
letter-spacing: 0%;
color: #333;
margin-bottom: 8rpx;
display: block;
}
.password-input {
position: relative;
width: 100%;
padding: 0;
input {
width: 100%;
height: 90rpx;
background: transparent;
font-size: 28rpx;
color: #333;
border-bottom: 1px solid #E5E5E5;
padding: 0;
padding-right: 60rpx;
box-sizing: border-box;
}
.eye-icon {
position: absolute;
right: -10rpx;
top: 50%;
transform: translateY(-50%);
padding: 20rpx;
display: flex;
align-items: center;
justify-content: center;
}
}
input {
width: 100%;
height: 90rpx;
background: transparent;
font-size: 28rpx;
color: #333;
border-bottom: 1px solid #E5E5E5;
padding: 0;
box-sizing: border-box;
}
}
.placeholder {
color: #999;
font-size: 28rpx;
}
.login-btn {
width: 100%;
height: 90rpx;
background: #00C853;
color: #fff;
font-size: 32rpx;
border-radius: 45rpx;
margin: 40rpx 0 20rpx;
display: flex;
align-items: center;
justify-content: center;
border: none;
}
.cancel-btn {
width: 100%;
height: 90rpx;
background: transparent;
color: #00C853;
font-size: 32rpx;
border-radius: 45rpx;
margin-bottom: 30rpx;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #00C853;
}
.agreement {
display: flex;
align-items: center;
padding: 0;
.checkbox {
width: 32rpx;
height: 32rpx;
margin-right: 12rpx;
.checkbox-empty {
width: 30rpx;
height: 30rpx;
border: 1px solid #00C853;
border-radius: 50%;
}
.checkbox-checked {
width: 32rpx;
height: 32rpx;
background: #00C853;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #00C853;
.checkmark {
color: #fff;
font-size: 20rpx;
line-height: 1;
transform: translateY(-1rpx);
}
}
}
.agreement-text {
font-size: 24rpx;
color: #666;
.link {
color: #00C853;
}
}
}
}
}
</style>

+ 9
- 68
pages/subcomponent/promotion.vue View File

@ -82,18 +82,7 @@
<!-- 权益说明表格 -->
<view class="rights-section">
<view class="rights-title">权益说明</view>
<view class="rights-table">
<view class="table-header">
<view class="th" v-for="(h, i) in rightsHeader" :key="i">{{h}}</view>
</view>
<view class="table-row" v-for="(row, i) in rightsRows" :key="i">
<view class="td" v-for="(cell, j) in row" :key="j">
<text v-if="cell==='✓'" class="cell-check"></text>
<text v-else-if="cell==='X'" class="cell-x">X</text>
<text v-else>{{cell}}</text>
</view>
</view>
</view>
<image :src="indexLvxingUrl" mode="widthFix" class="rights-image" />
</view>
<!-- 联系客服二维码 -->
<view class="qrcode-section">
@ -149,18 +138,6 @@ export default {
tabActive: 0,
rankList: [
],
rightsHeader: ['推广锁粉权限', '用户', '推广官', '合伙人'],
rightsRows: [
['推广锁粉权限', 'X', '✓', '✓'],
['直接推广收益', 'X', '20%', '20%'],
['间接推广收益', 'X', 'X', '5%'],
['官方群服务', 'X', '20%', '25%'],
['推广课程支持', 'X', '5%', '25%'],
['推广工具包', 'X', '20%', '25%'],
['VIP专属客服', 'X', 'X', '25%'],
['收益模式', 'X', '5%', '主动收益'],
['线下沙龙', 'X', '✓', '主动收益'],
],
status: 0,
showProgressModal: false
}
@ -171,6 +148,11 @@ export default {
const item = getApp().globalData.configData.find(i => i.keyName === 'kefu_code')
return item ? item.keyContent : ''
},
indexLvxingUrl() {
console.log(getApp().globalData.configData,'getApp().globalData.configData')
const item = getApp().globalData.configData.find(i => i.keyName === 'index_lvxing')
return item ? item.keyContent : ''
}
},
onLoad() {
const sysInfo = uni.getSystemInfoSync()
@ -604,50 +586,9 @@ export default {
text-align: center;
margin-bottom: 24rpx;
}
.rights-table {
background: #fff;
border-radius: 24rpx;
border: 1rpx solid #ff9900;
overflow: hidden;
box-sizing: border-box;
.table-header {
display: flex;
background: #fff7ed;
border-bottom: 1rpx solid #ff9900;
.th {
flex: 1;
text-align: center;
font-size: 26rpx;
color: #ff9900;
font-weight: bold;
padding: 24rpx 0;
border-right: 1rpx solid #ff9900;
&:last-child { border-right: none; }
}
}
.table-row {
display: flex;
border-bottom: 1rpx solid #ffe5c2;
&:last-child { border-bottom: none; }
.td {
flex: 1;
text-align: center;
font-size: 26rpx;
color: #222;
padding: 20rpx 0;
border-right: 1rpx solid #ffe5c2;
&:last-child { border-right: none; }
.cell-check {
color: #13ac47;
font-size: 30rpx;
font-weight: bold;
}
.cell-x {
color: #bbb;
font-size: 30rpx;
}
}
}
.rights-image {
width: 100%;
height: auto;
}
}


+ 0
- 514
pages_order/auth/loginAndRegisterAndForgetPassword.vue View File

@ -1,514 +0,0 @@
<template>
<view class="refundsOrExchange">
<navbar :title="titleList[titleIndex]" leftClick
@leftClick="$utils.redirectTo('/pages/index/index')" />
<view class="frame">
<!-- 注册 -->
<view class='forgetPassword' v-if='titleIndex == 0'>
<!-- 标题 -->
<view class="title">{{titleList[titleIndex]}}</view>
<!-- 表单 -->
<view class="form1">
<view class="userName">
<uv-input v-model="form1.username" placeholder="请输入手机号" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view class="code">
<view class="left">
<uv-input v-model="form1.captcha" placeholder="请输入验证码" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view class="right">
<view>
<uv-toast ref="toast"></uv-toast>
<uv-code :seconds="seconds" @end="end" @start="start" ref="code"
@change="codeChange"></uv-code>
<uv-button @tap="getCode" iconSize='10rpx' color='#1f1c39'
shape='circle'>{{tips}}</uv-button>
</view>
</view>
</view>
<view class="password1">
<uv-input v-model="form1.password" placeholder="设置您的新密码(6到50个字符)" password clearable
border="surround" shape='circle' :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view class="password2">
<uv-input v-model="form1.newPassword" placeholder="重新确认密码" password clearable border="surround"
shape='circle' :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
</view>
<view>
<uv-checkbox-group v-model="checkboxValue" shape="circle">
<view class="content">
<view style="display: flex;">
<uv-checkbox size="30rpx" :name="1"></uv-checkbox>
请你阅读并同意我们的<span style="color: #fd5100"
@click="$refs.popup.open('getPrivacyPolicy')">隐私条款</span><span
style="color: #fd5100"
@click="$refs.popup.open('getUserAgreement')">服务协议</span>
</view>
</view>
</uv-checkbox-group>
</view>
</view>
<!-- 登录 -->
<view class="loginRegister" v-if='titleIndex==1'>
<!-- 标题 -->
<view class="title">{{titleList[titleIndex]}}</view>
<!-- 头像 -->
<view class="userIamge">
<view>
<img src="/static/image/center/11.svg" alt="" style="width: 100%;height: 100%;">
</view>
</view>
<!-- 用户名&密码&隐私条款 -->
<view class="form">
<view>
<uv-input v-model="form.username" placeholder="请输入账号" border="surround" shape='circle' clearable
:customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view>
<uv-input v-model="form.password" password placeholder="请输入密码" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view>
<uv-checkbox-group v-model="checkboxValue" shape="circle">
<view class="content">
<view style="display: flex;">
<uv-checkbox size="30rpx" :name="1"></uv-checkbox>
请你阅读并同意我们的<span style="color: #fd5100"
@click="$refs.popup.open('yszc')">隐私条款</span><span
style="color: #fd5100"
@click="$refs.popup.open('fwxy')">服务协议</span>
</view>
</view>
</uv-checkbox-group>
</view>
</view>
</view>
<!-- 忘记密码 -->
<view class='forgetPassword' v-if='titleIndex == 2'>
<!-- 标题 -->
<view class="title">{{titleList[titleIndex]}}</view>
<!-- 表单 -->
<view class="form1">
<view class="userName">
<uv-input v-model="form1.username" placeholder="请输入手机号" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view class="code">
<view class="left">
<uv-input v-model="form1.captcha" placeholder="请输入验证码" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view class="right">
<view>
<uv-toast ref="toast"></uv-toast>
<uv-code :seconds="seconds" @end="end" @start="start" ref="code"
@change="codeChange"></uv-code>
<uv-button @tap="getCode" iconSize='10rpx' color='#1f1c39'
shape='circle'>{{tips}}</uv-button>
</view>
</view>
</view>
<view class="password1">
<uv-input v-model="form1.password" placeholder="设置您的新密码(6到50个字符)" password clearable
border="surround" shape='circle' :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view class="password2">
<uv-input v-model="form1.newPassword" placeholder="重新确认密码" password clearable border="surround"
shape='circle' :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
</view>
</view>
<!-- 按钮 -->
<view class="btn" @click="submit">
<button class='a'>{{titleList[titleIndex]}}</button>
</view>
<!-- tab -->
<view class="bottomTab">
<span :class="titleIndex==0 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
@click='changePage(0)'>注册账号</span>
<span style="color: #9c9fa4">|</span>
<span :class="titleIndex==1 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
@click='changePage(1)'>账号登录</span>
<span style="color: #9c9fa4">|</span>
<span :class="titleIndex==2 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
@click='changePage(2)'>忘记密码</span>
</view>
</view>
<configPopup ref="popup"></configPopup>
</view>
</template>
<script>
import configPopup from '@/components/config/configPopup.vue';
export default {
components: {
configPopup
},
onLoad(option) {
this.titleIndex = option.index || 1
},
data() {
return {
titleIndex: 0,
titleList: ['注册', '登录', '重置密码'],
checkboxValue: [],
form: {
username: '',//19330214982
password: '',//1234567
loginModel: 0,
captcha: '',
},
form1: {
username: '',
captcha: '',
password: '',
newPassword: '',
},
tips: '获取验证码',
seconds: 60,
}
},
methods: {
submit() {
if (!this.checkboxValue.length && this.titleIndex != 2) {
return uni.showToast({
title: '请先同意隐私协议',
icon: 'none'
})
}
if (this.titleIndex == 0) {
//
this.register()
} else if (this.titleIndex == 1) {
//
this.login()
} else {
//
this.updatePassword()
}
},
//
login(){
if (this.$utils.verificationAll(this.form, {
username: '请输入账号',
password: '请输入密码',
})) {
return
}
if (!this.$utils.verificationPhone(this.form.username)) {
return uni.showToast({
title: '请输入合法的手机号',
icon: 'none'
})
}
//
this.$store.commit('login', this.form)
},
//
register(){
if (this.$utils.verificationAll(this.form1, {
username: '请输入账号',
captcha : '请输入验证码',
password: '请输入密码',
newPassword: '请确认密码',
})) {
return
}
if (!this.$utils.verificationPhone(this.form1.username)) {
return uni.showToast({
title: '请输入合法的手机号',
icon: 'none'
})
}
if (this.form1.password != this.form1.newPassword) {
return uni.showToast({
title: '密码与确认密码不一致',
icon: 'none'
})
}
this.$api('registerUser', this.form1, res => {
this.form1 = {}
if (res.code == 200) {
this.titleIndex = 1
uni.showToast({
title: '注册成功,请登录!',
icon: 'none'
})
}
})
},
updatePassword(){
if (this.$utils.verificationAll(this.form1, {
username: '请输入账号',
captcha : '请输入验证码',
password: '请输入新密码',
newPassword: '请确认密码',
})) {
return
}
if (!this.$utils.verificationPhone(this.form1.username)) {
return uni.showToast({
title: '请输入合法的手机号',
icon: 'none'
})
}
if (this.form1.password != this.form1.newPassword) {
return uni.showToast({
title: '密码与确认密码不一致',
icon: 'none'
})
}
this.$api('newPassword', this.form1, res => {
this.form1 = {}
if (res.code == 200) {
this.titleIndex = 1
uni.showToast({
title: '修改成功,请登录!',
icon: 'none'
})
}
})
},
//
changePage(index) {
this.titleIndex = index
},
confirm() {
},
codeChange(text) {
this.tips = text;
},
getCode() {
if (this.$refs.code.canGetCode) {
if (!this.$utils.verificationPhone(this.form1.username)) {
return uni.showToast({
title: '请输入合法的手机号',
icon: 'none'
})
}
uni.showLoading({
title: '正在获取验证码'
})
this.$api('sendSms', {
username: this.form1.username,
}, res => {
if (res.code == 200) {
uni.hideLoading();
// this.start()
uni.$uv.toast('验证码已发送');
//
this.$refs.code.start();
}
})
} else {
uni.$uv.toast('请勿重复发送');
}
},
end() {
// uni.$uv.toast('');
},
start() {
// uni.$uv.toast('');
}
}
}
</script>
<style lang="scss" scoped>
* {
box-sizing: border-box;
}
.content{
font-size: 22rpx;
margin: 0 auto;
}
.refundsOrExchange {
background-color: #FFF;
height: 100vh;
.frame {
background-color: #FFF;
.loginRegister {
display: flex;
flex-direction: column;
gap: 40rpx;
padding-bottom: 50rpx;
.title {
display: flex;
justify-content: center;
align-items: flex-end;
height: 10vh;
color: #000;
font-size: 40rpx;
font-weight: 700;
}
.userIamge {
display: flex;
justify-content: center;
height: 10vh;
>view:nth-of-type(1) {
width: 25%;
height: 100%;
border-radius: 50%;
overflow: hidden;
}
}
.form {
height: 12vh;
>view:nth-of-type(1) {
padding: 20rpx 100rpx;
}
>view:nth-of-type(2) {
padding: 0 100rpx;
}
>view:nth-of-type(3) {
display: flex;
padding: 30rpx 100rpx 0 100rpx;
font-size: 22rpx;
}
}
}
.btn {
// height: 5vh;
display: flex;
justify-content: center;
margin: 90rpx 0 0 0;
.a {
display: flex;
justify-content: center;
align-items: center;
width: 70%;
height: 80rpx;
color: #FFF;
background-color: $uni-color;
box-shadow: 0 0 4rpx 4rpx rgba($uni-color, 0.2);
border-radius: 100rpx;
font-size: 30rpx;
}
}
.bottomTab {
display: flex;
justify-content: space-between;
height: 10vh;
padding: 0 80rpx;
margin-top: 30rpx;
.tabbarItemActive {
color: $uni-color;
}
.tabbarItemNoActive {
color: #9c9fa4;
}
}
.forgetPassword {
padding: 100rpx 40rpx 0 40rpx;
.title {
display: flex;
justify-content: center;
align-items: flex-end;
height: 10vh;
color: #000;
font-size: 40rpx;
font-weight: 700;
}
.form1 {
display: flex;
flex-direction: column;
gap: 30rpx;
margin-top: 20rpx;
padding: 20rpx 80rpx;
.userName {
// padding: 20rpx 100 rpx;
}
.code {
display: flex;
width: 100%;
.left {
width: 55%;
}
.right {
width: 45%;
height: 100%;
>view:nth-of-type(1) {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
}
}
.password1 {}
.password2 {}
}
}
}
}
</style>

+ 0
- 155
pages_order/auth/wxLogin.vue View File

@ -1,155 +0,0 @@
<template>
<view class="login">
<view class="logo">
<!-- <image src="/static/image/login/logo.png" mode=""></image> -->
</view>
<view class="title">
欢迎使用酒店桌布租赁平台
</view>
<view class="btn mt"
@click="wxLogin">
<view class="icon">
<image src="../static/auth/wx.png" mode=""></image>
</view>
<view class="">
微信授权登录
</view>
</view>
<!-- <view class="btn b2">
使用短信验证登录
</view> -->
<view class="btn b2"
@click="qux">
取消登录
</view>
<view class="config">
<uv-checkbox-group
v-model="checkboxValue"
shape="circle">
<view class="content">
<view
style="display: flex;">
<uv-checkbox
size="40rpx"
icon-size="30rpx"
activeColor="#FD5100"
:name="1"
></uv-checkbox>
阅读并同意我们的<text @click="$refs.popup.open('getPrivacyPolicy')">服务协议与隐私条款</text>
</view>
<view class="">
以及<text @click="$refs.popup.open('getUserAgreement')">个人信息保护指引</text>
</view>
</view>
</uv-checkbox-group>
</view>
<configPopup ref="popup"></configPopup>
</view>
</template>
<script>
export default {
name : 'Login',
data() {
return {
checkboxValue : []
}
},
methods: {
wxLogin(){
if(!this.checkboxValue.length){
return uni.showToast({
title: '请先同意隐私协议',
icon:'none'
})
}
this.$store.commit('login')
},
qux(){
uni.reLaunch({
url: '/pages/index/index'
})
},
}
}
</script>
<style scoped lang="scss">
.login{
display: flex;
justify-content: center;
align-items: center;
height: 80vh;
flex-direction: column;
position: relative;
.logo{
height: 140rpx;
width: 140rpx;
background-color: #ddd;
border-radius: 30rpx;
image{
height: 140rpx;
width: 140rpx;
border-radius: 30rpx;
}
margin-bottom: 20rpx;
}
.title{
position: relative;
font-weight: 900;
font-size: 45rpx;
&::after{
content: '';
position: absolute;
left: 0;
top: 100%;
display: block;
height: 8rpx;
width: 210rpx;
background: linear-gradient(to right,$uni-color, #fff);
}
}
.btn{
width: 80%;
height: 100rpx;
background-color: $uni-color;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
margin: 20rpx 0;
border-radius: 20rpx;
.icon{
margin-right: 10rpx;
image{
width: 40rpx;
height: 35rpx;
}
}
}
.b2{
background-color: rgba($uni-color, 0.2);
color: $uni-color;
}
.mt{
margin-top: 200rpx;
}
.config{
position: absolute;
bottom: 0;
font-size: 24rpx;
text-align: center;
line-height: 40rpx;
text{
color: $uni-color;
}
}
}
</style>

+ 0
- 133
pages_order/auth/wxUserInfo.vue View File

@ -1,133 +0,0 @@
<template>
<view class="login">
<view class="title">
酒店桌布租赁平台
</view>
<view class="title">
申请获取你的头像昵称
</view>
<button class="chooseAvatar" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<view class="line">
<view class="">
头像
</view>
<view class="">
<image :src="userInfo.headImage" v-if="userInfo.headImage" style="width: 60rpx;height: 60rpx;"
mode=""></image>
<image src="../static/auth/headImage.png" v-else style="width: 50rpx;height: 50rpx;" mode=""></image>
</view>
</view>
</button>
<view class="line">
<view class="">
昵称
</view>
<view class="">
<input type="nickname" placeholder="请输入昵称" style="text-align: right;" id="nickName"
v-model="userInfo.nickName" />
</view>
</view>
<view class="btn" @click="submit">
确认
</view>
</view>
</template>
<script>
export default {
data() {
return {
userInfo: {
headImage: '',
nickName: '',
}
};
},
onShow() {},
computed: {},
methods: {
onChooseAvatar(res) {
let self = this
self.$Oss.ossUpload(res.target.avatarUrl)
.then(url => {
self.userInfo.headImage = url
})
},
submit() {
let self = this
uni.createSelectorQuery().in(this)
.select("#nickName")
.fields({
properties: ["value"],
})
.exec((res) => {
const nickName = res?.[0]?.value
self.userInfo.nickName = nickName
if (self.$utils.verificationAll(self.userInfo, {
headImage: '请选择头像',
nickName: '请填写昵称',
})) {
return
}
self.$api('updateInfo', self.userInfo, res => {
if (res.code == 200) {
uni.switchTab({
url:'/pages/index/index'
})
}
})
})
},
}
}
</script>
<style lang="scss" scoped>
.login {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 80vh;
.title {
line-height: 45rpx;
font-weight: 900;
}
.line {
display: flex;
justify-content: space-between;
align-items: center;
width: 80%;
border-bottom: 1px solid #00000023;
padding: 30rpx 0;
margin: 0 auto;
}
.chooseAvatar {
width: 100%;
padding: 0;
margin: 0;
margin-top: 10vh;
border: none;
}
.btn {
// background: $uni-linear-gradient-btn-color;
background: $uni-color;
color: #fff;
width: 80%;
padding: 20rpx 0;
text-align: center;
border-radius: 15rpx;
margin-top: 10vh;
}
}
</style>

+ 0
- 244
pages_order/components/address/addressList.vue View File

@ -1,244 +0,0 @@
<template>
<scroll-view
scroll-y="true"
:style="{height: height}"
@scrolltolower="moreAddress">
<uv-radio-group v-model="selectAddress"
@change="editDefault"
v-if="addressList.length > 0">
<view v-for="item in addressList" :key="item.id" class="address-item">
<view class="address-item-top"
@click="select(item)">
<view class="img-box">
<image src="../../static/address/icon.png" mode="aspectFill"></image>
</view>
<view class="address-info">
<view class="user-info">
<text class="user-name">{{ item.name }}</text>
<text class="user-phone">{{ item.phone }}</text>
<text v-if="item.defaultFlag == 1" class="is-default">默认</text>
</view>
<view class="address-detail">
{{ item.address + " " + item.addressDetail }}
</view>
</view>
</view>
<view class="controls"
v-if="controls">
<view class="default-checkbox">
<uv-radio
:name="item.id"
label-disabled
size="30rpx"
icon-size="30rpx">
默认地址
</uv-radio>
</view>
<view class="edit-btn">
<uv-icon name="edit-pen"></uv-icon>
<text @click="editAddress(item)" class="control-title">编辑</text>
</view>
<view class="del-btn">
<uv-icon name="trash"></uv-icon>
<text class="control-title" @click="deleteAddress(item.id)">删除</text>
</view>
</view>
</view>
</uv-radio-group>
<view
style="padding: 100rpx 0;"
v-else>
<uv-empty
mode="history"
textSize="28rpx"
iconSize="100rpx"/>
</view>
</scroll-view>
</template>
<script>
export default {
props : {
controls : {
default : false,
type : Boolean,
},
height : {
default : 'calc(90vh - 180rpx)'
}
},
data() {
return {
selectAddress : 0,
queryParams: {
pageNo: 1,
pageSize: 10,
},
addressList: [],
total : 0,
}
},
methods: {
//
getAddressList() {
return new Promise((success, fail) => {
this.$api('addressPage', this.queryParams, res => {
if (res.code == 200) {
this.addressList = res.result.records || [];
this.total = res.result.total || 0;
res.result.records.forEach(n => { //
if (n.defaultFlag == 1) {
this.selectAddress = n.id
}
})
success(res.result)
}
})
})
},
//
moreAddress(){
if(this.queryParams.pageSize > this.total){
return
}
this.queryParams.pageSize += 10
this.getAddressList()
},
//
deleteAddress(e){
this.$emit('deleteAddress', e)
},
//
editAddress(e){
this.$emit('editAddress', e)
},
//
editDefault(e){
this.$emit('editDefault', e)
},
//
select(e){
this.$emit('select', e)
},
}
}
</script>
<style scoped lang="scss">
.address-item {
background: white;
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 20rpx;
padding: 15rpx 15rpx 0rpx 15rpx;
width: 680rpx;
.address-item-top {
border-bottom: 1px dashed #D3D1D1;
display: flex;
align-items: center;
padding: 0rpx 0rpx 15rpx 0rpx;
.img-box {
width: 120rpx;
height: 120rpx;
image {
width: 75%;
height: 75%;
display: block;
margin: 12.5% auto;
}
}
.address-info {
width: calc(100% - 120rpx);
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
.user-info {
display: flex;
align-items: center;
text {
display: block;
line-height: 40rpx;
margin-right: 20rpx;
}
.user-name,
.user-phone {
font-size: 30rpx;
}
.is-default {
display: flex;
align-items: center;
justify-content: center;
background: #FEB773;
color: white;
width: 80rpx;
height: 35rpx;
border-radius: 20rpx;
font-size: 22rpx;
}
}
.address-detail {
color: #4a4a4a;
font-size: 26rpx;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
}
}
}
.controls {
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
font-size: 26rpx;
padding: 15rpx 15rpx 25rpx 15rpx;
.default-checkbox {
display: flex;
text {
margin-left: 8rpx;
}
}
.control-title {
height: 30rpx;
line-height: 30rpx;
color: #666666;
}
view {
display: flex;
align-items: center;
}
image {
width: 23rpx;
height: 23rpx;
vertical-align: middle;
margin-right: 8rpx;
}
}
}
</style>

+ 0
- 220
pages_order/components/address/redactAddress.vue View File

@ -1,220 +0,0 @@
<template>
<uv-popup round="40rpx" ref="addressPopup" :customStyle="{ height: 'auto' , width : '100%' , padding : '20rpx'}">
<view class="redact-address">
<view class="redact-address-title">{{title}}</view>
<uv-form label-width="210rpx" :model="addressDetail" ref="form">
<uv-form-item label="联系人" prop="name">
<uv-input v-model="addressDetail.name" placeholder="请输入联系人姓名" border="none">
</uv-input>
</uv-form-item>
<uv-form-item label="手机号" prop="phone">
<uv-input v-model="addressDetail.phone" placeholder="请输入手机号" border="none">
</uv-input>
</uv-form-item>
<uv-form-item label="所在地区" prop="address">
<uv-input v-model="addressDetail.address" placeholder="请选择所在地区" border="none">
</uv-input>
<template #right>
<view style="padding-right: 40rpx;color: #FBAB32;" @click.stop="selectAddr">
<image src="../../static/address/selectIcon.png" mode="aspectFit"></image>定位
</view>
</template>
</uv-form-item>
<uv-form-item label="详细地址" prop="addressDetail">
<uv-input v-model="addressDetail.addressDetail" placeholder="请输入详细地址" border="none">
</uv-input>
</uv-form-item>
</uv-form>
<view @click="onSubmit" class="save">{{ addressDetail.id ? '修改地址' : '新增地址'}}</view>
</view>
</uv-popup>
</template>
<script>
import Position from '@/utils/position.js'
export default {
data() {
return {
addressDetail: {}
}
},
props: {
title: {
type: String,
default: '新增地址'
}
},
methods: {
open(addressDetail) {
this.addressDetail = addressDetail
this.$refs.addressPopup.open('bottom')
},
close(){
this.$refs.addressPopup.close()
},
//
onSubmit() {
let isOk = this.parameterVerification(this.addressDetail)
if (isOk && !isOk.auth) {
return uni.showToast({
icon: 'none',
title: isOk.title,
'zIndex': 10000
})
}
this.$emit('saveOrUpdate', this.addressDetail)
},
//
parameterVerification(addressDetaila) {
let {
name,
phone,
address,
addressDetail
} = addressDetaila
if (name.trim() == '') {
return {
title: '请填写联系人',
auth: false
}
} else if (phone.trim() == '') {
return {
title: '请填写手机号',
auth: false
}
} else if (address.trim() == '') {
return {
title: '请填写所在地区',
auth: false
}
} else if (addressDetail.trim() == '') {
return {
title: '请填写详细地址',
auth: false
}
} else if (phone.trim() != '') {
if (!this.$utils.verificationPhone(phone)) {
return {
title: '手机号格式不合法',
auth: false
}
}
}
return {
title: '验证通过',
auth: true
}
},
//
selectAddr() {
Position.getLocation(res => {
Position.selectAddress(res.longitude, res.latitude, success => {
this.setAddress(success)
})
})
},
//
setAddress(res) {
//
this.addressDetail.latitude = res.latitude
this.addressDetail.longitude = res.longitude
if (!res.address && res.name) { //
return this.addressDetail.address = res.name
}
if (res.address || res.name) {
return this.addressDetail.address = res.address + res.name
}
this.addressDetail.address = '' //
},
}
}
</script>
<style lang="scss" scoped>
.redact-address {
box-sizing: border-box;
.redact-address-title {
height: 80rpx;
line-height: 80rpx;
font-size: 30rpx;
color: #333333;
font-weight: 600;
}
.save {
display: flex;
align-items: center;
justify-content: center;
width: 90%;
height: 80rpx;
border-radius: 40rpx;
color: white;
font-size: 28rpx;
margin: 0rpx auto;
background: $uni-color;
margin-top: 150rpx;
}
image {
width: 25rpx;
height: 25rpx;
}
//
.uv-form {
padding: 30rpx 0rpx;
}
&::v-deep .uv-cell {
padding: 0rpx 0rpx;
font-size: 26rpx;
&::after {
border: none !important;
}
.uv-field__label {
display: flex;
align-items: center;
height: 80rpx;
}
.uv-field__control,
.uv-field__right-icon {
height: 80rpx;
font-size: 26rpx;
border-bottom: 2rpx solid #cbc8c8;
}
.uv-field__right-icon {
display: flex;
align-items: center;
height: 78rpx;
color: #5FCC9F;
}
.uv-cell__value {
height: 120rpx;
}
}
&::v-deep .uv-field__error-message {
color: #5AC796;
font-size: 20rpx;
margin-top: 10rpx;
}
}
</style>

+ 0
- 77
pages_order/components/product/submit.vue View File

@ -1,77 +0,0 @@
<template>
<view class="submit">
<view class=""
@click="$emit('share')">
<uv-icon
size="40rpx"
name="share-square"></uv-icon>
<view class="">
分享
</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 }}
</view>
</view>
</template>
<script>
export default {
name:"submit",
props : {
submiitTitle : {
default : '立即租赁',
type : String,
}
},
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;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
}
</style>

+ 0
- 367
pages_order/components/product/submitUnitSelect.vue View File

@ -1,367 +0,0 @@
<template>
<uv-popup ref="popup"
:round="30"
bgColor="#f7f7f7">
<view class="content">
<!-- 地址 -->
<view class="address"
@click="openAddress">
<image src="../../static/address/selectIcon.png" mode=""></image>
<view class="">
{{ address.name }}
</view>
<view class="">
{{ address.addressDetail }}
</view>
<view class="icon">
<uv-icon
size="30rpx"
name="arrow-right"></uv-icon>
</view>
</view>
<!-- 商品信息和数量 -->
<view class="submit-info">
<view class="title">
桌布租赁
</view>
<view class="box">
<image
class="image"
:src="unit.pic"
mode=""></image>
<view class="info">
<view class="price">
<text>{{ unit.depositPrice }}</text>
</view>
<view class="unit">
请选择规格
</view>
<view class="">
<uv-number-box v-model="num"></uv-number-box>
</view>
</view>
</view>
</view>
<!-- 规格 -->
<view class="submit-unit">
<view class="title">
规格选择
</view>
<view class="list">
<view :class="{act : unitIndex == index}"
v-for="(item, index) in detail.hotelGoodsSkuList"
@click="selectUnit(item, index)"
:key="index">
{{ item.title }}
</view>
</view>
</view>
<!-- 费用明细 -->
<view class="expense-detail">
<view class="title">
费用明细
</view>
<view class="detail">
押金{{ unit.depositPrice }}
</view>
</view>
<!-- 提交按钮 -->
<view class="submit-btn">
<view class="l"
@click="addCart">
加入租赁车
</view>
<view class="r"
@click="orderPay">
{{ submiitTitle }}
</view>
</view>
</view>
<uv-popup ref="addressPopup" :round="30">
<addressList
ref="addressList"
height="60vh"
@select="selectAddress"
/>
</uv-popup>
</uv-popup>
</template>
<script>
import addressList from '../address/addressList.vue'
export default {
components : {
addressList,
},
props : {
submiitTitle : {
default : '立即租赁',
type : String,
},
detail : {
default : {}
}
},
data() {
return {
unitIndex : 0,
address : {
name : '请选择联系人',
addressDetail : '',
},
num : 1,
unit : {},
addressTotal : 0,
}
},
methods: {
//
open(){
this.$refs.popup.open('bottom')
if(!this.unit.id){
this.selectUnit(this.detail.hotelGoodsSkuList[0], 0)
}
//
this.$refs.addressList.getAddressList().then(res => {
this.addressTotal = res.total
if(this.addressTotal != 0){
this.address = res.records[0]
}
})
},
//
close(){
this.$refs.popup.close()
},
//
openAddress(){
if (this.addressTotal == 0) {
this.$refs.popup.close()
return uni.navigateTo({
url: '/pages_order/mine/address?type=back'
})
}
this.$refs.addressPopup.open('bottom')
},
//
selectAddress(e){
this.address = e
this.$refs.addressPopup.close()
},
//
selectUnit(item, index){
this.unit = item
this.unitIndex = index
},
addCart(){
this.$api('cartAdd', {
id : this.detail.id,
skuId : this.unit.id,
}, res => {
if(res.code == 200){
uni.showToast({
title: '添加成功',
});
this.$refs.popup.close()
}
})
},
orderPay(){
let data = {
id : this.detail.id,//id
skuId : this.unit.id,//id
addressId : this.address.id,//id
sku : this.unit.title,//
num : this.num,
}
if(this.$utils.verificationAll(data, {
skuId : '请选择规格',
addressId : '请选择地址',
})){
return
}
this.$api('orderPay', data, res => {
if(res.code == 200){
uni.redirectTo({
url: '/pages/index/order'
})
// uni.requestPayment({
// provider: 'wxpay', //
// timeStamp: res.result.timeStamp, //
// nonceStr: res.result.nonceStr, //
// package: res.result.packageValue,
// signType: res.result.signType, //
// paySign: res.result.paySign, //
// success: function (res) {
// console.log('',res);
// uni.redirectTo({
// url: '/pages/index/order'
// })
// },
// fail: function (err) {
// console.log('',err);
// uni.showToast({
// icon:'none',
// title:""
// })
// }
// });
}
})
},
}
}
</script>
<style scoped lang="scss">
.content{
max-height: 80vh;
overflow: hidden;
overflow-y: auto;
.address{
display: flex;
padding: 20rpx;
background-color: #fff;
image{
width: 30rpx;
height: 30rpx;
margin: 20rpx;
}
view{
margin: 20rpx;
overflow:hidden; //
text-overflow:ellipsis; //
white-space:nowrap; //
}
.icon{
margin-left: auto;
}
}
.submit-info{
background-color: #fff;
padding: 30rpx;
margin-top: 20rpx;
.title{
font-size: 30rpx;
padding: 10rpx;
font-weight: 600;
}
.box{
display: flex;
margin-top: 10rpx;
.image{
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
margin-right: 20rpx;
}
.info{
flex: 1;
.unit{
font-size: 24rpx;
padding: 10rpx 20rpx;
color: #717171;
display: flex;
align-items: center;
}
.price{
color: $uni-color;
font-size: 28rpx;
padding: 10rpx 20rpx;
text{
font-size: 36rpx;
font-weight: 900;
}
}
}
}
}
.submit-unit{
padding: 30rpx;
background-color: #fff;
.title{
font-size: 28rpx;
font-weight: 600;
}
.list{
display: flex;
flex-wrap: wrap;
font-size: 22rpx;
.act{
color: $uni-color;
border: 1px solid $uni-color;
background-color: #F9E7DE;
}
view{
border-radius: 15rpx;
width: 320rpx;
background-color: #F3F3F3;
border: 1px solid #F3F3F3;
margin: 10rpx;
display: flex;
justify-content: center;
padding: 15rpx 0;
}
}
}
.expense-detail{
padding: 30rpx;
background-color: #fff;
font-size: 28rpx;
.title{
font-weight: 600;
}
.detail{
background-color: #F6F6F6;
color: #717171;
margin: 10rpx 0;
padding: 10rpx 20rpx;
}
}
.submit-btn{
width: 600rpx;
height: 80rpx;
color: #fff;
border-radius: 40rpx;
font-size: 28rpx;
margin: 20rpx auto;
display: flex;
justify-content: center;
align-items: center;
border: 1rpx solid $uni-color;
overflow: hidden;
.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;
}
}
}
</style>

+ 0
- 213
pages_order/mine/address.vue View File

@ -1,213 +0,0 @@
<template>
<view class="address">
<navbar title="地址管理" leftClick @leftClick="leftClick" />
<view class="address-list">
<addressList
controls
ref="addressList"
@deleteAddress="deleteAddress"
@editAddress="editAddress"
@editDefault="editDefault"/>
</view>
<redactAddress
ref="addressPopup"
:addressDetail="addressDetail"
@saveOrUpdate="saveOrUpdate"
:title="title"></redactAddress>
<view class="add-btn">
<view @click="addBtn" class="btn">
新增地址
</view>
</view>
</view>
</template>
<script>
import redactAddress from '../components/address/redactAddress.vue'
import addressList from '../components/address/addressList.vue'
export default {
components: {
redactAddress,
addressList
},
data() {
return {
title: '新增地址',
type : '',
}
},
onLoad(args) {
this.type = args.type
if(this.type == 'back'){
this.addBtn()
}
},
onShow() {
this.getAddressList()
},
methods: {
//
getAddressList() {
this.$refs.addressList.getAddressList()
},
//
editAddress(address) {
this.$refs.addressPopup.open({...address})
},
//
leftClick() {
uni.navigateBack(-1)
},
//
saveOrUpdate(addressDetail) {
let data = {
name: addressDetail.name,
phone: addressDetail.phone,
address: addressDetail.address,
addressDetail: addressDetail.addressDetail,
defaultId: addressDetail.defaultId || '0',
latitude: addressDetail.latitude,
longitude: addressDetail.longitude
}
if (addressDetail.id) {
data.id = addressDetail.id
}
this.$api(data.id ? 'addressEdit' : 'addressAdd', data, res => {
if (res.code == 200) {
this.$refs.addressPopup.close()
this.getAddressList()
if(this.type == 'back'){
uni.navigateBack(-1)
}
uni.showToast({
title: '操作成功',
icon: 'none'
})
}
})
},
//
editDefault(id) {
this.$api('addressDefault', {
id: id,
}, res => {
if (res.code == 200) {
this.$refs.addressPopup.close()
uni.showToast({
title: '操作成功',
icon: 'none'
})
this.getAddressList()
}
})
},
//
deleteAddress(id) {
let self = this
uni.showModal({
title: '删除地址',
content: '确认删除此地址?删除后数据不可恢复',
success(e) {
if(e.confirm){
self.$api('addressDelete', {
id
}, res => {
if (res.code == 200) {
uni.showToast({
title: '删除成功',
icon: 'none'
})
self.getAddressList()
}
})
}
}
})
},
//
addBtn() {
this.title = '新增地址'
this.$refs.addressPopup.open({ //
name: '',
phone: '',
address: '',
addressDetail: '',
defaultId: '',
latitude: '',
longitude: ''
})
},
}
}
</script>
<style lang="scss" scoped>
.address {
width: 750rpx;
margin: 0rpx auto;
background: #F5F5F5;
box-sizing: border-box;
min-height: 100vh;
.address-list {
padding: 40rpx 20rpx 120rpx 20rpx;
}
.add-btn {
position: fixed;
display: flex;
justify-content: center;
align-items: center;
left: 0;
bottom: 0;
width: 750rpx;
height: 100rpx;
background: white;
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 85%;
height: 80rpx;
border-radius: 40rpx;
color: white;
text-align: center;
font-size: 28rpx;
background: $uni-color;
}
}
}
@media all and (min-width: 961px) {
.add-btn {
left: 50% !important;
transform: translateX(-50%);
}
}
//
:deep(.uni-system-choose-location) {
z-index: 99999 !important;
}
</style>

+ 0
- 172
pages_order/mine/help.vue View File

@ -1,172 +0,0 @@
<template>
<!-- 帮助与反馈 -->
<view class="help">
<navbar title="帮助与反馈" leftClick @leftClick="$utils.navigateBack" />
<view class="help-box">
<view>
<view class="help-issue">
<text>问题和意见</text>
<text style="color: #BD3624;">*</text>
</view>
<uv-textarea v-model="form.question" :count="true" border="none" height="400"
placeholder="请把发现的问题提交给我们,感谢您的参与(必填)"
:text-style="{color:'#BCB7B7',fontSize:'28rpx'}" />
</view>
<view>
<view class="help-issue">
<text>问题截图</text>
<!-- <text style="color: #BD3624;">*</text> -->
</view>
<view class="help-screenshot">
<uv-upload :fileList="fileList" multiple :maxCount="3" width="180rpx"
height="180rpx" multiple @afterRead="afterRead" @delete="deleteImage">
<image src="../static/help/uploading.png" mode="aspectFill"
style="width: 180rpx;height: 180rpx;" />
</uv-upload>
</view>
</view>
<view>
<view class="help-issue">
<text>联系方式</text>
<text style="color: #BD3624;">*</text>
</view>
<view class="form-sheet-cell">
<view>
联系姓名
</view>
<input placeholder="请输入联系姓名" v-model="form.name" />
</view>
<view class="form-sheet-cell">
<view>
联系电话
</view>
<input placeholder="请输入联系电话" v-model="form.phone" />
</view>
</view>
<view class="help-button">
<!-- <view>历史提交</view> -->
<view @click="submit">确认</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
form : {
question : '',
phone : '',
name : '',
image : '',
},
fileList: []
}
},
onLoad(args) {
},
methods: {
deleteImage(e){
this.fileList.splice(e.index, 1)
},
afterRead(e){
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.fileList.push({
url
})
})
})
},
submit(){
let data = JSON.parse(JSON.stringify(this.form))
if(this.$utils.verificationAll(this.form, {
question : '请输入你的问题和意见',//
// image : '',//
name : '请输入姓名',//
phone : '请输入手机号码',//
})){
return
}
data.image = this.fileList.map((item) => item.url).join(",")
this.$api('addAdvice', data, res => {
if(res.code == 200){
uni.showToast({
title: res.message,
icon:'none'
})
setTimeout(uni.navigateBack, 800, -1)
}
})
},
}
}
</script>
<style scoped lang="scss">
.help {
.help-box {
width: 92%;
margin-left: 4%;
.help-issue {
margin: 20rpx;
font-size: 28rpx;
font-weight: 600;
color: #333333;
}
.help-screenshot {
display: flex;
align-items: center;
background-color: #fff;
padding: 20rpx;
}
.form-sheet-cell{
display: flex;
background-color: #fff;
padding: 20rpx 30rpx;
font-size: 24rpx;
align-items: center;
view{
width: 150rpx;
}
}
.help-button {
display: flex;
justify-content: center;
font-size: 24rpx;
flex-shrink: 0;
margin-top: 60rpx;
view {
padding: 14rpx 120rpx;
border-radius: 38rpx;
}
view:nth-child(1) {
background: $uni-color;
color: #fff;
}
view:nth-child(2) {
color: #FFFDF6;
background-color: #C83741;
}
}
}
}
</style>

+ 0
- 283
pages_order/mine/promotion.vue View File

@ -1,283 +0,0 @@
<template>
<view class="promotion">
<navbar title="二维码"
bgColor="#A3D250"
color="#fff"
leftClick @leftClick="$utils.navigateBack" />
<view class="promotion-card">
<!-- <view class="user-info"> -->
<!-- <image class="image" :src="userInfo.headImage" mode="widthFix"></image> -->
<!-- <image class="image" src="../../static/logo.png" mode="widthFix"></image> -->
<!-- <view class="user-name">{{ userInfo.nickName }}</view> -->
<!-- <view class="user-name">湖南第一深情</view> -->
<!-- </view> -->
<!-- <view class="invitation-code-img">
<image
style="width: 400rpx;"
:src="imagePath" mode="widthFix"></image>
</view> -->
<image style="width: 100%;" :src="imagePath" mode="widthFix"></image>
<!-- <view class="invitation-code">加油站: {{ title }}</view> -->
<canvas id="myCanvas" type="2d" canvas-id="firstCanvas1"></canvas>
</view>
<view class="btns">
<view class="btn"
@click="preservationImg(imagePath)">保存</view>
<!-- <view class="btn">立即邀请</view> -->
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'Promotion',
computed: {
...mapState(['userInfo']),
},
data() {
return {
url: '',
title: '123123',
baseUrl: 'https://dianpin-img.xzaiyp.top/',
canvas: {},
imagePath: '',
}
},
onShow() {
this.getQrCode()
this.$store.commit('getUserInfo')
},
methods: {
getQrCode() {
this.$api('getInviteCode', res => {
if (res.code == 200) {
this.url = res.result.url
this.title = res.result.name
this.draw()
}
})
},
draw() {
uni.showLoading({
title: "拼命绘画中..."
})
wx.createSelectorQuery()
.select('#myCanvas') // canvasid
.fields({
node: true,
size: true
})
.exec((res) => {
const canvas = res[0].node
//
const ctx = canvas.getContext('2d')
// Canvas
const width = res[0].width
const height = res[0].height
//
const dpr = wx.getWindowInfo().pixelRatio
//dpr
// dpr 2 4
// 3 6
let Ratio = dpr * 2
console.log("bug", dpr)
canvas.width = width * dpr
canvas.height = height * dpr
this.canvas = canvas
ctx.scale(dpr, dpr)
ctx.clearRect(0, 0, width, height)
ctx.fillStyle = '#fff'
ctx.fillRect(0, 0, canvas.width, canvas.height)
//
// const image = canvas.createImage()
// image.onload = () => {
// ctx.drawImage(image, 30, 18, 40, 40)
// }
// image.src = '/public/img/wechar_1.png'
// image.src = this.userInfo.headImage
ctx.fillStyle = 'black'
ctx.font = '22px PingFangSC-regular';
let s = this.title || '加油站'
ctx.fillText(s, canvas.width / Ratio - s.length * 11, 50);
//
const coderImage = canvas.createImage()
coderImage.src = this.baseUrl + this.url
coderImage.onload = () => {
ctx.drawImage(coderImage,
canvas.width / Ratio - 240 / 2, 100, 240, 240)
}
//
setTimeout(() => {
wx.canvasToTempFilePath({
x: 0,
y: 0,
width: this.canvas.width,
height: this.canvas.height,
canvas,
success: (res) => {
var tempFilePath = res.tempFilePath;
this.imagePath = tempFilePath
uni.hideLoading()
}
});
}, 600);
})
},
back() {
uni.navigateBack(-1)
},
preservationImg(img) {
let that = this
uni.authorize({
/* scope.writePhotosAlbum 类型是保存到相册 */
scope: 'scope.writePhotosAlbum',
success() {
/* 已授权进入 */
/* 保存图片到相册方法方法 */
that.imgApi(img);
},
complete(res) {
/* 判断如果没有授权就打开设置选项让用户重新授权 */
uni.getSetting({
success(res) {
if (!res.authSetting['scope.writePhotosAlbum']) {
/* 打开设置的方法 */
that.openInstall();
}
}
});
}
});
},
imgApi(image) {
/* 获取图片的信息 */
uni.getImageInfo({
src: image,
success: function(image) {
/* 保存图片到手机相册 */
uni.saveImageToPhotosAlbum({
filePath: image.path,
success: function() {
uni.showModal({
title: '保存成功',
content: '图片已成功保存到相册',
showCancel: false
});
},
complete(res) {
console.log(res);
}
});
}
});
},
}
}
</script>
<style lang="scss" scoped>
.promotion {
width: 100%;
height: 100vh;
background-color: $uni-color;
.promotion-card {
width: 90%;
margin: 100rpx auto 0rpx auto;
box-shadow: 0rpx 0rpx 15rpx rgba(0, 0, 0, .2);
border-radius: 15rpx;
padding: 40rpx 30rpx;
box-sizing: border-box;
background-color: #fff;
.user-info {
display: flex;
align-items: center;
.image {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-right: 10rpx;
}
.user-name {
font-size: 30rpx;
}
}
.invitation-code-img {
display: flex;
align-items: center;
justify-content: center;
margin: 100rpx 0rpx;
.image {
width: 30%;
border-radius: 50%;
}
}
.invitation-code {
text-align: center;
color: #818181;
font-size: 28rpx;
}
}
.btns {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 120rpx;
display: flex;
background: #fff;
font-size: 28rpx;
color: $uni-color;
.btn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
&:nth-child(2) {
background: orange;
}
}
}
}
#myCanvas {
position: fixed;
left: 100%;
/* visibility: hidden */
/* visibility: hidden; */
/* margin-top: 100rpx; */
margin: 68rpx auto;
width: 750rpx;
height: 750rpx;
/* line-height: 20px; */
background-color: rgba(255, 255, 255, 1);
text-align: center;
}
</style>

+ 0
- 109
pages_order/mine/purse.vue View File

@ -1,109 +0,0 @@
<template>
<view class="purse">
<navbar title="立即提现" leftClick @leftClick="$utils.navigateBack" />
<!-- 水洗店 -->
<view class="userShop">
<userShopCommission purse />
</view>
<view class="from-body">
<view>我要提现</view>
<view class="from-line">
<input placeholder="请输入提现金额" />
</view>
<view class="from-line">
<input placeholder="请输入姓名" />
</view>
<view class="from-line">
<input placeholder="请输入开户行" />
</view>
<view class="from-line">
<input placeholder="请输入银行卡卡号" />
</view>
<view class="mt56">提现说明</view>
<view style="line-height: 45rpx; font-size: 24rpx;color: #666666;" v-html="notice">
</view>
<!-- <p>1本次提现必须通过银行卡提现暂不支持其他途径</p>
<p>2如若遇到24小时提现未到账请联系客服</p> -->
</view>
<view class="b-fiexd">
<view class="button-submit">提交</view>
</view>
</view>
</template>
<script>
import userShopCommission from '@/components/userShop/userShopCommission.vue'
export default {
components: {
userShopCommission,
},
data() {
return {
notice : ''
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
.purse{
min-height: 100vh;
background-color: #ffffff;
.from-body {
padding: 40rpx 20rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Bold;
font-weight: 700;
text-align: left;
color: #333333;
line-height: 40px;
padding-bottom: 160rpx;
.from-line {
margin-top: 40rpx;
}
input {
width: 612rpx;
height: 90rpx;
line-height: 90rpx;
background: #F5F5F5;
border-radius: 46rpx;
padding: 0 50rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #333;
}
}
.button-submit {
width: 596rpx;
height: 90rpx;
line-height: 90rpx;
background: $uni-color;
border-radius: 46rpx;
margin: 20rpx auto;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
text-align: center;
color: #ffffff;
}
}
</style>

+ 0
- 88
pages_order/mine/runningWater.vue View File

@ -1,88 +0,0 @@
<template>
<view class="running-water">
<navbar :title="title[status]" leftClick @leftClick="leftClick" />
<view class="tab-box">
<view class="tab-box1" v-if="agentFlow && agentFlow.total">
<uv-cell center border :title="item.title"
v-for="(item, index) in agentFlow.records"
:value="x[item.type] + item.money" :label="item.createTime" />
</view>
<view
style="padding: 100rpx 0;"
v-else>
<uv-empty
mode="history"
textSize="28rpx"
iconSize="100rpx"/>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title : ['余额记录','提现记录','佣金记录'],
agentFlow : {
total : 0,
records : [
{
type : 0,
money : 100,
createTime : '2024-04-02 20:00',
title : "佣金提现",
},
{
type : 0,
money : 100,
createTime : '2024-04-02 20:00',
title : "佣金提现",
},
{
type : 0,
money : 100,
createTime : '2024-04-02 20:00',
title : "佣金提现",
},
]
},
x : ['+', '-' , '-' , '+'],
status : 0,
}
},
onLoad(e) {
this.status = e.status
},
methods: {
leftClick() { //
uni.navigateBack(-1)
},
getAgentFlow(){ //
let type = this.status;
this.$api('getAgentFlow', { type }, res => {
if(res.code == 200){
this.agentFlow = res.result
}
})
},
}
}
</script>
<style lang="scss" scoped>
.running-water{
width: 750rpx;
background: #F5F5F5;
margin: 0 auto;
min-height: 100vh;
.tab-box{
margin: 20rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
}
}
</style>

+ 0
- 567
pages_order/order/orderDetail.vue View File

@ -1,567 +0,0 @@
<template>
<view>
<navbar
title="订单详情"
leftClick
@leftClick="$utils.navigateBack"
/>
<!-- 水洗店 -->
<view class=""
v-if="userShop">
<view class="controls">
<view class="title">
<image src="../static/order/icon.png" mode=""></image>
服务完成
</view>
<view class="tips">
待送回
</view>
<view class="btns">
<view class="btn1">
快递寄回
</view>
<view class="btn2">
线下配送
</view>
</view>
</view>
<view class="steps">
<uv-steps
activeColor="#FD5100"
:current="stepsCurrent" dot>
<uv-steps-item :title="item"
:key="index"
v-for="(item, index) in steps"></uv-steps-item>
</uv-steps>
</view>
</view>
<!-- 酒店和水洗店 -->
<view class="info">
<view class="flex"
style="display: flex;">
<view style="width: 8rpx;height: 30rpx;
background: #FD5100;border-radius: 6rpx;" />
<view class="head-title">服务项目</view>
</view>
<view class="flex">
<view class="server-item">
<view class="img-box">
<image :src="msgShop.image" mode="aspectFill"></image>
</view>
<view class="server-info">
<view class="server-title">
{{msgOrder.projectName}}
<!-- <view class="coupon">领券立减</view> -->
</view>
<view class="current-price">
<text class="unit"></text>{{msgOrder.money}}
</view>
<view class="sales-volume" style="margin-top: 5px;">
<view class="desc">规格{{msgOrder.unit}}</view>
</view>
<view class="time-coupon">
<!-- <view class="flex">
<image src="@/static/home/time-icon.png"></image>
<view class="time">{{msgOrder.useTime}}分钟</view>
</view> -->
<!-- <view class="sales-volume">
<image src="@/static/icons/icon1.png"></image>
<view class="desc">已售出{{msgShop.payNum}}+</view>
</view> -->
</view>
</view>
</view>
</view>
<!-- <view class="line min_tips">
<view class="head-div flex">
<view style="width: 118rpx;height: 118rpx;border-radius: 50%;overflow: hidden;">
<image style="width: 118rpx;" :src="msgTechnician.image" mode="widthFix"></image>
</view>
<view style="padding: 10rpx 34rpx;display: flex;flex-direction: column;justify-content: space-around;">
<view class="nickname">
{{msgTechnician.title}}
<view v-if="msgTechnician.isVip" class="tag">
<image src="@/static/order/s.png" mode="aspectFit"></image>
<view class="auth">官方认证</view>
</view>
</view>
<view class="days">
<van-rate v-model="msgTechnician.score" :size="10" readonly color="#ffb54c" void-icon="star"
void-color="#eee" />
<view class="">
好评{{msgTechnician.pinNum}}
</view>
</view>
</view>
</view>
<view @click="gototechnicianDetail(msgTechnician)" class="btn-x">
服务技师
</view>
</view> -->
<view class="line address">
<view class="address-top">
<!-- <view class="">
服务地址
</view> -->
<view class="copy">
<image @click="copy(msgOrder.name + ' ' + msgOrder.phone + ' ' + msgOrder.address)" src="/static/order/copy.png"></image>
</view>
</view>
<view class="addressDetail">
<view class="">{{msgOrder.name}} {{msgOrder.phone}}</view>
<view class="">{{msgOrder.address}}</view>
</view>
</view>
<view class="line">
<view class="t min_tips">
<view class="">
实付款
</view>
<view class="current-price">
{{ msgOrder.money }}
</view>
</view>
<view class="min_tips">
<view class="">
租赁费用
</view>
<view class="">
{{ msgOrder.price }}
</view>
</view>
<view class="min_tips">
<view class="">
水洗费用
</view>
<view class="">
{{ msgOrder.price}}
</view>
</view>
<view class="min_tips">
<view class="">
押金
</view>
<view class="">
{{ msgOrder.price }}
</view>
</view>
</view>
<!-- 订单信息 -->
<view class="line">
<view class="t min_tips">
<view class="">
订单信息
</view>
</view>
<view class="min_tips">
<view class="">
订单编号
</view>
<view class="">
{{msgOrder.id}}
</view>
</view>
<view class="min_tips">
<view class="">
下单时间
</view>
<view class="">
{{msgOrder.createTime}}
</view>
</view>
</view>
<!-- 下单须知 -->
<view class="line">
<view class="t min_tips">
<view class="">
下单须知
</view>
</view>
<view class="min_tips" style="line-height: 40rpx;">
{{msgShop.projectExplain}}
</view>
<view class="btns">
<view @click="clickService" class="btn">
联系客服
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
computed : {
...mapGetters(['userShop']),
},
data() {
return {
stepsCurrent : 0,
steps : [
'接单',
'检查',
'开始清洗',
'服务完成',
],
msgShop : {
money : 99.99,
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
projectExplain : '1.xxxxxxxxxx xxxxxxxxxx。2.xxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxx。3.。',
},
msgOrder : {
money : 99.99,
address : '广东省广州市越秀区城南故事C3栋2802',
name : '李**',
phone : '150*****091',
unit : '120*40*75【桌子尺寸】',
state_dictText : '已完成',
price : 199.99,
id : '020644568964457',
createTime : '2024-01-18 15:39',
projectName : '桌布租赁'
},
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
.order {
background: linear-gradient(#4899a6, #6fc6ad, #6fc6ad);
padding-bottom: 10px;
}
.controls{
margin: 20rpx;
background-color: #fff;
height: 400rpx;
display: flex;
flex-direction: column;
width: 710rpx;
border-radius: 20rpx;
justify-content: center;
align-items: center;
.title{
display: flex;
justify-content: center;
align-items: center;
font-size: 40rpx;
image{
width: 100rpx;
height: 100rpx;
margin-right: 20rpx;
}
}
.tips{
font-size: 26rpx;
color: #FD5100;
margin-top: 10rpx;
}
.btns{
margin-top: 50rpx;
display: flex;
view{
margin: 0 20rpx;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
background-color: $uni-color;
padding: 15rpx 40rpx;
border-radius: 40rpx;
}
.btn2{
background-color: #FFFFFF;
border: 1px solid #A7A7A7;
color: #A7A7A7;
}
}
}
.steps{
margin: 20rpx;
background-color: #fff;
display: flex;
flex-direction: column;
width: 710rpx;
border-radius: 20rpx;
padding: 70rpx 0;
/deep/ .uv-text__value{
font-size: 22rpx !important;
}
}
.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;
padding: 20rpx;
background-color: #fff;
width: calc(100% - 40px);
border-radius: 10px;
.head-title {
font-family: PingFang SC, PingFang SC-Bold;
color: #2f2e2e;
line-height: 30rpx;
margin-left: 10rpx;
}
.server-item {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
background: white;
border-radius: 15rpx;
box-sizing: border-box;
margin: 20rpx 0rpx;
width: 100%;
.img-box {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.server-info {
display: flex;
flex-direction: column;
justify-content: space-around;
width: calc(100% - 180rpx);
box-sizing: border-box;
padding: 10rpx 15rpx;
.server-title {
display: flex;
margin-bottom: 10rpx;
}
.coupon {
display: flex;
justify-content: center;
align-items: center;
background: #F29E45;
color: white;
width: 120rpx;
height: 40rpx;
border-radius: 10rpx;
margin-left: 10rpx;
font-size: 22rpx;
}
.time-coupon,
.price {
display: flex;
flex-wrap: wrap;
align-items: center;
}
.time-coupon {
margin: 10rpx 0rpx;
font-size: 26rpx;
justify-content: space-between;
width: 100%;
.flex {
justify-content: center;
align-items: center;
}
image {
width: 25rpx;
height: 25rpx;
}
.time {
color: #B8B8B8;
margin-left: 6rpx;
}
}
.sales-volume {
display: flex;
align-items: center;
color: #B8B8B8;
font-size: 24rpx;
image {
width: 25rpx;
height: 25rpx;
}
}
}
}
.address {
.address-top{
display: flex;
justify-content: space-between;
align-items: center;
image{
width: 30rpx;
height: 30rpx;
}
}
.addressDetail {
color: #777;
font-size: 22rpx;
padding: 5px 0;
}
text {
background-color: #F29E45;
padding: 8rpx 10rpx;
color: #fff;
font-size: 20rpx;
margin-left: 10px;
border-radius: 5px;
}
}
.min_tips {
font-size: 22rpx;
color: #777;
display: flex;
justify-content: space-between;
padding: 5px 0;
align-items: center;
}
.current-price {
font-size: 30rpx;
color: #FD5100;
}
.line {
border-top: 2px dotted #00000011;
padding: 20rpx 0;
.t {
padding: 5px 0;
color: #000;
font-size: 26rpx;
}
}
.head-div {
.nickname {
font-size: 30rpx;
font-weight: 600;
text-align: left;
line-height: 42rpx;
display: flex;
align-items: center;
.tag {
position: relative;
display: flex;
align-items: center;
image {
height: 45rpx;
width: 90rpx;
vertical-align: middle;
}
.auth {
position: absolute;
white-space: nowrap;
color: #FF6200;
left: 23rpx;
font-size: 17rpx;
}
}
}
.days {
font-size: 20rpx;
font-weight: 400;
text-align: left;
line-height: 56rpx;
display: flex;
align-items: center;
view {
padding-left: 5px;
}
}
}
.btn-x {
color: #6fc6ad;
border: 1px solid #6fc6ad;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}
.btns {
display: flex;
justify-content: center;
.btn {
color: #6fc6ad;
border: 1px solid #6fc6ad;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}
}
}
</style>

+ 0
- 353
pages_order/order/refundsOrExchange.vue View File

@ -1,353 +0,0 @@
<template>
<view class="refundsOrExchange">
<navbar :title="title[titleIndex]" leftClick @leftClick="$utils.navigateBack" />
<view class="frame">
<!-- 商品简介 -->
<view class="itme1" @click="openSpPopup">
<view class="left">
<img src="../../static/image/center/1.png" alt="" style="width: 100%;height: 100%;">
</view>
<view class="center">
<view>{{ commodity.title }}</view>
<view>{{ commodity.smallTitle }}</view>
</view>
<view class="right">×{{ commodity.total }}</view>
</view>
<!--<commoditySelect ></commoditySelect>-->
<!-- 申请类型&申请原因 -->
<view class="item2">
<view class="type">
<span>申请类型</span>
<span>退货退款</span>
</view>
<uv-line></uv-line>
<view class="reason">
<view>申请原因</view>
<view>
<uv-input placeholder="请输入申请原因" border="none" clearable></uv-input>
</view>
</view>
</view>
<!-- 退货数量&申请金额-->
<view class="item3">
<view class="type">
<span>{{ titleIndex == 0 ? '退货数量' : '换货数量' }}</span>
<span>
<uv-number-box :min="1" :max="100"></uv-number-box>
</span>
</view>
<uv-line v-if='titleIndex == 0 ? true :false'></uv-line>
<view class="reason" v-if='titleIndex == 0 ? true :false'>
<view>申请原因</view>
<view>
<uv-input disabled placeholder="$" border="none" clearable></uv-input>
</view>
</view>
</view>
<!-- 申请说明 -->
<view class="item4">
<view>申请说明(选填)</view>
<view>
<uv-input placeholder="请您详细填写申请说明" border="none" clearable></uv-input>
</view>
<view>
<uv-upload :fileList="fileList" :maxCount="5" multiple width="150rpx" height="150rpx"
@delete="deleteImage" @afterRead="afterRead" :previewFullImage="true"></uv-upload>
</view>
</view>
<!-- 联系电话 -->
<view class="item5">
<view class="phone">
<view>联系电话</view>
<view>
<uv-input placeholder="请输入联系电话" border="none" clearable></uv-input>
</view>
</view>
</view>
</view>
<!-- 底部按钮 -->
<!--商品选择-->
<uv-popup ref="spPopup" :round="30">
</uv-popup>
</view>
</template>
<script>
export default {
onLoad(option) {
this.titleIndex = option.index
},
components: {
},
data() {
return {
titleIndex: 0,
title: ['申请换货', '申请退货'],
fileList: [],
bottomBtnStyle: {
color: '#FFF',
backgroundColor: '#fd5100',
fontSize: '34rpx',
text: '提交申请',
width: '400rpx',
height: '80rpx',
borderRadius: '100rpx',
bottom: '40rpx'
},
commodityList: [{
title: '商品名称',
smallTitle: '产品规格:120*4*75【桌子尺寸】',
total: 1,
},
{
title: '商品名称1',
smallTitle: '产品规格:120*4*75【桌子尺寸】',
total: 1,
},
{
title: '商品名称2',
smallTitle: '产品规格:120*4*75【桌子尺寸】',
total: 1,
}
],
commodity: {
title: '商品名称',
smallTitle: '产品规格:120*4*75【桌子尺寸】',
total: 1,
},
}
},
mounted() {
},
methods: {
openSpPopup() {
this.$refs.spPopup.open('bottom');
},
// 退
selectCommodity(e) {
console.log(e, "selectCommodity--e")
this.commodity = e
this.$refs.spPopup.close()
},
confirm() {
console.log("===");
},
deleteImage(e) {
this.fileList.splice(e.index, 1)
},
afterRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.fileList.push({
url
})
})
})
},
}
}
</script>
<style lang="scss" scoped>
* {
box-sizing: border-box;
}
.refundsOrExchange {
.frame {
display: flex;
flex-direction: column;
gap: 30rpx;
width: 100%;
padding-top: 40rpx;
background-color: #f5f5f5;
.itme1 {
display: flex;
height: 200rpx;
background-color: #ffffff;
.left {
padding: 40rpx;
width: 20%;
border-radius: 10rpx;
background-color: #ffffff;
}
.center {
display: flex;
flex-direction: column;
justify-content: center;
gap: 20rpx;
width: 60%;
padding: 0rpx 0 0 20rpx;
background-color: #ffffff;
// view
>view:first-of-type {
font-size: 36rpx;
color: #333;
}
// view
>view:nth-of-type(2) {
font-size: 28rpx;
color: #666666;
}
}
.right {
display: flex;
justify-content: center;
align-items: center;
width: 10%;
color: #666666;
background-color: #ffffff;
}
}
.item2 {
width: 100vw;
.type {
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
padding: 0 0 0 20rpx;
>span:nth-of-type(1) {
width: 30%;
}
>span:nth-of-type(2) {
width: 70%;
}
}
.reason {
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
// margin: 10rpx 0 0 0;
padding: 10rpx 0 0 20rpx;
>view:nth-of-type(1) {
width: 30%;
}
>view:nth-of-type(2) {
width: 70%;
padding: 0 20rpx 0 0;
}
}
}
.item3 {
width: 100vw;
.type {
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
padding: 0 0 0 20rpx;
>span:nth-of-type(1) {
width: 70%;
}
>span:nth-of-type(2) {
width: 30%;
}
}
.reason {
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
// margin: 10rpx 0 0 0;
padding: 10rpx 0 0 20rpx;
>view:nth-of-type(1) {
width: 30%;
}
>view:nth-of-type(2) {
width: 70%;
padding: 0 20rpx 0 0;
}
}
}
.item4 {
display: flex;
flex-direction: column;
padding: 10rpx 0 0 20rpx;
background-color: #FFF;
>view:nth-of-type(1) {
background-color: #FFF;
}
>view:nth-of-type(2) {
margin: 10rpx 0 10rpx 0;
background-color: #FFF;
}
}
.item5 {
display: flex;
flex-direction: column;
padding: 0 0 0 20rpx;
background-color: #FFF;
.phone {
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
// margin: 10rpx 0 0 0;
padding: 10rpx 0 0 20rpx;
>view:nth-of-type(1) {
width: 30%;
}
>view:nth-of-type(2) {
width: 70%;
padding: 0 20rpx 0 0;
}
}
}
}
}
</style>

+ 0
- 169
pages_order/product/productDetail.vue View File

@ -1,169 +0,0 @@
<template>
<view class="page">
<navbar title="商品详情" leftClick @leftClick="$utils.navigateBack" />
<view class="swipe">
<uv-swiper
:list="productDetail.image.split(',')"
indicator
height="350rpx"></uv-swiper>
</view>
<view class="info">
<view class="title">
桌布租赁
</view>
<view class="info-line">
<view class="price">
<text>45.9</text>
</view>
<view class="num">
已售1000+
<image src="../static/product/like.png" mode=""></image>
</view>
</view>
<view class="tips">
<view class="tip">
专业设备
</view>
<view class="tip">
科学流程
</view>
<view class="tip">
质量保证
</view>
</view>
</view>
<view class="info-unit">
<uv-cell title="是否有桌布" isLink>
<template #icon>
<text class="text">桌布</text>
</template>
</uv-cell>
<uv-cell title="请选择规格" isLink>
<template #icon>
<text class="text">规格</text>
</template>
</uv-cell>
<uv-cell>
<template #icon>
<text>上门取件·送货上门</text>
</template>
</uv-cell>
</view>
<view class="content">
<view class="title">
商品详情
</view>
<uv-parse :content="productDetail.content"></uv-parse>
</view>
<!-- 分享和租赁按钮 -->
<submit
@submit="$refs.submitUnitSelect.open()"
@share="share"/>
<!-- 选择规格 -->
<submitUnitSelect ref="submitUnitSelect"/>
</view>
</template>
<script>
import submit from '../components/product/submit.vue'
import submitUnitSelect from '../components/product/submitUnitSelect.vue'
export default {
components : {
submit,
submitUnitSelect
},
data() {
return {
productDetail : {
image : 'https://cdn.uviewui.com/uview/swiper/swiper3.png,https://cdn.uviewui.com/uview/swiper/swiper2.png',
content : '',
}
}
},
onLoad(args) {
console.log(args);
},
methods: {
//
share(){
},
//
submit(){
}
}
}
</script>
<style scoped lang="scss">
.page{
.swipe{
}
.info{
padding: 30rpx;
background-color: #fff;
.title{
font-size: 34rpx;
font-weight: 900;
}
.info-line{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 30rpx;
.price{
font-size: 28rpx;
color: $uni-color;
text{
font-size: 34rpx;
}
}
.num{
font-size: 24rpx;
image{
width: 24rpx;
height: 24rpx;
}
}
}
.tips{
display: flex;
font-size: 20rpx;
margin-top: 30rpx;
.tip{
margin-right: 40rpx;
}
}
}
.info-unit{
margin-top: 20rpx;
padding: 30rpx;
background-color: #fff;
/deep/ text{
font-size: 26rpx;
}
/deep/ .text{
color: #7C7C7C;
margin-right: 20rpx;
font-size: 26rpx;
}
}
.content{
background-color: #fff;
margin-top: 20rpx;
.title{
padding: 30rpx;
}
}
}
</style>

BIN
pages_order/static/address/icon.png View File

Before After
Width: 96  |  Height: 96  |  Size: 4.5 KiB

BIN
pages_order/static/address/selectIcon.png View File

Before After
Width: 28  |  Height: 36  |  Size: 1.3 KiB

BIN
pages_order/static/auth/headImage.png View File

Before After
Width: 80  |  Height: 80  |  Size: 1.4 KiB

BIN
pages_order/static/auth/wx.png View File

Before After
Width: 22  |  Height: 18  |  Size: 453 B

BIN
pages_order/static/help/uploading.png View File

Before After
Width: 216  |  Height: 216  |  Size: 7.2 KiB

BIN
pages_order/static/order/icon.png View File

Before After
Width: 82  |  Height: 82  |  Size: 3.0 KiB

BIN
pages_order/static/product/like.png View File

Before After
Width: 25  |  Height: 22  |  Size: 1.1 KiB

BIN
static/home/1745571336565.png View File

Before After
Width: 144  |  Height: 144  |  Size: 36 KiB

BIN
static/home/T 恤衬衣.png View File

Before After
Width: 193  |  Height: 192  |  Size: 25 KiB

BIN
static/home/① 在线预约.png View File

Before After
Width: 144  |  Height: 144  |  Size: 22 KiB

BIN
static/home/② 快递上门.png View File

Before After
Width: 144  |  Height: 144  |  Size: 24 KiB

BIN
static/home/③ 透明质检.png View File

Before After
Width: 144  |  Height: 144  |  Size: 17 KiB

BIN
static/home/④ 现金打款.png View File

Before After
Width: 144  |  Height: 144  |  Size: 23 KiB

BIN
static/home/不会下单.png View File

Before After
Width: 128  |  Height: 128  |  Size: 12 KiB

BIN
static/home/儿童羽绒服.png View File

Before After
Width: 193  |  Height: 192  |  Size: 41 KiB

BIN
static/home/关于我们.png View File

Before After
Width: 160  |  Height: 161  |  Size: 27 KiB

BIN
static/home/包包.png View File

Before After
Width: 193  |  Height: 192  |  Size: 21 KiB

BIN
static/home/品牌服饰.png View File

Before After
Width: 193  |  Height: 192  |  Size: 30 KiB

BIN
static/home/品牌羽绒服.png View File

Before After
Width: 450  |  Height: 450  |  Size: 40 KiB

BIN
static/home/床被.png View File

Before After
Width: 193  |  Height: 192  |  Size: 26 KiB

BIN
static/home/羽绒服.png View File

Before After
Width: 193  |  Height: 192  |  Size: 35 KiB

BIN
static/home/羽绒裤.png View File

Before After
Width: 193  |  Height: 192  |  Size: 27 KiB

BIN
static/home/鞋子.png View File

Before After
Width: 193  |  Height: 192  |  Size: 33 KiB

BIN
static/image/PrivacyAgreementPoup/icon.png View File

Before After
Width: 39  |  Height: 39  |  Size: 1007 B

BIN
static/image/cart/1.png View File

Before After
Width: 36  |  Height: 36  |  Size: 1.9 KiB

BIN
static/image/cart/2.png View File

Before After
Width: 72  |  Height: 72  |  Size: 5.4 KiB

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

Before After
Width: 51  |  Height: 49  |  Size: 1.2 KiB

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

Before After
Width: 355  |  Height: 158  |  Size: 45 KiB

+ 0
- 1
static/image/center/11.svg View File

@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1726157567630" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6220" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M513.536 628.6336c101.6832 0 280.8832 38.7072 310.8864 193.7408 77.5168-77.5168 124.928-185.9584 124.928-305.0496 0-241.152-194.6624-435.8144-435.8144-435.8144S77.7216 277.0944 77.7216 517.2224c0 119.0912 47.4112 227.6352 124.928 306.0736 30.0032-154.9312 209.2032-194.6624 310.8864-194.6624z m0-439.7056c112.3328 0 204.3904 91.0336 204.3904 204.3904 0 112.3328-91.0336 204.3904-204.3904 204.3904a203.776 203.776 0 0 1-204.3904-204.3904c0.1024-112.4352 92.0576-204.3904 204.3904-204.3904z m0 0" fill="#cdcdcd" p-id="6221"></path><path d="M515.4816 1006.8992c-65.8432 0-129.8432-12.9024-189.952-38.4-58.1632-24.576-110.2848-59.8016-155.136-104.5504A485.56032 485.56032 0 0 1 65.8432 708.8128c-25.6-60.2112-38.5024-124.1088-38.5024-189.952 0-65.8432 12.9024-129.8432 38.4-189.952 24.576-58.1632 59.8016-110.2848 104.5504-155.136 44.8512-44.8512 96.9728-79.9744 155.136-104.5504C385.6384 43.6224 449.536 30.72 515.4816 30.72c65.8432 0 129.8432 12.9024 189.952 38.4 58.1632 24.576 110.2848 59.8016 155.136 104.5504 44.8512 44.8512 79.9744 96.9728 104.5504 155.136C990.6176 389.0176 1003.52 452.9152 1003.52 518.8608c0 65.8432-12.9024 129.8432-38.4 189.952-24.576 58.1632-59.8016 110.2848-104.5504 155.136a485.56032 485.56032 0 0 1-155.136 104.5504 484.39296 484.39296 0 0 1-189.952 38.4z m0-936.8576c-60.6208 0-119.3984 11.8784-174.6944 35.2256a447.76448 447.76448 0 0 0-142.6432 96.1536A444.42624 444.42624 0 0 0 101.9904 344.064a446.70976 446.70976 0 0 0-35.2256 174.6944c0 60.6208 11.8784 119.3984 35.2256 174.6944 22.6304 53.4528 54.9888 101.4784 96.1536 142.6432 41.1648 41.2672 89.1904 73.6256 142.6432 96.1536 55.296 23.3472 114.0736 35.2256 174.6944 35.2256 60.6208 0 119.3984-11.8784 174.6944-35.2256 53.4528-22.6304 101.4784-54.9888 142.6432-96.1536 41.2672-41.1648 73.6256-89.1904 96.1536-142.6432 23.3472-55.296 35.2256-114.0736 35.2256-174.6944 0-60.6208-11.8784-119.3984-35.2256-174.6944a447.76448 447.76448 0 0 0-96.1536-142.6432 444.42624 444.42624 0 0 0-142.6432-96.1536 447.44704 447.44704 0 0 0-174.6944-35.2256z m0 0" fill="#cdcdcd" p-id="6222"></path></svg>

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

Before After
Width: 112  |  Height: 126  |  Size: 6.1 KiB

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

Before After
Width: 120  |  Height: 120  |  Size: 5.9 KiB

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

Before After
Width: 52  |  Height: 49  |  Size: 1.7 KiB

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

Before After
Width: 64  |  Height: 64  |  Size: 2.8 KiB

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

Before After
Width: 63  |  Height: 50  |  Size: 2.1 KiB

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

Before After
Width: 64  |  Height: 64  |  Size: 2.4 KiB

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

Before After
Width: 64  |  Height: 64  |  Size: 2.5 KiB

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

Before After
Width: 56  |  Height: 48  |  Size: 2.1 KiB

BIN
static/image/home/0.png View File

Before After
Width: 116  |  Height: 118  |  Size: 14 KiB

BIN
static/image/home/1.png View File

Before After
Width: 117  |  Height: 117  |  Size: 13 KiB

BIN
static/image/home/2.png View File

Before After
Width: 114  |  Height: 114  |  Size: 12 KiB

BIN
static/image/home/3.png View File

Before After
Width: 114  |  Height: 114  |  Size: 11 KiB

BIN
static/image/home/address-icon.png View File

Before After
Width: 38  |  Height: 38  |  Size: 1.4 KiB

BIN
static/image/home/arrow-icon.png View File

Before After
Width: 39  |  Height: 39  |  Size: 296 B

BIN
static/image/home/search-icon.png View File

Before After
Width: 38  |  Height: 38  |  Size: 1.8 KiB

BIN
static/image/product/favorable.png View File

Before After
Width: 60  |  Height: 15  |  Size: 282 B

BIN
static/image/tabbar/cart-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 958 B

BIN
static/image/tabbar/cart.png View File

Before After
Width: 40  |  Height: 40  |  Size: 953 B

BIN
static/image/tabbar/category-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 1.1 KiB

BIN
static/image/tabbar/category.png View File

Before After
Width: 40  |  Height: 40  |  Size: 1.2 KiB

BIN
static/image/tabbar/center-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 915 B

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

Before After
Width: 40  |  Height: 40  |  Size: 937 B

BIN
static/image/tabbar/home-a.png View File

Before After
Width: 47  |  Height: 43  |  Size: 2.2 KiB

BIN
static/image/tabbar/home.png View File

Before After
Width: 47  |  Height: 43  |  Size: 2.2 KiB

BIN
static/image/tabbar/order-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 691 B

BIN
static/image/tabbar/order.png View File

Before After
Width: 40  |  Height: 40  |  Size: 736 B

BIN
static/logo.png View File

Before After
Width: 72  |  Height: 72  |  Size: 3.9 KiB

BIN
static/my/钱包流水.png View File

Before After
Width: 1500  |  Height: 896  |  Size: 301 KiB

+ 0
- 110
store/store.js View File

@ -1,110 +0,0 @@
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex); //vue的插件机制
import api from '@/api/api.js'
//Vuex.Store 构造器选项
const store = new Vuex.Store({
state: {
configList: {}, //配置列表
shop : false,//身份判断如果不需要,可以删除
userInfo : {}, //用户信息
},
getters: {
// 角色 true为水洗店 false为酒店 : 身份判断如果不需要,可以删除
userShop(state){
return state.shop
}
},
mutations: {
// 初始化配置
initConfig(state){
api('getConfig', res => {
const configList = {
...state.configList,
}
if (res.code == 200) {
res.result.forEach(n => {
configList[n.keyName] = n.keyContent;
configList[n.keyName + '_keyValue'] = n.keyValue;
});
}
state.configList = configList
uni.$emit('initConfig', state.configList)
})
// let config = ['getPrivacyPolicy', 'getUserAgreement']
// config.forEach(k => {
// api(k, res => {
// if (res.code == 200) {
// state.configList[k] = res.result
// }
// })
// })
},
// 微信登录
login(state){
uni.showLoading({
title: '登录中...'
})
uni.login({
success(res) {
if(res.errMsg != "login:ok"){
return
}
api('wxLogin', {
code : res.code
}, res => {
uni.hideLoading()
if(res.code != 200){
return
}
state.userInfo = res.result.userInfo
uni.setStorageSync('token', res.result.token)
if(!state.userInfo.nickName || !state.userInfo.headImage){
uni.navigateTo({
url: '/pages_order/auth/wxUserInfo'
})
}else{
uni.navigateBack(-1)
}
})
}
})
},
// 获取用户个人信息
getUserInfo(state){
api('getInfo', res => {
if(res.code == 200){
state.userInfo = res.result
}
})
},
// 退出登录
logout(state){
uni.showModal({
title: '确认退出登录吗',
success(r) {
if(r.confirm){
state.userInfo = {}
state.role = false
uni.removeStorageSync('token')
uni.reLaunch({
url: '/pages/index/index'
})
}
}
})
},
},
actions: {},
})
export default store

+ 0
- 7
uni_modules/uv-action-sheet/changelog.md View File

@ -1,7 +0,0 @@
## 1.0.2(2023-07-02)
uv-action-sheet 由于弹出层uv-popup的修改,打开和关闭方法更改,详情参考文档:https://www.uvui.cn/components/actionSheet.html
## 1.0.1(2023-05-16)
1. 优化组件依赖,修改后无需全局引入,组件导入即可使用
2. 优化部分功能
## 1.0.0(2023-05-10)
uv-action-sheet 底部操作菜单

+ 0
- 50
uni_modules/uv-action-sheet/components/uv-action-sheet/props.js View File

@ -1,50 +0,0 @@
export default {
props: {
// 标题,有值则显示,同时会显示关闭按钮
title: {
type: String,
default: ''
},
// 选项上方的描述信息
description: {
type: String,
default: ''
},
// 数据
actions: {
type: Array,
default: () => []
},
// 取消按钮的文字,不为空时显示按钮
cancelText: {
type: String,
default: ''
},
// 点击某个菜单项时是否关闭弹窗
closeOnClickAction: {
type: Boolean,
default: true
},
// 处理底部安全区(默认true)
safeAreaInsetBottom: {
type: Boolean,
default: true
},
// 小程序的打开方式
openType: {
type: String,
default: ''
},
// 点击遮罩是否允许关闭 (默认true)
closeOnClickOverlay: {
type: Boolean,
default: true
},
// 圆角值
round: {
type: [Boolean, String, Number],
default: 0
},
...uni.$uv?.props?.actionSheet
}
}

+ 0
- 280
uni_modules/uv-action-sheet/components/uv-action-sheet/uv-action-sheet.vue View File

@ -1,280 +0,0 @@
<template>
<uv-popup
ref="popup"
mode="bottom"
:safeAreaInsetBottom="safeAreaInsetBottom"
:round="round"
:close-on-click-overlay="closeOnClickOverlay"
@change="popupChange"
>
<view class="uv-action-sheet">
<view
class="uv-action-sheet__header"
v-if="title"
>
<text class="uv-action-sheet__header__title uv-line-1">{{title}}</text>
<view
class="uv-action-sheet__header__icon-wrap"
@tap.stop="cancel"
>
<uv-icon
name="close"
size="17"
color="#c8c9cc"
bold
></uv-icon>
</view>
</view>
<text
class="uv-action-sheet__description"
:style="[{
marginTop: `${title && description ? 0 : '18px'}`
}]"
v-if="description"
>{{description}}</text>
<slot>
<uv-line v-if="description"></uv-line>
<view class="uv-action-sheet__item-wrap">
<view v-for="(item, index) in actions" :key="index">
<!-- #ifdef MP -->
<button
class="uv-reset-button"
:openType="item.openType"
@getuserinfo="onGetUserInfo"
@contact="onContact"
@getphonenumber="onGetPhoneNumber"
@error="onError"
@launchapp="onLaunchApp"
@opensetting="onOpenSetting"
:lang="lang"
:session-from="sessionFrom"
:send-message-title="sendMessageTitle"
:send-message-path="sendMessagePath"
:send-message-img="sendMessageImg"
:show-message-card="showMessageCard"
:app-parameter="appParameter"
@tap="selectHandler(index)"
:hover-class="!item.disabled && !item.loading ? 'uv-action-sheet--hover' : ''"
>
<!-- #endif -->
<view
class="uv-action-sheet__item-wrap__item"
@tap.stop="selectHandler(index)"
:hover-class="!item.disabled && !item.loading ? 'uv-action-sheet--hover' : ''"
:hover-stay-time="150"
>
<template v-if="!item.loading">
<text
class="uv-action-sheet__item-wrap__item__name"
:style="[itemStyle(index)]"
>{{ item.name }}</text>
<text
v-if="item.subname"
class="uv-action-sheet__item-wrap__item__subname"
>{{ item.subname }}</text>
</template>
<uv-loading-icon
v-else
custom-class="van-action-sheet__loading"
size="18"
mode="circle"
/>
</view>
<!-- #ifdef MP -->
</button>
<!-- #endif -->
<uv-line v-if="index !== actions.length - 1"></uv-line>
</view>
</view>
</slot>
<uv-gap
bgColor="#eaeaec"
height="6"
v-if="cancelText"
></uv-gap>
<view hover-class="uv-action-sheet--hover">
<text
@touchmove.stop.prevent
:hover-stay-time="150"
v-if="cancelText"
class="uv-action-sheet__cancel-text"
@tap="cancel"
>{{cancelText}}</text>
</view>
</view>
</uv-popup>
</template>
<script>
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
import button from '@/uni_modules/uv-ui-tools/libs/mixin/button.js'
import openType from '@/uni_modules/uv-ui-tools/libs/mixin/openType.js'
import props from './props.js';
/**
* ActionSheet 操作菜单
* @description 本组件用于从底部弹出一个操作菜单供用户选择并返回结果本组件功能类似于uni的uni.showActionSheetAPI配置更加灵活所有平台都表现一致
* @tutorial https://www.uvui.cn/components/actionSheet.html
* @property {Boolean} show 操作菜单是否展示 默认 false
* @property {String} title 操作菜单标题
* @property {String} description 选项上方的描述信息
* @property {Array<Object>} actions 按钮的文字数组见官方文档示例
* @property {String} cancelText 取消按钮的提示文字,不为空时显示按钮
* @property {Boolean} closeOnClickAction 点击某个菜单项时是否关闭弹窗 默认 true
* @property {Boolean} safeAreaInsetBottom 处理底部安全区 默认 true
* @property {String} openType 小程序的打开方式 (contact | launchApp | getUserInfo | openSetting getPhoneNumber error )
* @property {Boolean} closeOnClickOverlay 点击遮罩是否允许关闭 (默认 true )
* @property {String} lang 指定返回用户信息的语言zh_CN 简体中文zh_TW 繁体中文en 英文
* @property {String} sessionFrom 会话来源openType="contact"时有效
* @property {String} sendMessageTitle 会话内消息卡片标题openType="contact"时有效
* @property {String} sendMessagePath 会话内消息卡片点击跳转小程序路径openType="contact"时有效
* @property {String} sendMessageImg 会话内消息卡片图片openType="contact"时有效
* @property {Boolean} showMessageCard 是否显示会话内消息卡片设置此参数为 true用户进入客服会话会在右下角显示"可能要发送的小程序"提示用户点击后可以快速发送小程序消息openType="contact"时有效 默认 false
* @property {String} appParameter 打开 APP APP 传递的参数openType=launchApp 时有效
*
* @event {Function} select 点击ActionSheet列表项时触发
* @event {Function} close 点击取消按钮时触发
* @event {Function} getuserinfo 用户点击该按钮时会返回获取到的用户信息回调的 detail 数据与 wx.getUserInfo 返回的一致openType="getUserInfo"时有效
* @event {Function} contact 客服消息回调openType="contact"时有效
* @event {Function} getphonenumber 获取用户手机号回调openType="getPhoneNumber"时有效
* @event {Function} error 当使用开放能力时发生错误的回调openType="error"时有效
* @event {Function} launchapp 打开 APP 成功的回调openType="launchApp"时有效
* @event {Function} opensetting 在打开授权设置页后回调openType="openSetting"时有效
* @example <uv-action-sheet ref="actionSheet" :actions="list" :title="title" ></uv-action-sheet>
*/
export default {
name: "uv-action-sheet",
mixins: [openType, button, mpMixin , mixin, props],
emits: ['close', 'select'],
computed: {
//
itemStyle() {
return (index) => {
let style = {};
if (this.actions[index].color) style.color = this.actions[index].color
if (this.actions[index].fontSize) style.fontSize = this.$uv.addUnit(this.actions[index].fontSize)
//
if (this.actions[index].disabled) style.color = '#c0c4cc'
return style;
}
},
},
methods: {
open() {
this.$refs.popup.open();
},
close() {
this.$refs.popup.close();
},
popupChange(e) {
if(!e.show) this.$emit('close');
},
//
cancel() {
this.close();
},
selectHandler(index) {
const item = this.actions[index]
if (item && !item.disabled && !item.loading) {
this.$emit('select', item)
if (this.closeOnClickAction) {
this.close();
}
}
},
}
}
</script>
<style lang="scss" scoped>
$show-lines: 1;
$show-reset-button: 1;
@import '@/uni_modules/uv-ui-tools/libs/css/variable.scss';
@import '@/uni_modules/uv-ui-tools/libs/css/components.scss';
@import '@/uni_modules/uv-ui-tools/libs/css/color.scss';
$uv-action-sheet-reset-button-width:100% !default;
$uv-action-sheet-title-font-size: 16px !default;
$uv-action-sheet-title-padding: 12px 30px !default;
$uv-action-sheet-title-color: $uv-main-color !default;
$uv-action-sheet-header-icon-wrap-right:15px !default;
$uv-action-sheet-header-icon-wrap-top:15px !default;
$uv-action-sheet-description-font-size:13px !default;
$uv-action-sheet-description-color:14px !default;
$uv-action-sheet-description-margin: 18px 15px !default;
$uv-action-sheet-item-wrap-item-padding:15px !default;
$uv-action-sheet-item-wrap-name-font-size:16px !default;
$uv-action-sheet-item-wrap-subname-font-size:13px !default;
$uv-action-sheet-item-wrap-subname-color: #c0c4cc !default;
$uv-action-sheet-item-wrap-subname-margin-top:10px !default;
$uv-action-sheet-cancel-text-font-size:16px !default;
$uv-action-sheet-cancel-text-color:$uv-content-color !default;
$uv-action-sheet-cancel-text-font-size:15px !default;
$uv-action-sheet-cancel-text-hover-background-color:rgb(242, 243, 245) !default;
.uv-reset-button {
width: $uv-action-sheet-reset-button-width;
}
.uv-action-sheet {
text-align: center;
&__header {
position: relative;
padding: $uv-action-sheet-title-padding;
&__title {
font-size: $uv-action-sheet-title-font-size;
color: $uv-action-sheet-title-color;
font-weight: bold;
text-align: center;
}
&__icon-wrap {
position: absolute;
right: $uv-action-sheet-header-icon-wrap-right;
top: $uv-action-sheet-header-icon-wrap-top;
}
}
&__description {
font-size: $uv-action-sheet-description-font-size;
color: $uv-tips-color;
margin: $uv-action-sheet-description-margin;
text-align: center;
}
&__item-wrap {
&__item {
padding: $uv-action-sheet-item-wrap-item-padding;
@include flex;
align-items: center;
justify-content: center;
flex-direction: column;
&__name {
font-size: $uv-action-sheet-item-wrap-name-font-size;
color: $uv-main-color;
text-align: center;
}
&__subname {
font-size: $uv-action-sheet-item-wrap-subname-font-size;
color: $uv-action-sheet-item-wrap-subname-color;
margin-top: $uv-action-sheet-item-wrap-subname-margin-top;
text-align: center;
}
}
}
&__cancel-text {
font-size: $uv-action-sheet-cancel-text-font-size;
color: $uv-action-sheet-cancel-text-color;
text-align: center;
padding: $uv-action-sheet-cancel-text-font-size;
}
&--hover {
background-color: $uv-action-sheet-cancel-text-hover-background-color;
}
}
</style>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save