Browse Source

修改样式

master
longjieli 1 month ago
parent
commit
a33e7ed057
11 changed files with 157 additions and 17979 deletions
  1. +2
    -2
      components/calendars/index.vue
  2. +3
    -3
      components/couponList/couponList.vue
  3. +4
    -3
      components/product/productItem.vue
  4. +1
    -3
      package.json
  5. +4
    -2
      pages.json
  6. +24
    -81
      pages_order/components/areaSelector/areaSelector.vue
  7. +34
    -31
      pages_order/mine/memberCenter.vue
  8. +50
    -8
      pages_order/mine/recruit.vue
  9. +35
    -9
      pages_order/mine/runningWater.vue
  10. +0
    -17837
      pages_order/static/regions.json
  11. BIN
      static/logo.png

+ 2
- 2
components/calendars/index.vue View File

@ -1,6 +1,6 @@
<template>
<view class="calendars">
<uv-calendars ref="calendars" @confirm="confirm" />
<uv-calendars ref="calendars" mode="range" @confirm="confirm" color="#E3441A" confirmColor="#E3441A" />
</view>
</template>
@ -9,7 +9,7 @@
name: "Calendars",
data() {
return {
date: ['2023-08-26', '2023-08-29']
}
},
methods: {


+ 3
- 3
components/couponList/couponList.vue View File

@ -36,9 +36,9 @@
</view>
</view>
<view class="surplus">
<!-- <view class="surplus">
剩余28天过期
</view>
</view> -->
</view>
</view>
</view>
@ -83,7 +83,7 @@
//
formatDate(date) {
date = new Date(date);
date = new Date(date.replace(/-/g,'/'));
// const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 01
const day = String(date.getDate()).padStart(2, '0'); //


+ 4
- 3
components/product/productItem.vue View File

@ -22,11 +22,11 @@
<text class="unit">/元每件</text>
</view>
<view class="price-imgs">
<image v-if="userInfo.role == 1" :src="configList.vip_money_one" mode="widthFix" class="price-img">
<image v-if="userInfo.role == 1" :src="configList.vip_money_one" mode="aspectFill" class="price-img">
</image>
<image v-if="userInfo.role == 2" :src="configList.vip_money_two" mode="widthFix" class="price-img">
<image v-if="userInfo.role == 2" :src="configList.vip_money_two" mode="aspectFill" class="price-img">
</image>
<image v-if="userInfo.role == 3" :src="configList.vip_money_three" mode="widthFix"
<image v-if="userInfo.role == 3" :src="configList.vip_money_three" mode="aspectFill"
class="price-img"></image>
</view>
</view>
@ -159,6 +159,7 @@
.price-img {
width: 80rpx;
height: 30rpx;
margin-left: 10rpx;
}
}


+ 1
- 3
package.json View File

@ -15,8 +15,6 @@
"license": "ISC",
"dependencies": {
"ali-oss": "^6.21.0",
"dayjs": "^1.11.12",
"swiper": "^5.4.5",
"vue-awesome-swiper": "^4.1.0"
"dayjs": "^1.11.12"
}
}

+ 4
- 2
pages.json View File

