Commit ac737f76 authored by 张娇(东信)'s avatar 张娇(东信)

Merge remote-tracking branch 'origin/master'

parents 73b8d8f2 11666726
......@@ -40,7 +40,7 @@
<text class="fab-text">订单</text>
</view>
<view class="custom-button" @click="go('/pages/assistingAgriculture/cart/cart')">
<image class="fab-icon" src="../../static/index/gwc.png"></image>
<image class="fab-icon" src="../../static/index/shoppingCart.png"></image>
<text class="fab-text">购物车</text>
<view class="badge" v-if="cartCount > 0">{{ cartCount }}</view>
</view>
......@@ -103,14 +103,15 @@ const go = (url) => {
.badge {
font-size: 18rpx;
font-weight: bold;
color: #fa4350;
background-color: #fff;
color: #fff;
background-color: #fa4350;
text-align: center;
border-radius: 32rpx;
padding: 4rpx 8rpx;
padding: 4rpx 10rpx;
position: absolute;
top: 0;
right: -6rpx;
top: -10rpx;
right: -18rpx;
border: 4rpx solid #fff;
}
}
</style>
......@@ -8,3 +8,12 @@ export function getPhoto(data) {
data,
});
}
// 点赞
export function likeOrDislike(data) {
return request({
url: `/sgyrdd/evaluation/likeOrDislike`,
method: 'POST',
data,
});
}
......@@ -82,7 +82,7 @@
"sdkConfigs": {
"maps": {
"qqmap": {
"key": "B7VBZ-PT5RB-WRHUT-J2EEQ-3WTUE-APFX4"
"key": "MN4BZ-7JXKW-2RYRD-32QGF-AHONV-PAFUN"
}
}
}
......
......@@ -178,7 +178,26 @@ async function changeLocation() {
page {
background: #f9f9f9;
}
:deep(#u-a-c .uni-system-choose-location .nav) {
top: 20px !important;
background-image: none;
}
:deep(#u-a-c .uni-system-choose-location .nav-btn) {
background-color: #007aff;
border-radius: 10px;
}
:deep(#u-a-c .uni-system-choose-location .nav-btn.back) {
background-color: #007aff;
border-radius: 10px;
top: 50px;
left: 10px;
}
:deep(#u-a-c .uni-system-choose-location .nav-btn.confirm) {
background-color: #007aff;
border-radius: 10px;
top: 50px;
right: 10px;
}
.container {
width: 375 * 2rpx;
margin: 0 auto;
......
......@@ -310,6 +310,7 @@
<button @click="openZfType">立即预定</button>
</div>
<Payment ref="PaymentRef" @payment="payNow"></Payment>
<fab position="3" />
</div>
</template>
......@@ -318,6 +319,7 @@ import timeLine from './timeLine.vue';
import domain from '@/utils/domain';
import Payment from '@/pages/order/components/Payment/index.vue';
import { ref, computed, watch } from 'vue';
import fab from '../../../components/fab/fab.vue';
import {
getProd,
getEvalStatis,
......@@ -589,14 +591,14 @@ function back() {
function toCommentDetail() {
// TODO: 跳转到评论详情页
xma.navigateTo({
url: '/pages/assistingAgriculture/commentList/index',
url: `/pages/assistingAgriculture/commentList/index?shopId=${shopIds.value}&prodId=${prodIds.value}`,
});
}
// 跳转用户相册
function toAlbum() {
// TODO: 跳转到评论详情页
xma.navigateTo({
url: '/pages/assistingAgriculture/album/index',
url: `/pages/assistingAgriculture/album/index?shopId=${shopIds.value}&prodId=${prodIds.value}`,
});
}
</script>
......@@ -1016,10 +1018,10 @@ uni-page-body {
}
}
.footer {
height: 196rpx;
height: 90rpx;
border-radius: 16rpx 16rpx 0rpx 0rpx;
background: #ffffff;
padding: 20rpx 20rpx 0 42rpx;
padding: 16rpx;
align-items: flex-start;
.like {
display: flex;
......
......@@ -121,6 +121,7 @@
没有更多啦~
</view>
</view>
<fab position="3" />
</view>
</template>
......@@ -131,6 +132,7 @@ import Sort from '../../../components/assistingAgriculture/index/Sort.vue';
import DepartureDate from '../../../components/assistingAgriculture/index/Date.vue';
import ScenicSpots from '../../../components/assistingAgriculture/index/ScenicSpots.vue';
import Screen from '../../../components/assistingAgriculture/index/Screen.vue';
import fab from '../../../components/fab/fab.vue';
const rotate = ref(false);
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
const rotate2 = ref(false);
......
......@@ -11,8 +11,11 @@
<img :src="item.avatar" alt="" />
<p>{{ item.nickName }}</p>
</div>
<div class="like">
<wd-icon name="thumb-up"></wd-icon>
<div class="like flex-align-center" @click="like(item)">
<img
:src="`/static/assistingAgriculture/assets/${item.give == 0 ? 'like' : 'likeFilled'}.png`"
alt=""
/>
{{ item.giveCount }}
</div>
</div>
......@@ -20,6 +23,7 @@
</template>
<script setup>
import { likeOrDislike } from '../../../api/photo';
const showMore = ref(false);
const props = defineProps({
photoData: {
......@@ -33,6 +37,24 @@ const toReviewDetails = (id) => {
url: `/pages/assistingAgriculture/reviewDetails/reviewDetails?evaluationId=${id}`,
});
};
/* 点赞 */
let flag = false;
const like = (item) => {
if (flag) {
return;
} else {
flag = true;
}
likeOrDislike({ evaluationId: item.evaluationId }).then((res) => {
flag = false;
if (res.code === 0) {
// 成功
item.give = item.give === 0 ? 1 : 0;
item.giveCount = item.give === 0 ? item.giveCount - 1 : item.giveCount + 1;
}
});
};
</script>
<style lang="scss" scoped>
......@@ -86,8 +108,9 @@ const toReviewDetails = (id) => {
.like {
font-size: 12px;
color: #767676;
.wd-icon {
font-size: 15px;
img {
width: 16px;
height: 16px;
}
}
}
......
......@@ -7,7 +7,7 @@
</div>
</scroll-view>
<div class="back">
<button>返回预订</button>
<button @click="back">返回预订</button>
</div>
</div>
</template>
......@@ -60,12 +60,9 @@ const filterList = [
},
];
const photoData = ref([]);
const params = {
prodId: '43828',
shopId: '1818876196597334017',
};
onLoad(() => {
getPhotoFn();
onLoad(({ prodId, shopId }) => {
getPhotoFn({ prodId, shopId });
});
// const scrolltolower = () => {
// console.log('触底加载触底加载触底加载');
......@@ -76,7 +73,7 @@ onLoad(() => {
// }
// show.value = true;
// };
const getPhotoFn = () => {
const getPhotoFn = (params) => {
getPhoto(params).then((res) => {
res.data.forEach((v) => {
if (v.images) {
......@@ -91,6 +88,9 @@ const getPhotoFn = () => {
photoData.value = [...photoData.value, ...res.data];
});
};
const back = () => {
uni.navigateBack();
};
</script>
<style lang="scss" scoped>
......@@ -103,21 +103,21 @@ uni-page-body {
flex-direction: column;
background-color: #f3f3f3;
.content {
padding: 10px 5px;
padding: 20rpx 10rpx;
box-sizing: border-box;
flex-grow: 1;
height: 69px;
height: 138rpx;
.filter-box {
display: flex;
background-color: #fff;
padding: 10px;
gap: 10px;
padding: 20rpx;
gap: 20rpx;
flex-wrap: wrap;
div {
padding: 8px;
padding: 16rpx;
color: #3d3d3d;
font-size: 8px;
border-radius: 8px;
font-size: 16rpx;
border-radius: 16rpx;
background-color: #eeeeee;
}
.active {
......@@ -126,23 +126,23 @@ uni-page-body {
}
}
.card-wrap {
// margin-top: 5px;
// margin-top: 10rpx;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 5px;
gap: 10rpx;
}
}
}
.back {
background-color: #fff;
padding: 20px 0 34px;
box-shadow: 0px -4px 8px 0px rgba(0, 0, 0, 0.12);
padding: 40rpx 0;
box-shadow: 0rpx -8rpx 16rpx 0rpx rgba(0, 0, 0, 0.12);
button {
width: 345px;
height: 44px;
border-radius: 34px;
width: 690rpx;
height: 88rpx;
border-radius: 68rpx;
background-color: #fa5151;
font-size: 16px;
font-size: 32rpx;
font-weight: 500;
color: #ffffff;
}
......
......@@ -89,8 +89,8 @@ const imgUrl = import.meta.env.VITE_APP_IMG_URL;
const tagList = ref([]);
const commentData = ref([]);
const commentParameters = {
shopId: '1818876196597334017',
prodId: '43828',
shopId: '',
prodId: '',
current: 1,
size: 10,
};
......@@ -99,7 +99,9 @@ let total;
const select = ref(-1);
const topData = ref({});
onLoad((options) => {
onLoad(({ prodId, shopId }) => {
commentParameters.prodId = prodId;
commentParameters.shopId = shopId;
getEvalStatisFn();
getCommentListFn();
});
......@@ -299,7 +301,7 @@ uni-page-body {
}
.back {
background-color: #fff;
padding: 40rpx 0 68rpx;
padding: 40rpx 0;
box-shadow: 0rpx -8rpx 16rpx 0rpx rgba(0, 0, 0, 0.12);
button {
width: 690rpx;
......
......@@ -176,6 +176,7 @@ const rateList = ref({
onLoad(async (options) => {
catalog.shopId = options.shopId;
catalog.prodId = options.prodId;
console.log(options);
await getList();
await getTotal();
......@@ -191,6 +192,7 @@ const catalog = reactive({
current: 0,
size: 10,
shopId: '',
prodId: '',
evaluation: '', // 关键字搜索
type: '', // img-图片,append-追评,diff-中差评,good-好评
});
......
......@@ -132,6 +132,7 @@
</view>
</view>
</view>
<fab position="3" />
</view>
</template>
......@@ -147,6 +148,7 @@ import {
getCouponShopList,
receiveCoupon,
} from '@/api/packageDetail';
import fab from '../../../components/fab/fab.vue';
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
// 图片
const swiperList = ref([
......
......@@ -84,8 +84,9 @@
<!-- ></wd-icon>-->
<view class="buy-img">
<view class="hot-img" v-for="(item, index) in hotImgList" :key="index">
<img
<image
class="rice"
mode="aspectFill"
@tap="toDetail(item)"
:src="item.img"
style="width: 670rpx; height: 236rpx"
......@@ -480,13 +481,13 @@ page {
height: 100%;
background-color: lightgreen;
}
img.rice {
border-radius: 16rpx 16rpx 16rpx 16rpx;
margin-left: 20rpx;
}
.buy-img {
position: relative;
top: -20rpx;
.rice {
border-radius: 16rpx 16rpx 16rpx 16rpx;
margin-left: 20rpx;
}
}
.searchBox {
opacity: 1;
......
......@@ -8,9 +8,9 @@
>
<view class="searchBox" :style="{ border }">
<image
mode="aspectFill"
class="magnifyingGlass"
src="../../../static/index/magnifyingGlass.png"
mode="aspectFit|aspectFill|widthFix"
/>
<input
type="text"
......@@ -43,7 +43,7 @@
v-for="(item, index) in sortList"
:key="index"
>
<img :src="item.icon" style="width: 96rpx; height: 96rpx" />
<image mode="aspectFill" :src="item.icon" style="width: 96rpx; height: 96rpx" />
<view class="sort-text">{{ item.categoryName }}</view>
</view>
</view>
......@@ -51,7 +51,7 @@
<view class="product-page" v-for="(item, index) in list" :key="index">
<view>
<view class="page-title">{{ item.categoryName }}</view>
<img :src="item.img" class="main-img" />
<image mode="aspectFill" :src="item.img" class="main-img" />
<view style="display: flex; flex-direction: row">
<view
class="detail-border"
......@@ -59,7 +59,8 @@
:key="index"
@click="toDetail(item)"
>
<img
<image
mode="aspectFill"
:src="item.commodityImg"
style="width: 216rpx; height: 176rpx; border-radius: 16rpx"
/>
......
......@@ -117,6 +117,7 @@
>
没有更多啦~
</view>
<fab />
</view>
</template>
......@@ -125,6 +126,7 @@ import FoodDetails from '../../components/index/FoodDetails.vue';
// import Search from '../../components/index/Search.vue';
import Classification from '../../components/index/Classification.vue';
import Position from '../../components/index/Position.vue';
import fab from '../../components/fab/fab.vue';
import Sort from '../../components/index/Sort.vue';
import { getByParentId, merchantList, prodSpecial } from '../../api/index';
......
......@@ -73,6 +73,7 @@
>
没有更多啦~
</view>
<fab />
</view>
</template>
......@@ -82,6 +83,7 @@ import FoodDetails from '../../components/index/FoodDetails.vue';
import Classification from '../../components/index/Classification.vue';
import Position from '../../components/index/Position.vue';
import Sort from '../../components/index/Sort.vue';
import fab from '../../components/fab/fab.vue';
import { merchantList, getByParentId, getByType } from '../../api/index';
import { getLocation } from '../../utils/tool';
const business = reactive(['优选商家', '超值半价', '今日可订', '经典单人']);
......
......@@ -245,12 +245,14 @@
</view>
<!-- 底部-end -->
</view>
<fab />
</template>
<script setup>
import { getProdDetail, getCollect, getCouponShopList, receiveCoupon } from '@/api/packageDetail';
import { getStoreInformation } from '@/api/shop';
import { getDistance } from '@/utils/common';
import fab from '../../components/fab/fab.vue';
const prodInfo = ref({});
const prodRlue = ref({});
const myProdId = ref('');
......
......@@ -291,10 +291,12 @@
</view>
<!-- 周边推荐-end -->
</view>
<fab />
</view>
</template>
<script setup>
import fab from '../../components/fab/fab.vue';
import {
likeOrDislike,
getStoreInformation,
......
......@@ -169,7 +169,6 @@
v-model="show"
position="bottom"
custom-style="height:500px;overflow:auto;"
safe-area-inset-bottom="true"
@close="handleClose"
>
<view class="hcontent">
......@@ -383,7 +382,6 @@ const exsitedData = ref();
const dealCategoryData = ref([]);
onLoad((options) => {
console.log(options.content);
headers.value = { Authorization: 'Bearer ' + token };
if (options.content != null) {
isNewFlag.value = false;
......@@ -710,31 +708,42 @@ const submitData = () => {
// 重新定位收货地址
async function changeLocation() {
showNavBar.value = false;
console.log('1111');
uni.chooseLocation({
success: function (res) {
console.log('第一次回调', res);
// forMData.value.city = res.address;
formData.shopAddress = res.address;
formData.shopLng = res.longitude;
formData.shopLat = res.latitude;
uni.request({
url: '/ws/geocoder/v1/',
url: 'https://apis.map.qq.com/ws/geocoder/v1/',
data: {
key: 'B7VBZ-PT5RB-WRHUT-J2EEQ-3WTUE-APFX4',
key: 'MN4BZ-7JXKW-2RYRD-32QGF-AHONV-PAFUN',
location: `${res.latitude},${res.longitude}`,
},
success: function (res) {
// console.log('逆地理编码:' + JSON.stringify(res));
console.log('进入成功回调');
console.log(res.data.status);
if (res.data.status === 0) {
formData.province = res.data.result.address_component.province;
formData.city = res.data.result.address_component.city;
formData.area = res.data.result.address_component.district;
ssq.value = formData.province + formData.city + formData.area;
console.log('省' + formData.province);
console.log('市' + formData.city);
console.log('区' + formData.area);
console.log('ssq' + ssq.value);
// showNavBar.value = true;
}
},
complete: function (res) {
console.log('在complete里');
console.log(res);
},
});
},
complete: (res) => {
......@@ -748,7 +757,26 @@ async function changeLocation() {
page {
background: #fff;
}
:deep(#u-a-c .uni-system-choose-location .nav) {
top: 20px !important;
background-image: none;
}
:deep(#u-a-c .uni-system-choose-location .nav-btn) {
background-color: #007aff;
border-radius: 10px;
}
:deep(#u-a-c .uni-system-choose-location .nav-btn.back) {
background-color: #007aff;
border-radius: 10px;
top: 50px;
left: 10px;
}
:deep(#u-a-c .uni-system-choose-location .nav-btn.confirm) {
background-color: #007aff;
border-radius: 10px;
top: 50px;
right: 10px;
}
.uni-textarea-placeholder,
.uni-textarea-line,
.uni-textarea-compute,
......
......@@ -144,8 +144,8 @@ onLoad(async () => {
// 优惠券状态 0:失效 2:已使用,3-未使用
const iconUrl = ref({
0: '@/static/ticket/past-icon.png',
2: '@/static/ticket/used-icon.png',
0: '../../static/ticket/past-icon.png',
2: '../..//static/ticket/used-icon.png',
});
// 主状态
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment