Browse Source

上传

master
前端-胡立永 7 months ago
parent
commit
e222a2df4a
35 changed files with 1841 additions and 404 deletions
  1. +1
    -1
      api/http.js
  2. +0
    -77
      components/base/changeLanguage.vue
  3. +0
    -71
      components/base/super-drawer.vue
  4. +29
    -79
      components/config/configPopup.vue
  5. +111
    -0
      components/user/productList.vue
  6. +59
    -2
      components/userShop/userShopCommission.vue
  7. +0
    -23
      locale/en.json
  8. +0
    -25
      locale/index.js
  9. +0
    -26
      locale/zh-Hans.json
  10. +0
    -2
      main.js
  11. +15
    -0
      pages.json
  12. +187
    -7
      pages/index/cart.vue
  13. +55
    -6
      pages/index/center.vue
  14. +381
    -0
      pages/index/index.vue
  15. +3
    -0
      pages/index/order.vue
  16. +206
    -0
      pages_order/components/address/redactAddress.vue
  17. +501
    -0
      pages_order/mine/address.vue
  18. +109
    -0
      pages_order/mine/purse.vue
  19. +88
    -0
      pages_order/mine/runningWater.vue
  20. +84
    -80
      pages_order/order/orderDetail.vue
  21. BIN
      pages_order/static/address/icon.png
  22. BIN
      pages_order/static/address/selectIcon.png
  23. BIN
      pages_order/static/order/icon.png
  24. BIN
      static/image/cart/1.png
  25. BIN
      static/image/cart/2.png
  26. BIN
      static/image/home/0.png
  27. BIN
      static/image/home/1.png
  28. BIN
      static/image/home/2.png
  29. BIN
      static/image/home/3.png
  30. BIN
      static/image/home/address-icon.png
  31. BIN
      static/image/home/arrow-icon.png
  32. BIN
      static/image/home/search-icon.png
  33. BIN
      static/image/product/favorable.png
  34. +3
    -2
      store/store.js
  35. +9
    -3
      utils/utils.js

+ 1
- 1
api/http.js View File

@ -6,7 +6,7 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
if(showLoading){
uni.showLoading({
title: title || '正在提交...'
title: title || '加载中...'
});
}


+ 0
- 77
components/base/changeLanguage.vue View File

@ -1,77 +0,0 @@
<template>
<view class="change-language">
<uv-picker ref="picker"
:columns="languageList"
keyName="name"
:itemHeight="70"
@confirm="confirm"></uv-picker>
</view>
</template>
<script>
export default {
props : {
url : {
default : '/pages/index/index',
type : String,
}
},
data(){
return {
languageList: [
[
{
name:'简体中文',
key : "zh-Hans"
},
{
name:'English',
key : "en"
},
]
],
}
},
methods : {
open() {
this.$refs.picker.open();
},
confirm(e) {
this.changeLanguage(e.value.pop())
},
//
changeLanguage(res){
//#ifdef H5
this.$router.go(0); //validate.js
//#endif
//#ifdef APP-PLUS
uni.navigateTo({
url: this.url //
});
//#endif
if(!res.key){
return
}
uni.setStorage({
key: 'language',
data: res.key
})
this.$i18n.locale = res.key
uni.setLocale(res.key) //this.$i18n.localeappbug
uni.$responseMessage = this.$t('responseMessage')
}
}
}
</script>
<style lang="scss" scoped>
.change-language{
}
</style>

+ 0
- 71
components/base/super-drawer.vue View File

