第一次上传

This commit is contained in:
Ls
2026-03-09 16:39:03 +08:00
commit 3d9efaf15c
924 changed files with 326227 additions and 0 deletions

View File

@@ -0,0 +1,119 @@
<template>
<view>
<view class="" style=" margin: 25rpx 0; padding: 0 20rpx; display: flex; align-items: center; justify-content: space-between;">
<view @click="changetab(index)" v-for="(item,index) in tag" :key="index"
:class="{active:index!=currentIndex,actived:index==currentIndex}" class="tag"
style=" padding: 14rpx 36rpx; border-radius: 14rpx; ">
{{item}}
</view>
</view>
<view v-if="type==0"class="" style=" margin:20rpx; margin-top: 30rpx; " >
<view class="" style="display: flex; align-items: center; padding: 40rpx 30rpx; margin-top: 20rpx; justify-content: space-between; border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #e2e2e2; " >
<view class="">
<view class="" style="display: flex; align-items: center;" >
<img :src="Service.GetMateUrlByImg('/static/dele/dele1.jpg')" style=" border-radius: 10rpx; width: 60rpx; height: 60rpx;" alt="" />
<text style="margin-left: 10rpx;" >星巴克咖啡</text>
</view>
<view class="" style="margin-top: 15rpx; color: #999999; " >
今天 14:30
</view>
</view>
<view class="" style="font-weight: 600; color: #666666;" >
¥-38.00
</view>
</view>
<up-loadmore :status="status" />
</view>
<view v-else class="" style=" margin:20rpx; margin-top: 30rpx; " >
<view class="" style="display: flex; align-items: center; padding: 40rpx 30rpx; margin-top: 20rpx; justify-content: space-between; border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #e2e2e2; " >
<view class="">
<view class="" style="display: flex; align-items: center;" >
<img :src="Service.GetMateUrlByImg('/static/dele/dele1.jpg')" style=" border-radius: 10rpx; width: 60rpx; height: 60rpx;" alt="" />
<text style="margin-left: 10rpx;" >星巴克咖啡</text>
</view>
<view class="" style="margin-top: 15rpx; color: #999999; " >
今天 14:30
</view>
</view>
<view class="" style="font-weight: 600; color: #666666;" >
¥-38.00
</view>
</view>
<up-loadmore :status="status" />
</view>
<up-calendar :show="showDate" :mode="mode" monthNum='5' minDate='2025-12-01' maxDate='2999-12-31' @close="showDate=false" @confirm="confirmDate"></up-calendar>
</view>
</template>
<script setup lang="ts">
import { onShow, onLoad } from "@dcloudio/uni-app";
import { ref } from "vue";
import { Service } from '@/Service/Service'
let status=ref('nomore')
let currentIndex=ref(0)
let tag = ref([
'全部',
'今日',
'本月',
'自定义'
])
// 日历管理
const showDate = ref(false);
const mode = ref('range');
let type=ref(null)
onLoad((data:any) => {
type.value=data.type
if(data.type==0){
uni.setNavigationBarTitle({
title:'交易明细'
})
}else{
uni.setNavigationBarTitle({
title:'交易记录'
})
}
});
onShow(() => {
});
const changetab=(e:number)=>{
if(e==3){
showDate.value=true
return
}
currentIndex.value=e
}
const confirmDate = (e) => {
console.log(e);
currentIndex.value=3
showDate.value=false
};
</script>
<style lang="scss">
.active{
background-color: #F3F4F6;
color: #4B5563;
}
.actived{
background-color: #FF6B35;
color: #fff;
}
.tag{
display: flex;
align-items: center;
justify-content: center;
width: fit-content;
font-size: 28rpx;
}
</style>

View File

