Browse Source

上传

master
前端-胡立永 9 months ago
parent
commit
44853ab6a5
23 changed files with 1696 additions and 395 deletions
  1. +1
    -0
      App.vue
  2. +20
    -0
      api/api.js
  3. +70
    -0
      mixins/list.js
  4. +98
    -0
      mixins/order.js
  5. +16
    -4
      pages.json
  6. +21
    -20
      pages/index/category.vue
  7. +98
    -43
      pages/index/center.vue
  8. +22
    -52
      pages/index/index.vue
  9. +103
    -36
      pages/index/order.vue
  10. +95
    -145
      pages_order/auth/loginAndRegisterAndForgetPassword.vue
  11. +8
    -7
      pages_order/auth/wxLogin.vue
  12. +40
    -3
      pages_order/components/commodity/commoditySelect.vue
  13. +6
    -6
      pages_order/components/product/submitUnitSelect.vue
  14. +220
    -3
      pages_order/mine/lease.vue
  15. +0
    -1
      pages_order/mine/purse.vue
  16. +22
    -21
      pages_order/mine/runningWater.vue
  17. +19
    -0
      pages_order/order/applyLaundryStore.vue
  18. +448
    -0
      pages_order/order/createWash.vue
  19. +129
    -0
      pages_order/order/damageReport.vue
  20. +97
    -44
      pages_order/order/orderDetail.vue
  21. +87
    -8
      pages_order/order/refundsOrExchange.vue
  22. BIN
      pages_order/static/help/uploading.png
  23. +76
    -2
      store/store.js

+ 1
- 0
App.vue View File

@ -5,6 +5,7 @@
onShow: function() { onShow: function() {
// this.$store.commit('initConfig') // this.$store.commit('initConfig')
this.$store.commit('getPosition') this.$store.commit('getPosition')
this.$store.commit('categoryList')
if(uni.getStorageSync('token')){ if(uni.getStorageSync('token')){
this.$store.commit('getUserInfo') this.$store.commit('getUserInfo')
} }


+ 20
- 0
api/api.js View File

@ -265,6 +265,26 @@ const config = {
method: 'POST', method: 'POST',
auth: true, auth: true,
}, },
// 水洗店账号绑定微信
bindWx: {
url: '/shop/bind/wx',
method: 'POST',
auth: true,
},
// 上传自己的桌布
tablecloth: {
url: '/order/upload/tablecloth',
method: 'POST',
auth: true,
},
// 水洗店确认接单
orderConfirmAccept: {
url: '/order/confirm/accept',
method: 'POST',
auth: true,
},
} }


+ 70
- 0
mixins/list.js View File

@ -0,0 +1,70 @@
function query(self, queryParams){
// return (self.beforeGetData && self.beforeGetData()) ||
// queryParams || 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: {
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){
this.getDataThen && this.getDataThen(res.result.records, res.result.total, res.result)
success(res.result)
this[this.mixinsListKey || 'list'] = res.result.records
this.total = res.result.total
}
})
})
},
loadMoreData(){
console.log('loadMoreData----', this.queryParams.pageSize < this.total);
if(this.queryParams.pageSize < this.total){
this.queryParams.pageSize += 10
this.getData()
}
},
}
}

+ 98
- 0
mixins/order.js View File

@ -0,0 +1,98 @@
export default {
methods: {
// 酒店支付订单
payOrder(id){
let self = this
this.$api('orderPay', {
id
}, res => {
if (res.code == 200) {
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) {
self.getData()
},
fail: function(err) {
console.log('支付失败', err);
// self.$refs.confirmationPopup.close()
uni.showToast({
icon: 'none',
title: "支付失败"
})
}
});
}
})
},
// 确认收货
confirmReceiveGoods(item) {
let self = this
uni.showModal({
title: '您收到货了吗?',
success(res) {
if (res.confirm) {
self.$api('orderConfirm', {
id: item.id
}, res => {
if (res.code == 200) {
self.getData()
}
})
}
}
})
},
// 水洗店确认接单
orderConfirmAccept(item){
let self = this
this.$api('orderConfirmAccept', {
id: item.id
}, res => {
if (res.code == 200) {
uni.showToast({
title: '接单成功',
icon: 'none'
})
self.getData()
}
})
},
// 水洗店确认破损0无破损,1破损
orderConfirmedDamage(item, flag){
let self = this
this.$api('orderConfirmAccept', {
id: item.id,
flag,
}, res => {
if (res.code == 200) {
uni.showToast({
title: '上报成功',
icon: 'none'
})
self.getData()
}
})
},
// 水洗店完成水洗
orderFinishedWashing(item){
let self = this
self.$api('orderConfirm', {
id: item.id
}, res => {
if (res.code == 200) {
self.getData()
}
})
},
}
}

+ 16
- 4
pages.json View File

@ -9,13 +9,15 @@
{ {
"path": "pages/index/order", "path": "pages/index/order",
"style": { "style": {
"navigationBarTitleText": ""
"navigationBarTitleText": "",
"enablePullDownRefresh" : true
} }
}, },
{ {
"path": "pages/index/category", "path": "pages/index/category",
"style": { "style": {
"navigationBarTitleText": ""
"navigationBarTitleText": "",
"enablePullDownRefresh" : true
} }
}, },
{ {
@ -39,8 +41,12 @@
}, },
"subPackages": [{ "subPackages": [{
"root": "pages_order", "root": "pages_order",
"pages": [{
"path": "order/orderDetail"
"pages": [
{
"path": "order/orderDetail",
"style": {
"enablePullDownRefresh" : true
}
}, },
{ {
"path": "mine/purse" "path": "mine/purse"
@ -71,6 +77,12 @@
}, },
{ {
"path": "order/applyLaundryStore" "path": "order/applyLaundryStore"
},
{
"path": "order/createWash"
},
{
"path": "order/damageReport"
} }
] ]
}], }],


+ 21
- 20
pages/index/category.vue View File