@ -1,71 +0,0 @@
<template>
<view>
<view>
<uni-drawer ref="mode1" mode="left" :width="200">
<view class="bottom-line" style="line-height: 72rpx; margin: 0 52rpx;"
v-for="ele in drawerData1" @click="oncuechange1(ele)">{{ ele.name }}</view>
</uni-drawer>
<uni-drawer ref="mode2" mode="left" :width="200">
<view class="bottom-line" style="line-height: 72rpx; margin: 0 52rpx;"
v-for="ele in drawerData2" @click="oncuechange2(ele)">{{ ele.name }}</view>
</uni-drawer>
<uni-drawer ref="mode3" mode="left" :width="200">
<view class="bottom-line" style="line-height: 72rpx; margin: 0 52rpx;"
v-for="ele in drawerData3" @click="oncuechange3(ele)">{{ ele.name }}</view>
</uni-drawer>
</view>
</view>
</template>
<script>
export default {
data() {
return {
drawerData1: [],
drawerData2: [],
drawerData3: [],
value: []
}
},
methods: {
open(categorys){
this.value = []
this.drawerData1 = categorys
this.$refs.mode1.open()
},
oncuechange1(ele){
this.value.push(ele.name)
if (ele.node){
this.drawerData2 = ele.node
this.$refs.mode2.open()
} else {
this.clearAndEmit()
}
},
oncuechange2(ele){
this.value.push(ele.name)
if (ele.node){
this.drawerData3 = ele.node
this.$refs.mode3.open()
} else {
this.clearAndEmit()
}
},
oncuechange3(ele){
this.value.push(ele.name)
this.clearAndEmit()
},
clearAndEmit(ele){
console.log("end", this.value.join(" "));
this.$emit('changSuccess', this.value.join(" "))
this.$refs.mode3.close()
this.$refs.mode2.close()
this.$refs.mode1.close()
},
}
}
</script>

+ 29
- 79
components/config/configPopup.vue View File

@ -1,16 +1,7 @@
<template>
<!-- 协议配置弹出层组件 -->
<view>
<uv-parse
v-if="tiled"
:content="content">
</uv-parse>
<uv-popup
v-else
:customStyle="{height: '75vh'}"
ref="popup">
<view id="config">
<view class="configPopup">
<uv-popup ref="popup" :round="30" :customStyle="{height: '50vh'}">
<view class="content">
<uv-parse :content="content"></uv-parse>
</view>
</uv-popup>
@ -18,80 +9,39 @@
</template>
<script>
import { mapState } from 'vuex'
import { mapGetters } from 'vuex'
export default {
name:"configPopup",
props : {
findValue : {//
type : String,
},
findKey : {//
type : String,
default : 'keyValue'
},
contentKey : {//
type : String,
default : 'content'
},
languageContentKey : {//
type : Object,
},
index : {//
type : Number,
},
tiled : {
default : false,
type : Boolean,
}
},
name: 'configPoup',
data() {
return {
};
},
computed : {
...mapState(['configList']),
locale(){
return this.$t('components.config.configPopup')
},
obj(){
if(typeof this.index == 'number'){
return this.configList[this.index]
}
for(let i = 0; i < this.configList.length; i++){
if(this.configList[i][this.findKey] == this.findValue){
return this.configList[i]
}
}
},
objKey(){
if(this.languageContentKey
&& this.languageContentKey[this.$i18n.locale]){
return this.languageContentKey[this.$i18n.locale]
}
return this.contentKey
},
content(){
if(!this.obj){
return `<h3>${this.locale.noData}</h3>`
}
return this.obj[this.objKey]
content : ''
}
},
methods : {
open(type = 'bottom'){
if(this.tiled){
return
}
this.$refs.popup.open(type);
},
onShow(){
console.log(this.getConfig);
},
methods: {
//
open(key){
console.log(key);
this.content = this.getConfig[key]
this.$refs.popup.open('bottom');
}
},
computed : {
...mapGetters(['getConfig'])
}
}
</script>
<style scoped lang="scss">
#config{
padding: 20rpx;
line-height: 50rpx;
}
<style lang="scss" scoped>
.configPopup {
.content{
padding: 30rpx 20rpx;
}
}
</style>

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

@ -0,0 +1,111 @@
<template>
<view class="list">
<view class="item"
v-for="(item, index) in 10"
: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>

+ 59
- 2
components/userShop/userShopCommission.vue View File

@ -9,7 +9,17 @@
7890.34
</view>
</view>
<view class="btn">
<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>
@ -18,10 +28,39 @@
<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>
@ -56,6 +95,24 @@
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;


+ 0
- 23
locale/en.json View File

