修改购物车为空时显示图标,新增虚拟商品退款判断,修改个人中心背景图

master
lemon橪 2021-06-28 14:22:27 +08:00
parent 6f162b6d15
commit 5612636b29
10 changed files with 44 additions and 28 deletions

View File

@ -4,12 +4,8 @@
*/ */
// 开发环境 // 开发环境
const dev = { const dev = {
common: "http://192.168.0.100:8890", common: "https://common-api.pickmall.cn",
buyer: "http://192.168.0.100:8888", buyer: "https://buyer-api.pickmall.cn",
// common: "https://common-api.pickmall.cn",
// buyer: "https://buyer-api.pickmall.cn",
// common: 'http://192.168.0.109:8890',
// buyer: 'http://192.168.0.109:8888',
}; };
// 生产环境 // 生产环境
const prod = { const prod = {

View File

@ -156,9 +156,7 @@ export default {
this.routers = options; this.routers = options;
}, },
watch: { watch: {
showFlag(val) { showFlag(val) {},
},
}, },
onShow() { onShow() {
this.goodsList = []; this.goodsList = [];
@ -172,14 +170,22 @@ export default {
}, },
async handleLink(goods) { async handleLink(goods) {
uni.showToast({
title: "请请按住保存图片",
duration: 2000,
icon: "none",
});
let page = `pages/product/goods`; let page = `pages/product/goods`;
let scene = `${goods.skuId},${goods.id},${this.routers.id}`; let scene = `${goods.skuId},${goods.id},${this.routers.id}`;
let result = await getMpCode({ page, scene }); let result = await getMpCode({ page, scene });
if(result.data.success){ if (result.data.success) {
let callback = result.data.result; let callback = result.data.result;
this.res.container.title = `${goods.goodsName}`; this.res.container.title = `${goods.goodsName}`;
this.res.bottom.code = `data:image/png;base64,${callback}`; this.res.bottom.code = `data:image/png;base64,${callback}`;
this.res.bottom.price = this.$options.filters.unitPrice(goods.price, "¥"); this.res.bottom.price = this.$options.filters.unitPrice(
goods.price,
"¥"
);
this.res.bottom.desc = `${goods.goodsName}`; this.res.bottom.desc = `${goods.goodsName}`;
this.res.bottom.img = `${goods.thumbnail}`; this.res.bottom.img = `${goods.thumbnail}`;
@ -187,12 +193,11 @@ export default {
this.$refs.drawCanvas.init(); this.$refs.drawCanvas.init();
} }
this.showFlag = true; this.showFlag = true;
} } else {
else{
uni.showToast({ uni.showToast({
title: `制作二维码失败!请稍后重试`, title: `制作二维码失败!请稍后重试`,
duration: 2000, duration: 2000,
icon:"none" icon: "none",
}); });
} }
}, },

View File

@ -26,7 +26,7 @@
</view> </view>
<view class="select-view"> <view class="select-view">
<view class="select-cell" @click="onSelect(1)"> <view class="select-cell" v-if="applyInfo.returnGoods" @click="onSelect(1)">
<view class="select-image"> <view class="select-image">
<image style="height: 51rpx; width: 51rpx" src="/static/order/t1.png"></image> <image style="height: 51rpx; width: 51rpx" src="/static/order/t1.png"></image>
</view> </view>
@ -38,7 +38,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="select-cell" @click="onSelect(3)"> <view class="select-cell" v-if="applyInfo.returnMoney" @click="onSelect(3)">
<view class="select-image"> <view class="select-image">
<image style="height: 51rpx; width: 51rpx" src="/static/order/t3.png"></image> <image style="height: 51rpx; width: 51rpx" src="/static/order/t3.png"></image>
</view> </view>
@ -56,6 +56,8 @@
<script> <script>
import UniIcons from "@/components/uni-icons/uni-icons.vue"; import UniIcons from "@/components/uni-icons/uni-icons.vue";
import { getAfterSaleInfo } from "@/api/after-sale";
export default { export default {
components: { components: {
UniIcons, UniIcons,
@ -64,6 +66,7 @@ export default {
return { return {
sn: "", sn: "",
sku: {}, //sku sku: {}, //sku
applyInfo:""
}; };
}, },
onLoad(options) { onLoad(options) {
@ -71,8 +74,20 @@ export default {
let dData = decodeURIComponent(options.sku); let dData = decodeURIComponent(options.sku);
let newData = JSON.parse(dData); let newData = JSON.parse(dData);
this.sku = newData; this.sku = newData;
// 退退
this.init()
}, },
methods: { methods: {
//
init() {
getAfterSaleInfo(this.sn).then((response) => {
if (response.data.success) {
this.applyInfo = response.data.result;
}
});
},
/** /**
* 选择退货流程 * 选择退货流程
*/ */

View File

@ -3,7 +3,7 @@
<u-navbar :isBack="false" title="购物车"></u-navbar> <u-navbar :isBack="false" title="购物车"></u-navbar>
<!-- 空白页--> <!-- 空白页-->
<view v-if="cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail" class="empty"> <view v-if="cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail" class="empty">
<image src="/static/emptyCart.jpg" mode="aspectFit"></image> <image src="/static/emptyCart.png" mode="aspectFit"></image>
<view class="empty-tips"> <view class="empty-tips">
空空如也 空空如也
<navigator class="navigator" url="/pages/tabbar/home/index" open-type="switchTab">随便逛逛></navigator> <navigator class="navigator" url="/pages/tabbar/home/index" open-type="switchTab">随便逛逛></navigator>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

BIN
static/emptyCart.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB