Browse Source

申请水洗店

master
chenkun 8 months ago
parent
commit
e26622ee60
4 changed files with 320 additions and 3 deletions
  1. +3
    -0
      pages.json
  2. +1
    -1
      pages/index/center.vue
  3. +313
    -0
      pages_order/order/applyLaundryStore.vue
  4. +3
    -2
      pages_order/order/refundsOrExchange.vue

+ 3
- 0
pages.json View File

@ -67,6 +67,9 @@
},
{
"path": "mine/lease"
},
{
"path": "order/applyLaundryStore"
}
]
}],


+ 1
- 1
pages/index/center.vue View File

@ -112,7 +112,7 @@
</uv-grid-item>
<uv-grid-item
@click="$utils.navigateTo('/pages_order/auth/loginAndRegisterAndForgetPassword?index='+2)">
@click="$utils.navigateTo('/pages_order/order/applyLaundryStore')">
<image class="image" src="/static/image/center/7.png" mode=""></image>
<text class="grid-text">申请成为水洗店</text>
</uv-grid-item>


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

@ -0,0 +1,313 @@
<template>
<view class="applyLaundryStore">
<navbar title="申请水洗店" leftClick @leftClick="$utils.navigateBack" />
<view class="frame">
<view class="title">
<span style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span>
<span>店铺信息</span>
</view>
<view class="shopName">
<view>店铺名称</view>
<view>
<input placeholder="请输入店铺名称" clearable></input>
</view>
</view>
<view class="shopName">
<view>您的姓名</view>
<view>
<input placeholder="请输入您的姓名" clearable></input>
</view>
</view>
<view class="shopName">
<view>联系方式</view>
<view>
<input placeholder="请输入联系方式" clearable></input>
</view>
</view>
<view class="currentRegion">
<view>所在地区</view>
<view @click="open">
湖南省
</view>
</view>
<view class="shopName">
<view>详细地址</view>
<view>
<input placeholder="请输入详细地址" clearable></input>
</view>
</view>
</view>
<!-- 省市区三级联动 -->
<uv-picker ref="provinceCityDistrictLinkageRef" :columns="addressList" :loading="loading" keyName="name"
@change="change" @confirm="confirm">
</uv-picker>
<!-- 底部按钮 -->
<bottomBtn @confirm='submitApplication()' :color='bottomBtnStyle.color'
:backgroundColor='bottomBtnStyle.backgroundColor' :fontSize='bottomBtnStyle.fontSize'
:text='bottomBtnStyle.text' :width="bottomBtnStyle.width" :height="bottomBtnStyle.height"
:borderRadius='bottomBtnStyle.borderRadius' :bottom='bottomBtnStyle.bottom'>
</bottomBtn>
</view>
</template>
<script>
import bottomBtn from "../../components/bottom/bottomBtn.vue"
export default {
components: {
bottomBtn,
},
data() {
return {
loading: true,
provinces: [], //
citys: [], //
areas: [], //
pickerValue: [0, 0, 0],
defaultValue: [3442, 1, 2],
bottomBtnStyle: {
color: '#FFF',
backgroundColor: '#fd5100',
fontSize: '34rpx',
text: '提交',
width: '400rpx',
height: '80rpx',
borderRadius: '100rpx',
bottom: '40rpx'
},
}
},
computed: {
addressList() {
return [this.provinces, this.citys, this.areas];
}
},
mounted() {
this.getprovinceCityDistrictLinkageData();
},
methods: {
//
submitApplication() {
},
getprovinceCityDistrictLinkageData() {
uni.request({
method: 'GET',
url: '/static/uvui/example/regions.json',
success: res => {
const {
statusCode,
data
} = res
if (statusCode === 200) {
console.log('获取的数据:', res);
this.provinces = data.sort((left, right) => (Number(left.code) > Number(right
.code) ? 1 : -1));
console.log(this.provinces)
this.handlePickValueDefault()
setTimeout(() => {
this.loading = false
}, 200)
}
}
})
},
handlePickValueDefault() {
//
this.pickerValue[0] = this.provinces.findIndex(item => Number(item.id) === this.defaultValue[0]);
//
this.citys = this.provinces[this.pickerValue[0]]?.children || [];
this.pickerValue[1] = this.citys.findIndex(item => Number(item.id) === this.defaultValue[1]);
//
this.areas = this.citys[this.pickerValue[1]]?.children || [];
this.pickerValue[2] = this.areas.findIndex(item => Number(item.id) === this.defaultValue[2]);
//
this.$refs.provinceCityDistrictLinkageRef.setIndexs([this.pickerValue[0], this.pickerValue[1], this
.pickerValue[2]
], true);
},
change(e) {
if (this.loading) return;
const {
columnIndex,
index,
indexs
} = e
//
if (columnIndex === 0) {
this.citys = this.provinces[index]?.children || []
this.areas = this.citys[0]?.children || []
this.$refs.provinceCityDistrictLinkageRef.setIndexs([index, 0, 0], true)
} else if (columnIndex === 1) {
this.areas = this.citys[index]?.children || []
this.$refs.provinceCityDistrictLinkageRef.setIndexs(indexs, true)
}
},
open() {
this.$refs.provinceCityDistrictLinkageRef.open();
this.handlePickValueDefault()
},
confirm(e) {
console.log('确认选择的地区:', e);
uni.showToast({
icon: 'none',
title: `${e.value[0].name}/${e.value[1].name}/${e.value[2].name}`
})
}
}
}
</script>
<style lang="scss" scoped>
* {
box-sizing: border-box;
}
.applyLaundryStore {
padding: 0 20rpx 0 20rpx;
background-color: #f5f5f5;
.frame {
display: flex;
flex-direction: column;
gap: 20rpx;
background-color: #FFF;
margin-top: 20rpx;
padding: 20rpx;
.title {
display: flex;
// padding-top: 40rpx;
font-size: 34rpx;
font-weight: 700;
padding: 0 0 0 20rpx;
>span:nth-of-type(1) {
margin: 4rpx 0 0 8rpx;
background-color: #FFF;
}
>span:nth-of-type(2) {
margin: 0 0 0 8rpx;
background-color: #FFF;
}
}
.shopName {
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
// margin: 10rpx 0 0 0;
padding: 10rpx 0 0 20rpx;
>view:nth-of-type(1) {
width: 30%;
// 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;
}
}
}
.name {
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
// margin: 10rpx 0 0 0;
padding: 10rpx 0 0 20rpx;
>view:nth-of-type(1) {
width: 30%;
font-weight: 700;
}
>view:nth-of-type(2) {
width: 70%;
padding: 0 20rpx 0 0;
}
}
.phone {
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
// margin: 10rpx 0 0 0;
padding: 10rpx 0 0 20rpx;
>view:nth-of-type(1) {
width: 30%;
font-weight: 700;
}
>view:nth-of-type(2) {
width: 70%;
padding: 0 20rpx 0 0;
}
}
.currentRegion {
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
// margin: 10rpx 0 0 0;
padding: 10rpx 0 0 20rpx;
>view:nth-of-type(1) {
width: 30%;
// font-weight: 700;
}
>view:nth-of-type(2) {
width: 70%;
padding: 0 20rpx 0 0;
}
}
.detailedAddress {
display: flex;
align-items: center;
background-color: #FFF;
height: 80rpx;
// margin: 10rpx 0 0 0;
padding: 10rpx 0 0 20rpx;
>view:nth-of-type(1) {
width: 30%;
font-weight: 700;
}
>view:nth-of-type(2) {
width: 70%;
padding: 0 20rpx 0 0;
}
}
}
}
</style>

+ 3
- 2
pages_order/order/refundsOrExchange.vue View File

@ -167,6 +167,7 @@
}
.refundsOrExchange {
padding: 0 40rpx 0 40rpx;
.frame {
display: flex;
@ -229,7 +230,7 @@
}
.item2 {
width: 100vw;
// width: 100vw;
.type {
display: flex;
@ -267,7 +268,7 @@
}
.item3 {
width: 100vw;
// width: 100vw;
.type {
display: flex;


Loading…
Cancel
Save