diff --git a/pages/addaddress/addaddress.json b/pages/addaddress/addaddress.json index 8f85ac7..cf0935a 100644 --- a/pages/addaddress/addaddress.json +++ b/pages/addaddress/addaddress.json @@ -1,4 +1,5 @@ { + "navigationBarTitleText": "添加地址", "usingComponents": { "shuru": "/components/addaddress/shuru/shuru", "addradd": "/components/chooseaddr/addradd/addradd", diff --git a/pages/chooseaddr/chooseaddr.json b/pages/chooseaddr/chooseaddr.json index 5874c1a..34ef65e 100644 --- a/pages/chooseaddr/chooseaddr.json +++ b/pages/chooseaddr/chooseaddr.json @@ -1,4 +1,5 @@ { + "navigationBarTitleText": "地址", "usingComponents": { "address": "/components/chooseaddr/address/address", "addradd": "/components/chooseaddr/addradd/addradd" diff --git a/pages/classify/classify.json b/pages/classify/classify.json index 0fa3766..a66e4d4 100644 --- a/pages/classify/classify.json +++ b/pages/classify/classify.json @@ -1,4 +1,5 @@ { + "navigationBarTitleText": "分类", "usingComponents": { "list":"../components/classify/list/index", "navigation":"../components/classify/navigation/index" diff --git a/pages/index/index.json b/pages/index/index.json index bb6644d..c12f5df 100644 --- a/pages/index/index.json +++ b/pages/index/index.json @@ -1,4 +1,5 @@ { + "navigationBarTitleText": "首页", "usingComponents": { "search":"../components/index/search/index", "list":"../components/index/list/index" diff --git a/pages/member/member.json b/pages/member/member.json index 72cca76..878c5fb 100644 --- a/pages/member/member.json +++ b/pages/member/member.json @@ -1,4 +1,5 @@ { + "navigationBarTitleText": "会员中心", "usingComponents": { "membertop": "/components/member/membertop/membertop", "membershop": "/components/member/membershop/membershop" diff --git a/pages/order/order.json b/pages/order/order.json index f3c80a3..dec8389 100644 --- a/pages/order/order.json +++ b/pages/order/order.json @@ -1,4 +1,5 @@ { + "navigationBarTitleText": "订单详情", "usingComponents": { "tab":"../components/order/tab/index" } diff --git a/pages/personal/personal.json b/pages/personal/personal.json index 8835af0..c0a8251 100644 --- a/pages/personal/personal.json +++ b/pages/personal/personal.json @@ -1,3 +1,4 @@ { + "navigationBarTitleText": "我的", "usingComponents": {} } \ No newline at end of file diff --git a/pages/product/product.js b/pages/product/product.js index bf9ae12..510d741 100644 --- a/pages/product/product.js +++ b/pages/product/product.js @@ -1,5 +1,6 @@ // pages/product/product.js' import { request } from "../../utils/bin" +var WxParse = require('../../utils/wxParse/wxParse'); Page({ /** @@ -7,14 +8,15 @@ Page({ */ data: { array: ['20粒', '30粒', '50粒', '100粒'], - userid:0, - specs:{item:'默认规格'} + userid: 0, + specs: [{ 'item': '默认规格' }], + article:"" }, /** * 生命周期函数--监听页面加载 */ - onLoad: function(options) { + onLoad: function (options) { console.log(options) request({ url: "Goods/goodsInfo", @@ -25,16 +27,18 @@ Page({ // console.log(res) this.setData({ info: res.data.result, - shopid:options.shopid, + shopid: options.shopid, }) + var that = this; + WxParse.wxParse('article', 'html', that.data.info.goods.goods_content, that, 5); // console.log(this.data.type, 150) }) request({ - url:"User/validateOpenid" - }).then((res)=>{ + url: "User/validateOpenid" + }).then((res) => { console.log(res) this.setData({ - userid:res.data.data.user_id + userid: res.data.data.user_id }) }) }, @@ -48,64 +52,64 @@ Page({ data: { goods_id: this.data.shopid, goods_num: 1, - goods_spec:this.data.info.goods.goods_spec_list?this.data.info.goods.goods_spec_list[0][e.detail.value].item_id:'', - user_id:this.data.userid + goods_spec: this.data.info.goods.goods_spec_list ? this.data.info.goods.goods_spec_list[0][e.detail.value].item_id : '', + user_id: this.data.userid }, - name:"session_id" - }).then((res)=>{ + name: "session_id" + }).then((res) => { console.log(res) wx.switchTab({ url: '/pages/shopping/shopping' }) - }) - + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ - onReady: function() { + onReady: function () { }, /** * 生命周期函数--监听页面显示 */ - onShow: function() { + onShow: function () { }, /** * 生命周期函数--监听页面隐藏 */ - onHide: function() { + onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ - onUnload: function() { + onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ - onPullDownRefresh: function() { + onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ - onReachBottom: function() { + onReachBottom: function () { }, /** * 用户点击右上角分享 */ - onShareAppMessage: function() { + onShareAppMessage: function () { } }) \ No newline at end of file diff --git a/pages/product/product.json b/pages/product/product.json index 8835af0..98a1ad5 100644 --- a/pages/product/product.json +++ b/pages/product/product.json @@ -1,3 +1,4 @@ { + "navigationBarTitleText": "商品详情", "usingComponents": {} } \ No newline at end of file diff --git a/pages/product/product.scss b/pages/product/product.scss index 2385c52..f75f9ba 100644 --- a/pages/product/product.scss +++ b/pages/product/product.scss @@ -1,3 +1,4 @@ +@import "../../utils/wxParse/wxParse.wxss"; .box{ border-top: 1rpx solid #eaeaea; display: flex; @@ -33,5 +34,8 @@ font-size: 34rpx; color: #fff; text-align: center; + position: fixed; + bottom: 50rpx; + left: 221rpx; } } \ No newline at end of file diff --git a/pages/product/product.wxml b/pages/product/product.wxml index 74f2a8d..f152433 100644 --- a/pages/product/product.wxml +++ b/pages/product/product.wxml @@ -1,3 +1,4 @@ + @@ -18,7 +19,8 @@ {{info.goods.goods_name}} $ {{info.goods.shop_price}} - +