第一次上传
This commit is contained in:
@@ -0,0 +1,149 @@
|
||||
{
|
||||
"name" : "科讯代购",
|
||||
"appid" : "__UNI__06C2D6A",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.8",
|
||||
"versionCode" : 108,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"compatible" : {
|
||||
"ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : false,
|
||||
"waiting" : false,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {
|
||||
"Barcode" : {},
|
||||
"Maps" : {},
|
||||
"Geolocation" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
],
|
||||
"minSdkVersion" : 25,
|
||||
"targetSdkVersion" : 25,
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
"idfa" : false,
|
||||
"dSYMs" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"ad" : {},
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"name" : "amapZAvZjTHj",
|
||||
"appkey_ios" : "3caf9e6f01b0085be1e75e0d0e281fe7",
|
||||
"appkey_android" : "3caf9e6f01b0085be1e75e0d0e281fe7"
|
||||
}
|
||||
},
|
||||
"geolocation" : {
|
||||
"amap" : {
|
||||
"name" : "amapZAvZjTHj",
|
||||
"__platform__" : [ "android" ],
|
||||
"appkey_ios" : "",
|
||||
"appkey_android" : "3caf9e6f01b0085be1e75e0d0e281fe7"
|
||||
}
|
||||
}
|
||||
},
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios" : {
|
||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||
"ipad" : {
|
||||
"app" : "unpackage/res/icons/76x76.png",
|
||||
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||
"notification" : "unpackage/res/icons/20x20.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||
"settings" : "unpackage/res/icons/29x29.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone" : {
|
||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx1cc1bc806eda600a",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"permission" : {
|
||||
"scope.userLocation" : {
|
||||
"desc" : "获取用户地址展示附近商家"
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos" : [ "getLocation", "chooseLocation" ]
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "3",
|
||||
"h5" : {
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"qqmap" : {
|
||||
"key" : "7DIBZ-K4HCJ-ZR2FE-FOOOP-SALFT-RLFYW"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
export class ResultData {
|
||||
public code: number=-1;
|
||||
public msg: string="";
|
||||
public data: any;
|
||||
constructor(code:number,msg:string,data:any) {
|
||||
this.code=code;
|
||||
this.msg = msg;
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,238 @@
|
||||
<template>
|
||||
<view style="padding: 20rpx;">
|
||||
<view class="" style="background-color: #fff; padding: 20rpx">
|
||||
<up-scroll-list :indicator='false'>
|
||||
<view v-for="(item, index) in tabList" @click="chooseTab(item,index)"
|
||||
style=" margin: 0 10rpx; 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.GetMateUrlByImg(item.icon)" style="width: 50rpx; height: 50rpx; "></img>
|
||||
</view>
|
||||
<view :class="{tabActivefont:index==tabCurrent,tabfont:index!=tabCurrent}"
|
||||
style="font-size: 26rpx; width: fit-content; white-space: nowrap; margin-top: 15rpx;" class="">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</up-scroll-list>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="" style=" background-color: #fff; padding: 20rpx; ">
|
||||
|
||||
<view class="" v-for="(item,index) in merchList" :key="index"
|
||||
style="padding: 20rpx; margin-top: 30rpx; border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #e2e2e2;">
|
||||
<view @click="Service.GoPage('/pages/community/merchantDetail?merchId='+item.merchId)" class=""
|
||||
style="display: flex; ">
|
||||
<img :src="Service.GetMateUrlByImg(item.showImg)"
|
||||
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;">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="tag" v-if="item.tag" v-for="(tagItem,tagIndex) in item.tag.split(',')"
|
||||
:key="tagIndex"
|
||||
style=" margin-left: 15rpx; color: #fff; border-radius: 12rpx; background-color: #FF6B35; padding: 4rpx 20rpx; ">
|
||||
{{tagItem}}
|
||||
</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;">{{item.score}}</text>
|
||||
<text style="margin-left: 10rpx;color: #666666; font-size: 26rpx; ">月售{{item.sale}}单</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;">{{cancleDistance(item.distance)}}</text>
|
||||
</view>
|
||||
<view class="" style="margin-right: 20rpx;">
|
||||
<text style="font-size: 28rpx;font-weight: 600; color: #FF6B35; "> ¥{{item.price}}/人
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-if="item.goodsList.length>0" style="margin: 20rpx; margin-bottom: 0; ">
|
||||
<up-scroll-list :indicator='false'>
|
||||
<view @click="Service.GoPage('/pages/goods/goodsDetail?goodsId='+goodsItem.goodsId)"
|
||||
v-for="(goodsItem, goodsIndex) in item.goodsList" :key="goodsIndex"
|
||||
style="display: flex; flex-direction: column; justify-content: center; align-items: center;">
|
||||
<img :src="Service.GetMateUrlByImg(goodsItem.img)" alt=""
|
||||
style="width: 100rpx; height: 100rpx; border-radius: 20rpx; " />
|
||||
<view class="" style="font-size: 24rpx; color: #666666; margin-top: 10rpx; ">
|
||||
{{goodsItem.name}}
|
||||
</view>
|
||||
</view>
|
||||
</up-scroll-list>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<up-loadmore :status="status" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onShow, onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||
import { ref } from "vue";
|
||||
import { Service } from "@/Service/Service"
|
||||
import { vpMerchService } from '@/Service/vp/vpMerchService'
|
||||
interface tab {
|
||||
name : string
|
||||
icon : string
|
||||
assortId : string
|
||||
}
|
||||
|
||||
|
||||
interface Goods {
|
||||
showImg : string
|
||||
distance : number
|
||||
tips : string
|
||||
price : number
|
||||
name : string
|
||||
score : number
|
||||
tag : string
|
||||
merchId : string
|
||||
sale : number
|
||||
goodsList : merchGoods[]
|
||||
}
|
||||
|
||||
interface merchGoods {
|
||||
name : string
|
||||
img : string
|
||||
goodsId : string
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
let current = ref(0)
|
||||
let swiperList = ref([])
|
||||
|
||||
let address = ref('许昌市魏都区')
|
||||
|
||||
let notice = ref('uview-plus UI众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让您快速集成,开箱即用')
|
||||
let tabCurrent = ref(0)
|
||||
let tabList = ref<tab[]>([])
|
||||
|
||||
|
||||
let scrollList = ref([
|
||||
{
|
||||
name: '牛肉面',
|
||||
img: '/static/dele/dele1.jpg'
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
let assId = ref('')
|
||||
let comId = ref('')
|
||||
let page = ref(1)
|
||||
let status = ref('nomore')
|
||||
let longitude = ref()
|
||||
let latitude = ref()
|
||||
|
||||
let merchList = ref<Goods[]>([])
|
||||
|
||||
onLoad(() => {
|
||||
|
||||
getLocation()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
|
||||
});
|
||||
|
||||
|
||||
onReachBottom(() => {
|
||||
getList()
|
||||
})
|
||||
|
||||
|
||||
const getLocation = () => {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: function (res) {
|
||||
longitude.value = res.longitude
|
||||
latitude.value = res.latitude
|
||||
getdata()
|
||||
},
|
||||
fail: function (e) {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const getdata = () => {
|
||||
|
||||
status.value = 'loadmore'
|
||||
page.value = 1
|
||||
|
||||
getList()
|
||||
}
|
||||
|
||||
const getList = () => {
|
||||
|
||||
if (status.value !== 'loadmore') {
|
||||
return
|
||||
}
|
||||
status.value = 'loading'
|
||||
|
||||
|
||||
vpMerchService.GetMerchList(assId.value ? assId.value : '', comId.value ? comId.value : '', longitude.value, latitude.value, page.value).then(res => {
|
||||
swiperList.value = []
|
||||
res.data.banner.map((item : any) => {
|
||||
swiperList.value.push(Service.GetMateUrlByImg(item.img))
|
||||
})
|
||||
merchList.value = [...merchList.value, ...res.data.merchList]
|
||||
tabList.value = res.data.assortList.slice(0, 10)
|
||||
status.value = res.data.merchList.length == 10 ? 'loadmore' : 'nomore'
|
||||
page.value++
|
||||
})
|
||||
}
|
||||
|
||||
const chooseTab = (e : any, index : number) => {
|
||||
tabCurrent.value = index
|
||||
assId.value = e.assortId
|
||||
getdata()
|
||||
}
|
||||
|
||||
const cancleDistance = (item : any) => {
|
||||
if (item >= 1000) {
|
||||
return (item / 1000).toFixed(1) + 'km'
|
||||
} else {
|
||||
return item + 'm'
|
||||
}
|
||||
}
|
||||
</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>
|
||||
@@ -0,0 +1,80 @@
|
||||
/* 会员标签和ID标签全局样式 */
|
||||
|
||||
/* ID标签 - 紧凑设计 */
|
||||
.user-id-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
background: rgba(255, 107, 0, 0.08);
|
||||
border: 1rpx solid rgba(255, 107, 0, 0.25);
|
||||
border-radius: 20rpx;
|
||||
padding: 6rpx 12rpx;
|
||||
height: 44rpx;
|
||||
backdrop-filter: blur(10rpx);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.user-id-tag:active {
|
||||
transform: scale(0.95);
|
||||
background: rgba(255, 107, 0, 0.15);
|
||||
}
|
||||
|
||||
.id-icon {
|
||||
font-size: 18rpx;
|
||||
color: #FF6B00;
|
||||
margin-right: 4rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.id-text {
|
||||
font-size: 20rpx;
|
||||
color: #FF6B00;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.5rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
.id-copy {
|
||||
font-size: 20rpx;
|
||||
color: #FF9800;
|
||||
padding: 2rpx;
|
||||
margin-left: 2rpx;
|
||||
transition: all 0.2s ease;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.id-copy:active {
|
||||
transform: scale(1.15);
|
||||
color: #FF6B00;
|
||||
}
|
||||
|
||||
/* 会员等级标签 */
|
||||
.user-member-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
background: linear-gradient(135deg, #FF6B00, #FF9500);
|
||||
padding: 6rpx 12rpx;
|
||||
border-radius: 20rpx;
|
||||
height: 44rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(255, 107, 0, 0.25);
|
||||
}
|
||||
|
||||
.member-icon {
|
||||
font-size: 18rpx;
|
||||
color: #FFFFFF;
|
||||
margin-right: 4rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.member-text {
|
||||
font-size: 20rpx;
|
||||
color: #FFFFFF;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 标签行 - 用于排列ID和会员等级标签 */
|
||||
.tags-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10rpx;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
Reference in New Issue
Block a user