@@ -0,0 +1,436 @@
<template>
<view class="" style="padding: 30rpx;">
<view class="" style="position: relative;">
<image v-if="!storeData.photo" :src="Service.GetIconImg('/static/userFunc/null.png')"
style="border-radius: 20rpx; width: 100%; height: 350rpx; " mode="aspectFit" alt="" />
<image v-else :src="Service.GetMateUrlByImg(storeData.photo)"
style="border-radius: 20rpx; width: 100%; height: 350rpx; " mode="aspectFill" alt="" />
<view @click="uploaduserImg()"
style=" display: flex; align-items: center; justify-content: center; border-radius: 50%; width: 70rpx; height: 70rpx; position: absolute; bottom: 24rpx; right: 12rpx; background-color: #F97316; ">
<img :src="Service.GetIconImg('/static/userFunc/photo-store.png')"
style="width: 40rpx; height: 40rpx; " alt="" />
</view>
</view>
<view class=""
style=" margin-top: 20rpx; padding: 20rpx;border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #E2e2e2; ">
<up-form labelWidth='180rpx' :labelStyle="{'font-weight':600}" labelPosition="top" :model="storeData"
ref="form1">
<up-form-item label="店铺名称: " :borderBottom="true" ref="item1">
<up-input v-model="storeData.name" placeholder="请输入店铺名称" border="none"></up-input>
</up-form-item>
<up-form-item label="店铺地址: " :borderBottom="true" ref="item1">
<view class="">
<view v-if="!storeData.address" @click="chooseAddress()" class=""
style="display: flex; align-items: center;">
<text style="font-size: 26rpx; color: #c0c4cc; margin-right: 10rpx;">请选择地址 </text>
<up-icon name="arrow-right" color="#c0c4cc" size="12"></up-icon>
</view>
<view v-else @click="chooseAddress()" class="">
{{storeData.address}}
</view>
</view>
</up-form-item>
<up-form-item label="联系电话: " :borderBottom="true" ref="item1">
<up-input v-model="storeData.phone" placeholder="请输入您的联系电话" border="none"></up-input>
</up-form-item>
<up-form-item label="营业时间: " :borderBottom="true" ref="item1">
<view class="">
<view v-if="!storeData.time" @click="showDate=!showDate" class=""
style="display: flex; align-items: center;">
<text style="font-size: 26rpx; color: #c0c4cc; margin-right: 10rpx;">请选择营业时间 </text>
<up-icon name="arrow-right" color="#c0c4cc" size="12"></up-icon>
</view>
<view v-else @click="showDate=!showDate" class="">
{{storeData.time}}
</view>
</view>
</up-form-item>
</up-form>
</view>
<view class=""
style="margin-top: 20rpx; padding: 20rpx;border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #E2e2e2; ">
<view style="display: flex; align-items: center; justify-content: space-between;" class="">
<view class="" style="font-weight: 600;">
店铺标签
</view>
<view class="">
<up-icon @click="showTagfunc()" name="plus" color="#000" size="16" :bold='true'></up-icon>
</view>
</view>
<view class="" style="display: grid; grid-template-columns: repeat(4,1fr); ">
<view class="tag" v-for="(item,index) in tagList" :key="index"
style=" margin-top: 15rpx; padding: 10rpx 20rpx; border-radius: 8rpx; margin-right: 15rpx; background-color: var(--nav-mian); color: #fff; ">
{{item}}
</view>
</view>
</view>
<view class=""
style="margin-top: 20rpx; padding: 20rpx;border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #E2e2e2; ">
<view style="display: flex; align-items: center; justify-content: space-between;" class="">
<view class="" style="font-weight: 600;">
所属社区
</view>
<view class="">
</view>
</view>
<view class="" style="padding: 15rpx 0;">
<view v-if="!storeData.community" @click="showCommunity=!showCommunity" class=""
style="display: flex; align-items: center;">
<text style="font-size: 26rpx; color: #c0c4cc; margin-right: 10rpx;">请选择所属社区 </text>
<up-icon name="arrow-right" color="#c0c4cc" size="12"></up-icon>
</view>
<view v-else @click="showCommunity=!showCommunity" class="">
{{storeData.community}}
</view>
</view>
</view>
<view class=""
style="margin-top: 20rpx; padding: 20rpx;border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #E2e2e2; ">
<view style="display: flex; align-items: center; justify-content: space-between;" class="">
<view class="" style="font-weight: 600;">
商品管理
</view>
<view class="">
</view>
</view>
<view class="" style="padding: 20rpx 0;">
<view @click="Service.GoPage('/pages/goods/goodsDetail')" class=""
style="display: flex; align-items: center; justify-content: space-between; ">
<view class="" style=" flex: 1; display: flex; align-items: center;">
<image :src="Service.GetMateUrlByImg('/static/dele/dele3.png')"
style="width: 150rpx; height: 150rpx; " mode="aspectFit" alt="" />
<view class="" style="margin-left: 20rpx;">
<view class="" style="font-weight: 600;">
招牌牛肉面
</view>
<view class=""
style=" margin-top: 15rpx; color: #F97316; font-weight: 600; font-size: 28rpx; ">
¥28
</view>
</view>
</view>
<view class="">
<up-icon name="arrow-right" color="#c0c4cc" size="26"></up-icon>
</view>
</view>
<view class="tag" @click="Service.GoPage('/pages/goods/addGoods')"
style=" color: #F97316; margin-top: 20rpx; width: 100%; border-radius: 15rpx; border: 5rpx dashed #F97316; padding: 20rpx; text-align: center; ">
<up-icon name="plus" color="#F97316" size="16" :bold='true'></up-icon>
<text style="margin-left: 20rpx;">添加商品</text>
</view>
</view>
</view>
<view class="" style="width: 100%; height: 200rpx; ">
</view>
</view>
<view class="" style="width: 100%; background-color: #fff; position: fixed; bottom: 0; left: 0; padding: 20rpx; ">
<up-button shape='circle' color='#FF6B35' text="保存修改"></up-button>
</view>
<!-- 弹窗 -->
<up-popup :show="showDate">
<view style="width: 100%; padding: 30rpx; ">
<view class="" style="display: flex; align-items: center; justify-content: space-between;">
<view class="">
</view>
<up-icon @click="showDate=!showDate" name="close" color="#000" size="18"></up-icon>
</view>
<up-form labelWidth='180rpx' :labelStyle="{'font-weight':600}" labelPosition="top" :model="storeData"
ref="form1">
<up-form-item label="营业时间: ">
<view class="" style=" width: 100%; display: grid; grid-template-columns: repeat(4,1fr);">
<view v-for="(item,index) in 7" @click="chooseWeek(index)"
style=" margin-top: 15rpx; font-size: 32rpx; padding: 10rpx 30rpx;border-radius: 14rpx;"
:class="{ tab:weekList.findIndex(item => item == index)===-1,tabActive: weekList.findIndex(item => item == index)!=-1 }"
:key="index" class="tag">
周{{chinese(index)}}
</view>
</view>
</up-form-item>
<up-form-item label="开业时间: " labelPosition="left">
<view v-if="!openTime" @click="showOpenTime=!showOpenTime" class=""
style="display: flex; align-items: center;">
<text style="font-size: 26rpx; color: #c0c4cc; margin-right: 10rpx;">请选择开业时间 </text>
<up-icon name="arrow-right" color="#c0c4cc" size="12"></up-icon>
</view>
<view v-else @click="showOpenTime=!showOpenTime" class="">
{{openTime}}
</view>
</up-form-item>
<up-form-item label="结业时间: " labelPosition="left">
<view v-if="!closeTime" @click="showCloseTime=!showCloseTime" class=""
style="display: flex; align-items: center;">
<text style="font-size: 26rpx; color: #c0c4cc; margin-right: 10rpx;">请选择开业时间 </text>
<up-icon name="arrow-right" color="#c0c4cc" size="12"></up-icon>
</view>
<view v-else @click="showCloseTime=!showCloseTime" class="">
{{closeTime}}
</view>
</up-form-item>
</up-form>
<view class="" style="margin-top: 20rpx;">
<up-button @click="dateconfiom" text="确认"></up-button>
</view>
<up-datetime-picker @confirm='showOpenTime=!showOpenTime' @cancel="showOpenTime=!showOpenTime"
:show="showOpenTime" v-model="openTime" mode="time"></up-datetime-picker>
<up-datetime-picker @confirm='showCloseTime=!showCloseTime' @cancel="showCloseTime=!showCloseTime"
:show="showCloseTime" v-model="closeTime" mode="time"></up-datetime-picker>
</view>
</up-popup>
<up-popup :show="showTag">
<view style="width: 100%; padding: 30rpx; ">
<view class="" style="display: flex; align-items: center; justify-content: space-between;">
<view class="">
</view>
<up-icon @click="showTag=!showTag" name="close" color="#000" size="18"></up-icon>
</view>
<view class="">
<view style="display: flex; align-items: center; justify-content: space-between;" class="">
<view class="">
店铺标签
</view>
<view class="">
</view>
</view>
<view class="" style="margin: 20rpx 0;">
<up-input placeholder="请输入标签" border="bottom" v-model="tag"></up-input>
</view>
<view class="" style="margin-top: 20rpx;">
<up-button @click="addTag()" text="确认"></up-button>
</view>
</view>
</view>
</up-popup>
<!-- 社区 -->
<up-picker :show="showCommunity" @confirm="communityFunc" @cancel='showCommunity=!showCommunity'
:columns="columns"></up-picker>
</template>
<script setup lang="ts">
import { onShow, onLoad } from "@dcloudio/uni-app";
import { Service } from "@/Service/Service"
import { ref } from "vue";
interface data {
photo : string,
name : string,
address : string,
phone : string,
time : string,
community : string
}
let storeData = ref<data>({
photo: '',
name: '',
address: '',
phone: '',
time: '',
community: ''
})
// 时间
let showDate = ref(false)
let weekList = ref<Array<number>>([])
let openTime = ref()
let showOpenTime = ref(false)
let closeTime = ref()
let showCloseTime = ref(false)
// 时间方式
let timefunc = ref(-1)
// 标签
let showTag = ref(false)
let tag = ref()
let tagList = ref<Array<string>>([])
// 社区
let showCommunity = ref(false)
const columns = ref([
['平安街', '镇魂街', '美食街']
]);
onLoad(() => {
});
onShow(() => {
});
// 社区
const communityFunc = (e : any) => {
showCommunity.value = !showCommunity.value
storeData.value.community = e.value[0]
}
// 标签
const showTagfunc = () => {
showTag.value = !showTag.value
tag.value = ''
}
const addTag = () => {
if (!tag.value) {
Service.Msg('请输入标签内容')
return
}
tagList.value.push(tag.value)
showTag.value = !showTag.value
}
// 选择照片
const uploaduserImg = () => {
uni.chooseImage({
count: 1, // 最多选择1张图片
sizeType: ['original', 'compressed'], // 支持原图和压缩图
sourceType: ['album', 'camera'], // 可从相册选择或使用相机拍照
success: function (res) {
storeData.value.photo = res.tempFiles[0].path
// let path = res.tempFiles[0].path
// Service.uploadH5(path, 'Avatar', data => {
// userInfo.value.userPhoto = data.split(',')[2].split(':')[1].split('"')[1]
// })
},
fail: function (err) {
console.error('选择失败:', err.errMsg);
}
})
}
// 地址
const chooseAddress = () => {
wx.chooseLocation({
success: res => {
storeData.value.address = res.address
// latitude.value = res.latitude.toString();
// longitude.value = res.longitude.toString();
}
})
}
const chooseWeek = (index : number) => {
if (weekList.value.findIndex(item => item == index) != -1) {
let i = weekList.value.findIndex(item => item == index)
weekList.value.splice(i, 1)
return
}
weekList.value.push(index)
}
const chinese = (item : number) => {
if (item + 1 == 1) {
return '一'
}
if (item + 1 == 2) {
return '二'
} if (item + 1 == 3) {
return '三'
} if (item + 1 == 4) {
return '四'
} if (item + 1 == 5) {
return '五'
} if (item + 1 == 6) {
return '六'
} if (item + 1 == 7) {
return '日'
}
}
const dateconfiom = () => {
storeData.value.time = ''
if (weekList.value.length == 0) {
Service.Msg('请选择营业时间')
return
}
if (!openTime.value) {
Service.Msg('请选择开业时间')
return
}
if (!closeTime.value) {
Service.Msg('请选择结业时间')
return
}
if (openTime.value > closeTime.value) {
Service.Msg('开业时间不得小于结业时间')
return
}
weekList.value.sort((a, b) => {
return a - b
})
let timeIndex = weekList.value[0] - 0
let judgment = weekList.value.findIndex((item, index) => {
return item - index !== timeIndex
})
// 1是至 /0是全显示
if (judgment == -1) {
timefunc.value = 1
} else {
timefunc.value = 0
}
if (timefunc.value == 0) {
weekList.value.map((item) => {
storeData.value.time = storeData.value.time + '周' + chinese(item) + ' '
})
} else {
storeData.value.time = '周' + chinese((weekList.value[0])) + '至' + '周' + chinese((weekList.value[weekList.value.length - 1]))
}
storeData.value.time = storeData.value.time + ' ' + openTime.value + '-' + closeTime.value
showDate.value = !showDate.value
}
</script>
<style lang="scss">
.tag {
display: flex;
align-items: center;
justify-content: center;
width: fit-content;
font-size: 24rpx;
}
.tabActive {
background-color: var(--nav-mian);
color: #fff;
}
.tab {
background-color: #F5F5F5;
color: #333333
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

View File

@@ -0,0 +1,7 @@
import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [uni()],
});