@ -1,23 +0,0 @@
{
"tabbar.title.1" : "消息",
"tabbar.title.2" : "通讯录",
"tabbar.title.3" : "发现",
"tabbar.title.4" : "我",
"navbar.relation.newFriend" : "新的朋友",
"navbar.mine.service" : "服务",
"navbar.relation.searchFriend" : "添加朋友",
"pages" : {
"index" : {
"index" : {
"agreement" : "Agreement content"
}
}
},
"components" : {
"config" : {
"configPopup" : {
}
}
}
}

+ 0
- 25
locale/index.js View File

@ -1,25 +0,0 @@
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import zhHans from './zh-Hans.json' // 中文简体
Vue.use(VueI18n)
// 所需要用的语言包
let messages = {
'zh-Hans' : zhHans
}
if(!uni.getStorageSync('language') || !messages[uni.getStorageSync('language')]){
uni.setStorageSync('language', 'zh-Hans')
}
const lang = uni.getStorageSync('language');//获取缓存中的语言
// const lang = 'en';
// VueI18n构造函数所需要的配置
const i18nConfig = {
locale: lang,//当前语言
messages
}
const i18n = new VueI18n(i18nConfig)
export default i18n

+ 0
- 26
locale/zh-Hans.json View File

@ -1,26 +0,0 @@
{
"tabbar.title.1" : "消息",
"tabbar.title.2" : "通讯录",
"tabbar.title.3" : "发现",
"tabbar.title.4" : "我",
"navbar.relation.newFriend" : "新的朋友",
"navbar.mine.service" : "服务",
"navbar.relation.searchFriend" : "添加朋友",
"responseMessage" : {
},
"pages" : {
"index" : {
"index" : {
"agreement" : "协议内容"
}
}
},
"components" : {
"config" : {
"configPopup" : {
"noData" : "内容未找到:404"
}
}
}
}

+ 0
- 2
main.js View File

@ -10,7 +10,6 @@ Vue.config.productionTip = false
App.mpType = 'app'
import store from '@/store/store'
import i18n from './locale/index.js'
import './config'
import './utils/index.js'
@ -25,7 +24,6 @@ Vue.component('navbar',navbar)
const app = new Vue({
...App,
store,
i18n
})
app.$mount()
// #endif


+ 15
- 0
pages.json View File

@ -35,12 +35,27 @@
}
}
],
"preloadRule" : {
"pages/index/index" : {
"network" : "all",
"packages" : ["pages_order"]
}
},
"subPackages": [
{
"root": "pages_order",
"pages": [
{
"path": "order/orderDetail"
},
{
"path": "mine/purse"
},
{
"path": "mine/runningWater"
},
{
"path": "mine/address"
}
]
}


+ 187
- 7
pages/index/cart.vue View File

@ -1,27 +1,207 @@
<template>
<view class="page">
<tabber select="3"/>
<navbar/>
<view class="user">
<uv-swipe-action>
<view
v-for="(item, index) in 3"
:key="index">
<view style="margin-top: 20rpx;"></view>
<uv-swipe-action-item
:options="options">
<view class="item">
<image
class="image"
src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg"
mode=""></image>
<view class="info">
<view class="title">
<view class="">
桌布租赁
</view>
<view class="">
<uv-number-box v-model="value" @change="valChange"></uv-number-box>
</view>
</view>
<view class="unit">
规格120*40*75桌子尺寸
<uv-icon name="arrow-down"></uv-icon>
</view>
<view class="price">
<text>299</text>
</view>
</view>
</view>
</uv-swipe-action-item>
</view>
</uv-swipe-action>
<view class="action">
<view class="icon">
<image src="/static/image/cart/1.png" mode=""></image>
<view class="num">
4
</view>
</view>
<view class="price">
<view class="count">
合计
<view class="">
<text>218.00</text>
</view>
</view>
<view class="text">
共4件已享受更低优惠
</view>
</view>
<view class="btn">
去结算
</view>
</view>
</view>
<tabber select="3" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
export default {
components : {
components: {
tabber,
},
data() {
return {
value : 0,
options: [
{
text: '删除',
style: {
backgroundColor: '#f56c6c'
}
},
],
}
},
computed : {
},
computed: {},
methods: {
valChange(){
},
}
}
</script>
<style scoped lang="scss">
</style>
.page {
padding-bottom: 200rpx;
}
.user {
.item{
background-color: #fff;
display: flex;
padding: 30rpx;
.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;
.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>

+ 55
- 6
pages/index/center.vue View File

@ -11,12 +11,24 @@
</view>
<view class="info">
<view class="name">
QWEQWE
倾心.
</view>
<view class="vip">
<!-- <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>
<!-- 水洗店 -->
@ -67,14 +79,16 @@
</view>
<uv-grid :col="4" :border="false">
<uv-grid-item>
<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>
<uv-grid-item
@click="$utils.redirectTo('/index/order')">
<image class="image"
src="/static/image/center/8.png"
mode=""></image>
@ -113,7 +127,8 @@
<text class="grid-text">我的租赁</text>
</uv-grid-item>
<uv-grid-item>
<uv-grid-item
@click="$utils.redirectTo('/index/cart')">
<image class="image"
src="/static/image/center/7.png"
mode=""></image>
@ -151,6 +166,17 @@
}
},
methods: {
headBtn(){
let self = this
uni.showModal({
title: '演示切换角色之后的效果',
success(res) {
if(res.confirm){
self.$store.state.shop = !self.$store.state.shop
}
}
})
},
}
}
@ -166,6 +192,7 @@
background-color: #fff;
padding: 40rpx 20rpx;
align-items: center;
position: relative;
.headImage{
width: 120rpx;
height: 120rpx;
@ -188,6 +215,26 @@
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{
@ -213,7 +260,9 @@
}
.num{
color: $uni-color;
font-weight: 600;
font-size: 28rpx;
}
}
}