@ -35,14 +35,14 @@
<script> <script>
import tabber from '@/components/base/tabbar.vue' import tabber from '@/components/base/tabbar.vue'
import { mapState } from 'vuex'
export default { export default {
components: { components: {
tabber, tabber,
}, },
data() { data() {
return { return {
category: [],
// category: [],
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
@ -58,18 +58,19 @@
computed: { computed: {
productList(){ productList(){
return this.category.length ? this.category[this.categoryIndex].hotelGoodsList || [] : [] return this.category.length ? this.category[this.categoryIndex].hotelGoodsList || [] : []
}
},
...mapState(['category']),
}, },
onShow() { onShow() {
this.categoryList()
// this.categoryList()
}, },
// //
onReachBottom() {
if(this.queryParams.pageSize < this.list.total){
this.queryParams.pageSize += 10
this.getGoodsPage()
}
},
// onReachBottom() {
// if(this.queryParams.pageSize < this.list.total){
// this.queryParams.pageSize += 10
// this.getGoodsPage()
// }
// },
onReady() { onReady() {
}, },
@ -82,16 +83,16 @@
} }
}) })
}, },
getGoodsPage(){
this.$api('goodsPage', {
...this.queryParams,
categoryId : this.category[this.categoryIndex].id
}, res => {
if(res.code == 200){
this.list = res.result
}
})
},
// getGoodsPage(){
// this.$api('goodsPage', {
// ...this.queryParams,
// categoryId : this.category[this.categoryIndex].id
// }, res => {
// if(res.code == 200){
// this.list = res.result
// }
// })
// },
change(index) { change(index) {
this.categoryIndex = index; this.categoryIndex = index;
// this.queryParams.pageSize = 10 // this.queryParams.pageSize = 10


+ 98
- 43
pages/index/center.vue View File

@ -9,7 +9,7 @@
</view> </view>
<view class="info"> <view class="info">
<view class="name"> <view class="name">
{{ userInfo.nickName || '微信用户' }}
{{ userInfo.nickName || '用户昵称' }}
</view> </view>
<!-- 营业时间写这个view里面 --> <!-- 营业时间写这个view里面 -->
@ -30,14 +30,33 @@
<!-- <view class="headBtn" @click="headBtn"> <!-- <view class="headBtn" @click="headBtn">
角色切换 角色切换
</view> --> </view> -->
<view class="setting">
<!-- <view class="setting">
<uv-icon name="setting" size="40rpx"></uv-icon> <uv-icon name="setting" size="40rpx"></uv-icon>
</view>
</view> -->
</view> </view>
<!-- 水洗店 --> <!-- 水洗店 -->
<view class="userShop" v-if="userShop"> <view class="userShop" v-if="userShop">
<userShopCommission /> <userShopCommission />
<view class="line grid">
<view class="title">
常用功能
</view>
<uv-grid :col="4" :border="false">
<uv-grid-item @click="bindWx"
v-if="!userInfo.appOpenid">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">绑定微信</text>
</uv-grid-item>
<uv-grid-item @click="logout">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">退出登录</text>
</uv-grid-item>
</uv-grid>
</view>
<view class="userList"> <view class="userList">
<view class="title"> <view class="title">
我的用户 我的用户
@ -114,7 +133,7 @@
<uv-grid-item @click="$utils.navigateTo('/pages_order/mine/lease')"> <uv-grid-item @click="$utils.navigateTo('/pages_order/mine/lease')">
<image class="image" src="/static/image/center/6.png" mode=""></image> <image class="image" src="/static/image/center/6.png" mode=""></image>
<text class="grid-text">我的租赁</text>
<text class="grid-text">我的物品</text>
</uv-grid-item> </uv-grid-item>
<uv-grid-item @click="$utils.redirectTo('/index/cart')"> <uv-grid-item @click="$utils.redirectTo('/index/cart')">
@ -126,6 +145,11 @@
<image class="image" src="/static/image/center/7.png" mode=""></image> <image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">申请成为水洗店</text> <text class="grid-text">申请成为水洗店</text>
</uv-grid-item> </uv-grid-item>
<uv-grid-item @click="logout">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">退出登录</text>
</uv-grid-item>
</uv-grid> </uv-grid>
</view> </view>
</view> </view>
@ -210,13 +234,44 @@
if (res.code == 200) { if (res.code == 200) {
this.userList = res.result.records this.userList = res.result.records
this.total = res.result.total this.total = res.result.total
console.log("===getUserPage==");
} }
}) })
}, },
// //
setJobTime() { setJobTime() {
},
logout(){
this.$store.commit('logout')
},
//
bindWx() {
// uni.showModal({
// title: '',
// success(r) {
// if(r.confirm){
// }
// }
// })
let self = this
uni.login({
success(res) {
if(res.errMsg != "login:ok"){
return
}
self.$api('bindWx', {
code : res.code,
}, res => {
if (res.code == 200) {
self.$store.commit('getUserInfo')
}
})
}
})
}, },
} }
} }
@ -334,52 +389,52 @@
} }
.user { .user {
.line {
}
.line {
display: flex;
background-color: #fff;
margin-top: 20rpx;
padding: 20rpx 0;
.item {
flex: 1;
display: flex; display: flex;
background-color: #fff;
margin-top: 20rpx;
justify-content: center;
align-items: center;
padding: 20rpx 0; 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;
&:nth-child(1) {
border-right: 1px solid #00000013;
} }
.image { .image {
width: 70rpx;
width: 100rpx;
height: 70rpx; height: 70rpx;
margin-bottom: 10rpx;
}
text {
text-align: center;
width: 120rpx;
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> </style>

+ 22
- 52
pages/index/index.vue View File

@ -3,9 +3,9 @@
<navbar/> <navbar/>
<view class="search">
<view class="search" v-if="!userShop">
<view @click="showSelectArea" class="left-area">
<!-- <view @click="showSelectArea" class="left-area">
<image src="@/static/image/home/address-icon.png"></image> <image src="@/static/image/home/address-icon.png"></image>
<view class="area">{{ area }}</view> <view class="area">{{ area }}</view>
<image src="@/static/image/home/arrow-icon.png" mode="aspectFit"></image> <image src="@/static/image/home/arrow-icon.png" mode="aspectFit"></image>
@ -18,13 +18,20 @@
src="@/static/image/home/search-icon.png"></image> src="@/static/image/home/search-icon.png"></image>
<input v-model="queryParams.title" <input v-model="queryParams.title"
placeholder="桌布租赁" /> placeholder="桌布租赁" />
</view>
</view> -->
<!-- <view class="right-area"> <!-- <view class="right-area">
<view @click="searchAddress" class="search-button"> <view @click="searchAddress" class="search-button">
搜索 搜索
</view> </view>
</view> --> </view> -->
<uv-search
bgColor="#fff"
@search="getGoodsPage"
@custom="getGoodsPage"
placeholder="请输入搜索关键字..."
v-model="queryParams.name"></uv-search>
</view> </view>
@ -93,7 +100,7 @@
</view> </view>
<view class="btns"> <view class="btns">
<view class="btn" <view class="btn"
@click="">
@click="$utils.navigateTo('/pages_order/order/createWash')">
我要水洗 我要水洗
</view> </view>
</view> </view>
@ -121,7 +128,7 @@
import Position from '@/utils/position.js' import Position from '@/utils/position.js'
import tabber from '@/components/base/tabbar.vue' import tabber from '@/components/base/tabbar.vue'
import productList from '@/components/user/productList.vue' import productList from '@/components/user/productList.vue'
import { mapGetters } from 'vuex'
import { mapGetters, mapState } from 'vuex'
// import selectArea from '../../components/selectArea.vue'; // import selectArea from '../../components/selectArea.vue';
export default { export default {
components : { components : {
@ -132,7 +139,7 @@
data() { data() {
return { return {
area: '长沙', area: '长沙',
notice : '长沙市刘师傅在服务过程中客户投诉“服务过程中有不文明的行为”.....',
notice : '',
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
@ -143,7 +150,6 @@
records : [], records : [],
total : 0, total : 0,
}, },
statistics : {},
statisticsKey : [ statisticsKey : [
{ {
key : 'user', key : 'user',
@ -162,62 +168,37 @@
title : '破损换货', title : '破损换货',
}, },
], ],
bindShop : {},
} }
}, },
onShow() { onShow() {
// this.getGoodsPage()
this.noticeList() this.noticeList()
this.banner() this.banner()
if(this.userShop){
//
this.getLaundryStoreHomeData()
}else{
//
this.getBindShop()
//
this.getGoodsPage()
this.getGoodsPage()
if(uni.getStorageSync('token')){
// this.$store.commit('getUserInfo')
} }
}, },
// //
onPullDownRefresh(){ onPullDownRefresh(){
if(this.userShop){
this.getLaundryStoreHomeData()
}else{
this.getGoodsPage()
}
this.getGoodsPage()
this.noticeList() this.noticeList()
this.banner() this.banner()
if(uni.getStorageSync('token')){
this.$store.commit('getUserInfo')
}
}, },
// //
onReachBottom() { onReachBottom() {
if(this.queryParams.pageSize < this.productList.total){ if(this.queryParams.pageSize < this.productList.total){
this.queryParams.pageSize += 10 this.queryParams.pageSize += 10
if(this.userShop){
this.getLaundryStoreHomeData()
}else{
this.getGoodsPage()
}
this.getGoodsPage()
} }
}, },
computed : { computed : {
...mapGetters(['userShop']), ...mapGetters(['userShop']),
...mapState(['bindShop', 'statistics']),
}, },
methods: { methods: {
//
getBindShop(){
if(!uni.getStorageSync('token')){
return
}
this.$api('bindShop', res => {
if(res.code == 200){
this.bindShop = res.result
}
})
},
banner(){ banner(){
this.$api('bannerList', res => { this.$api('bannerList', res => {
if(res.code == 200){ if(res.code == 200){
@ -238,17 +219,6 @@
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
if(res.code == 200){ if(res.code == 200){
this.productList = res.result this.productList = res.result
console.log("===getGoodsPage==");
}
})
},
//
getLaundryStoreHomeData(){
this.$api('laundryStoreHomeData', this.queryParams, res => {
uni.stopPullDownRefresh()
if(res.code == 200){
this.statistics = res.result
console.log("===getUserPage==");
} }
}) })
}, },


+ 103
- 36
pages/index/order.vue View File

@ -53,12 +53,68 @@
</view> </view>
<view class="bottom">
<!-- 水洗店按钮 -->
<view class="bottom" v-if="userShop">
<view class="pay">
<view
v-if="item.washPay && item.type == 1">
水洗费用{{ item.washPay }}
</view>
</view>
<!-- 待接单 -->
<view
v-if="[4, 18, 19].includes(item.status)"
@click.stop="orderConfirmAccept(item)" class="b2">
确认接单
</view>
<!-- 待收货 -->
<template v-if="item.status == 2">
<view @click.stop="confirmReceiveGoods(item)" class="b2">
确认收货
</view>
<view @click.stop="" class="b1">
查看物流
</view>
</template>
<!-- 待检查 -->
<template v-if="item.status == 5">
<view @click.stop="orderConfirmedDamage(item, 1)" class="b2"
>
确认无破损
</view>
<!-- <view @click.stop="$utils.navigateTo
(`/pages_order/order/damageReport?id=${item.id}`)" class="b1"
>
破损上报
</view> -->
<view @click.stop="orderConfirmedDamage(item, 2)" class="b1"
>
破损上报
</view>
</template>
<view
v-if="[6].includes(item.status)"
@click.stop="orderFinishedWashing(item)" class="b2">
水洗完成
</view>
</view>
<!-- 酒店按钮 -->
<view class="bottom"
v-else>
<view class="pay"> <view class="pay">
<!-- 水洗店不展示 -->
<!-- <view class="price" <!-- <view class="price"
v-if="!userShop && item.type != 0 && item.type != 1">
v-if="item.type != 0 && item.type != 1 && item.orderPay">
总金额<text class="num">{{ item.orderPay }}</text> 总金额<text class="num">{{ item.orderPay }}</text>
</view> --> </view> -->
<view <view
@ -66,35 +122,29 @@
水洗费用{{ item.washPay }} 水洗费用{{ item.washPay }}
</view> </view>
<!-- 水洗店不展示 -->
<view <view
v-if="!userShop && item.rentPay && item.type == 1">
v-if="item.rentPay">
租赁费用{{ item.rentPay }} 租赁费用{{ item.rentPay }}
</view> </view>
</view> </view>
<view class="">
<!-- 水洗店不展示 -->
<view class="price"
v-if="!userShop && item.type == 1 && item.orderPay">
总金额<text class="num">{{ item.orderPay }}</text>
<!-- 待支付 -->
<view @click.stop="payOrder(item.orderLogId)" class="b2"
v-if="[0, 3, 10].includes(item.status)">
{{ item.status == 10 ? '支付平台损失' : '立即付款' }}
</view>
<!-- 待收货 -->
<template v-if="item.status == 2">
<view @click.stop="confirmReceiveGoods(item)" class="b2">
确认收货
</view> </view>
<view class="b1">
<view @click.stop="" class="b1">
查看物流 查看物流
</view> </view>
</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> -->
</template>
</view> </view>
</view> </view>
@ -112,12 +162,24 @@
</template> </template>
<script> <script>
//
// 0 1 2
// 3 4 5
// 6
// 7 8 9
// 10 18
// 退11 12 13
// 14退 19
// 15
import tabber from '@/components/base/tabbar.vue' import tabber from '@/components/base/tabbar.vue'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import mixinOrder from '@/mixins/order.js'
export default { export default {
components : { components : {
tabber, tabber,
}, },
mixins : [mixinOrder],
computed : { computed : {
...mapGetters(['userShop']), ...mapGetters(['userShop']),
}, },
@ -151,7 +213,7 @@
// phone : '150*****091', // phone : '150*****091',
// unit : '120*40*75', // unit : '120*40*75',
// image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg', // image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
// state_dictText : '',
// status_dictText : '',
// } // }
// ], // // ], //
orderList : { orderList : {
@ -163,20 +225,23 @@
} }
}, },
onLoad(args) { onLoad(args) {
this.uid = args.uid
this.uid = args.uid || 0
}, },
onShow() { onShow() {
this.orderPage()
this.getData()
},
onPullDownRefresh() {
this.getData()
}, },
// //
onReachBottom() { onReachBottom() {
if(this.queryParams.pageSize < this.orderList.total){ if(this.queryParams.pageSize < this.orderList.total){
this.queryParams.pageSize += 10 this.queryParams.pageSize += 10
this.orderPage()
this.getData()
} }
}, },
methods: { methods: {
orderPage(){
getData(){
let queryParams = { let queryParams = {
...this.queryParams, ...this.queryParams,
} }
@ -189,6 +254,7 @@
queryParams.uid = this.uid queryParams.uid = this.uid
} }
this.$api('orderPage', queryParams, res => { this.$api('orderPage', queryParams, res => {
uni.stopPullDownRefresh()
if(res.code == 200){ if(res.code == 200){
this.orderList = res.result this.orderList = res.result
} }
@ -202,7 +268,7 @@
this.type = index - 1; this.type = index - 1;
} }
this.queryParams.pageSize = 10 this.queryParams.pageSize = 10
this.orderPage()
this.getData()
}, },
// //
toOrderDetail(id) { toOrderDetail(id) {
@ -210,9 +276,6 @@
url: '/pages_order/order/orderDetail?id=' + id url: '/pages_order/order/orderDetail?id=' + id
}) })
}, },
getOrderList(){
},
} }
} }
</script> </script>
@ -271,8 +334,12 @@
.bottom { .bottom {
display: flex; display: flex;
justify-content: space-between;
justify-content: flex-end;
font-size: 25rpx; font-size: 25rpx;
.pay{
margin: 12rpx;
margin-right: auto;
}
.price { .price {
font-weight: 900; font-weight: 900;
text { text {
@ -290,7 +357,7 @@
} }
.b2 { .b2 {
background: linear-gradient(178deg, #4FD3BC, #60C285);
background: $uni-color;
color: #fff; color: #fff;
} }


+ 95
- 145
pages_order/auth/loginAndRegisterAndForgetPassword.vue View File

@ -6,19 +6,19 @@
<!-- 登录和注册 --> <!-- 登录和注册 -->
<view class="loginRegister" v-if='titleIndex!=2'> <view class="loginRegister" v-if='titleIndex!=2'>
<!-- 标题 --> <!-- 标题 -->
<view class="title">{{title}}</view>
<view class="title">{{titleList[titleIndex]}}</view>
<!-- 头像 --> <!-- 头像 -->
<view class="userIamge"> <view class="userIamge">
<view> <view>
<img src="../../static/image/center/11.svg" alt="" style="width: 100%;height: 100%;">
<img src="/static/image/center/11.svg" alt="" style="width: 100%;height: 100%;">
</view> </view>
</view> </view>
<!-- 用户名&密码&隐私条款 --> <!-- 用户名&密码&隐私条款 -->
<view class="form"> <view class="form">
<view> <view>
<uv-input v-model="form.userName" placeholder="请输入手机号/用户/邮箱" border="surround" shape='circle'
<uv-input v-model="form.account" placeholder="请输入账号/手机号" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input> clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view> </view>
<view> <view>
@ -26,12 +26,18 @@
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input> clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view> </view>
<view> <view>
<uv-checkbox-group v-model="form.checkboxValue" shape="circle">
<uv-checkbox-group v-model="checkboxValue" shape="circle">
<view class="content"> <view class="content">
<view style="display: flex;">
<uv-checkbox size="30rpx" :name="1"></uv-checkbox>
请你阅读并同意我们的<span style="color: #fd5100">隐私条款</span><span
style="color: #fd5100">服务协议</span>
<view style="display: flex;flex-wrap: wrap;">
<uv-checkbox
size="40rpx"
icon-size="30rpx"
activeColor="#FD5100"
: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>
</view> </view>
</uv-checkbox-group> </uv-checkbox-group>
@ -39,29 +45,12 @@
</view> </view>
<!-- 按钮 -->
<view class="btn">
<button class='a'>{{btnText}}</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> </view>
<!-- 忘记密码 --> <!-- 忘记密码 -->
<view class='forgetPassword' v-if='titleIndex==2'> <view class='forgetPassword' v-if='titleIndex==2'>
<!-- 标题 --> <!-- 标题 -->
<view class="title">{{title}}</view>
<view class="title">{{titleList[titleIndex]}}</view>
<!-- 表单 --> <!-- 表单 -->
<view class="form1"> <view class="form1">
@ -94,50 +83,52 @@
</view> </view>
</view> </view>
<!-- 按钮 -->
<view class="btn">
<button class='a'>{{btnText}}</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> </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> </view>
<configPopup ref="popup"></configPopup>
</view> </view>
</template> </template>
<script> <script>
import bottomBtn from "../../components/bottom/bottomBtn.vue"
import configPopup from '@/components/config/configPopup.vue';
export default { export default {
components: { components: {
bottomBtn
configPopup
}, },
onLoad(option) { onLoad(option) {
this.titleIndex = option.index
this.title = option.index == 0 ? '注册' : option.index == 1 ? '登录' : '忘记密码'
this.btnText = option.index == 0 ? '注册' : option.index == 1 ? '登录' : '重置密码'
this.titleIndex = option.index || 1
}, },
data() { data() {
return { return {
titleIndex: 0, titleIndex: 0,
titleList: ['注册账号', '账号密码登录', '重置密码'],
checkboxValue: ['apple'],
titleList: ['注册', '登录', '重置密码'],
checkboxValue: [],
form: { form: {
userName: '',
password: '',
checkboxValue: 'apple',
account: '13135294009',
password: 'lzx123456',
}, },
form1: { form1: {
userName: '', userName: '',
@ -145,30 +136,31 @@
password1: '', password1: '',
password2: '', password2: '',
}, },
bottomBtnStyle: {
color: '#FFF',
backgroundColor: '#fd5100',
fontSize: '34rpx',
width: '400rpx',
height: '80rpx',
borderRadius: '100rpx',
bottom: '42%'
},
title: "", //
btnText: "", //,
tips: '获取验证码', tips: '获取验证码',
seconds: 60, seconds: 60,
} }
}, },
methods: { methods: {
submit(){
if(!this.checkboxValue.length){
return uni.showToast({
title: '请先同意隐私协议',
icon:'none'
})
}
if(this.$utils.verificationAll(this.form, {
account: '请输入账号',
password: '请输入密码',
})){
return
}
this.$store.commit('accountLogin', this.form)
},
// //
changePage(index) { changePage(index) {
this.titleIndex = index this.titleIndex = index
this.title = index == 0 ? '注册' : index == 1 ? '登录' : '忘记密码'
this.btnText = index == 0 ? '注册' : index == 1 ? '登录' : '重置密码'
}, },
confirm() { confirm() {
@ -213,7 +205,7 @@
.refundsOrExchange { .refundsOrExchange {
background-color: #FFF; background-color: #FFF;
height: 100vh; height: 100vh;
.frame { .frame {
background-color: #FFF; background-color: #FFF;
@ -246,8 +238,7 @@
} }
.form { .form {
height: 12vh;
line-height: 50rpx;
>view:nth-of-type(1) { >view:nth-of-type(1) {
padding: 20rpx 100rpx; padding: 20rpx 100rpx;
} }
@ -262,45 +253,43 @@
font-size: 22rpx font-size: 22rpx
} }
} }
.btn {
// height: 5vh;
}
.btn {
// height: 5vh;
display: flex;
justify-content: center;
margin: 90rpx 0 0 0;
.a {
display: flex; display: flex;
justify-content: center; justify-content: center;
margin: 50rpx 0 0 0;
.a {
display: flex;
justify-content: center;
align-items: center;
width: 70%;
height: 80rpx;
color: #FFF;
background-color: #fd5100;
border: 1px solid red;
border-radius: 100rpx;
font-size: 30rpx;
}
align-items: center;
width: 70%;
height: 80rpx;
color: #FFF;
background-color: $uni-color;
border: 1px solid red;
border-radius: 100rpx;
font-size: 30rpx;
} }
.bottomTab {
display: flex;
justify-content: space-between;
height: 10vh;
padding: 0 80rpx;
.tabbarItemActive {
color: #fd5100;
}
.tabbarItemNoActive {
color: #9c9fa4;
}
}
.bottomTab {
display: flex;
justify-content: space-between;
height: 10vh;
padding: 0 80rpx;
margin-top: 30rpx;
.tabbarItemActive {
color: $uni-color;
}
.tabbarItemNoActive {
color: #9c9fa4;
} }
} }
.forgetPassword { .forgetPassword {
@ -354,45 +343,6 @@
} }
.btn {
// height: 5vh;
display: flex;
justify-content: center;
margin: 30rpx 0 0 0;
.a {
display: flex;
justify-content: center;
align-items: center;
width: 70%;
height: 80rpx;
color: #FFF;
background-color: #fd5100;
border: 1px solid red;
border-radius: 100rpx;
font-size: 30rpx;
}
}
.bottomTab {
display: flex;
justify-content: space-between;
margin: 50rpx 0 0 0;
padding: 0 80rpx;
.tabbarItemActive {
color: #fd5100;
}
.tabbarItemNoActive {
color: #9c9fa4;
}
}
} }
} }


+ 8
- 7
pages_order/auth/wxLogin.vue View File

@ -15,9 +15,10 @@
微信授权登录 微信授权登录
</view> </view>
</view> </view>
<!-- <view class="btn b2">
使用短信验证登录
</view> -->
<view class="btn b2"
@click="$utils.navigateTo('/pages_order/auth/loginAndRegisterAndForgetPassword')">
使用账号密码登录
</view>
@ -35,10 +36,10 @@
activeColor="#FD5100" activeColor="#FD5100"
:name="1" :name="1"
></uv-checkbox> ></uv-checkbox>
阅读并同意我们的<text @click="openConfigDetail('privacyAgreement')">服务协议与隐私条款</text>
阅读并同意我们的<text @click="openConfigDetail('getPrivacyPolicy')">服务协议与隐私条款</text>
</view> </view>
<view class=""> <view class="">
以及<text @click="openConfigDetail('userAgreement')">个人信息保护指引</text>
以及<text @click="openConfigDetail('getUserAgreement')">个人信息保护指引</text>
</view> </view>
</view> </view>
</uv-checkbox-group> </uv-checkbox-group>
@ -132,8 +133,8 @@
} }
} }
.b2{ .b2{
background-color: #3c69f122;
color: #3c69f1;
background-color: rgba($uni-color, 0.2);
color: $uni-color;
} }
.mt{ .mt{
margin-top: 200rpx; margin-top: 200rpx;


+ 40
- 3
pages_order/components/commodity/commoditySelect.vue View File

@ -4,14 +4,23 @@
<view v-for="(item, index) in commodityList" :key="index" class="address-item"> <view v-for="(item, index) in commodityList" :key="index" class="address-item">
<view class="itme1" @click="selectSp(item)"> <view class="itme1" @click="selectSp(item)">
<view class="left"> <view class="left">
<image :src="item.goodsPic" mode="aspectFill"/>
<image :src="item.goodsPic || 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg'" mode="aspectFill"/>
</view> </view>
<view class="center"> <view class="center">
<view>{{ item.goodsName }}</view>
<view>
{{ item.goodsName }}
<!-- <view class="leaseFlag" v-if="item.leaseFlag">
</view> -->
</view>
<view>规格:{{ item.sku }}</view> <view>规格:{{ item.sku }}</view>
<view>下单时间:{{ $dayjs(item.createTime).format('YYYY-MM-DD') }}</view> <view>下单时间:{{ $dayjs(item.createTime).format('YYYY-MM-DD') }}</view>
</view> </view>
<view class="right">×{{item.num}}</view> <view class="right">×{{item.num}}</view>
<view class="leaseFlag" v-if="item.leaseFlag">
</view>
</view> </view>
<uv-line></uv-line> <uv-line></uv-line>
</view> </view>
@ -27,6 +36,12 @@
props: { props: {
height: { height: {
default: 'calc(90vh - 180rpx)' default: 'calc(90vh - 180rpx)'
},
leaseFlag : {
},
status : {
} }
}, },
data() { data() {
@ -47,7 +62,14 @@
// //
getList() { getList() {
return new Promise((success, fail) => { return new Promise((success, fail) => {
this.$api('getLeasePage', this.queryParams, res => {
let queryParams = {...this.queryParams}
if(this.leaseFlag){
queryParams.leaseFlag = this.leaseFlag
}
if(this.status){
queryParams.status = this.status
}
this.$api('getLeasePage', queryParams, res => {
if (res.code == 200) { if (res.code == 200) {
this.commodityList = res.result.records || []; this.commodityList = res.result.records || [];
this.total = res.result.total || 0; this.total = res.result.total || 0;
@ -73,6 +95,7 @@
display: flex; display: flex;
width: 100vw; width: 100vw;
background-color: #ffffff; background-color: #ffffff;
position: relative;
.left { .left {
padding: 20rpx; padding: 20rpx;
@ -123,5 +146,19 @@
color: #666666; color: #666666;
background-color: #ffffff; background-color: #ffffff;
} }
.leaseFlag{
position: absolute;
background-color: $uni-color;
left: 10rpx;
top: 10rpx;
color: #fff;
// display: flex;
// justify-content: center;
// align-items: center;
border-radius: 50%;
padding: 12rpx;
font-size: 24rpx;
}
} }
</style> </style>

+ 6
- 6
pages_order/components/product/submitUnitSelect.vue View File

@ -174,12 +174,12 @@
] ]
// if (this.$utils.verificationAll(data, {
// skuId: '',
// addressId: '',
// })) {
// return
// }
if (this.$utils.verificationAll(data[0], {
skuId: '请选择规格',
addressId: '请选择地址',
})) {
return
}
this.$api('orderCreate', {req:JSON.stringify(data)}, res => { this.$api('orderCreate', {req:JSON.stringify(data)}, res => {
if (res.code == 200) { if (res.code == 200) {


+ 220
- 3
pages_order/mine/lease.vue View File

@ -1,32 +1,249 @@
<template> <template>
<view class="page"> <view class="page">
<navbar title="我的租赁" leftClick @leftClick="$utils.navigateBack" />
<navbar title="我的物品" leftClick @leftClick="$utils.navigateBack" />
<!-- <view class="tabs">
<uv-tabs :list="tabs" :activeStyle="{color : '#FD5100', fontWeight : 600}" lineColor="#FD5100" lineHeight="8rpx"
lineWidth="50rpx" :scrollable="false" @click="clickTabs"></uv-tabs>
</view> -->
<commoditySelect ref="commoditySelect"/> <commoditySelect ref="commoditySelect"/>
<view class="btn fixed" @click="open">
<button class="a">添加物品</button>
</view>
<uv-popup ref="addPopup" :round="30">
<view class="form">
<view class="shopName">
<view>物品分类</view>
<view class="list">
<view :class="{act : form.categoryId == item.id}"
@click="form.categoryId = item.id"
:key="index"
v-for="(item, index) in category">
{{ item.name }}
</view>
</view>
</view>
<view class="shopName">
<view>物品照片</view>
<view>
<uv-upload :fileList="fileList" multiple :maxCount="1" 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 class="shopName">
<view>物品名称</view>
<view>
<input v-model="form.name" placeholder="请输入物品名称" clearable></input>
</view>
</view>
<view class="shopName">
<view>物品长度CM</view>
<view>
<input v-model="form.length" type="number" placeholder="请输入物品长度" clearable></input>
</view>
</view>
<view class="shopName">
<view>物品宽度CM</view>
<view>
<input v-model="form.wide" type="number" placeholder="请输入物品宽度" clearable></input>
</view>
</view>
<view class="shopName">
<view>物品数量</view>
<view>
<uv-number-box v-model="form.num" :min="1"></uv-number-box>
</view>
</view>
</view>
<view class="btn" @click="submit">
<button class="a">添加</button>
</view>
</uv-popup>
</view> </view>
</template> </template>
<script> <script>
import commoditySelect from "../components/commodity/commoditySelect.vue" import commoditySelect from "../components/commodity/commoditySelect.vue"
import { mapState } from 'vuex'
export default { export default {
components : { components : {
commoditySelect, commoditySelect,
}, },
data() { data() {
return { return {
tabs: [{
name: '选择租赁物品'
},
{
name: '选择我的物品'
},
],
form : {
categoryId : 0,
name : '',
num : 1,
length : '',
wide : '',
},
fileList: [],
} }
}, },
computed : {
...mapState(['category']),
},
onShow() { onShow() {
this.$refs.commoditySelect.getList() this.$refs.commoditySelect.getList()
}, },
methods: { methods: {
//tab
clickTabs({
index,
name
}) {
// this.type = index;
// this.queryParams.pageSize = 10
// this.checkboxValue = []
// this.mixinsListApi = ['orderPage', 'orderPage'][index]
},
submit(){
this.form.pic = this.fileList.map((item) => item.url).join(",")
if (this.$utils.verificationAll(this.form, {
pic : '请上传物品照片',
name : '请输入物品名称',
length : '请输入物品长度',
wide : '请输入物品宽度',
})) {
return
}
this.$api('tablecloth', this.form, res => {
if(res.code == 200){
this.$refs.commoditySelect.getList()
this.$refs.addPopup.close()
}
})
},
open(){
this.form = {
categoryId : 0,
name : '',
num : 1,
length : '',
wide : '',
}
if(this.category.length){
this.form.categoryId = this.category[0].id
}
this.$refs.addPopup.open('bottom')
},
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> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.page{ .page{
padding-bottom: 200rpx;
.tabs{
position: sticky;
top: calc(var(--status-bar-height) + 120rpx);
background-color: #fff;
// padding-top: 20rpx;
}
.fixed{
position: fixed;
bottom: 20rpx;
}
.btn {
display: flex;
justify-content: center;
width: 100%;
.a {
display: flex;
justify-content: center;
align-items: center;
width: 90%;
height: 100rpx;
color: #FFF;
background-color: $uni-color;
border: 1px solid red;
border-radius: 100rpx;
font-size: 30rpx;
}
}
.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;
background-color: #F3F3F3;
border: 1px solid #F3F3F3;
margin: 10rpx;
display: flex;
justify-content: center;
padding: 10rpx 20rpx;
}
}
.form{
padding: 20rpx 0;
.shopName {
display: flex;
align-items: center;
background-color: #FFF;
margin: 10rpx 0 0 0;
padding: 10rpx 20rpx;
>view:nth-of-type(1) {
width: 30%;
// font-weight: 700;
}
>view:nth-of-type(2) {
width: 70%;
// padding: 0 20rpx 0 0;
border-radius: 10rpx;
overflow: hidden;
input {
background-color: #f5f5f5;
// color: #a4a4a4;
font-size: 28rpx;
padding: 8rpx 8rpx 8rpx 15rpx;
}
}
}
}
} }
</style> </style>

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

@ -84,7 +84,6 @@
text-align: left; text-align: left;
color: #333333; color: #333333;
// line-height: 40px; // line-height: 40px;
padding-bottom: 160rpx;
.from-line { .from-line {
margin-top: 40rpx; margin-top: 40rpx;


+ 22
- 21
pages_order/mine/runningWater.vue View File

@ -5,7 +5,7 @@
<view class="tab-box"> <view class="tab-box">
<view class="tab-box1" v-if="agentFlow && agentFlow.total"> <view class="tab-box1" v-if="agentFlow && agentFlow.total">
<uv-cell center border :title="item.title" v-for="(item, index) in agentFlow.records" <uv-cell center border :title="item.title" v-for="(item, index) in agentFlow.records"
:value="x[item.type] + item.money" :label="item.createTime" />
:value="x[item.type] + item.balance" :label="item.createTime" />
</view> </view>
<view style="padding: 100rpx 0;" v-else> <view style="padding: 100rpx 0;" v-else>
<uv-empty mode="history" textSize="28rpx" iconSize="100rpx" /> <uv-empty mode="history" textSize="28rpx" iconSize="100rpx" />
@ -21,28 +21,29 @@
return { return {
title: ['余额记录', '提现记录', '佣金记录'], title: ['余额记录', '提现记录', '佣金记录'],
agentFlow: { agentFlow: {
total: 1,
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: "佣金提现",
},
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: ['+', '-', '-', '+'],
x: ['+', '-', '+', '+'],
status: 0, status: 0,
} }
}, },


+ 19
- 0
pages_order/order/applyLaundryStore.vue View File

@ -27,6 +27,12 @@
<input v-model="form.phone" type="number" placeholder="请输入联系方式" clearable></input> <input v-model="form.phone" type="number" placeholder="请输入联系方式" clearable></input>
</view> </view>
</view> </view>
<view class="shopName">
<view>设置密码</view>
<view>
<input v-model="form.password" type="password" placeholder="请输入密码" clearable></input>
</view>
</view>
<view class="currentRegion"> <view class="currentRegion">
<view>所在地区</view> <view>所在地区</view>
@ -78,6 +84,7 @@
address: '', address: '',
latitude: '', latitude: '',
longitude: '', longitude: '',
password : '',
}, },
bottomBtnStyle: { bottomBtnStyle: {
@ -102,6 +109,18 @@
// //
submitApplication() { submitApplication() {
if (this.$utils.verificationAll(this.form, {
userName: '请输入您的姓名',
name: '请输入店铺名称',
phone: '请输入联系方式',
currentRegion: '请选择所在地区',
address: '请输入详细地址',
password : '请设置密码',
})) {
return
}
this.form.address = this.form.currentRegion + this.form.address this.form.address = this.form.currentRegion + this.form.address
this.$api('applyShopHotel', this.form, res => { this.$api('applyShopHotel', this.form, res => {
if (res.code == 200) { if (res.code == 200) {


+ 448
- 0
pages_order/order/createWash.vue View File

@ -0,0 +1,448 @@
<template>
<view class="page">
<navbar title="我要水洗" leftClick @leftClick="$utils.navigateBack" />
<view class="tabs">
<uv-tabs :list="tabs" :activeStyle="{color : '#FD5100', fontWeight : 600}" lineColor="#FD5100" lineHeight="8rpx"
lineWidth="50rpx" :scrollable="false" @click="clickTabs"></uv-tabs>
</view>
<!-- 选择租赁物品 -->
<view class="box d">
<uv-checkbox-group shape="circle" v-model="checkboxValue"
>
<view v-for="(item, index) in list" :key="index" class="item">
<view class="checkbox">
<uv-checkbox :name="item.id" :disabled="item.status != 0 || !item.startTime && item.leaseFlag" activeColor="#FA5A0A" size="40rpx" icon-size="35rpx"></uv-checkbox>
</view>
<image class="image" :src="item.pic || 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg'"
mode=""></image>
<view class="info">
<view class="title">
<view>{{ item.goodsName }}</view>
<view>
<!-- <uv-number-box v-model="item.num" @change="e => valChange(item, e)"></uv-number-box> -->
数量{{ item.num }}
</view>
</view>
<view class="unit">
规格{{ item.sku }}
<!-- <uv-icon name="arrow-down"></uv-icon> -->
</view>
<view class="wan"
v-if="!item.startTime
&& item.leaseFlag
&& item.status == 0">
确认收货后方可水洗
</view>
<view class="wan" v-else-if="item.status != 0">
{{ statusText[item.status] }}
</view>
<view class="price" v-else>
<view class="" v-if="item.zujin">
租金
<text>{{ item.zujin }}</text>
</view>
<view class="" v-if="item.washPrice">
水洗费
<text>{{ item.washPrice }}</text>
</view>
</view>
</view>
</view>
</uv-checkbox-group>
</view>
<!-- 地址弹框 -->
<uv-popup ref="addressPopup" :round="30">
<addressList ref="addressList" height="60vh" @select="selectAddress" />
</uv-popup>
<!-- <view class="btn" @click="submit">
<button class="a">水洗下单<text v-if="price">{{price}}</text></button>
</view> -->
<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>
<text>{{ price }}</text>
</view>
</view>
<view class="text">
<!-- {{ checkboxValue.length }}已享受更低优惠 -->
含租金{{zujin}}水洗费{{washPrice}}
</view>
</view>
<view class="btn2" @click="goCleaning">结算</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
import addressList from '@/components/address/addressList.vue'
export default {
mixins : [mixinsList],
components: {
addressList,
},
data() {
return {
checkboxValue : [],
statusText : ['正常', '换货中', '退货中'],
tabs: [{
name: '选择租赁物品'
},
{
name: '选择我的物品'
},
],
type: 1,
mixinsListApi : 'getLeasePage',
addressTotal: 0,
address: {
name: '请选择联系人',
addressDetail: ''
},
}
},
computed : {
price(){
return this.washPrice + this.zujin
},
washPrice(){
if(this.checkboxValue.length == 0){
return 0
}
let price = 0
this.list.forEach(n => {
if(this.checkboxValue.includes(n.id)){
price += n.washPrice || 0
}
})
return price
},
zujin(){
if(this.checkboxValue.length == 0){
return 0
}
let price = 0
this.list.forEach(n => {
if(this.checkboxValue.includes(n.id)){
price += n.zujin || 0
}
})
return price
},
},
onShow() {
this.getData()
this.getAddressListA()
},
methods: {
//tab
clickTabs({
index,
name
}) {
this.type = index ? 0 : 1;
this.queryParams.pageSize = 10
this.checkboxValue = []
// this.mixinsListApi = ['orderPage', 'orderPage'][index]
this.getData()
},
//
beforeGetData(){
let data = {}
data.leaseFlag = this.type
return data
},
// getDataThen(list){
// list[0] && list[0].d = true
// },
//
goCleaning() {
if (this.checkboxValue.length < 1) {
uni.showToast({
title: "请勾选商品",
icon: 'none'
})
return
}
if (this.addressTotal == 0) {
return uni.navigateTo({
url: '/pages_order/mine/address?type=back'
})
}
//
this.$refs.addressPopup.open('bottom')
},//
selectAddress(e) {
this.address = e
this.$refs.addressPopup.close()
this.ordersPay()
},
//
getAddressListA() {
this.$refs.addressList.getAddressList().then(res => {
this.addressTotal = res.total
if (this.addressTotal != 0) {
this.address = res.records[0]
}
})
},
//
ordersPay() {
var self = this
// var deleteCartIds = this.checkboxValue.join(",") //id
let data = []
let records = this.list
for (var i = 0; i < records.length; i++) {
if (this.checkboxValue.includes(records[i].id)) {
data.push({
leaseId: records[i].id, //id
addressId: this.address.id, //id
type : 1,
})
}
}
this.$api('orderCreate', {
req: JSON.stringify(data)
}, res => {
if (res.code == 200) {
let form = {
id: res.result.id
}
//
// self.$api('cartDel', {
// id: deleteCartIds
// }, res => {
// if (res.code == 200) {
// self.getData()
// }
// })
this.$api('orderPay', form, res => {
if (res.code == 200) {
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);
// self.$refs.confirmationPopup.close()
uni.showToast({
icon: 'none',
title: "支付失败"
})
}
});
}
})
}
})
},
}
}
</script>
<style scoped lang="scss">
.page {
padding-bottom: 200rpx;
.tabs{
position: sticky;
top: calc(var(--status-bar-height) + 120rpx);
background-color: #fff;
// padding-top: 20rpx;
}
.btn {
display: flex;
justify-content: center;
position: fixed;
bottom: 20rpx;
width: 100%;
.a {
display: flex;
justify-content: center;
align-items: center;
width: 70%;
height: 100rpx;
color: #FFF;
background-color: $uni-color;
border: 1px solid red;
border-radius: 100rpx;
font-size: 30rpx;
}
}
.d{
.item {
background-color: #fff;
display: flex;
padding: 30rpx;
width: 690rpx;
.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: 24rpx;
padding: 10rpx 20rpx;
display: flex;
justify-content: space-between;
text {
font-weight: 900;
}
}
.wan{
color: $uni-color;
font-size: 26rpx;
padding: 10rpx 20rpx;
}
}
}
}
.action {
width: 700rpx;
position: fixed;
bottom: 20rpx;
left: 25rpx;
background-color: #fff;
height: 130rpx;
border-radius: 65rpx;
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: 22rpx;
color: #717171;
}
}
.btn2 {
margin-left: auto;
background-color: $uni-color;
height: 100%;
padding: 0 50rpx;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
}
}
</style>

+ 129
- 0
pages_order/order/damageReport.vue View File

@ -0,0 +1,129 @@
<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="value" :count="true" border="none" height="400"
placeholder="请输入破损的细节部位....."
:text-style="{color:'#000',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="6" 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>
<uv-input placeholder="请输入联系方式" fontSize="24rpx" border="bottom"
:custom-style="{backgroundColor: '#fff'}">
<template #prefix>
<uv-text text="联系姓名" size="24rpx" margin="20rpx 10rpx 20rpx 10rpx" />
</template>
</uv-input>
<uv-input placeholder="请输入联系姓名" border="none" fontSize="24rpx"
:custom-style="{backgroundColor: '#fff'}">
<template #prefix>
<uv-text text="联系方式" size="24rpx" margin="20rpx 10rpx 20rpx 10rpx" />
</template>
</uv-input>
</view> -->
<view class="help-button">
<view>提交审核</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
value: "",
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
})
})
})
},
}
}
</script>
<style scoped lang="scss">
.help {
.help-box {
width: 92%;
margin-left: 4%;
.help-issue {
margin: 20rpx;
font-size: 28rpx;
font-weight: 600;
color: #000;
}
.help-screenshot {
display: flex;
align-items: center;
background-color: #fff;
padding: 20rpx;
}
.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>

+ 97
- 44
pages_order/order/orderDetail.vue View File

@ -3,7 +3,7 @@
<navbar title="订单详情" leftClick @leftClick="$utils.navigateBack" /> <navbar title="订单详情" leftClick @leftClick="$utils.navigateBack" />
<!-- 水洗店 --> <!-- 水洗店 -->
<view class="">
<view class="" v-if="userShop">
<view class="controls"> <view class="controls">
<view class="title"> <view class="title">
<image src="../static/order/icon.png" mode=""></image> <image src="../static/order/icon.png" mode=""></image>
@ -13,18 +13,57 @@
待送回 待送回
</view> --> </view> -->
<orderTypeBtn
<!-- <orderTypeBtn
:type="order.type" :type="order.type"
:status="order.status" :status="order.status"
:detail="order"></orderTypeBtn>
:detail="order"></orderTypeBtn> -->
<view class="btns">
<view
v-if="[4, 18, 19].includes(order.status)"
@click.stop="orderConfirmAccept(order)" class="b2">
确认接单
</view>
<!-- 待收货 -->
<template v-if="order.status == 2">
<view @click.stop="confirmReceiveGoods(order)" class="b2">
确认收货
</view>
<view @click.stop="" class="b1">
查看物流
</view>
</template>
<!-- 待检查 -->
<template v-if="order.status == 5">
<view @click.stop="orderConfirmedDamage(order, 1)" class="b2"
>
确认无破损
</view>
<view @click.stop="orderConfirmedDamage(order, 2)" class="b1"
>
破损上报
</view>
</template>
<view
v-if="[6].includes(order.status)"
@click.stop="orderFinishedWashing(order)" class="b2">
水洗完成
</view>
</view>
</view> </view>
<view class="steps">
<view class="steps" v-if="steps.length > 0">
<uv-steps activeColor="#FD5100" <uv-steps activeColor="#FD5100"
:current="order.status" dot>
<uv-steps-item :title="item"
:current="stepsCurrent" dot>
<uv-steps-item
:title="item.name"
:key="index" :key="index"
v-for="(item, index) in steps[order.type] || []">
v-for="(item, index) in steps">
</uv-steps-item> </uv-steps-item>
</uv-steps> </uv-steps>
</view> </view>
@ -127,7 +166,7 @@
<view class="line"> <view class="line">
<!-- 水洗店不展示 --> <!-- 水洗店不展示 -->
<view class="t min_tips" v-if="!userShop && item.orderPay">
<view class="t min_tips" v-if="!userShop && order.orderPay">
<view class=""> <view class="">
实付款 实付款
</view> </view>
@ -137,7 +176,7 @@
</view> </view>
<!-- 水洗店不展示 --> <!-- 水洗店不展示 -->
<view class="min_tips" v-if="!userShop && item.rentPay">
<view class="min_tips" v-if="!userShop && order.rentPay">
<view class=""> <view class="">
租赁费用 租赁费用
</view> </view>
@ -146,7 +185,7 @@
</view> </view>
</view> </view>
<view class="min_tips" v-if="item.washPay">
<view class="min_tips" v-if="order.washPay">
<view class=""> <view class="">
水洗费用 水洗费用
</view> </view>
@ -216,11 +255,12 @@
mapGetters mapGetters
} from 'vuex' } from 'vuex'
import orderTypeBtn from "../components/order/orderTypeBtn.vue" import orderTypeBtn from "../components/order/orderTypeBtn.vue"
import mixinOrder from '@/mixins/order.js'
export default { export default {
components: { components: {
orderTypeBtn orderTypeBtn
}, },
mixins : [mixinOrder],
computed: { computed: {
...mapGetters(['userShop']), ...mapGetters(['userShop']),
}, },
@ -228,31 +268,31 @@
return { return {
stepsCurrent: 0, stepsCurrent: 0,
steps: [// steps: [//
[//
'客户待支付',
'平台待发货',
'待收货',//
'服务完成',
],
[//
'客户待支付',
'检查破损',//
'开始清洗',//
'服务完成',
],
[//
'下单',
'寄回商品',//
'平台待收货',
'客户待支付',
'服务完成',
],
[//退
'下单',
'寄回商品',//
'平台待收货',
'服务完成',
],
// [//
// '',
// '',
// '',//
// '',
// ],
// [//
// '',
// '',//
// '',//
// '',
// ],
// [//
// '',
// '',//
// '',
// '',
// '',
// ],
// [//退
// '',
// '',//
// '',
// '',
// ],
], ],
order: {}, order: {},
orderId: 0, orderId: 0,
@ -273,6 +313,11 @@
}, },
onLoad(agrs) { onLoad(agrs) {
this.orderId = agrs.id this.orderId = agrs.id
},
onShow() {
this.getData()
},
onPullDownRefresh() {
this.getData() this.getData()
}, },
methods: { methods: {
@ -282,8 +327,17 @@
this.$api('orderOne', { this.$api('orderOne', {
id: this.orderId id: this.orderId
}, res => { }, res => {
uni.stopPullDownRefresh()
if (res.code == 200) { if (res.code == 200) {
this.order = res.result this.order = res.result
res.result.hotelOrderFlows.forEach((n, i) => {
if(this.order.status == n.value){
this.stepsCurrent = i
}
})
this.steps = res.result.hotelOrderFlows
} }
}) })
}, },
@ -293,7 +347,6 @@
<style scoped lang="scss"> <style scoped lang="scss">
.order { .order {
background: linear-gradient(#4899a6, #6fc6ad, #6fc6ad);
padding-bottom: 10px; padding-bottom: 10px;
} }
@ -534,7 +587,7 @@
.current-price { .current-price {
font-size: 30rpx; font-size: 30rpx;
color: #FD5100;
color: $uni-color;
} }
.line { .line {
@ -571,7 +624,7 @@
.auth { .auth {
position: absolute; position: absolute;
white-space: nowrap; white-space: nowrap;
color: #FF6200;
color: $uni-color;
left: 23rpx; left: 23rpx;
font-size: 17rpx; font-size: 17rpx;
} }
@ -593,8 +646,8 @@
} }
.btn-x { .btn-x {
color: #6fc6ad;
border: 1px solid #6fc6ad;
color: $uni-color;
border: 1px solid $uni-color;
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
border-radius: 30rpx; border-radius: 30rpx;
} }
@ -604,8 +657,8 @@
justify-content: center; justify-content: center;
.btn { .btn {
color: #6fc6ad;
border: 1px solid #6fc6ad;
color: $uni-color;
border: 1px solid $uni-color;
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
border-radius: 30rpx; border-radius: 30rpx;
} }


+ 87
- 8
pages_order/order/refundsOrExchange.vue View File

@ -11,15 +11,29 @@
</view> </view>
<view class="center"> <view class="center">
<view>{{ commodity.goodsName }}</view> <view>{{ commodity.goodsName }}</view>
<view>商品规格:{{ commodity.sku }}</view>
<view>下单时间:{{ commodity.startTime }}</view>
<view v-if="commodity.sku">商品规格:{{ commodity.sku }}</view>
<view v-if="commodity.createTime">下单时间:{{ $dayjs(commodity.createTime).format('YYYY-MM-DD') }}</view>
</view> </view>
<view class="right">×{{ commodity.num }}</view>
<view class="right" v-if="commodity.num">×{{ commodity.num }}</view>
</view> </view>
<!-- 暂未选择商品的时候 --> <!-- 暂未选择商品的时候 -->
<!-- <view v-else style="height: 200rpx;;display: flex;justify-content: center;align-items: center;font-size: 36px;"> <!-- <view v-else style="height: 200rpx;;display: flex;justify-content: center;align-items: center;font-size: 36px;">
请选择商品... 请选择商品...
</view> --> </view> -->
<!-- 地址 -->
<view class="address" @click="openAddress">
<image src="/static/image/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="item2"> <view class="item2">
@ -67,14 +81,14 @@
<!-- 联系电话 --> <!-- 联系电话 -->
<view class="item5">
<!-- <view class="item5">
<view class="phone"> <view class="phone">
<view>联系电话</view> <view>联系电话</view>
<view> <view>
<uv-input v-model="form.phone" placeholder="请输入联系电话" border="none" clearable></uv-input> <uv-input v-model="form.phone" placeholder="请输入联系电话" border="none" clearable></uv-input>
</view> </view>
</view> </view>
</view>
</view> -->
</view> </view>
<!-- 底部按钮 --> <!-- 底部按钮 -->
@ -85,7 +99,11 @@
<!--商品选择--> <!--商品选择-->
<uv-popup ref="spPopup" :round="30"> <uv-popup ref="spPopup" :round="30">
<commoditySelect height="60vh" @selectSp="selectCommodity" ref="commoditySelect" />
<commoditySelect height="60vh" leaseFlag="1" status="0" @selectSp="selectCommodity" ref="commoditySelect" />
</uv-popup>
<uv-popup ref="addressPopup" :round="30">
<addressList ref="addressList" height="60vh" @select="selectAddress" />
</uv-popup> </uv-popup>
</view> </view>
@ -95,12 +113,14 @@
import bottomBtn from "../../components/bottom/bottomBtn.vue" import bottomBtn from "../../components/bottom/bottomBtn.vue"
import commoditySelect from "../components/commodity/commoditySelect.vue" import commoditySelect from "../components/commodity/commoditySelect.vue"
import addressList from '@/components/address/addressList.vue'
export default { export default {
onLoad(option) { onLoad(option) {
this.titleIndex = option.index this.titleIndex = option.index
}, },
components: { components: {
bottomBtn, bottomBtn,
addressList,
commoditySelect commoditySelect
}, },
data() { data() {
@ -119,7 +139,7 @@
bottom: '40rpx' bottom: '40rpx'
}, },
commodity: { commodity: {
goodsName: '',
goodsName: '请选择租赁物品',
sku: '', sku: '',
num: 0, num: 0,
startTime: '', startTime: '',
@ -135,16 +155,44 @@
refundNum: "", refundNum: "",
type: '', //0退 1 type: '', //0退 1
}, },
addressTotal: 0,
address: {
name: '请选择联系人',
addressDetail: '',
},
} }
}, },
onShow() { onShow() {
this.$refs.commoditySelect.getList() this.$refs.commoditySelect.getList()
//
this.$refs.addressList.getAddressList().then(res => {
this.addressTotal = res.total
if (this.addressTotal != 0) {
this.address = res.records[0]
}
})
}, },
methods: { methods: {
openSpPopup() { openSpPopup() {
this.$refs.spPopup.open('bottom'); this.$refs.spPopup.open('bottom');
}, },
//
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()
},
// 退 // 退
selectCommodity(e) { selectCommodity(e) {
@ -161,7 +209,14 @@
confirm() { confirm() {
this.form.type = this.titleIndex this.form.type = this.titleIndex
this.form.reasonPic = this.fileList.map(item=>item.url).join(",") this.form.reasonPic = this.fileList.map(item=>item.url).join(",")
console.log(this.form, "form");
this.form.addressId = this.address.id
if (this.$utils.verificationAll(this.form, {
id: '请选择租赁物品',
reason: '请输入申请原因',
addressId: '请选择地址',
})) {
return
}
this.$api('refundOrder', this.form, res => { this.$api('refundOrder', this.form, res => {
if (res.code == 200) { if (res.code == 200) {
@ -200,6 +255,30 @@
} }
.refundsOrExchange { .refundsOrExchange {
.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;
}
}
.frame { .frame {
display: flex; display: flex;


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

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

+ 76
- 2
store/store.js View File

@ -16,6 +16,9 @@ const store = new Vuex.Store({
longitude : 0, longitude : 0,
}, },
userInfo : {},//用户信息 userInfo : {},//用户信息
bindShop : {},//酒店绑定的水洗店
statistics : {},//水洗店查询首页统计
category : [],//分类
}, },
getters: { getters: {
// 角色 true为水洗店 false为酒店 // 角色 true为水洗店 false为酒店
@ -41,7 +44,53 @@ const store = new Vuex.Store({
}) })
}) })
}, },
//获取绑定店铺的数据
getBindShop(state){
api('bindShop', res => {
if(res.code == 200){
state.bindShop = res.result
}
})
},
// 水洗店查询首页统计
getLaundryStoreHomeData(state){
api('laundryStoreHomeData', {}, res => {
uni.stopPullDownRefresh()
if(res.code == 200){
state.statistics = res.result
}
})
},
// 获取分类
categoryList(state){
api('categoryList', res => {
if(res.code == 200){
state.category = res.result
}
})
},
// 账号密码登录
accountLogin(state, form){
api('wxLogin', {
latitude : state.position.latitude,
longitude : state.position.longitude,
loginType : 1,
...form,
}, res => {
if(res.code == 200){
uni.setStorageSync('token', res.result.token)
state.userInfo = res.result.userInfo
state.shop = true
uni.redirectTo({
url: '/pages/index/index'
})
}
})
},
login(state){ login(state){
let self = this
uni.showLoading({ uni.showLoading({
title: '登录中...' title: '登录中...'
}) })
@ -56,6 +105,7 @@ const store = new Vuex.Store({
code : res.code, code : res.code,
latitude : state.position.latitude, latitude : state.position.latitude,
longitude : state.position.longitude, longitude : state.position.longitude,
loginType : 0,
}, res => { }, res => {
uni.hideLoading() uni.hideLoading()
@ -64,13 +114,14 @@ const store = new Vuex.Store({
return return
} }
state.userInfo = res.result.userInfo state.userInfo = res.result.userInfo
state.shop = !!state.userInfo.shop
// state.shop = !!state.userInfo.shop
uni.setStorageSync('token', res.result.token) uni.setStorageSync('token', res.result.token)
self.commit('getUserInfo')
if(!state.userInfo.nickName || !state.userInfo.headImage){ if(!state.userInfo.nickName || !state.userInfo.headImage){
uni.navigateTo({ uni.navigateTo({
url: '/pages_order/auth/wxUserInfo' url: '/pages_order/auth/wxUserInfo'
@ -88,6 +139,14 @@ const store = new Vuex.Store({
state.userInfo = res.result state.userInfo = res.result
state.shop = !!state.userInfo.shop state.shop = !!state.userInfo.shop
if(state.shop){
// 查询水洗店首页统计
this.commit('getLaundryStoreHomeData')
}else{
//获取绑定店铺的数据
this.commit('getBindShop')
}
} }
}) })
}, },
@ -97,6 +156,21 @@ const store = new Vuex.Store({
state.position = res state.position = res
}) })
}, },
logout(state){
uni.showModal({
title: '确认退出登录吗',
success(r) {
if(r.confirm){
state.userInfo = {}
state.shop = false
uni.removeStorageSync('token')
uni.redirectTo({
url: '/pages/index/index'
})
}
}
})
},
}, },
actions: {}, actions: {},
}) })


Loading…
Cancel
Save