修改测试环境

parent bdd970d7
......@@ -15,3 +15,10 @@ export function getCollect(data) {
method: 'GET',
});
}
// 商家商品优惠券
export function getCouponShopList(prodId, shopId) {
return request({
url: `/sgyrdd/coupon/couponGoodsShopList/${shopId}/${prodId}`,
method: 'GET',
});
}
<template>
<view class="package-details">
<wd-popup
v-model="showpopup"
position="bottom"
custom-style="height: 50%;"
@close="handleClose"
:safe-area-inset-bottom="true"
custom-class="popup"
></wd-popup>
<!-- 轮播 -->
<view class="swiper">
<wd-swiper
......@@ -17,6 +25,13 @@
<!-- 轮播-end -->
<!-- card -->
<view class="package-details-card">
<wd-overlay :show="show" @click="show = false">
<view class="wrapper">
<view class="block">
{{ productCoupons[0].activityNotes }}
</view>
</view>
</wd-overlay>
<view class="package-details-num">
<view class="num">
<text class="icon"></text>
......@@ -31,10 +46,10 @@
<text class="yh-name">优惠:</text>
<view class="bt-icon">
<image src="@/static/shop/bt-icon.png"></image>
<text class="yh-name lj">立减10元</text>
<text class="yh-name lj">{{ productCoupons[0].activityName }}</text>
</view>
<view class="ylq-icon">
已领取
<view class="ylq-icon" @click="showpopup = true">
{{ productCoupons[0].numState === 0 ? '未领取' : '已领取' }}
<wd-icon name="arrow-right" size="16px"></wd-icon>
</view>
</view>
......@@ -52,7 +67,7 @@
<i class="iconfont icon icon-jinggao" />
随时用
</view>
<i class="iconfont jg icon-jinggao" />
<i @click="alert" class="iconfont jg icon-jinggao" />
</view>
<view class="xz">
<text class="yh-name">限制:</text>
......@@ -148,8 +163,10 @@
</template>
<script setup>
import { getProdDetail, getCollect } from '@/api/packageDetail';
import { getProdDetail, getCollect, getCouponShopList } from '@/api/packageDetail';
import { getStoreInformation } from '@/api/shop';
import { useMessage } from '../../../node_modules/wot-design-uni';
const message = useMessage();
const prodInfo = ref({});
const prodRlue = ref({});
const myProdId = ref('');
......@@ -157,19 +174,34 @@ const current = ref(0);
const showRlue = ref(true);
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
const shopInfo = ref({});
const show = ref(false);
const currentLatitudeAndLongitude = ref({});
const shopId = ref('');
const showpopup = ref(false);
// 商品优惠券
const productCoupons = ref([]);
onLoad((options) => {
const { prodId } = options;
myProdId.value = prodId;
getProdDetailFn(prodId).then((shopId) => {
getStoreInformationFn(shopId);
getCouponShopListFn(prodId, shopId);
});
});
onShow(() => {
// 获取位置
getLocationFn();
});
function alert() {
show.value = true;
}
/**
* 关闭弹窗
*/
function handleClose() {
showpopup.value = false;
}
/**
* 获取套餐详情
* @param {String} prodId
......@@ -198,6 +230,16 @@ function getProdDetailFn(prodId) {
});
});
}
/**
* 获取商品优惠券列表
*/
function getCouponShopListFn(prodId, shopId) {
getCouponShopList(prodId, shopId).then((res) => {
if (res.code === 0) {
productCoupons.value = res.data;
}
});
}
/**
* 获取收藏
*/
......@@ -298,6 +340,20 @@ page {
flex-direction: column;
position: relative;
margin-top: -40rpx;
.wrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.block {
padding: 20rpx;
box-sizing: border-box;
background-color: #fff;
font-size: 24rpx;
color: #767676;
}
.package-details-num {
display: flex;
align-items: flex-end;
......
......@@ -66,13 +66,12 @@
<text class="shop-address-detail">{{ shopInfo.shopAddress }}</text>
</view>
<view class="shop-map-phone">
<image mode="aspectFill" class="img1" src="@/static/shop/map.png"></image>
<image
mode="aspectFill"
@tap="callShopPhone(shopInfo.phone)"
class="img1"
src="@/static/shop/map.png"
mode="aspectFill"
src="@/static/shop/phone.png"
></image>
<image mode="aspectFill" src="@/static/shop/phone.png"></image>
</view>
</view>
</view>
......
......@@ -41,7 +41,7 @@ export default defineConfig({
// 代理配置
proxy: {
'/api': {
target: 'http://192.168.0.147:9999',
target: 'http://test2.rhhzkj.com:8080',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
......
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