第一次上传
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
import { Service } from '@/Service/Service';
|
||||
/*****社区*****/
|
||||
class vpMerchService {
|
||||
private static GetMerchListPath: string = '/Merch/GetMerchList';
|
||||
/*****商家列表*****/
|
||||
static GetMerchList(assId: string,comId:string,lon:number,lat:number,page:number) {
|
||||
var result = Service.Request(this.GetMerchListPath, 'GET', {assId,comId,lon,lat,page});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static GetMerchInfoPath: string = '/Merch/GetMerchInfo';
|
||||
/*****店铺详情*****/
|
||||
static GetMerchInfo(merchId: string,page:number) {
|
||||
var result = Service.Request(this.GetMerchInfoPath, 'GET', {merchId,page});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static GetGoodsInfoPath: string = '/Merch/GetGoodsInfo';
|
||||
/*****商品详情*****/
|
||||
static GetGoodsInfo(goodsId: string,page:number) {
|
||||
var result = Service.Request(this.GetGoodsInfoPath, 'GET', {goodsId,page});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static GetMyMerchInfoPath: string = '/Merch/GetMyMerchInfo';
|
||||
/*****获取用户个人绑定商家*****/
|
||||
static GetMyMerchInfo() {
|
||||
var result = Service.Request(this.GetMyMerchInfoPath, 'GET', {});
|
||||
return result;
|
||||
}
|
||||
|
||||
private static UpdateMerchPath: string = '/Merch/UpdateMerch';
|
||||
/*****修改用户个人绑定商家*****/
|
||||
static UpdateMerch(comId:string,name:string,showImg:string,phone:string,price:number,province:string,city:string,county:string,address:string,lon:number,lat:number,busTime:string,tag:string) {
|
||||
var result = Service.Request(this.UpdateMerchPath, 'POST', {comId,name,showImg,phone,price,province,city,county,address,lon,lat,busTime,tag});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static GetMerchGoodsPath: string = '/Merch/GetMerchGoods';
|
||||
/*****获取商家商品列表*****/
|
||||
static GetMerchGoods(page:number) {
|
||||
var result = Service.Request(this.GetMerchGoodsPath, 'GET', {page});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static UpdateGoodsStatusPath: string = '/Merch/UpdateGoodsStatus';
|
||||
/*****修改商品上下架*****/
|
||||
static UpdateGoodsStatus(goodsId:string) {
|
||||
var result = Service.Request(this.UpdateGoodsStatusPath, 'POST', {goodsId});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static UpdateMerchGoodsPath: string = '/Merch/UpdateMerchGoods';
|
||||
/*****修改商品*****/
|
||||
static UpdateMerchGoods(goodsId:string,name:string,img:string,price:number,brief:string,status:number) {
|
||||
var result = Service.Request(this.UpdateMerchGoodsPath, 'POST', {goodsId,name,img,price,brief,status});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static DelGoodsPath: string = '/Merch/DelGoods';
|
||||
/*****删除商品*****/
|
||||
static DelGoods(goodsId:string) {
|
||||
var result = Service.Request(this.DelGoodsPath, 'POST', {goodsId});
|
||||
return result;
|
||||
}
|
||||
|
||||
private static GetUnitMerchInfoPath: string = '/Merch/GetUnitMerchInfo';
|
||||
/*****商家详情*****/
|
||||
static GetUnitMerchInfo(merchId:string) {
|
||||
var result = Service.Request(this.GetUnitMerchInfoPath, 'GET', {merchId});
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
export { Service, vpMerchService };
|
||||
@@ -0,0 +1,75 @@
|
||||
<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 class="" style=" margin:20rpx; margin-top: 50rpx; " >
|
||||
<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>
|
||||
</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([
|
||||
'全部',
|
||||
'今日',
|
||||
'本周',
|
||||
'本月'
|
||||
])
|
||||
onLoad(() => {
|
||||
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
|
||||
});
|
||||
const changetab=(e:number)=>{
|
||||
currentIndex.value=e
|
||||
}
|
||||
</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>
|
||||
@@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<view style="padding: 20rpx;">
|
||||
<view class=""
|
||||
style=" display: flex; align-items: center; justify-content: space-around; background-color: #fff; padding: 20rpx">
|
||||
<view v-for="(item, index) in tabList" @click="chooseTab(index)"
|
||||
style="display: flex; flex-direction: column; align-items: center; justify-content: center;"
|
||||
:key="index">
|
||||
<view class="" :class="{tabimgActive:index==tabCurrent,tabimg: index!=tabCurrent }"
|
||||
style=" border-radius: 50%; display: flex; align-items: center; justify-content: center; height: 100rpx; width: 100rpx; ">
|
||||
<img :src="Service.GetIconImg( index==tabCurrent? item.imged:item.img)"
|
||||
style="width: 50rpx; height: 50rpx; "></img>
|
||||
</view>
|
||||
<view :class="{tabActivefont:index==tabCurrent,tabfont:index!=tabCurrent}"
|
||||
style="font-size: 26rpx; margin-top: 15rpx;" class="">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="" style=" background-color: #fff; padding: 20rpx; " >
|
||||
|
||||
<view class="" @click="Service.GoPage('/pages/community/merchantDetail')"
|
||||
style="padding: 20rpx; margin-top: 20rpx; border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #e2e2e2;">
|
||||
<view class="" style="display: flex; ">
|
||||
<img :src="Service.GetMateUrlByImg('/static/dele/dele1.jpg')"
|
||||
style=" border-radius: 20rpx; width: 140rpx; height: 140rpx;" alt="" />
|
||||
<view class=""
|
||||
style=" flex: 1; margin-left: 20rpx; display: flex; flex-direction: column; justify-content: space-between; ">
|
||||
<view class="" style="display: flex; align-items: center;">
|
||||
<view class="" style="font-weight: 700; font-size: 32rpx;">
|
||||
老北京炸酱面
|
||||
</view>
|
||||
<view class="tag"
|
||||
style=" margin-left: 15rpx; color: #fff; border-radius: 12rpx; background-color: #FF6B35; padding: 4rpx 20rpx; ">
|
||||
新店
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<up-rate count="1" activeColor='#FF6B35' size='16' :readonly='true'></up-rate>
|
||||
<text style="color: #666666; font-size: 26rpx;">3.8</text>
|
||||
<text style="margin-left: 10rpx;color: #666666; font-size: 26rpx; ">月售892单</text>
|
||||
</view>
|
||||
<view class="" style="display: flex; align-items: center; justify-content: space-between; ">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<up-icon name="map" color="#666666" size="18"></up-icon>
|
||||
<text style="color: #666666; margin-left: 12rpx; font-size: 26rpx;">0.8km</text>
|
||||
</view>
|
||||
<view class="" style="margin-right: 20rpx;">
|
||||
<text style="font-size: 28rpx;font-weight: 600; color: #FF6B35; "> ¥58/人 </text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="margin: 20rpx; margin-bottom: 0; " >
|
||||
<up-scroll-list :indicator='false' >
|
||||
<view @click="Service.GoPage('/pages/goods/goodsDetail')" v-for="(item, index) in scrollList" :key="index" style="display: flex; margin-right: 50rpx; flex-direction: column; justify-content: center; align-items: center;" >
|
||||
<img :src="Service.GetIconImg(item.img)" alt="" style="width: 100rpx; height: 100rpx; border-radius: 20rpx; " />
|
||||
<view class="" style="font-size: 24rpx; color: #666666; margin-top: 10rpx; " >
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</up-scroll-list>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onShow, onLoad } from "@dcloudio/uni-app";
|
||||
import { ref } from "vue";
|
||||
import {Service} from "@/Service/Service"
|
||||
|
||||
let search = ref()
|
||||
|
||||
let tabCurrent=ref(0)
|
||||
let tabList = ref(
|
||||
[
|
||||
{
|
||||
name: '美食',
|
||||
img: '/static/index/index/food.png',
|
||||
imged: '/static/index/index/fooded.png'
|
||||
},
|
||||
{
|
||||
name: '饮品',
|
||||
img: '/static/index/index/cofe.png',
|
||||
imged: '/static/index/index/cofed.png'
|
||||
},
|
||||
{
|
||||
name: '超市',
|
||||
img: '/static/index/index/shop.png',
|
||||
imged: '/static/index/index/shoped.png'
|
||||
},
|
||||
{
|
||||
name: '美妆',
|
||||
img: '/static/index/index/good.png',
|
||||
imged: '/static/index/index/gooded.png'
|
||||
},
|
||||
{
|
||||
name: '医疗',
|
||||
img: '/static/index/index/medical.png',
|
||||
imged: '/static/index/index/medicaled.png'
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
let scrollList = ref([
|
||||
{
|
||||
name: '牛肉面',
|
||||
img: '/static/dele/dele3.png'
|
||||
},
|
||||
{
|
||||
name: '牛肉面',
|
||||
img: '/static/dele/dele3.png'
|
||||
},
|
||||
{
|
||||
name: '牛肉面',
|
||||
img: '/static/dele/dele3.png'
|
||||
},
|
||||
{
|
||||
name: '牛肉面',
|
||||
img: '/static/dele/dele3.png'
|
||||
},
|
||||
{
|
||||
name: '牛肉面',
|
||||
img: '/static/dele/dele3.png'
|
||||
},
|
||||
{
|
||||
name: '牛肉面',
|
||||
img: '/static/dele/dele3.png'
|
||||
},
|
||||
{
|
||||
name: '牛肉面',
|
||||
img: '/static/dele/dele3.png'
|
||||
},
|
||||
{
|
||||
name: '牛肉面',
|
||||
img: '/static/dele/dele3.png'
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
onLoad(() => {
|
||||
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
|
||||
});
|
||||
|
||||
|
||||
const chooseTab=(e)=>{
|
||||
tabCurrent.value=e
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
|
||||
.tabimgActive{
|
||||
background-color: var(--nav-mian);
|
||||
}
|
||||
.tabimg{
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
|
||||
.tabActivefont{
|
||||
color: var(--nav-mian);
|
||||
}
|
||||
.tabfont{
|
||||
color:#333333
|
||||
}
|
||||
.tag{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: fit-content;
|
||||
font-size: 24rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user