Commit e45ac04f authored by 彭佳妮(贵阳日报)'s avatar 彭佳妮(贵阳日报)
parents 4ae7ee7a 901e0069
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
VITE_APP_ENV = 'production' VITE_APP_ENV = 'production'
# URL路径 # URL路径
VITE_APP_BASE_URL = 'http://test.rhhzkj.com:8080' VITE_APP_BASE_URL = 'https://api.rddyz.com'
# 照片url路径 # 照片url路径
VITE_APP_IMG_URL = 'http://file.rhhzkj.com:8080' VITE_APP_IMG_URL = 'https://file.rddyz.com'
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,13 @@ ...@@ -9,7 +9,13 @@
<view class="full_list" v-else> <view class="full_list" v-else>
<wd-swipe-action> <wd-swipe-action>
<view class="additem" v-for="(item, index) in addressList" :key="index"> <view
@click.stop="selectAddress(item)"
:class="activeAdd === item ? 'acitve-additem' : 'additem'"
class="additem"
v-for="(item, index) in addressList"
:key="index"
>
<view class="additem_l"> <view class="additem_l">
<view class="address">{{ item.addr }}</view> <view class="address">{{ item.addr }}</view>
<view class="info"> <view class="info">
...@@ -22,7 +28,7 @@ ...@@ -22,7 +28,7 @@
<view class="txt">默认</view> <view class="txt">默认</view>
</view> </view>
<view v-else class="box" @click="deleteAdd(item.addrId)"> <view v-else class="box" @click.stop="deleteAdd(item.addrId)">
<wd-icon name="circle1" size="12px"></wd-icon> <wd-icon name="circle1" size="12px"></wd-icon>
<view class="txt">删除</view> <view class="txt">删除</view>
</view> </view>
...@@ -47,24 +53,35 @@ import { getAddressList, deleteAddress } from '@/api/address'; ...@@ -47,24 +53,35 @@ import { getAddressList, deleteAddress } from '@/api/address';
const isAdressEmpty = ref(false); const isAdressEmpty = ref(false);
const addressList = ref([]); const addressList = ref([]);
const activeAdd = ref(null);
const getAddressListData = async () => { const getAddressListData = async () => {
const { data: res } = await getAddressList(); const { data: res } = await getAddressList();
console.log(res); console.log(res);
if (res) { if (res) {
addressList.value = res; addressList.value = res;
activeAdd.value = res.filter((item) => {
return item.commonAddr === 1;
})[0];
res.length === 0 ? (isAdressEmpty.value = true) : (isAdressEmpty.value = false); res.length === 0 ? (isAdressEmpty.value = true) : (isAdressEmpty.value = false);
} }
}; };
onLoad(() => {}); onLoad(() => {});
onShow(() => { onShow(() => {
  getAddressListData(); getAddressListData();
}); });
const addNewAddress = () => { const addNewAddress = () => {
xma.navigateTo({ url: '/pages/address/addressEdit?new=true' }); xma.navigateTo({ url: '/pages/address/addressEdit?new=true' });
}; };
const selectAddress = (item) => {
activeAdd.value = item;
xma.setStorageSync('address', item);
xma.navigateBack({
delta: 1,
});
};
const editAddress = (col) => { const editAddress = (col) => {
xma.navigateTo({ xma.navigateTo({
url: `/pages/address/addressEdit?content=${JSON.stringify(col)}`, url: `/pages/address/addressEdit?content=${JSON.stringify(col)}`,
...@@ -104,6 +121,7 @@ page { ...@@ -104,6 +121,7 @@ page {
margin-top: 20rpx; margin-top: 20rpx;
padding-bottom: 180rpx; padding-bottom: 180rpx;
.acitve-additem,
.additem { .additem {
width: 710rpx; width: 710rpx;
padding: 20rpx; padding: 20rpx;
...@@ -170,7 +188,9 @@ page { ...@@ -170,7 +188,9 @@ page {
} }
} }
} }
.acitve-additem {
border: 2rpx solid #fa5151;
}
.addBtn { .addBtn {
width: 630rpx; width: 630rpx;
height: 72rpx; height: 72rpx;
......
...@@ -161,7 +161,6 @@ const imgUrl = import.meta.env.VITE_APP_IMG_URL; ...@@ -161,7 +161,6 @@ const imgUrl = import.meta.env.VITE_APP_IMG_URL;
const textInputs = ref(''); const textInputs = ref('');
const basketIds = ref([]); const basketIds = ref([]);
const activeCouponId = ref(''); const activeCouponId = ref('');
const changeAddress = ref(false);
const addressParams = ref({}); const addressParams = ref({});
const showpopup = ref(false); const showpopup = ref(false);
const outTradeNos = ref(null); const outTradeNos = ref(null);
...@@ -177,12 +176,15 @@ onLoad((options) => { ...@@ -177,12 +176,15 @@ onLoad((options) => {
skuIds.value = skuId; skuIds.value = skuId;
types.value = type; types.value = type;
if (type === 'qg') { if (type === 'qg') {
console.log('1111111111111111111');
groupBuyConfirmFn(prodId, skuId).then((res) => { groupBuyConfirmFn(prodId, skuId).then((res) => {
useraddrDefaultUserAddrFn().then(() => { useraddrDefaultUserAddrFn().then(() => {
groupBuyUpdateFnQg(); groupBuyUpdateFnQg();
}); });
}); });
} else { } else {
console.log('22222222222222222222222');
basketIds.value = ids.split(','); basketIds.value = ids.split(',');
sgyrddBasketConfirmFn(basketIds.value).then(() => { sgyrddBasketConfirmFn(basketIds.value).then(() => {
useraddrDefaultUserAddrFn().then(() => { useraddrDefaultUserAddrFn().then(() => {
...@@ -193,6 +195,7 @@ onLoad((options) => { ...@@ -193,6 +195,7 @@ onLoad((options) => {
}); });
function groupBuyUpdateFnQg(couponUserId = '') { function groupBuyUpdateFnQg(couponUserId = '') {
const { receiverName, receiverMobile, receiverAddress } = addressParams.value; const { receiverName, receiverMobile, receiverAddress } = addressParams.value;
groupBuyUpdate({ groupBuyUpdate({
key: orderInfo.value.key, key: orderInfo.value.key,
couponUserId, couponUserId,
...@@ -206,21 +209,37 @@ function groupBuyUpdateFnQg(couponUserId = '') { ...@@ -206,21 +209,37 @@ function groupBuyUpdateFnQg(couponUserId = '') {
}); });
} }
onShow(() => { onShow(() => {
if (changeAddress.value) { const storgeAddress = xma.getStorageSync('address') || null;
if (storgeAddress) {
addressInfo.value = storgeAddress;
addressParams.value.receiverName = storgeAddress.receiver;
addressParams.value.receiverMobile = storgeAddress.mobile;
addressParams.value.receiverAddress = storgeAddress.addr;
if (types.value === 'qg') { if (types.value === 'qg') {
groupBuyConfirmFn(prodIds.value, skuIds.value).then((res) => { groupBuyConfirmFn(prodIds.value, skuIds.value).then((res) => {
useraddrDefaultUserAddrFn().then(() => { groupBuyUpdateFnQg();
groupBuyUpdateFnQg();
});
}); });
} else { } else {
sgyrddBasketConfirmFn(basketIds.value).then(() => { sgyrddBasketConfirmFn(basketIds.value).then(() => {
useraddrDefaultUserAddrFn().then(() => { groupBuyUpdateFn();
groupBuyUpdateFn();
});
}); });
} }
} }
// else {
// if (types.value === 'qg') {
// groupBuyConfirmFn(prodIds.value, skuIds.value).then((res) => {
// useraddrDefaultUserAddrFn().then(() => {
// groupBuyUpdateFnQg();
// });
// });
// } else {
// sgyrddBasketConfirmFn(basketIds.value).then(() => {
// useraddrDefaultUserAddrFn().then(() => {
// groupBuyUpdateFn();
// });
// });
// }
// }
if (outTradeNos.value) { if (outTradeNos.value) {
// 查询订单状态决定是否支付 // 查询订单状态决定是否支付
...@@ -306,7 +325,6 @@ function selectShopCoupon(item) { ...@@ -306,7 +325,6 @@ function selectShopCoupon(item) {
} }
} }
const jumpToAddressList = () => { const jumpToAddressList = () => {
changeAddress.value = true;
wx.navigateTo({ wx.navigateTo({
url: '/pages/address/addressList', url: '/pages/address/addressList',
}); });
...@@ -367,6 +385,10 @@ const payNow = async (data) => { ...@@ -367,6 +385,10 @@ const payNow = async (data) => {
params.value.id = orderInfo.value.key; params.value.id = orderInfo.value.key;
params.value.tradeType = data.selectType; params.value.tradeType = data.selectType;
params.value.basketIds = basketIds.value; params.value.basketIds = basketIds.value;
xma.showLoading({
title: '正在支付',
mask: true,
});
if (types.value === 'qg') { if (types.value === 'qg') {
const qgParams = { const qgParams = {
id: orderInfo.value.key, id: orderInfo.value.key,
...@@ -376,16 +398,22 @@ const payNow = async (data) => { ...@@ -376,16 +398,22 @@ const payNow = async (data) => {
}; };
groupBuyCreate(qgParams).then((res) => { groupBuyCreate(qgParams).then((res) => {
if (res.code === 0) { if (res.code === 0) {
xma.hideLoading();
openUrl(res.data.result); openUrl(res.data.result);
xma.removeStorageSync('address');
} else { } else {
xma.hideLoading();
groupBuyConfirmFn(prodIds.value, skuIds.value); groupBuyConfirmFn(prodIds.value, skuIds.value);
} }
}); });
} else { } else {
znsgyOrderCreate(params.value).then((res) => { znsgyOrderCreate(params.value).then((res) => {
if (res.code === 0) { if (res.code === 0) {
xma.hideLoading();
openUrl(res.data.result); openUrl(res.data.result);
xma.removeStorageSync('address');
} else { } else {
xma.hideLoading();
sgyrddBasketConfirmFn(basketIds.value); sgyrddBasketConfirmFn(basketIds.value);
} }
}); });
......
...@@ -133,6 +133,7 @@ ...@@ -133,6 +133,7 @@
/> />
</view> </view>
</view> </view>
<wd-status-tip image="content" tip="暂无数据" v-if="testData.length === 0" />
</view> </view>
<!-- 购物车悬浮按钮 --> <!-- 购物车悬浮按钮 -->
<!--<view class="cart-floating" @tap="toCart"> <!--<view class="cart-floating" @tap="toCart">
...@@ -219,12 +220,23 @@ const getGoodSaleProd = () => { ...@@ -219,12 +220,23 @@ const getGoodSaleProd = () => {
}; };
// 筑农严选首页-分类查询商品列表 // 筑农严选首页-分类查询商品列表
const platformProdList = () => { const platformProdList = () => {
xma.showLoading({
title: '加载中',
});
getPlatformProdList({ categoryId: router.query.categoryId }).then((res) => { getPlatformProdList({ categoryId: router.query.categoryId }).then((res) => {
xma.hideLoading();
detailList.value = res.data; detailList.value = res.data;
choice(0, '3272'); choice(0, '3272');
}); });
}; };
const choice = (index, item) => { const choice = (index, item) => {
xma.showLoading({
title: '加载中',
});
getPlatformProdList({ categoryId: router.query.categoryId }).then((res) => {
xma.hideLoading();
detailList.value = res.data;
});
testData.value = detailList.value[index].prodList; testData.value = detailList.value[index].prodList;
testData.value.forEach((item) => { testData.value.forEach((item) => {
item.imgUrl = import.meta.env.VITE_APP_IMG_URL + item.pic; item.imgUrl = import.meta.env.VITE_APP_IMG_URL + item.pic;
...@@ -406,7 +418,7 @@ page { ...@@ -406,7 +418,7 @@ page {
font-weight: 500; font-weight: 500;
line-height: 28rpx; line-height: 28rpx;
letter-spacing: 0em; letter-spacing: 0em;
margin-left: 48rpx; margin-left: 20rpx;
color: #3d3d3d; color: #3d3d3d;
width: 190rpx; width: 190rpx;
white-space: nowrap; white-space: nowrap;
...@@ -420,7 +432,7 @@ page { ...@@ -420,7 +432,7 @@ page {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
color: #abaaaa; color: #abaaaa;
margin-left: 40rpx; margin-left: 20rpx;
} }
.price { .price {
font-size: 24rpx; font-size: 24rpx;
......
...@@ -117,7 +117,7 @@ const getPresaleCategoryList = () => { ...@@ -117,7 +117,7 @@ const getPresaleCategoryList = () => {
getPresaleCategory().then((res) => { getPresaleCategory().then((res) => {
res.data.forEach((item) => { res.data.forEach((item) => {
item.img = import.meta.env.VITE_APP_IMG_URL + item.pic; item.img = import.meta.env.VITE_APP_IMG_URL + item.pic;
item.commodityList = item.prodSimples; item.commodityList = item.prodSimples.splice(0, 3);
item.commodityList.forEach((item) => { item.commodityList.forEach((item) => {
item.commodityImg = import.meta.env.VITE_APP_IMG_URL + item.pic; item.commodityImg = import.meta.env.VITE_APP_IMG_URL + item.pic;
}); });
......
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
/> />
</view> </view>
</view> </view>
<wd-status-tip image="content" tip="暂无数据" v-if="buyList.length === 0" />
</view> </view>
<view class="waterfall"> <view class="waterfall">
<view class="wt-left wt-list"> <view class="wt-left wt-list">
...@@ -213,7 +214,11 @@ const chooseTab = (index, categoryId) => { ...@@ -213,7 +214,11 @@ const chooseTab = (index, categoryId) => {
}); });
}; };
const chooseBTab = (index, categoryId) => { const chooseBTab = (index, categoryId) => {
xma.showLoading({
title: '加载中',
});
getPresaleProdList({ current: 1, size: 10, categoryId }).then((res) => { getPresaleProdList({ current: 1, size: 10, categoryId }).then((res) => {
xma.hideLoading();
res.data.records.forEach((item) => { res.data.records.forEach((item) => {
item.img = import.meta.env.VITE_APP_IMG_URL + item.pic; item.img = import.meta.env.VITE_APP_IMG_URL + item.pic;
}); });
...@@ -233,7 +238,11 @@ const chooseBTab = (index, categoryId) => { ...@@ -233,7 +238,11 @@ const chooseBTab = (index, categoryId) => {
// }; // };
// 二级分类点击事件 // 二级分类点击事件
const choice = (index, categoryId) => { const choice = (index, categoryId) => {
xma.showLoading({
title: '加载中',
});
getPresaleProdList({ current: 1, size: 10, categoryId }).then((res) => { getPresaleProdList({ current: 1, size: 10, categoryId }).then((res) => {
xma.hideLoading();
res.data.records.forEach((item) => { res.data.records.forEach((item) => {
item.img = import.meta.env.VITE_APP_IMG_URL + item.pic; item.img = import.meta.env.VITE_APP_IMG_URL + item.pic;
}); });
...@@ -404,14 +413,14 @@ page { ...@@ -404,14 +413,14 @@ page {
width: 360rpx; width: 360rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
height: 442rpx;
} }
.wt-item { .wt-item {
border-radius: 8px 8px 8px 8px; border-radius: 16rpx 16rpx 16rpx 16rpx;
margin-bottom: 15rpx; margin-bottom: 15rpx;
background-color: #ffffff; background-color: #ffffff;
margin-left: 10rpx; margin-left: 10rpx;
height: max-content;
} }
.item-img image { .item-img image {
......
...@@ -7,20 +7,14 @@ ...@@ -7,20 +7,14 @@
<text class="title">退款商品</text> <text class="title">退款商品</text>
</view> </view>
<view class="content-item"> <view class="content-item">
<view class="item-top"> <view class="item-top itemtop1" v-for="(item2, index) in orderDetail" :key="index">
<image <image class="item-img" mode="aspectFill" :src="fileDomain + item2.pic"></image>
class="item-img"
mode="aspectFill"
src="https://img2.baidu.com/it/u=1028011339,1319212411&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=313"
></image>
<view class="item-info"> <view class="item-info">
<text class="text1"> <text class="text1">
商品名称商品名称商品名称商品名 商品名称商品名称商品名称商品名 商品名称商品名称 {{ item2.prodName }}
</text>
<text class="num">x1</text>
<text class="text2">
商品简介商品简介商品简介商品简介 商品简介商品简介商品简介商品简介
</text> </text>
<text class="num">x{{ item2.prodCount }}</text>
<!-- <rich-text class="text2" :nodes="prodDetail.prod.content"></rich-text> -->
</view> </view>
</view> </view>
<view class="item-buttom1"> <view class="item-buttom1">
...@@ -50,26 +44,11 @@ ...@@ -50,26 +44,11 @@
<text class="icon1">*</text> <text class="icon1">*</text>
</text> </text>
<view class="rightbox"> <view class="rightbox">
<text v-if="selectType2">{{ salesList[selectType2].name }}</text> <text v-if="selectType2">{{ salesList[selectType2 - 1].name }}</text>
<text v-else>请选择售后类型</text> <text v-else>请选择售后类型</text>
<wd-icon name="arrow-right" size="22px"></wd-icon> <wd-icon name="arrow-right" size="22px"></wd-icon>
</view> </view>
</view> </view>
<!-- <view class="content-between">
<text>退款金额</text>
<text class="price">{{ orderDetail.baseOrder.actualTotal }}</text>
</view> -->
<!-- <view class="content-between">
<text>相关图片</text>
<wd-upload
:file-list="fileList"
image-mode="aspectFill"
:action="action"
@change="handleChange"
:header="headers"
accept="image"
></wd-upload>
</view> -->
<view class="content-between" @tap="showPop = true"> <view class="content-between" @tap="showPop = true">
<text> <text>
售后原因 售后原因
...@@ -86,11 +65,8 @@ ...@@ -86,11 +65,8 @@
退款金额 退款金额
<text class="icon1">*</text> <text class="icon1">*</text>
</text> </text>
<text class="price2"> <text class="price2">{{ actualTotal }}</text>
<wd-input type="text" no-border custom-input-class="text-align:right" v-model="value" />
</text>
</view> </view>
<view class="tishi">可修改,最多商品¥198</view>
</view> </view>
<view class="content-box"> <view class="content-box">
<view class="content-item1"> <view class="content-item1">
...@@ -101,6 +77,7 @@ ...@@ -101,6 +77,7 @@
<textarea <textarea
placeholder="必填,请您详细填写申请说明" placeholder="必填,请您详细填写申请说明"
placeholder-style="font-size:28rpx;color:#000;" placeholder-style="font-size:28rpx;color:#000;"
v-model="otherReason"
></textarea> ></textarea>
</wd-cell-group> </wd-cell-group>
<view style="margin-top: 20rpx"> <view style="margin-top: 20rpx">
...@@ -132,14 +109,14 @@ ...@@ -132,14 +109,14 @@
<wd-icon name="close" size="20" color="#999" @tap="showGoodPop = false"></wd-icon> <wd-icon name="close" size="20" color="#999" @tap="showGoodPop = false"></wd-icon>
</view> </view>
<radio-group style="width: 100%" @change="radioChange1"> <radio-group style="width: 100%" @change="radioChange1">
<view class="resaon" v-for="(item, index) in goodsList" :key="index"> <view class="resaon" v-for="(item3, index) in goodsList" :key="index">
<view class="resaon-item"> <view class="resaon-item">
<text>{{ item.name }}</text> <text>{{ item3.name }}</text>
<radio <radio
class="radio" class="radio"
color="#f62828" color="#f62828"
:value="item.id" :value="item3.id"
:checked="item.id == selectType1" :checked="item3.id == selectType1"
/> />
</view> </view>
</view> </view>
...@@ -161,14 +138,14 @@ ...@@ -161,14 +138,14 @@
<wd-icon name="close" size="20" color="#999" @tap="showSalePop = false"></wd-icon> <wd-icon name="close" size="20" color="#999" @tap="showSalePop = false"></wd-icon>
</view> </view>
<radio-group style="width: 100%" @change="radioChange2"> <radio-group style="width: 100%" @change="radioChange2">
<view class="resaon" v-for="(item, index) in salesList" :key="index"> <view class="resaon" v-for="(item4, index) in salesList" :key="index">
<view class="resaon-item"> <view class="resaon-item">
<text>{{ item.name }}</text> <text>{{ item4.name }}</text>
<radio <radio
class="radio" class="radio"
color="#f62828" color="#f62828"
:value="item.id" :value="item4.id"
:checked="item.id == selectType2" :checked="item4.id == selectType2"
/> />
</view> </view>
</view> </view>
...@@ -213,7 +190,7 @@ import { applyForARefundApi, getOrderDetail } from '@/api/order'; ...@@ -213,7 +190,7 @@ import { applyForARefundApi, getOrderDetail } from '@/api/order';
import { getToken } from '@/utils/auth'; import { getToken } from '@/utils/auth';
const fileDomain = import.meta.env.VITE_APP_IMG_URL; const fileDomain = import.meta.env.VITE_APP_IMG_URL;
const token = getToken(); const token = getToken();
const value = ref('198.00'); const actualTotal = ref(0);
// 上传图片地址 // 上传图片地址
const action = ref(import.meta.env.VITE_APP_BASE_URL + '/sgyrdd/file/update'); const action = ref(import.meta.env.VITE_APP_BASE_URL + '/sgyrdd/file/update');
const headers = ref(''); const headers = ref('');
...@@ -231,7 +208,8 @@ onLoad((options) => { ...@@ -231,7 +208,8 @@ onLoad((options) => {
const orderDetail = ref(); const orderDetail = ref();
const getDetail = async () => { const getDetail = async () => {
const res = await getOrderDetail({ orderNumber: orderNumber.value }); const res = await getOrderDetail({ orderNumber: orderNumber.value });
orderDetail.value = res.data; actualTotal.value = res.data.baseOrder.actualTotal;
orderDetail.value = res.data.orderItems;
}; };
/** /**
...@@ -254,20 +232,20 @@ const selectType = ref(null); ...@@ -254,20 +232,20 @@ const selectType = ref(null);
const goodsList = ref([ const goodsList = ref([
{ {
id: '0', id: '0',
name: '收到货', name: '收到货',
}, },
{ {
id: '1', id: '1',
name: '收到货', name: '收到货',
}, },
]); ]);
const salesList = ref([ const salesList = ref([
{ {
id: '0', id: '1',
name: '仅退款', name: '仅退款',
}, },
{ {
id: '1', id: '2',
name: '退货退款', name: '退货退款',
}, },
]); ]);
...@@ -313,6 +291,7 @@ function radioChange1(evt) { ...@@ -313,6 +291,7 @@ function radioChange1(evt) {
function radioChange2(evt) { function radioChange2(evt) {
const { value } = evt.detail; const { value } = evt.detail;
console.log(evt);
selectType2.value = value; selectType2.value = value;
} }
function radioChange(evt) { function radioChange(evt) {
...@@ -323,15 +302,27 @@ function radioChange(evt) { ...@@ -323,15 +302,27 @@ function radioChange(evt) {
* 提交申请 * 提交申请
*/ */
const submit = async () => { const submit = async () => {
if (!selectType1.value) {
return xma.showToast({
title: '请选择货物状态',
icon: 'none',
});
}
if (!selectType2.value) {
return xma.showToast({
title: '请选择售后类型',
icon: 'none',
});
}
if (!selectType.value) { if (!selectType.value) {
return xma.showToast({ return xma.showToast({
title: '请选择退款原因', title: '请选择退款原因',
icon: 'none', icon: 'none',
}); });
} }
if (selectType.value === '4' && !otherReason.value) { if (!otherReason.value) {
return xma.showToast({ return xma.showToast({
title: '请输入其他原因', title: '请输入申请说明',
icon: 'none', icon: 'none',
}); });
} }
...@@ -341,8 +332,10 @@ const submit = async () => { ...@@ -341,8 +332,10 @@ const submit = async () => {
}); });
await applyForARefundApi({ await applyForARefundApi({
orderNumber: orderNumber.value, orderNumber: orderNumber.value,
refundMemo: goodsStatus: selectType1.value,
selectType.value === '4' ? otherReason.value : reasonList.value[selectType.value].name, type: selectType2.value,
refundMemo: reasonList.value[selectType.value].name,
illustrate: otherReason.value,
imgs: processingImageAddresses(), imgs: processingImageAddresses(),
}); });
setTimeout(() => { setTimeout(() => {
...@@ -391,7 +384,7 @@ const chooseSalessReason = () => { ...@@ -391,7 +384,7 @@ const chooseSalessReason = () => {
icon: 'none', icon: 'none',
}); });
} }
showGoodPop.value = false; showSalePop.value = false;
}; };
/** /**
* 请选择退款原因 * 请选择退款原因
...@@ -411,12 +404,6 @@ const chooseReason = () => { ...@@ -411,12 +404,6 @@ const chooseReason = () => {
page { page {
background: #f3f3f3; background: #f3f3f3;
} }
:deep(.uni-input-input) {
text-align: right;
font-weight: 700;
font-size: 28rpx;
color: #fa5151;
}
:deep(uni-textarea) { :deep(uni-textarea) {
width: 100%; width: 100%;
background: #f0f0f0; background: #f0f0f0;
...@@ -463,7 +450,6 @@ page { ...@@ -463,7 +450,6 @@ page {
.item-top { .item-top {
display: flex; display: flex;
gap: 20rpx; gap: 20rpx;
.item-img { .item-img {
width: 216rpx; width: 216rpx;
height: 216rpx; height: 216rpx;
...@@ -506,6 +492,9 @@ page { ...@@ -506,6 +492,9 @@ page {
} }
} }
} }
.itemtop1 {
margin-top: 20rpx;
}
.item-buttom1 { .item-buttom1 {
margin-top: 42rpx; margin-top: 42rpx;
height: 37rpx; height: 37rpx;
......
...@@ -215,7 +215,7 @@ const cardData2 = ref([]); ...@@ -215,7 +215,7 @@ const cardData2 = ref([]);
const shopCardData = ref({}); const shopCardData = ref({});
const current = ref(0); const current = ref(0);
const swiperList = ref(['../../static/index/guiyang.png', '../../static/index/guiyang.png']); const swiperList = ref(['../../static/index/guiyang.png', '../../static/index/guiyang.png']);
const listParams = { let listParams = {
current: 1, current: 1,
size: 10, size: 10,
lon: 106.68650025025502, lon: 106.68650025025502,
...@@ -272,7 +272,10 @@ const getCouponMainList = () => { ...@@ -272,7 +272,10 @@ const getCouponMainList = () => {
const receive = (data) => { const receive = (data) => {
if (data.couponType === 'mch' && data.numState === 0) { if (data.couponType === 'mch' && data.numState === 0) {
receiveCoupon([data.couponYzfId]).then((res) => { receiveCoupon([data.couponYzfId]).then((res) => {
// console.log('打印', res); xma.showToast({
title: '领取成功!',
icon: 'none',
});
}); });
} }
}; };
...@@ -341,7 +344,12 @@ const recommendedClassification = () => { ...@@ -341,7 +344,12 @@ const recommendedClassification = () => {
}; };
// 重置数据 // 重置数据
const reset = () => { const reset = () => {
listParams.current = 1; listParams = {
current: 1,
size: 10,
lon: 106.68650025025502,
lat: 26.567192352601154,
};
shopCardData.value = {}; shopCardData.value = {};
cardData.value = []; cardData.value = [];
cardData1.value = []; cardData1.value = [];
......
...@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index'; ...@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index';
import { getToken } from '../../utils/auth'; import { getToken } from '../../utils/auth';
onLoad(async (options) => { onLoad(async (options) => {
await signIn(); // await signIn();
// if (!getToken()) await signIn2(); if (!getToken()) await signIn2();
const { type } = options; const { type } = options;
switch (type) { switch (type) {
case '0': case '0':
......
...@@ -285,10 +285,15 @@ const submitOrder = debounce(() => { ...@@ -285,10 +285,15 @@ const submitOrder = debounce(() => {
payWayCode: 5, payWayCode: 5,
tradeType: selectType.value, tradeType: selectType.value,
}; };
xma.showLoading({
title:'正在支付',
mask:true,
})
groupBuyCreate(params).then((res) => { groupBuyCreate(params).then((res) => {
if (res.code === 0) { if (res.code === 0) {
const { paymentUrl, outTradeNo } = res.data.result; const { paymentUrl, outTradeNo } = res.data.result;
outTradeNos.value = outTradeNo; outTradeNos.value = outTradeNo;
xma.hideLoading()
window.location.href = paymentUrl; window.location.href = paymentUrl;
// 设置一个延时器 // 设置一个延时器
const start = Date.now(); const start = Date.now();
...@@ -541,7 +546,7 @@ page { ...@@ -541,7 +546,7 @@ page {
border-radius: 16 * 2rpx; border-radius: 16 * 2rpx;
margin: 0 auto; margin: 0 auto;
box-sizing: border-box; box-sizing: border-box;
margin-top: 108rpx; margin-top: 20rpx;
background: #ffffff; background: #ffffff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
...@@ -108,7 +108,7 @@ page { ...@@ -108,7 +108,7 @@ page {
.container { .container {
.content { .content {
padding-top: 44px; padding-top: 20px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 20rpx; gap: 20rpx;
......
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