From a5a5716139da8fce260c371ac038e3d5b18b2135 Mon Sep 17 00:00:00 2001 From: kk_888 <1422704179@qq.com> Date: Mon, 29 Nov 2021 16:41:01 +0800 Subject: [PATCH] =?UTF-8?q?cy=E9=A6=96=E9=A1=B54?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/http.js | 2 +- app.json | 5 +++-- pages/courseDetail/index.js | 28 ++++++++++++++++++++++++---- pages/courseDetail/index.wxml | 11 ++++++----- pages/courseDetail/index.wxss | 4 +++- pages/goodsList/index.js | 2 +- pages/goodsList/index.wxml | 11 ++++++----- pages/home/index.js | 11 ++++++----- pages/home/index.wxml | 4 ++-- project.private.config.json | 23 +++++++++++++++++++++++ 10 files changed, 75 insertions(+), 26 deletions(-) create mode 100644 project.private.config.json diff --git a/api/http.js b/api/http.js index 72a97cb..0348a89 100644 --- a/api/http.js +++ b/api/http.js @@ -1,4 +1,4 @@ -const baseURL = 'http://192.168.0.112:8088/api/'; +const baseURL = 'http://192.168.0.111:8088/api/'; export function $http(methods,url,params){ var header = { diff --git a/app.json b/app.json index 188fa6a..f832f66 100644 --- a/app.json +++ b/app.json @@ -1,8 +1,9 @@ { "pages": [ + + "pages/goodsList/index", "pages/home/index", "pages/home2/index", - "pages/courseDetail/index", "pages/companyInfo/index", "pages/companyPage/index", @@ -11,7 +12,7 @@ "pages/user/profit/index", "pages/user/cashOut/index", "pages/goodsDetail/index", - "pages/goodsList/index", + "pages/login/index", "pages/user/index", "pages/user/myTeam/index" diff --git a/pages/courseDetail/index.js b/pages/courseDetail/index.js index 584a5b3..7db12c0 100644 --- a/pages/courseDetail/index.js +++ b/pages/courseDetail/index.js @@ -1,18 +1,30 @@ // pages/courseDetail/index.js + +const app = getApp() +const user = require('../../api/user.js') +const store = require('../../api/store.js') Page({ /** * 页面的初始数据 */ data: { - + showMask: false, + form:{ + name: '', + phone: '', + id: '' + }, + detail: {} }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - + this.setData({ + 'form.id': options.id + }) }, toReservation(){ wx.navigateTo({ @@ -30,9 +42,17 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { - + this.getProductDetail() + }, + getProductDetail(){ + store.getProductDetail(this.data.form.id).then((res)=>{ + console.log('detail',res) + res.data.data.storeInfo.description.replace(/\ - - 弘扬传统国学 + + @@ -45,4 +45,5 @@ + diff --git a/pages/courseDetail/index.wxss b/pages/courseDetail/index.wxss index 2cc9643..a96972b 100644 --- a/pages/courseDetail/index.wxss +++ b/pages/courseDetail/index.wxss @@ -88,6 +88,7 @@ height: 416rpx; margin-top: 20rpx; padding-left: 40rpx; + display: none; } .teach{ padding-top: 28rpx; @@ -140,4 +141,5 @@ .course-con view{ color: #343434; padding: 8rpx 22rpx 18rpx 24rpx; -} \ No newline at end of file +} + diff --git a/pages/goodsList/index.js b/pages/goodsList/index.js index 5c97029..4b60b6a 100644 --- a/pages/goodsList/index.js +++ b/pages/goodsList/index.js @@ -30,7 +30,7 @@ Page({ toDetail(e){ let id = e.currentTarget.dataset.id wx.navigateTo({ - url: '/pages/goodsDetail/index?id=' + id, + url: '/pages/courseDetail/index?id=' + id, }) }, /** diff --git a/pages/goodsList/index.wxml b/pages/goodsList/index.wxml index 01a218a..03cd1eb 100644 --- a/pages/goodsList/index.wxml +++ b/pages/goodsList/index.wxml @@ -3,17 +3,18 @@ + 搜一下 - + - 无极先天密码 - 商道智慧 + {{item.storeInfo}} + {{item.storeName}} - + diff --git a/pages/home/index.js b/pages/home/index.js index a2405a6..4694398 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -49,16 +49,17 @@ Page({ } }) }, - toDetial(){ + toCompany(){ wx.navigateTo({ - url: '/pages/goodsDetail/index', + url: '/pages/companyPage/index', }) }, - toCompany(){ - wx.navigateTo({ - url: '/pages/companyInfo/index', + submitInfo(){ + wx.switchTab({ + url: '/pages/goodsList/index', }) }, + //点击查看 toCheck(){ wx.navigateTo({ diff --git a/pages/home/index.wxml b/pages/home/index.wxml index b817029..6d2dd75 100644 --- a/pages/home/index.wxml +++ b/pages/home/index.wxml @@ -2,7 +2,7 @@ - 点击了解 + 点击了解 名师讲团 @@ -81,5 +81,5 @@ 课程内容 - 前去预约 + 前去预约 diff --git a/project.private.config.json b/project.private.config.json new file mode 100644 index 0000000..e5be272 --- /dev/null +++ b/project.private.config.json @@ -0,0 +1,23 @@ +{ + "condition": { + "plugin": { + "list": [] + }, + "game": { + "list": [] + }, + "gamePlugin": { + "list": [] + }, + "miniprogram": { + "list": [ + { + "name": "pages/courseDetail/index", + "pathName": "pages/courseDetail/index", + "query": "", + "scene": null + } + ] + } + } +} \ No newline at end of file