+ 381
- 0
pages/index/index.vue View File

@ -1,27 +1,408 @@
<template>
<view class="page">
<navbar/>
<view class="search">
<view @click="showSelectArea" class="left-area">
<image src="@/static/image/home/address-icon.png"></image>
<view class="area">{{ area }}</view>
<image src="@/static/image/home/arrow-icon.png" mode="aspectFit"></image>
<view class="parting-line">|</view>
</view>
<view class="center-area">
<image
style="margin-right: 20rpx;"
src="@/static/image/home/search-icon.png"></image>
<input v-model="queryParams.title"
placeholder="桌布租赁" />
</view>
<!-- <view class="right-area">
<view @click="searchAddress" class="search-button">
搜索
</view>
</view> -->
</view>
<view class="swipe">
<uv-swiper
:list="bannerList"
indicator
height="320rpx"
keyName="url"></uv-swiper>
</view>
<!-- 水洗店 -->
<view class="userShop"
v-if="userShop">
<view class="list">
<view class="item"
v-for="(item, index) in 4"
:key="index">
<view class="">
<view class="">
我的客户
</view>
<view class="num">
{{ 30 }}
</view>
</view>
<view class="">
<image :src="`/static/image/home/${index}.png`" mode=""></image>
</view>
</view>
</view>
</view>
<!-- 酒店 -->
<view class="user"
v-else>
<uv-notice-bar
fontSize="28rpx"
:text="text"></uv-notice-bar>
<view class="shop">
<image
class="image"
src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg"
mode=""></image>
<view class="shopInfo">
<view class="title">
HOUS水洗店
</view>
<view class="tags">
<view class="tag">
桌布水洗
</view>
<view class="tag">
桌布租赁
</view>
</view>
<view class="time">
9:00-18:00
</view>
<view class="address">
长沙市天心区桂花坪街道231号
</view>
</view>
<view class="btns">
<view class="btn">
我要水洗
</view>
</view>
<view class="tips">
关联门店主信门店
</view>
</view>
<view class="productList">
<productList/>
</view>
</view>
<!-- <selectArea ref="selectArea" @close="closeAreaPro" @select="selectArea"></selectArea> -->
<tabber select="0"/>
</view>
</template>
<script>
import Position from '@/utils/position.js'
import tabber from '@/components/base/tabbar.vue'
import productList from '@/components/user/productList.vue'
import { mapGetters } from 'vuex'
// import selectArea from '../../components/selectArea.vue';
export default {
components : {
tabber,
productList,
},
data() {
return {
area: '长沙',
text : '长沙市刘师傅在服务过程中客户投诉“服务过程中有不文明的行为”.....',
queryParams: {
pageNo: 1,
pageSize: 10,
title: ''
},
bannerList: [
{
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
},
{
url: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
},
{
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
},
],
productList: [],
}
},
computed : {
...mapGetters(['userShop']),
},
methods: {
//
showSelectArea() {
// this.$refs.selectArea.open()
},
//
searchAddress() {
Position.getLocation(res => {
Position.selectAddress(res.longitude, res.latitude, success => {
let address = this.extractProvinceAndCity(success)
this.queryParams.title = address.city
})
})
},
//()
extractProvinceAndCity(res) { //()
if (!res.address && res.name) { //
return {
province: '',
city: res.name
};
}
if (res.address) { //
// 使
const regex = /(?<province>[\u4e00-\u9fa5]+?省)(?<city>[\u4e00-\u9fa5]+?(?:市|自治州|盟|地区))/;
const match = res.address.match(regex);
if (match) { //
return {
province: match.groups.province,
city: match.groups.city
};
}
}
return { //
province: '',
city: ''
}
},
}
}
</script>
<style scoped lang="scss">
.search {
height: 82rpx;
width: 710rpx;
background: #FFFFFF;
margin: 20rpx auto;
border-radius: 41rpx;
box-sizing: border-box;
padding: 0 15rpx;
display: flex;
align-items: center;
// justify-content: space-between;
.left-area,
.center-area {
display: flex;
align-items: center;
}
.left-area {
max-width: 160rpx;
image {
flex-shrink: 0;
width: 26rpx;
height: 26rpx;
}
.area {
font-size: 24rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
/* 限制显示两行 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
color: #292929;
}
.parting-line {
flex-shrink: 0;
font-size: 26rpx;
color: #ccc;
margin: 0rpx 5rpx;
}
}
.center-area {
display: flex;
flex-wrap: nowrap;
align-items: center;
width: calc(100% - 290rpx);
margin-left: 30rpx;
image {
width: 26rpx;
height: 26rpx;
}
.van-field {
background-color: transparent;
box-sizing: border-box;
height: 82rpx;
line-height: 82rpx;
width: calc(100% - 30rpx);
padding: 0rpx 10rpx 0rpx 0rpx;
input {
height: 82rpx;
font-size: 60rpx;
}
}
}
.right-area {
.search-button {
background: #60BDA2;
height: 60rpx;
width: 130rpx;
font-size: 26rpx;
border-radius: 35rpx;
color: white;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.swipe{
overflow: hidden;
border-radius: 20rpx;
margin: 20rpx;
}
.page{
padding-bottom: 200rpx;
& /deep/ .uv-icon__icon{
font-size: 30rpx !important;
}
//
.userShop{
.list{
display: flex;
flex-wrap: wrap;
.item{
display: flex;
justify-content: center;
align-items: center;
width: 330rpx;
margin: 20rpx;
padding: 30rpx 0;
color: #FFFFFF;
line-height: 50rpx;
border-radius: 20rpx;
font-size: 28rpx;
.num{
font-size: 38rpx;
font-weight: 900;
}
image{
width: 110rpx;
height: 110rpx;
margin-left: 20rpx;
}
&:nth-child(1){
background: #F07A77;
}
&:nth-child(2){
background: #F48B4E;
}
&:nth-child(3){
background: #6487E1;
}
&:nth-child(4){
background: #61B7E6;
}
}
}
}
//
.user{
padding: 20rpx;
.shop{
position: relative;
display: flex;
align-items: center;
justify-content: center;
background-color: #fff;
margin-top: 20rpx;
border-radius: 20rpx;
padding: 20rpx;
overflow: hidden;
.image{
width: 180rpx;
height: 180rpx;
margin-right: 20rpx;
border-radius: 20rpx;
}
.shopInfo{
font-size: 22rpx;
.title{
font-size: 30rpx;
}
.tags{
display: flex;
.tag{
padding: 4rpx 6rpx;
border: 1rpx solid #FFAC6E;
color: #FFAC6E;
margin-right: 10rpx;
margin-top: 10rpx;
font-size: 18rpx;
}
}
.time{
margin-top: 10rpx;
display: flex;
}
.address{
margin-top: 10rpx;
display: flex;
}
}
.btns{
margin-left: auto;
display: flex;
align-items: center;
justify-content: center;
.btn{
background-color: $uni-color;
color: #fff;
box-shadow: 0 0 5rpx 5rpx #FFAC6E;
padding: 10rpx 20rpx;
flex-shrink: 0;
border-radius: 35rpx;
}
}
.tips{
position: absolute;
top: 0;
right: 0;
font-size: 24rpx;
color: #FFAC6E;
background-color: #FEF5EE;
padding: 10rpx 20rpx;
border-radius: 10rpx;
}
}
}
}
</style>

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

@ -151,6 +151,9 @@
</script>
<style scoped lang="scss">
.page{
padding-bottom: 200rpx;
}
.list {
.item {
width: calc(100% - 40rpx);


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

@ -0,0 +1,206 @@
<template>
<view class="redact-address">
<view class="redact-address-title">{{title}}</view>
<uv-form label-width="210rpx"
:model="addressDetail"
ref="form" :rules="rules">
<!-- <uv-field v-model="addressDetail.name" name="联系人" label="联系人" placeholder="请输入联系人姓名"
:rules="[{ required: true, message: '请填写联系人' }]" />
<uv-field v-model="addressDetail.phone" name="手机号" label="手机号" placeholder="请输入手机号"
:rules="[{ required: true, message: '请填写手机号' }]" />
<uv-field @click="$emit('clickAddressIcon')" v-model="addressDetail.address" name="所在地区" label="所在地区" placeholder="选择省市区街道"
:rules="[{ required: true, message: '请选择省市区街道' }]">
<template #right-icon>
<image @click.stop="$emit('clickAddressIcon')" src="../static/address/selectIcon.png" mode="aspectFit"></image>定位
</template>
</uv-field>
<uv-field v-model="addressDetail.addressDetail" name="详细地址" label="详细地址" placeholder="小区楼栋、门牌号、村等"
:rules="[{ required: true, message: '请填写详细地址' }]" /> -->
<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="$emit('clickAddressIcon')">
<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>
</template>
<script>
export default {
data() {
return {
rules: {
'name': {
type: 'string',
required: true,
message: '请填写姓名',
trigger: ['blur', 'change']
},
'addressDetail': {
type: 'string',
max: 50,
required: true,
message: '请输入详细地址',
trigger: ['blur', 'change']
},
},
}
},
props : {
addressDetail : {
type : Object,
default : function(){ return {} }
},
title : {
type : String,
default : '新增地址'
}
},
methods: {
//
onSubmit() {
this.$refs.form.validate().then(res => {
console.log(res);
uni.showToast({
icon: 'success',
title: '校验通过'
})
}).catch(errors => {
uni.showToast({
icon: 'error',
title: '校验失败'
})
})
// this.$emit('saveOrUpdate', this.addressDetail)
}
}
}
</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>

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

@ -0,0 +1,501 @@
<template>
<view class="address">
<navbar title="地址管理" leftClick @leftClick="leftClick" />
<view v-if="addressList.length > 0" class="address-list">
<uv-radio-group v-model="selectAddress">
<view v-for="item in addressList" :key="item.id" class="address-item">
<view class="address-item-top">
<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.defaultId == '1'" class="is-default">默认</text>
</view>
<view class="address-detail">
{{ item.address + " " + item.addressDetail }}
</view>
</view>
</view>
<view class="controls">
<view class="default-checkbox">
<uv-radio @click="addDefault(item)"
:name="item.id"
label-disabled
size="30rpx"
icon-size="30rpx">
默认地址
</uv-radio>
</view>
<view class="edit-btn">
<uv-icon name="edit-pen"></uv-icon>
<!-- <image src="@/static/address/edit-icon.png" mode="aspectFill"></image> -->
<text @click="getAddressDetail(item.id)" class="control-title">编辑</text>
</view>
<view class="del-btn">
<uv-icon name="trash"></uv-icon>
<!-- <image src="@/static/address/delete-icon.png" mode="aspectFill"></image> -->
<text class="control-title" @click="deleteAddress(item.id)">删除</text>
</view>
</view>
</view>
</uv-radio-group>
</view>
<view
style="padding: 100rpx 0;"
v-else>
<uv-empty
mode="history"
textSize="28rpx"
iconSize="100rpx"/>
</view>
<uv-popup
round="40rpx"
ref="addressPopup"
:customStyle="{ height: 'auto' , width : '100%' , padding : '20rpx'}">
<redactAddress :addressDetail="addressDetail" @saveOrUpdate="saveOrUpdate" :title="title"
@clickAddressIcon="selectAddr"></redactAddress>
</uv-popup>
<view class="add-btn">
<view @click="addBtn" class="btn">
新增地址
</view>
</view>
</view>
</template>
<script>
import redactAddress from '../components/address/redactAddress.vue'
import Position from '@/utils/position.js'
export default {
components: {
redactAddress
},
data() {
return {
selectAddress: 0, //
queryParams: {
pageNo: 1,
pageSize: 10
},
addressList: [
{
id : 1,
name : 'xx',
phone : '1305xxxx802',
address : '广东省广州市越秀区',
addressDetail : '城南故事C3栋2802',
},
{
id : 2,
name : 'xx',
phone : '1305xxxx802',
address : '广东省广州市越秀区',
addressDetail : '城南故事C3栋2802',
},
{
id : 3,
name : 'xx',
phone : '1305xxxx802',
address : '广东省广州市越秀区',
addressDetail : '城南故事C3栋2802',
},
],
addressDetail: {},
title: '新增地址'
}
},
onShow() {
// if (this.$route.query.current == 'payOrder') {
// this.$refs.addressPopup.open('bottom')
// }
// this.getAddressList()
},
methods: {
//list
onLoad() {
this.queryParams.pageSize += 10
this.getAddressList()
},
//
getAddressList() {
this.$api('getAddressList', this.queryParams, res => {
if (res.code == 200) {
this.addressList = res.result.records || [];
this.addressList.forEach(n => { //
if (n.defaultId == '1') {
this.selectAddress = n.id
}
})
if (this.queryParams.pageSize > res.result.total) {
this.finished = true
}
}
this.loading = false
})
},
//
getAddressDetail(id) {
this.title = '修改地址'
this.$api('getAddressDetail', {
id
}, res => {
if (res.code == 200) {
this.addressDetail = res.result;
this.$refs.addressPopup.open('bottom')
}
})
},
//
leftClick() {
uni.navigateBack(-1)
},
//
saveOrUpdate() {
let isOk = this.parameterVerification()
if (isOk && !isOk.auth) {
return showNotify({
type: 'warning',
message: isOk.title,
'z-index': 10000
});
}
let data = {
name: this.addressDetail.name,
phone: this.addressDetail.phone,
address: this.addressDetail.address,
addressDetail: this.addressDetail.addressDetail,
defaultId: this.addressDetail.defaultId || '0',
latitude: this.addressDetail.latitude,
longitude: this.addressDetail.longitude
}
if (this.addressDetail.id) {
data.id = this.addressDetail.id
}
this.$api('addOrUpdateAddress', data, res => {
if (res.code == 200) {
this.$refs.addressPopup.close()
this.getAddressList()
uni.showToast({
title: '操作成功',
icon: 'none'
})
if (this.$route.query.current == 'payOrder') { //
uni.navigateTo({
url: `/pages/order/payOrder?orderId=${this.$route.query.orderId}`
})
}
}
})
},
//
addDefault(item) {
this.selectAddress = item.id
this.$api('addOrUpdateAddress', {
id: item.id,
defaultId: '1',
}, 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('deleteAddress', {
id
}, res => {
if (res.code == 200) {
uni.showToast({
title: '删除成功',
icon: 'none'
})
self.getAddressList()
}
})
}
}
})
},
//
addBtn() {
this.title = '新增地址'
this.addressDetail = { //
name: '',
phone: '',
address: '',
addressDetail: '',
defaultId: '',
latitude: '',
longitude: ''
}
this.$refs.addressPopup.open('bottom')
},
//
parameterVerification() {
let {
name,
phone,
address,
addressDetail
} = this.addressDetail
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>
.address {
width: 750rpx;
margin: 0rpx auto;
background: #F5F5F5;
box-sizing: border-box;
min-height: 100vh;
.address-list {
padding: 40rpx 20rpx 120rpx 20rpx;
.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;
}
}
}
}
.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>

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

@ -0,0 +1,109 @@
<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>

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

@ -0,0 +1,88 @@
<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>

+ 84
- 80
pages_order/order/orderDetail.vue View File

@ -9,7 +9,32 @@
<!-- 水洗店 -->
<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>
<!-- 酒店和水洗店 -->
@ -195,6 +220,13 @@
},
data() {
return {
stepsCurrent : 0,
steps : [
'接单',
'检查',
'开始清洗',
'服务完成',
],
msgShop : {
money : 99.99,
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
@ -225,96 +257,68 @@
background: linear-gradient(#4899a6, #6fc6ad, #6fc6ad);
padding-bottom: 10px;
}
.box {
padding: 20px;
.active-icon {
width: 12px;
height: 12px;
background-color: #fff;
border-radius: 6px;
transform: translate(-25%, 0);
}
.inactive-icon {
width: 8px;
height: 8px;
background-color: #fff;
border-radius: 4px;
}
.stepText {
font-size: 20rpx !important;
}
.stepText.color {
color: #eee;
}
.inactive-icon.tip {
width: 6px;
height: 6px;
background-color: #fff;
border-radius: 3px;
}
.stepText.tip {
background-color: #b5d7d3;
padding: 3px 5px;
position: relative;
top: 50px;
border-radius: 5px;
color: #4899a6;
.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;
font-size: 10px;
}
.stepText.tip>view {
position: absolute;
top: -13px;
left: 50%;
transform: translate(-50%, 0);
border-top: 7px solid transparent;
border-bottom: 7px solid #b5d7d3;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
justify-content: center;
align-items: center;
font-size: 40rpx;
image{
width: 100rpx;
height: 100rpx;
margin-right: 20rpx;
}
}
.stepText.tip>view.act {
left: 50%;
.tips{
font-size: 26rpx;
color: #FD5100;
margin-top: 10rpx;
}
.title {
.btns{
margin-top: 50rpx;
display: flex;
justify-content: center;
align-items: center;
.icon {
width: 25px;
height: 25px;
background-color: #fff;
border-radius: 15px;
view{
margin: 0 20rpx;
display: flex;
justify-content: center;
align-items: center;
}
.text {
color: #fff;
padding-left: 5px;
background-color: $uni-color;
padding: 15rpx 40rpx;
border-radius: 40rpx;
}
.btn2{
background-color: #FFFFFF;
border: 1px solid #A7A7A7;
color: #A7A7A7;
}
}
.tips {
display: flex;
justify-content: center;
align-items: center;
color: #eee;
padding: 10px;
font-size: 22rpx;
padding-bottom: 20px;
}
.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;


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/order/icon.png View File

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

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/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

+ 3
- 2
store/store.js View File

@ -9,11 +9,12 @@ import api from '@/api/api.js'
const store = new Vuex.Store({
state: {
configList: [], //配置列表
shop : true
},
getters: {
// 角色 true为水洗店 false为酒店
userShop(){
return true
userShop(state){
return state.shop
}
},
mutations: {


+ 9
- 3
utils/utils.js View File

@ -110,7 +110,6 @@ export function deepMergeObject(a, b){
function params(url){
if(typeof url == 'object'){
data.url = '/pages' + data.url
return url
}
@ -118,7 +117,9 @@ function params(url){
url
}
data.url = '/pages' + data.url
if(!data.url.includes('/pages')){
data.url = '/pages' + data.url
}
return data
}
@ -132,6 +133,10 @@ export function navigateBack(num = -1){
uni.navigateBack(num)
}
export function redirectTo(...args){
uni.redirectTo(params(...args))
}
export default {
toArray,
generateUUID,
@ -142,5 +147,6 @@ export default {
getHrefParams,
deepMergeObject,
navigateTo,
navigateBack
navigateBack,
redirectTo,
}

Loading…
Cancel
Save