From e55314af71fa031d3c58d1135e663ebbfe0e2190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LAPTOP-D7TKRI82=5C=E9=82=93?= <52643018@qq.com> Date: Wed, 23 Jun 2021 16:45:31 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=8E=A5=E6=8E=A5=E5=8F=A3]=20=E9=A6=96?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/api.js | 3 +- pages/goodsDetail/index.vue | 7 +- pages/index/index.vue | 178 +++++++++++++++++++++--------------- pages/login/index.vue | 2 +- 4 files changed, 112 insertions(+), 78 deletions(-) diff --git a/common/api.js b/common/api.js index 8c3c39d..4255537 100644 --- a/common/api.js +++ b/common/api.js @@ -1,10 +1,11 @@ // appId: 正式 null | 测试 wxb35ef055a4dd8ad4 export const DEV = "dev"; // dev 测试 | prod 正式 export const VERSION = '1.0.0'; // 版本号 -export const DEVURL = 'http://192.168.3.8:8000'; // 测试服请求地址 +export const DEVURL = 'http://gxsky.lanzulive.com'; // 测试服请求地址 export const PRODURL = ''; // 正式服请求地址 /* 首页相关接口 */ +export const API_CATEGORY_LIST = '/api/category/list'; // 首页-分类 export const API_GOODS_LIST = '/api/goods/list'; // 首页-分类下商品列表 // 用户订单 diff --git a/pages/goodsDetail/index.vue b/pages/goodsDetail/index.vue index e5f48dd..84c2060 100644 --- a/pages/goodsDetail/index.vue +++ b/pages/goodsDetail/index.vue @@ -81,11 +81,12 @@ export default { data(){ return { - current: 0 // 轮播下标 + current: 0, // 轮播下标 + goods_id: 0 } }, - onLoad(){ - + onLoad(options){ + this.goods_id = options.id; }, methods: { diff --git a/pages/index/index.vue b/pages/index/index.vue index 5170813..85e19c1 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -3,23 +3,26 @@ - - + + - + - 网红辣椒棒 魔鬼辣椒挑战全 网第一辣 网红优惠季网红辣椒棒 魔鬼辣椒挑战全 网第一辣 网红优惠季 - + {{ item.name }} + - + - 已抢25% - 2.4万人已购买 + {{ item.specs[0].sold_percent_text }} + {{ item.specs[0].sold_stock_text }} - 19.90 - ¥39.00 + + + {{ item.specs[0].selling_price }} + + ¥{{ item.specs[0].original_price }} @@ -38,60 +41,87 @@