View File

@@ -0,0 +1,436 @@
<template>
<view class="" style="padding: 30rpx;">
<view class="" style="position: relative;">
<image v-if="!storeData.photo" :src="Service.GetMateUrlByImg('/static/userFunc/null.png')"
style="border-radius: 20rpx; width: 100%; height: 350rpx; " mode="aspectFit" alt="" />
<image v-else :src="Service.GetMateUrlByImg(storeData.photo)"
style="border-radius: 20rpx; width: 100%; height: 350rpx; " mode="aspectFill" alt="" />
<view @click="uploaduserImg()"
style=" display: flex; align-items: center; justify-content: center; border-radius: 50%; width: 70rpx; height: 70rpx; position: absolute; bottom: 24rpx; right: 12rpx; background-color: #F97316; ">
<img :src="Service.GetIconImg('/static/userFunc/photo-store.png')"
style="width: 40rpx; height: 40rpx; " alt="" />
</view>
</view>
<view class=""
style=" margin-top: 20rpx; padding: 20rpx;border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #E2e2e2; ">
<up-form labelWidth='180rpx' :labelStyle="{'font-weight':600}" labelPosition="top" :model="storeData"
ref="form1">
<up-form-item label="店铺名称: " :borderBottom="true" ref="item1">
<up-input v-model="storeData.name" placeholder="请输入店铺名称" border="none"></up-input>
</up-form-item>
<up-form-item label="店铺地址: " :borderBottom="true" ref="item1">
<view class="">
<view v-if="!storeData.address" @click="chooseAddress()" class=""
style="display: flex; align-items: center;">
<text style="font-size: 26rpx; color: #c0c4cc; margin-right: 10rpx;">请选择地址 </text>
<up-icon name="arrow-right" color="#c0c4cc" size="12"></up-icon>
</view>
<view v-else @click="chooseAddress()" class="">
{{storeData.address}}
</view>
</view>
</up-form-item>
<up-form-item label="联系电话: " :borderBottom="true" ref="item1">
<up-input v-model="storeData.phone" placeholder="请输入您的联系电话" border="none"></up-input>
</up-form-item>
<up-form-item label="营业时间: " :borderBottom="true" ref="item1">
<view class="">
<view v-if="!storeData.time" @click="showDate=!showDate" class=""
style="display: flex; align-items: center;">
<text style="font-size: 26rpx; color: #c0c4cc; margin-right: 10rpx;">请选择营业时间 </text>
<up-icon name="arrow-right" color="#c0c4cc" size="12"></up-icon>
</view>
<view v-else @click="showDate=!showDate" class="">
{{storeData.time}}
</view>
</view>
</up-form-item>
</up-form>
</view>
<view class=""
style="margin-top: 20rpx; padding: 20rpx;border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #E2e2e2; ">
<view style="display: flex; align-items: center; justify-content: space-between;" class="">
<view class="" style="font-weight: 600;">
店铺标签
</view>
<view class="">
<up-icon @click="showTagfunc()" name="plus" color="#000" size="16" :bold='true'></up-icon>
</view>
</view>
<view class="" style="display: grid; grid-template-columns: repeat(4,1fr); ">
<view class="tag" v-for="(item,index) in tagList" :key="index"
style=" margin-top: 15rpx; padding: 10rpx 20rpx; border-radius: 8rpx; margin-right: 15rpx; background-color: var(--nav-mian); color: #fff; ">
{{item}}
</view>
</view>
</view>
<view class=""
style="margin-top: 20rpx; padding: 20rpx;border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #E2e2e2; ">
<view style="display: flex; align-items: center; justify-content: space-between;" class="">
<view class="" style="font-weight: 600;">
所属社区
</view>
<view class="">
</view>
</view>
<view class="" style="padding: 15rpx 0;">
<view v-if="!storeData.community" @click="showCommunity=!showCommunity" class=""
style="display: flex; align-items: center;">
<text style="font-size: 26rpx; color: #c0c4cc; margin-right: 10rpx;">请选择所属社区 </text>
<up-icon name="arrow-right" color="#c0c4cc" size="12"></up-icon>
</view>
<view v-else @click="showCommunity=!showCommunity" class="">
{{storeData.community}}
</view>
</view>
</view>
<view class=""
style="margin-top: 20rpx; padding: 20rpx;border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #E2e2e2; ">
<view style="display: flex; align-items: center; justify-content: space-between;" class="">
<view class="" style="font-weight: 600;">
商品管理
</view>
<view class="">
</view>
</view>
<view class="" style="padding: 20rpx 0;">
<view @click="Service.GoPage('/pages/goods/goodsDetail')" class=""
style="display: flex; align-items: center; justify-content: space-between; ">
<view class="" style=" flex: 1; display: flex; align-items: center;">
<image :src="Service.GetMateUrlByImg('/static/dele/dele3.png')"
style="width: 150rpx; height: 150rpx; " mode="aspectFit" alt="" />
<view class="" style="margin-left: 20rpx;">
<view class="" style="font-weight: 600;">
招牌牛肉面
</view>
<view class=""
style=" margin-top: 15rpx; color: #F97316; font-weight: 600; font-size: 28rpx; ">
¥28
</view>
</view>
</view>
<view class="">
<up-icon name="arrow-right" color="#c0c4cc" size="26"></up-icon>
</view>
</view>
<view class="tag" @click="Service.GoPage('/pages/goods/addGoods')"
style=" color: #F97316; margin-top: 20rpx; width: 100%; border-radius: 15rpx; border: 5rpx dashed #F97316; padding: 20rpx; text-align: center; ">
<up-icon name="plus" color="#F97316" size="16" :bold='true'></up-icon>
<text style="margin-left: 20rpx;">添加商品</text>
</view>
</view>
</view>
<view class="" style="width: 100%; height: 200rpx; ">
</view>
</view>
<view class="" style="width: 100%; background-color: #fff; position: fixed; bottom: 0; left: 0; padding: 20rpx; ">
<up-button shape='circle' color='#FF6B35' text="保存修改"></up-button>
</view>
<!-- 弹窗 -->
<up-popup :show="showDate">
<view style="width: 100%; padding: 30rpx; ">
<view class="" style="display: flex; align-items: center; justify-content: space-between;">
<view class="">
</view>
<up-icon @click="showDate=!showDate" name="close" color="#000" size="18"></up-icon>
</view>
<up-form labelWidth='180rpx' :labelStyle="{'font-weight':600}" labelPosition="top" :model="storeData"
ref="form1">
<up-form-item label="营业时间: ">
<view class="" style=" width: 100%; display: grid; grid-template-columns: repeat(4,1fr);">
<view v-for="(item,index) in 7" @click="chooseWeek(index)"
style=" margin-top: 15rpx; font-size: 32rpx; padding: 10rpx 30rpx;border-radius: 14rpx;"
:class="{ tab:weekList.findIndex(item => item == index)===-1,tabActive: weekList.findIndex(item => item == index)!=-1 }"
:key="index" class="tag">
周{{chinese(index)}}
</view>
</view>
</up-form-item>
<up-form-item label="开业时间: " labelPosition="left">
<view v-if="!openTime" @click="showOpenTime=!showOpenTime" class=""
style="display: flex; align-items: center;">
<text style="font-size: 26rpx; color: #c0c4cc; margin-right: 10rpx;">请选择开业时间 </text>
<up-icon name="arrow-right" color="#c0c4cc" size="12"></up-icon>
</view>
<view v-else @click="showOpenTime=!showOpenTime" class="">
{{openTime}}
</view>
</up-form-item>
<up-form-item label="结业时间: " labelPosition="left">
<view v-if="!closeTime" @click="showCloseTime=!showCloseTime" class=""
style="display: flex; align-items: center;">
<text style="font-size: 26rpx; color: #c0c4cc; margin-right: 10rpx;">请选择开业时间 </text>
<up-icon name="arrow-right" color="#c0c4cc" size="12"></up-icon>
</view>
<view v-else @click="showCloseTime=!showCloseTime" class="">
{{closeTime}}
</view>
</up-form-item>
</up-form>
<view class="" style="margin-top: 20rpx;">
<up-button @click="dateconfiom" text="确认"></up-button>
</view>
<up-datetime-picker @confirm='showOpenTime=!showOpenTime' @cancel="showOpenTime=!showOpenTime"
:show="showOpenTime" v-model="openTime" mode="time"></up-datetime-picker>
<up-datetime-picker @confirm='showCloseTime=!showCloseTime' @cancel="showCloseTime=!showCloseTime"
:show="showCloseTime" v-model="closeTime" mode="time"></up-datetime-picker>
</view>
</up-popup>
<up-popup :show="showTag">
<view style="width: 100%; padding: 30rpx; ">
<view class="" style="display: flex; align-items: center; justify-content: space-between;">
<view class="">
</view>
<up-icon @click="showTag=!showTag" name="close" color="#000" size="18"></up-icon>
</view>
<view class="">
<view style="display: flex; align-items: center; justify-content: space-between;" class="">
<view class="">
店铺标签
</view>
<view class="">
</view>
</view>
<view class="" style="margin: 20rpx 0;">
<up-input placeholder="请输入标签" border="bottom" v-model="tag"></up-input>
</view>
<view class="" style="margin-top: 20rpx;">
<up-button @click="addTag()" text="确认"></up-button>
</view>
</view>
</view>
</up-popup>
<!-- 社区 -->
<up-picker :show="showCommunity" @confirm="communityFunc" @cancel='showCommunity=!showCommunity'
:columns="columns"></up-picker>
</template>
<script setup lang="ts">
import { onShow, onLoad } from "@dcloudio/uni-app";
import { Service } from "@/Service/Service"
import { ref } from "vue";
interface data {
photo : string,
name : string,
address : string,
phone : string,
time : string,
community : string
}
let storeData = ref<data>({
photo: '',
name: '',
address: '',
phone: '',
time: '',
community: ''
})
// 时间
let showDate = ref(false)
let weekList = ref<Array<number>>([])
let openTime = ref()
let showOpenTime = ref(false)
let closeTime = ref()
let showCloseTime = ref(false)
// 时间方式
let timefunc = ref(-1)
// 标签
let showTag = ref(false)
let tag = ref()
let tagList = ref<Array<string>>([])
// 社区
let showCommunity = ref(false)
const columns = ref([
['平安街', '镇魂街', '美食街']
]);
onLoad(() => {
});
onShow(() => {
});
// 社区
const communityFunc = (e : any) => {
showCommunity.value = !showCommunity.value
storeData.value.community = e.value[0]
}
// 标签
const showTagfunc = () => {
showTag.value = !showTag.value
tag.value = ''
}
const addTag = () => {
if (!tag.value) {
Service.Msg('请输入标签内容')
return
}
tagList.value.push(tag.value)
showTag.value = !showTag.value
}
// 选择照片
const uploaduserImg = () => {
uni.chooseImage({
count: 1, // 最多选择1张图片
sizeType: ['original', 'compressed'], // 支持原图和压缩图
sourceType: ['album', 'camera'], // 可从相册选择或使用相机拍照
success: function (res) {
storeData.value.photo = res.tempFiles[0].path
// let path = res.tempFiles[0].path
// Service.uploadH5(path, 'Avatar', data => {
// userInfo.value.userPhoto = data.split(',')[2].split(':')[1].split('"')[1]
// })
},
fail: function (err) {
console.error('选择失败:', err.errMsg);
}
})
}
// 地址
const chooseAddress = () => {
wx.chooseLocation({
success: res => {
storeData.value.address = res.address
// latitude.value = res.latitude.toString();
// longitude.value = res.longitude.toString();
}
})
}
const chooseWeek = (index : number) => {
if (weekList.value.findIndex(item => item == index) != -1) {
let i = weekList.value.findIndex(item => item == index)
weekList.value.splice(i, 1)
return
}
weekList.value.push(index)
}
const chinese = (item : number) => {
if (item + 1 == 1) {
return '一'
}
if (item + 1 == 2) {
return '二'
} if (item + 1 == 3) {
return '三'
} if (item + 1 == 4) {
return '四'
} if (item + 1 == 5) {
return '五'
} if (item + 1 == 6) {
return '六'
} if (item + 1 == 7) {
return '日'
}
}
const dateconfiom = () => {
storeData.value.time = ''
if (weekList.value.length == 0) {
Service.Msg('请选择营业时间')
return
}
if (!openTime.value) {
Service.Msg('请选择开业时间')
return
}
if (!closeTime.value) {
Service.Msg('请选择结业时间')
return
}
if (openTime.value > closeTime.value) {
Service.Msg('开业时间不得小于结业时间')
return
}
weekList.value.sort((a, b) => {
return a - b
})
let timeIndex = weekList.value[0] - 0
let judgment = weekList.value.findIndex((item, index) => {
return item - index !== timeIndex
})
// 1是至 /0是全显示
if (judgment == -1) {
timefunc.value = 1
} else {
timefunc.value = 0
}
if (timefunc.value == 0) {
weekList.value.map((item) => {
storeData.value.time = storeData.value.time + '周' + chinese(item) + ' '
})
} else {
storeData.value.time = '周' + chinese((weekList.value[0])) + '至' + '周' + chinese((weekList.value[weekList.value.length - 1]))
}
storeData.value.time = storeData.value.time + ' ' + openTime.value + '-' + closeTime.value
showDate.value = !showDate.value
}
</script>
<style lang="scss">
.tag {
display: flex;
align-items: center;
justify-content: center;
width: fit-content;
font-size: 24rpx;
}
.tabActive {
background-color: var(--nav-mian);
color: #fff;
}
.tab {
background-color: #F5F5F5;
color: #333333
}
</style>

