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

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 = {
common: "http://192.168.0.100:8890",
buyer: "http://192.168.0.100:8888",
// 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',
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
};
// 生产环境
const prod = {

View File

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

View File

@ -26,7 +26,7 @@
</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">
<image style="height: 51rpx; width: 51rpx" src="/static/order/t1.png"></image>
</view>
@ -38,7 +38,7 @@
</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">
<image style="height: 51rpx; width: 51rpx" src="/static/order/t3.png"></image>
</view>
@ -56,6 +56,8 @@
<script>
import UniIcons from "@/components/uni-icons/uni-icons.vue";
import { getAfterSaleInfo } from "@/api/after-sale";
export default {
components: {
UniIcons,
@ -64,6 +66,7 @@ export default {
return {
sn: "",
sku: {}, //sku
applyInfo:""
};
},
onLoad(options) {
@ -71,8 +74,20 @@ export default {
let dData = decodeURIComponent(options.sku);
let newData = JSON.parse(dData);
this.sku = newData;
// 退退
this.init()
},
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>
<!-- 空白页-->
<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">
空空如也
<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