@ -1,4 +1,7 @@
{
"easycom": {
"^esc-(.*)": "@/components/sn-swiper/esc-$1/index.vue"
},
"pages": [{
"path": "pages/index/index",
"style": {
@ -48,8 +51,7 @@
},
"subPackages": [{
"root": "pages_order",
"pages": [
{
"pages": [{
"path": "mine/partner"
},
{


+ 24
- 81
pages_order/components/areaSelector/areaSelector.vue View File

@ -1,99 +1,42 @@
<!-- 省市区三级联动 -->
<template>
<view class="area-selector">
<uv-picker ref="picker" :columns="addressList" :loading="loading" keyName="name" @change="change"
@confirm="confirm">
</uv-picker>
<button @click="open">打开</button>
<view>
<cityPicker :column="column" :default-value="defaultValue" :mask-close-able="maskCloseAble" @confirm="confirm"
@cancel="cancel" :visible="visible" />
</view>
</template>
<script>
import cityPicker from '@/uni_modules/piaoyi-cityPicker/components/piaoyi-cityPicker/piaoyi-cityPicker'
export default {
name: "AreaSelector",
data() {
loading: true,
provinces: [], //
citys: [], //
areas: [], //
pickerValue: [0, 0, 0],
defaultValue: [3442, 1, 2]
},
onShow() {
this.getData();
},
computed: {
addressList() {
return [this.provinces, this.citys, this.areas];
return {
visible: false,
maskCloseAble: true,
defaultValue: '110000',
// defaultValue: ['','',''],
column: 3
}
},
components: {
cityPicker
},
methods: {
getData() {
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.picker.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.picker.setIndexs([index, 0, 0], true)
} else if (columnIndex === 1) {
this.areas = this.citys[index]?.children || []
this.$refs.picker.setIndexs(indexs, true)
}
},
open() {
this.$refs.picker.open();
this.handlePickValueDefault()
this.visible = true
},
confirm(val) {
this.$emit('select', `${val.provinceName}-${val.cityName}-${val.areaName}`)
this.visible = false
},
confirm(e) {
console.log('确认选择的地区:', e);
uni.showToast({
icon: 'none',
title: `${e.value[0].name}/${e.value[1].name}/${e.value[2].name}`
})
cancel() {
this.visible = false
}
}
}
</script>
<style lang="scss" scoped>
.area-selector {}
<style lang="scss">
</style>

+ 34
- 31
pages_order/mine/memberCenter.vue View File

@ -5,28 +5,31 @@
<navbar title="会员中心" leftClick @leftClick="$utils.navigateBack" bgColor="#fff" color="#000" />
<!-- 会员卡片 -->
<!-- <swiper :slides-per-view="3" :space-between="50" @swiper="onSwiper" @slideChange="onSlideChange">
<swiper-slide v-for="item in memberList" :key="item.id" class="member-item">
<image :src="item.memberBg" mode="widthFix" class="member-image"></image>
<view class="member-info">
<view class="profile-photo">
<image src="@/pages_order/static/card/profilePhoto.png" mode="widthFix" class="pro-img">
</image>
<view class="open-status">
暂未开通
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
:duration="duration" :current="current" style="height: 380rpx;">
<swiper-item v-for="(item,index) in list" :key="item.id">
<view class="member-item">
<image :src="item.headImage" mode="widthFix" class="member-image"></image>
<view class="member-info">
<view class="profile-photo">
<image :src="userInfo.headImage" mode="aspectFill" class="pro-img">
</image>
<view class="open-status">
{{ index + 1 == userInfo.role ? '已开通' : '暂未开通'}}
</view>
</view>
<view class="open">
累计消费满{{ item.money }}元自动开通
</view>
</view>
<view class="open">
立即开通
</view>
</view>
</swiper-slide>
</swiper> -->
</swiper-item>
</swiper>
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
:duration="duration" style="height: 380rpx;">
<swiper-item v-for="item in list" :key="item.id">
<view class="member-item">
<!-- <esc-swiper ref="swiper" :autoplay="true" :circular="true" :current.sync="current" :size="list.length"
:plus="2" :width="750" :height="290" :itemWidth="600" :space="30">
<esc-swiper-item class="member-item" v-for="(item, idx) in list" :index="idx" :key="item.id">
<view class="item" style="width: 100%;height: 100%;">
<image :src="item.headImage" mode="widthFix" class="member-image"></image>
<view class="member-info">
<view class="profile-photo">
@ -41,8 +44,8 @@
</view>
</view>
</view>
</swiper-item>
</swiper>
</esc-swiper-item>
</esc-swiper> -->
<!-- 充值套餐 -->
<view class="top-up-package">
@ -92,23 +95,19 @@
</template>
<script>
// import {
// Swiper,
// SwiperSlide
// } from 'vue-awesome-swiper'
// import 'swiper/css/swiper.css'
import mixinsList from '@/mixins/list.js'
import {
getSwiperList
} from '@/components/sn-swiper/esc-swiper/helper.js';
import {
mapState
} from 'vuex'
export default {
name: "MemberCenter",
mixins: [mixinsList],
data() {
return {
list: [
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
'https://cdn.uviewui.com/uview/swiper/swiper1.png'
],
cardList: [{
id: 1,
title: "金卡",
@ -160,11 +159,15 @@
]
}
],
mixinsListApi: "getRiceVipList"
mixinsListApi: "getRiceVipList",
current: 0
}
},
methods: {
},
computed: {
...mapState(['userInfo'])
}
}
</script>


+ 50
- 8
pages_order/mine/recruit.vue View File

@ -25,7 +25,13 @@
</view>
<view class="item-line">
<view class="label">所在地区</view>
<input placeholder="请输入所在地区" v-model="partnership.address" />
<!-- <input placeholder="请输入所在地区" v-model="partnership.address" /> -->
<view @click="openAreaSelector" class="area-info">
<view class="area-detail">{{ partnership.address ? partnership.address : '请选择省市区' }}</view>
<view class="arraw">
<uv-icon name="arrow-right"></uv-icon>
</view>
</view>
</view>
<view class="item-line">
<view class="label">详细地址</view>
@ -36,17 +42,19 @@
<view class="b-fiexd">
<view @click="submit" class="button-submit">{{ partnership.id ? '修改' : '新增' }}</view>
</view>
<!-- <AreaSelector></AreaSelector> -->
<AreaSelector ref="AreaSelector" @select="selectArea"></AreaSelector>
</view>
</template>
<script>
// import AreaSelector from "../components/areaSelector/areaSelector.vue"
import AreaSelector from '../components/areaSelector/areaSelector.vue';
export default {
name: "Recruit",
components : { AreaSelector },
components: {
AreaSelector
},
data() {
return {
partnership: {
@ -102,6 +110,16 @@
}
}
})
},
//
openAreaSelector() {
this.$refs.AreaSelector.open();
},
//
selectArea(area) {
this.partnership.address = area;
}
},
computed: {
@ -118,11 +136,12 @@
<style lang="scss" scoped>
.recruit {
//
.bg {
width: 710rpx;
margin: 20rpx auto 0rpx auto;
.bg-img {
width: 100%;
height: 250rpx;
@ -142,6 +161,7 @@
.item-line {
display: flex;
flex-wrap: wrap;
height: 60rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Bold;
@ -181,9 +201,30 @@
height: 60rpx;
}
.item-line .area-info {
height: 60rpx;
display: flex;
align-items: center;
justify-content: space-between;
width: calc(100% - 152rpx);
padding: 0rpx 20rpx;
box-sizing: border-box;
.area-detail {
width: 95%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.arraw {
width: 5%;
}
}
.item-line input,
.item-line textarea {
width: 90%;
width: calc(100% - 152rpx);
height: 60rpx;
background: #f5f5f5;
border-radius: 12rpx;
@ -195,6 +236,7 @@
color: #939393;
padding: 0 20rpx;
box-sizing: border-box;
}
.item-line textarea {


+ 35
- 9
pages_order/mine/runningWater.vue View File

@ -35,16 +35,20 @@
</view>
<view class="year-info">
<view @click="openCalendars" class="time-unit">
{{ year }}
{{ beforeYear }}
<uv-icon name="arrow-down-fill"></uv-icon>
</view>
<view @click="openCalendars" class="time-unit">
{{ month }}
{{ beforeMonth }}
<uv-icon name="arrow-down-fill"></uv-icon>
</view>
<text class="interval"></text>
<view @click="openCalendars" class="time-unit">
20
{{ afterYear }}
<uv-icon name="arrow-down-fill"></uv-icon>
</view>
<view @click="openCalendars" class="time-unit">
{{ afterMonth }}
<uv-icon name="arrow-down-fill"></uv-icon>
</view>
</view>
@ -77,8 +81,12 @@
return {
x: ['+', '-', '-', '+'],
mixinsListApi: "getWaterPageList",
year : new Date().getFullYear(),
month : new Date().getMonth() + 1
beforeYear: new Date().getFullYear(), //
afterYear: new Date().getFullYear(), //
beforeMonth: new Date().getMonth() + 1 < 9 ? '' + new Date().getMonth() + 1 : new Date().getMonth() +
1, //
afterMonth: new Date().getMonth() + 1 < 9 ? '' + new Date().getMonth() + 1 : new Date().getMonth() +
1, //, //
}
},
methods: {
@ -91,9 +99,27 @@
//
handleSelectCalendars(day) {
this.year = day.year;
this.month = day.month;
}
let beforeDate = this.getYearMonth(day?.range?.before)
let afterDate = this.getYearMonth(day?.range?.after)
this.beforeYear = beforeDate.year;
this.beforeMonth = beforeDate.month;
this.afterYear = afterDate.year;
this.afterMonth = afterDate.month;
},
//
getYearMonth(time) {
if (!time) {
time = new Date().toString()
}
let data = new Date(time.replace(/-/g, '/'));
let year = data.getFullYear();
let month = data.getMonth() + 1;
return {
year: data.getFullYear(),
month: month < 9 ? '0' + month : month
}
},
}
}
</script>
@ -195,7 +221,7 @@
font-size: 20rpx !important;
}
}
.interval {
display: flex;
align-items: center;


+ 0
- 17837
pages_order/static/regions.json
File diff suppressed because it is too large
View File


BIN
static/logo.png View File

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

Loading…
Cancel
Save