View File

@@ -0,0 +1,199 @@
# 项目图标清单
> 本项目需要从 https://www.iconfont.cn/ 下载以下图标
## 📋 图标清单
### 底部导航栏(必须)
| 图标名称 | 文件名 | 颜色(未选中) | 颜色(选中) | 尺寸 |
|---------|--------|--------------|------------|------|
| 首页 | home.png | #94A3B8 | #6366F1 | 48x48 px |
| 首页激活 | home-active.png | - | #6366F1 | 48x48 px |
| 我的 | profile.png | #94A3B8 | #6366F1 | 48x48 px |
| 我的激活 | profile-active.png | - | #6366F1 | 48x48 px |
**搜索关键词:** 首页 / home / 我的 / 用户 / user
---
### 首页图标
| 图标名称 | 文件名 | 尺寸 | 颜色 |
|---------|--------|------|------|
| 搜索 | search.png | 24x24 px | #94A3B8 |
| 位置 | location.png | 24x24 px | #94A3B8 |
| 全部 | all.png | 32x32 px | #6366F1 |
| 餐饮 | restaurant.png | 32x32 px | #6366F1 |
| 酒馆 | bar.png | 32x32 px | #6366F1 |
| 超市 | supermarket.png | 32x32 px | #6366F1 |
| 空状态 | empty.png | 80x80 px | #CBD5E1 |
**搜索关键词:** search / location / grid / food / drink / shop / empty
---
### 个人中心图标
| 图标名称 | 文件名 | 尺寸 | 颜色 |
|---------|--------|------|------|
| 编辑 | edit.png | 24x24 px | #FFFFFF |
| 会员 | vip.png | 32x32 px | #FFFFFF |
| 优惠券 | coupon.png | 32x32 px | #FFFFFF |
| 积分 | points.png | 32x32 px | #FFFFFF |
| 订单 | order.png | 32x32 px | #FFFFFF |
| 地址 | location.png | 24x24 px | #64748B |
| 收藏 | favorite.png | 24x24 px | #64748B |
| 帮助 | help.png | 24x24 px | #64748B |
| 设置 | settings.png | 24x24 px | #64748B |
| 右箭头 | arrow-right.png | 20x20 px | #CBD5E1 |
**搜索关键词:** edit / VIP / ticket / coin / list / map / heart / question / settings / arrow
---
### 店铺详情图标
| 图标名称 | 文件名 | 尺寸 | 颜色 |
|---------|--------|------|------|
| 电话 | phone.png | 32x32 px | #FFFFFF |
| 导航 | navigation.png | 32x32 px | #FFFFFF |
| 时间 | clock.png | 24x24 px | #64748B |
| 地址 | location.png | 24x24 px | #64748B |
**搜索关键词:** phone / navigation / clock / map-pin
---
### 优惠券图标
| 图标名称 | 文件名 | 尺寸 | 颜色 |
|---------|--------|------|------|
| 已使用 | check.png | 24x24 px | #10B981 |
| 已过期 | close.png | 24x24 px | #94A3B8 |
**搜索关键词:** check / close
---
## 🎨 颜色规范
| 用途 | 颜色代码 | 说明 |
|------|---------|------|
| 主色 | #6366F1 | 靛蓝色 |
| 辅助色 | #8B5CF6 | 紫色 |
| 未选中 | #94A3B8 | 浅灰色 |
| 次要文字 | #64748B | 灰色 |
| 辅助文字 | #94A3B8 | 更浅灰色 |
| 边框 | #CBD5E1 | 极浅灰色 |
| 背景 | #F8FAFC | 极浅蓝灰 |
---
## 📥 下载步骤
### 方法一:使用 Iconfont
1. 访问 https://www.iconfont.cn/
2. 搜索对应关键词
3. 选择合适的图标(选择 linear 或 outline 风格)
4. 点击"下载"
5. 选择 PNG 格式
6. 调整颜色和尺寸
7. 保存到 `static/icons/` 目录
### 方法二:使用其他图标库
#### Remix Icon推荐
- 网址https://remixicon.com/
- 风格:简约线条
- 格式SVG可转PNG
- 免费:✅
#### Heroicons
- 网址https://heroicons.com/
- 风格:现代简约
- 格式SVG可转PNG
- 免费:✅
#### Tabler Icons
- 网址https://tabler-icons.io/
- 风格:线条图标
- 格式SVG可转PNG
- 免费:✅
---
## 🔧 图标处理
### 调整颜色
1. 下载 SVG 格式
2. 使用在线工具或设计软件调整颜色
3. 导出为 PNG 格式
4. 确保背景透明
### 调整尺寸
- 导出时设置对应尺寸
- 确保清晰度2x 或 3x
- 保持背景透明
### 批量处理
推荐工具:
- 在线转换https://convertio.co/zh/
- Sketch / Figma
- Adobe Illustrator
---
## ⚠️ 注意事项
1. **命名规范:** 严格按照文件名清单命名
2. **格式要求:** PNG格式透明背景
3. **尺寸要求:** 按照清单中的尺寸导出
4. **颜色准确:** 使用指定的颜色代码
5. **风格统一:** 保持所有图标风格一致(建议线性图标)
---
## 📦 临时方案
如果暂时无法下载图标,可以:
### 1. 使用占位色块
```css
background: #6366F1;
border-radius: 50%;
```
### 2. 使用纯色图标
创建简单的纯色圆形或方形作为临时图标
### 3. 使用文字替代
```html
<text style="font-size: 40rpx;">🏠</text>
```
---
## ✅ 检查清单
- [ ] 底部导航栏图标4个
- [ ] 首页图标7个
- [ ] 个人中心图标10个
- [ ] 店铺详情图标4个
- [ ] 优惠券图标2个
**总计27 个图标**
---
## 📞 帮助
如有问题,请参考:
- Iconfont 帮助文档
- 在线图标转换工具
- 设计工具使用教程
---
**最后更新:** 2025-01-24