diff --git a/pages/category/index.vue b/pages/category/index.vue index f87869f..7098e2d 100644 --- a/pages/category/index.vue +++ b/pages/category/index.vue @@ -246,7 +246,7 @@ // 设置列表数据 await app.getCatList(page.num) .then(list => { - console.log('list',list) + //console.log('list',list) const curPageLen = list.data.length const totalSize = list.total app.mescroll.endBySize(curPageLen, totalSize) diff --git a/pages/user/shopcart/index.vue b/pages/user/shopcart/index.vue index be758d9..70f8e25 100644 --- a/pages/user/shopcart/index.vue +++ b/pages/user/shopcart/index.vue @@ -20,13 +20,13 @@ {{ item.detail.goods_name }} 交易方式:{{ item.detail.goods_entrust?'转让':'授权' }} 购买年限:{{ item.use_years }}年 - 单价:¥{{ item.goods_price }} + 单价:¥{{ item.detail.price_str }} 合计: - {{ item.use_years * item.goods_price }} + {{ item.total_money_str }} @@ -71,6 +71,7 @@ import { inArray, arrayIntersect, debounce } from '@/utils/util' import { checkLogin, setCartTotalNum, setCartTabBadge } from '@/core/app' import * as UserApi from '@/api/user' +import {formatAmount} from '@/api/order/comment' import EmptyCart from '@/components/empty-cart' import uniIcons from '../../../uni_modules/uni-icons/components/uni-icons/uni-icons' import {createOrder, delShopCart} from "../../../api/user"; @@ -159,6 +160,10 @@ export default { if (result.code == '200') { app.list = result.data app.total = result.data.length + app.list.forEach(item => { + item.total_money_str = formatAmount(item.total_money) + item.detail.price_str = formatAmount(Number(item.detail.price)) + }) } // 清除checkedIds中无效的ID app.onClearInvalidId()