diff --git a/app.js b/app.js index c603897..a5ab26e 100644 --- a/app.js +++ b/app.js @@ -59,7 +59,11 @@ App({ } else if (res.data.code == '201') { resolve(res.data); } else { - console.log(res) + wx.showToast({ + title: res.data.msg, + duration: 1200, + icon:'none' + }) reject(res) } @@ -151,6 +155,7 @@ App({ }, globalData: { userInfo: null, - url:'http://winesbook.cn/static/images_mini/' + url:'http://winesbook.cn/static/images_mini/', + baseUrl:'https://winesbook.cn/api' } }) \ No newline at end of file diff --git a/app.json b/app.json index 0ef3268..5675431 100644 --- a/app.json +++ b/app.json @@ -39,6 +39,15 @@ "pages/findblock/zhuanjiapinjiudetail/zhuanjiapinjiudetail", "pages/findblock/niangjiushi/niangjiushi", "pages/findblock/jiudandetail/jiudandetail", + "pages/myblock/history/history", + "pages/myblock/jiupin/jiupin", + "pages/myblock/pinpai/pinpai", + "pages/myblock/company/company", + "pages/myblock/message/message", + "pages/myblock/feedback/feedback", + "pages/myblock/rule/rule", + "pages/myblock/about/about", + "pages/findblock/jiudandetail/jiudandetail", "pages/findblock/meirixinjiu/meirixinjiu", "pages/findblock/jiulist/jiulist", "pages/findblock/putongwenzhang/putongwenzhang" diff --git a/app.wxss b/app.wxss index 61fd345..abfa2e9 100644 --- a/app.wxss +++ b/app.wxss @@ -1,16 +1,18 @@ - - - -@font-face {font-family: "iconfont"; +@font-face { + font-family: "iconfont"; src: url('//at.alicdn.com/t/font_1185667_ds07xvngh3k.eot?t=1557490149623'); /* IE9 */ - src: url('//at.alicdn.com/t/font_1185667_ds07xvngh3k.eot?t=1557490149623#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAJ4AAsAAAAABiAAAAItAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAooRwE2AiQDCAsGAAQgBYRtBzEbbgXInpo8CQBIEAKw5OZZAMTD9/v9b+1zz1NNXxTzaBJFExlPJNEqFptWpnvEM0P7d//nMgdo757P88fyFNGAfSG/5fSl6QDVnJ5SE3ITbm/9Qwq8v752fZ5r6iXQgeQHmmsHRSUlBdDeeEAD7MLRkW0gQ98wdsELfE6gaU5P6ejxkxtoyux1gbhx1bOgWYjKMivUhWrD0Sxeqainx+kDXkbfj792RZ2kUrBbTl1auzD7wSkpHpWPXAwIMQI6XUGBLUAmzjVmT6gIxlU0s1VL4FiNwQ9lGXjEUZ2C/XV2fRvMwFzwg7dWgASPRRluT1KAqN49Re6l1+3sX7v38OPlfx0EKN+ntcoB8qvg1rf+6+39V29l8PFPvkfh8n02zA/q6/mC91cPHMiG1nanrKkbx5Pqftuamijh4NDvVNvkZMVQN5ngr5nNUKhbITO7BRUte1BVdwBNm21Pt4yIisgNbPIJEPq+kHS9RqHvm8zsDyqm/lDVjwJNF2J0Zcu6uNo8cpMsJRftJwwcTo3r1XbceEVeEVuS10b8HUkeJHC8bUe5sKWUZIkd+b03UTVohBPcgNcojhkz4ZAcHfiq2XS4/VKTQgOHE2g7QhCLIi5ke4ICDpYywWTVrnz+CvEUYhbp6Kur3iEiF8yOxgZGA8itKR3U9yjv5O55JpQykCFYAm3AIhKLMZQ1LwoRhxrwJ6QzU0NnlBlqGmxvSf7uFDTZ9hTO3ELt2lUrVS4AAAA=') format('woff2'), - url('//at.alicdn.com/t/font_1185667_ds07xvngh3k.woff?t=1557490149623') format('woff'), - url('//at.alicdn.com/t/font_1185667_ds07xvngh3k.ttf?t=1557490149623') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ - url('//at.alicdn.com/t/font_1185667_ds07xvngh3k.svg?t=1557490149623#iconfont') format('svg'); /* iOS 4.1- */ + src: url('//at.alicdn.com/t/font_1185667_ds07xvngh3k.eot?t=1557490149623#iefix') format('embedded-opentype'), + /* IE6-IE8 */ url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAJ4AAsAAAAABiAAAAItAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAooRwE2AiQDCAsGAAQgBYRtBzEbbgXInpo8CQBIEAKw5OZZAMTD9/v9b+1zz1NNXxTzaBJFExlPJNEqFptWpnvEM0P7d//nMgdo757P88fyFNGAfSG/5fSl6QDVnJ5SE3ITbm/9Qwq8v752fZ5r6iXQgeQHmmsHRSUlBdDeeEAD7MLRkW0gQ98wdsELfE6gaU5P6ejxkxtoyux1gbhx1bOgWYjKMivUhWrD0Sxeqainx+kDXkbfj792RZ2kUrBbTl1auzD7wSkpHpWPXAwIMQI6XUGBLUAmzjVmT6gIxlU0s1VL4FiNwQ9lGXjEUZ2C/XV2fRvMwFzwg7dWgASPRRluT1KAqN49Re6l1+3sX7v38OPlfx0EKN+ntcoB8qvg1rf+6+39V29l8PFPvkfh8n02zA/q6/mC91cPHMiG1nanrKkbx5Pqftuamijh4NDvVNvkZMVQN5ngr5nNUKhbITO7BRUte1BVdwBNm21Pt4yIisgNbPIJEPq+kHS9RqHvm8zsDyqm/lDVjwJNF2J0Zcu6uNo8cpMsJRftJwwcTo3r1XbceEVeEVuS10b8HUkeJHC8bUe5sKWUZIkd+b03UTVohBPcgNcojhkz4ZAcHfiq2XS4/VKTQgOHE2g7QhCLIi5ke4ICDpYywWTVrnz+CvEUYhbp6Kur3iEiF8yOxgZGA8itKR3U9yjv5O55JpQykCFYAm3AIhKLMZQ1LwoRhxrwJ6QzU0NnlBlqGmxvSf7uFDTZ9hTO3ELt2lUrVS4AAAA=') format('woff2'), + url('//at.alicdn.com/t/font_1185667_ds07xvngh3k.woff?t=1557490149623') format('woff'), + url('//at.alicdn.com/t/font_1185667_ds07xvngh3k.ttf?t=1557490149623') format('truetype'), + /* chrome, + firefox, + opera, + Safari, + Android, + iOS 4.2+ */ url('//at.alicdn.com/t/font_1185667_ds07xvngh3k.svg?t=1557490149623#iconfont') format('svg'); /* iOS 4.1- */ } - .iconfont { font-family: "iconfont" !important; font-size: 16px; @@ -23,72 +25,83 @@ content: "\e63f"; } -image{ - width:100%; - height:100%; +image { + width: 100%; + height: 100%; } -/* 遮罩层 */ - -.register{ - width: 100%; - height: 100%; - background-color: rgba(0,0,0,0.5); - position:fixed; - top:180rpx; - - left:0; - right:0; - z-index: 5; - } - - /* 箭头样式 */ - - .listrow{ - color:#999999; + +.register { + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + position: fixed; + top: 180rpx; + left: 0; + right: 0; + z-index: 5; +} + +/* 箭头样式 */ + +.listrow { + color: #999; font-size: 24rpx; } /* 星星图片 */ - .starimg{ - width:34rpx; - height:32rpx; - font-size: 0 - } - - .redrow{ - width:12rpx; - height:25rpx; - font-size: 0 + +.starimg { + width: 34rpx; + height: 32rpx; + font-size: 0; +} + +.redrow { + width: 12rpx; + height: 25rpx; + font-size: 0; } /* 关注 */ -.atten{ +.atten { /* width:100rpx; */ padding: 0 20rpx; - height:50rpx; - background:rgba(232,24,37,1); - border-radius:2rpx; + height: 50rpx; + background: rgba(232, 24, 37, 1); + border-radius: 2rpx; font-size: 26rpx; - color:#fff; + color: #fff; text-align: center; line-height: 50rpx; - } - - /* 上三角 */ - .boxright{ - width:26rpx; - height:15rpx; - font-size: 0 - } - .noData{ - height: 360rpx; - width: 750rpx; - text-align: center; - display: flex; - align-items: center; - font-size: 26rpx; - color: #999; - justify-content: center; - } - \ No newline at end of file +} + +/* 上三角 */ + +.boxright { + width: 26rpx; + height: 15rpx; + font-size: 0; +} + +.noData { + height: 360rpx; + width: 750rpx; + text-align: center; + display: flex; + align-items: center; + font-size: 26rpx; + color: #999; + justify-content: center; +} + +.showall { + color: #999; + font-size: 26rpx; + margin-top: 60rpx; + text-align: center; +} + +.nambottom .namebottomitem:first-child { + padding-left: 0; +} diff --git a/pages/findblock/niangjiushi/niangjiushi.wxml b/pages/findblock/niangjiushi/niangjiushi.wxml index 5f1b805..3f130b3 100644 --- a/pages/findblock/niangjiushi/niangjiushi.wxml +++ b/pages/findblock/niangjiushi/niangjiushi.wxml @@ -1,142 +1,142 @@ <view class="niangjiulist"> - <view class="niangjiuitem"> - <view class="teachimg"> - <image src="{{url}}/aicon_77@2x.png"></image> + <view class="niangjiuitem"> + <view class="teachimg"> + <image src="{{url}}/aicon_77@2x.png"></image> + </view> + <view class="jiuname">徐强</view> + + <view class="atten">关注</view> + + <view class="jiubottom"> + <view class="jiuleft"> + <view class="jiuleftimg"> + <image src="{{url}}/aicon_66x.png"></image> </view> - <view class="jiuname">徐强</view> - - <view class="atten">关注</view> - - <view class="jiubottom"> - <view class="jiuleft"> - <view class="jiuleftimg"> - <image src="{{url}}/aicon_66x.png"></image> - </view> - <view class="jiuzan">618</view> - </view> - - <view class="jiumiddle"> - <view class="middleimg"> - <image src="{{url}}/aicon_67x.png"></image> - </view> - <view class="tiao">54</view> - </view> - - <view class="jiuright"> - <image src="{{url}}/aicon_68x.png"></image> - </view> + <view class="jiuzan">618</view> + </view> + + <view class="jiumiddle"> + <view class="middleimg"> + <image src="{{url}}/aicon_67x.png"></image> </view> + <view class="tiao">54</view> + </view> + + <view class="jiuright"> + <image src="{{url}}/aicon_68x.png"></image> + </view> + </view> + </view> + <view class="niangjiuitem"> + <view class="teachimg"> + <image src="{{url}}/aicon_77@2x.png"></image> </view> - <view class="niangjiuitem"> - <view class="teachimg"> - <image src="{{url}}/aicon_77@2x.png"></image> + <view class="jiuname">徐强</view> + + <view class="atten">关注</view> + + <view class="jiubottom"> + <view class="jiuleft"> + <view class="jiuleftimg"> + <image src="{{url}}/aicon_66x.png"></image> </view> - <view class="jiuname">徐强</view> - - <view class="atten">关注</view> - - <view class="jiubottom"> - <view class="jiuleft"> - <view class="jiuleftimg"> - <image src="{{url}}/aicon_66x.png"></image> - </view> - <view class="jiuzan">618</view> - </view> - - <view class="jiumiddle"> - <view class="middleimg"> - <image src="{{url}}/aicon_67x.png"></image> - </view> - <view class="tiao">54</view> - </view> - - <view class="jiuright"> - <image src="{{url}}/aicon_68x.png"></image> - </view> + <view class="jiuzan">618</view> + </view> + + <view class="jiumiddle"> + <view class="middleimg"> + <image src="{{url}}/aicon_67x.png"></image> </view> + <view class="tiao">54</view> + </view> + + <view class="jiuright"> + <image src="{{url}}/aicon_68x.png"></image> + </view> </view> - <view class="niangjiuitem"> - <view class="teachimg"> - <image src="{{url}}/aicon_77@2x.png"></image> + </view> + <view class="niangjiuitem"> + <view class="teachimg"> + <image src="{{url}}/aicon_77@2x.png"></image> + </view> + <view class="jiuname">徐强</view> + + <view class="atten">关注</view> + + <view class="jiubottom"> + <view class="jiuleft"> + <view class="jiuleftimg"> + <image src="{{url}}/aicon_66x.png"></image> </view> - <view class="jiuname">徐强</view> - - <view class="atten">关注</view> - - <view class="jiubottom"> - <view class="jiuleft"> - <view class="jiuleftimg"> - <image src="{{url}}/aicon_66x.png"></image> - </view> - <view class="jiuzan">618</view> - </view> - - <view class="jiumiddle"> - <view class="middleimg"> - <image src="{{url}}/aicon_67x.png"></image> - </view> - <view class="tiao">54</view> - </view> - - <view class="jiuright"> - <image src="{{url}}/aicon_68x.png"></image> - </view> + <view class="jiuzan">618</view> + </view> + + <view class="jiumiddle"> + <view class="middleimg"> + <image src="{{url}}/aicon_67x.png"></image> </view> + <view class="tiao">54</view> + </view> + + <view class="jiuright"> + <image src="{{url}}/aicon_68x.png"></image> + </view> + </view> + </view> + <view class="niangjiuitem"> + <view class="teachimg"> + <image src="{{url}}/aicon_77@2x.png"></image> </view> - <view class="niangjiuitem"> - <view class="teachimg"> - <image src="{{url}}/aicon_77@2x.png"></image> + <view class="jiuname">徐强</view> + + <view class="atten">关注</view> + + <view class="jiubottom"> + <view class="jiuleft"> + <view class="jiuleftimg"> + <image src="{{url}}/aicon_66x.png"></image> </view> - <view class="jiuname">徐强</view> - - <view class="atten">关注</view> - - <view class="jiubottom"> - <view class="jiuleft"> - <view class="jiuleftimg"> - <image src="{{url}}/aicon_66x.png"></image> - </view> - <view class="jiuzan">618</view> - </view> - - <view class="jiumiddle"> - <view class="middleimg"> - <image src="{{url}}/aicon_67x.png"></image> - </view> - <view class="tiao">54</view> - </view> - - <view class="jiuright"> - <image src="{{url}}/aicon_68x.png"></image> - </view> + <view class="jiuzan">618</view> + </view> + + <view class="jiumiddle"> + <view class="middleimg"> + <image src="{{url}}/aicon_67x.png"></image> </view> + <view class="tiao">54</view> + </view> + + <view class="jiuright"> + <image src="{{url}}/aicon_68x.png"></image> + </view> + </view> + </view> + <view class="niangjiuitem"> + <view class="teachimg"> + <image src="{{url}}/aicon_77@2x.png"></image> </view> - <view class="niangjiuitem"> - <view class="teachimg"> - <image src="{{url}}/aicon_77@2x.png"></image> + <view class="jiuname">徐强</view> + + <view class="atten">关注</view> + + <view class="jiubottom"> + <view class="jiuleft"> + <view class="jiuleftimg"> + <image src="{{url}}/aicon_66x.png"></image> </view> - <view class="jiuname">徐强</view> - - <view class="atten">关注</view> - - <view class="jiubottom"> - <view class="jiuleft"> - <view class="jiuleftimg"> - <image src="{{url}}/aicon_66x.png"></image> - </view> - <view class="jiuzan">618</view> - </view> - - <view class="jiumiddle"> - <view class="middleimg"> - <image src="{{url}}/aicon_67x.png"></image> - </view> - <view class="tiao">54</view> - </view> - - <view class="jiuright"> - <image src="{{url}}/aicon_68x.png"></image> - </view> + <view class="jiuzan">618</view> + </view> + + <view class="jiumiddle"> + <view class="middleimg"> + <image src="{{url}}/aicon_67x.png"></image> </view> + <view class="tiao">54</view> + </view> + + <view class="jiuright"> + <image src="{{url}}/aicon_68x.png"></image> + </view> </view> -</view> + </view> +</view> \ No newline at end of file diff --git a/pages/findblock/zhuanjiapinjiu/zhuanjiapinjiu.wxml b/pages/findblock/zhuanjiapinjiu/zhuanjiapinjiu.wxml index f446371..824b98e 100644 --- a/pages/findblock/zhuanjiapinjiu/zhuanjiapinjiu.wxml +++ b/pages/findblock/zhuanjiapinjiu/zhuanjiapinjiu.wxml @@ -1,11 +1,8 @@ <view class="wineblock"> - <view class="winetitle">浓香酒酿酒大师:沈才宏</view> - <view class="wineimg"> <image src="{{url}}aicon_64.png"></image> </view> - <view class="winebottom"> <view class="winebottomleft"> <view class="winebottomleftimg"> @@ -14,7 +11,6 @@ <view class="wineeng">WinesBook</view> </view> <view class="winebottonright"> - <view class="winerighttou"> <view class="winerighttouimg"> <image src="{{url}}aicon_66x.png"></image> @@ -27,20 +23,16 @@ </view> <view class="winezan">54</view> </view> - <view class="winerighttou"> <view class="winerighttouimg"> <image src="{{url}}aicon_68x.png"></image> </view> - </view> </view> - </view> - </view> <view class="wineblock"> - + <view class="winetitle">浓香酒酿酒大师:沈才宏</view> <view class="wineimg"> diff --git a/pages/findblock/zhuanjiapinjiu/zhuanjiapinjiu.wxss b/pages/findblock/zhuanjiapinjiu/zhuanjiapinjiu.wxss index 8852b9b..8f47f1a 100644 --- a/pages/findblock/zhuanjiapinjiu/zhuanjiapinjiu.wxss +++ b/pages/findblock/zhuanjiapinjiu/zhuanjiapinjiu.wxss @@ -8,19 +8,30 @@ width:686rpx; height:300rpx; margin:30rpx auto 0; + position: relative; +} +.video_play{ + position: absolute; + top: 50%; + left: 50%; + width: 80rpx; + height: 80rpx; + transform: translate(-50%,-50%); + -webkit-transform: translate(-50%,-50%); } .winebottom{ display:flex; justify-content: space-between; align-items: center; - padding: 0 32rpx; box-sizing: border-box; margin-top:30rpx; } .winebottomleftimg{ width:60rpx; height:60rpx; - font-size: 0 + font-size: 0; + border-radius: 50%; + overflow: hidden; } .winebottomleft{ display:flex; @@ -30,7 +41,7 @@ width:345rpx; display:flex; align-items: center; - justify-content: space-around + justify-content: space-between } .winerighttouimg{ width:30rpx; @@ -54,7 +65,8 @@ .wineblock{ border-bottom: 1rpx solid #f5f5f5; padding-bottom: 30rpx; - margin-top:33rpx; + margin: 33rpx auto 0; + } .pin{ width:16rpx; diff --git a/pages/homeblock/search/search.wxss b/pages/homeblock/search/search.wxss index 81539d8..0c22c19 100644 --- a/pages/homeblock/search/search.wxss +++ b/pages/homeblock/search/search.wxss @@ -126,6 +126,7 @@ image{ padding: 37rpx 31rpx; box-sizing: border-box; border-bottom: 1rpx solid #f5f5f5; + background: #FFF; } .searchitemleft{ display:flex; diff --git a/pages/mine/mine.json b/pages/mine/mine.json index ced5b27..cc2724b 100644 --- a/pages/mine/mine.json +++ b/pages/mine/mine.json @@ -1,4 +1,5 @@ { "navigationStyle": "custom", - "usingComponents": {} + "usingComponents": {}, + "navigationBarTitleText": "关于我们" } \ No newline at end of file diff --git a/pages/mine/mine.wxml b/pages/mine/mine.wxml index 7b3a66a..a212428 100644 --- a/pages/mine/mine.wxml +++ b/pages/mine/mine.wxml @@ -1,6 +1,6 @@ <view class="headimg"> <image src="{{url}}aicon_87x.png"></image> - <navigator class="peopleinfo" url=''> + <navigator class="peopleinfo" url='/pages/myblock/personpage/personpage'> <view class="peoplecontent"> <view class="peopleleft"> <image src="{{userInfo.avatar||url+'aicon_77@2x.png'}}"></image> @@ -44,23 +44,23 @@ <view class="collect"> <view class="mycollect">我的收藏</view> <view class="collectnum"> - <view class="collectitem"> - <view class="collectitemnum">19</view> + <navigator url='/pages/myblock/jiupin/jiupin' class="collectitem"> + <view class="collectitemnum">{{userInfo.wine_count}}</view> <view class="collectitemtitle">酒品</view> - </view> - <view class="collectitem"> - <view class="collectitemnum">19</view> + </navigator> + <navigator url='/pages/myblock/pinpai/pinpai' class="collectitem"> + <view class="collectitemnum">{{userInfo.brand_count}}</view> <view class="collectitemtitle">品牌</view> - </view> - <view class="collectitem"> - <view class="collectitemnum">19</view> + </navigator> + <navigator url='/pages/myblock/jiupin/jiupin' class="collectitem"> + <view class="collectitemnum">{{userInfo.wine_rec_count}}</view> <view class="collectitemtitle">酒企</view> - </view> + </navigator> </view> </view> <view class="mylist"> - <navigator class="mylistitem" url="/pages/myblock/personpage/personpage" hover-class="none"> + <navigator class="mylistitem" url="/pages/myblock/message/message" hover-class="none"> <view class="mylistleft"> <view class="mylistimage"> <image src="{{url}}aicon_82x.png"></image> @@ -83,11 +83,11 @@ <view class="mylistimage"> <image src="{{url}}aicon_84x.png"></image> </view> - <view class="message">账号与安全</view> + <view class="message">账号与安全</view> </view> <view class="iconfont icon-jiantou listrow"></view> </navigator> - <navigator class="mylistitem"> + <navigator class="mylistitem" url='/pages/myblock/rule/rule'> <view class="mylistleft"> <view class="mylistimage"> <image src="{{url}}aicon_85x.png"></image> @@ -96,7 +96,7 @@ </view> <view class="iconfont icon-jiantou listrow"></view> </navigator> - <navigator class="mylistitem"> + <navigator class="mylistitem" url='/pages/myblock/about/about'> <view class="mylistleft"> <view class="mylistimage"> <image src="{{url}}aicon_86x.png"></image> diff --git a/pages/myblock/about/about.js b/pages/myblock/about/about.js new file mode 100644 index 0000000..1b7e556 --- /dev/null +++ b/pages/myblock/about/about.js @@ -0,0 +1,74 @@ +// pages/myblock/rule/rule.js +let WxParse = require('../../../wxParse/wxParse.js'); +const app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getRule(); + }, + getRule() { + let url = '/index/Common/about'; + app.post(url, {}).then(r => { + WxParse.wxParse('contentHtml', 'html', r.content, this, 5) + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/myblock/about/about.json b/pages/myblock/about/about.json new file mode 100644 index 0000000..dcde4a0 --- /dev/null +++ b/pages/myblock/about/about.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "关于我们" +} \ No newline at end of file diff --git a/pages/myblock/about/about.wxml b/pages/myblock/about/about.wxml new file mode 100644 index 0000000..a50ba56 --- /dev/null +++ b/pages/myblock/about/about.wxml @@ -0,0 +1,5 @@ +<!--pages/myblock/rule/rule.wxml--> +<view class='content'> + <import src="/wxParse/wxParse.wxml" /> + <template is="wxParse" data="{{wxParseData:contentHtml.nodes}}" /> + </view> diff --git a/pages/myblock/about/about.wxss b/pages/myblock/about/about.wxss new file mode 100644 index 0000000..19ded1d --- /dev/null +++ b/pages/myblock/about/about.wxss @@ -0,0 +1,6 @@ + +.content{ + font-size: 30rpx; + padding: 30rpx; + color: #666; +} \ No newline at end of file diff --git a/pages/myblock/company/company.js b/pages/myblock/company/company.js new file mode 100644 index 0000000..22aac66 --- /dev/null +++ b/pages/myblock/company/company.js @@ -0,0 +1,66 @@ +// pages/myblock/company/company.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/myblock/company/company.json b/pages/myblock/company/company.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/myblock/company/company.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/myblock/company/company.wxml b/pages/myblock/company/company.wxml new file mode 100644 index 0000000..d074353 --- /dev/null +++ b/pages/myblock/company/company.wxml @@ -0,0 +1,2 @@ +<!--pages/myblock/company/company.wxml--> +<text>pages/myblock/company/company.wxml</text> diff --git a/pages/myblock/company/company.wxss b/pages/myblock/company/company.wxss new file mode 100644 index 0000000..f2d08f9 --- /dev/null +++ b/pages/myblock/company/company.wxss @@ -0,0 +1 @@ +/* pages/myblock/company/company.wxss */ \ No newline at end of file diff --git a/pages/myblock/feedback/feedback.js b/pages/myblock/feedback/feedback.js new file mode 100644 index 0000000..767bdc2 --- /dev/null +++ b/pages/myblock/feedback/feedback.js @@ -0,0 +1,88 @@ +// pages/myblock/feedback/feedback.js +const app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + inputFeedback(e){ + this.setData({ + content:e.detail.value + }) + }, + subFeedBack(){ + let url = 'user/Center/feedback',params = { + content:this.data.content + }; + params.content?app.post(url,params).then(r=>{ + wx.showToast({ + title: '提交成功', + icon:'none' + }) + setTimeout(r=>{ + wx.navigateBack({}) + },1200) + }):wx.showToast({ + title: '请输入您要反馈的内容', + icon:'none' + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/myblock/feedback/feedback.json b/pages/myblock/feedback/feedback.json new file mode 100644 index 0000000..e85f0b9 --- /dev/null +++ b/pages/myblock/feedback/feedback.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "用户反馈" +} \ No newline at end of file diff --git a/pages/myblock/feedback/feedback.wxml b/pages/myblock/feedback/feedback.wxml new file mode 100644 index 0000000..5c5a062 --- /dev/null +++ b/pages/myblock/feedback/feedback.wxml @@ -0,0 +1,6 @@ +<!--pages/myblock/feedback/feedback.wxml--> +<view> + <textarea class='feedback_box' bindinput='inputFeedback' placeholder='请输入您的意见,我们会积极处理并改正的~'></textarea> + + <view class='submit_btn' bindtap='subFeedBack'>提交</view> +</view> diff --git a/pages/myblock/feedback/feedback.wxss b/pages/myblock/feedback/feedback.wxss new file mode 100644 index 0000000..79c767c --- /dev/null +++ b/pages/myblock/feedback/feedback.wxss @@ -0,0 +1,22 @@ +/* pages/myblock/feedback/feedback.wxss */ +.feedback_box{ + margin: 40rpx 32rpx 0 32rpx; + background-color: #F2F2F2; + border-radius: 10rpx; + padding: 25rpx; + font-size: 28rpx; + display: block; + width: auto; +} +.submit_btn{ + height: 80rpx; + width: 660rpx; + color: #FFF; + font-size: 28rpx; + background-color: #E81825; + display: flex; + align-items: center; + justify-content: center; + border-radius: 40rpx; + margin: 40rpx auto; +} diff --git a/pages/myblock/history/history.wxml b/pages/myblock/history/history.wxml index 97ab6db..0caf2b2 100644 --- a/pages/myblock/history/history.wxml +++ b/pages/myblock/history/history.wxml @@ -114,7 +114,7 @@ <view class='wine_list' wx:if='{{selectindex==3}}' bindtap='closeShareAction'> <view class='list_item' wx:for='{{list}}' wx:key=''> <view class='img_box'> - <image src='{{item.thumb}}' mode='widthFix'></image> + <image src='{{item.avatar}}' mode='widthFix'></image> </view> <view class='wine_title'>{{item.title}}</view> <view class='wine_name'>{{item.user_nickname}}</view> @@ -136,42 +136,82 @@ <image src='/img/gengduo.png' mode='widthFix' class='moreIcon'></image> <view class='min_action_box'> <view class='action_btn {{item.is_favorite?"active":""}}'>{{!item.is_favorite?"收藏":"已收藏"}}</view> - <view class='action_btn'>分享 <button open-type='share'></button></view> + <view class='action_btn'>分享 + <button open-type='share'></button> + </view> </view> </view> </view> </view> - <!-- <view class='list_item'> - <view class='img_box'> - <image src='/img/aicon_65.png'></image> + </view> + <!-- 专家品酒 --> + <view class='wine_list' wx:if='{{selectindex==4}}'> + <view class="wineblock" wx:for='{{list}}' wx:key=''> + <view class="winetitle">{{item.title}}</view> + <view class="wineimg"> + <image src="{{item.video_image}}"></image> + <image src='/img/aicon_70.png' class='video_play'></image> </view> - <view class='wine_title'>万丈红尘一人醉</view> - <view class='wine_name'>唐国强</view> - <view class='wine_leavel'>lv12</view> - <view class='action_box'> - <view class='single_action'> - <view class='zan_icon'> - <image src='/img/aicon_47.png' mode='widthFix'></image> + <view class="winebottom"> + <view class="winebottomleft"> + <view class="winebottomleftimg"> + <image src="{{item.avatar}}"></image> </view> - 618 + <view class="wineeng">{{item.name}}</view> </view> - <view class='single_action'> - <view class='zan_icon'> + <view class="winebottonright"> + <view class="winerighttou"> + <view class="winerighttouimg"> + <image src='{{!item.is_good?"/img/aicon_47.png":"/img/aicon_46.png"}}' mode='widthFix'></image> + </view> + <view class="winezan">{{item.good_count}}</view> + </view> + <view class="winerighttou"> + <view class="winerighttouimg"> + <image src='/img/aicon_67.png' mode='widthFix'></image> + </view> + <view class="winezan">{{item.comment_count}}</view> + </view> + <view class="winerighttou"> + <view class="winerighttouimg"> + <image src="/img/aicon_74.png"></image> + </view> + </view> + </view> + </view> + </view> + </view> + <view class="niangjiulist" wx:if='{{selectindex==5}}'> + <view class="niangjiuitem" wx:for='{{list}}' wx:key=''> + <view class="teachimg"> + <image src="{{item.avatar}}"></image> + </view> + <view class="jiuname">{{item.name}}</view> + <view class="atten">{{item.is_concern==0?'关注':'已关注'}}</view> + <view class="jiubottom"> + <view class="jiuleft"> + <view class="jiuleftimg"> + <image src='{{!item.is_good?"/img/aicon_47.png":"/img/aicon_46.png"}}' mode='widthFix'></image> + </view> + <view class="jiuzan">{{item.good_count}}</view> + </view> + + <view class="jiumiddle"> + <view class="middleimg"> <image src='/img/aicon_67.png' mode='widthFix'></image> </view> - 54 + <view class="tiao">{{item.comment_count}}</view> </view> - <view class='single_action'> - <image src='/img/gengduo.png' mode='widthFix' class='more'></image> - + <view class="jiuright"> + <image src="/img/aicon_68.png"></image> </view> </view> - </view> --> + </view> </view> <view class='showall' wx:if='{{noMore&&noData}}'>已显示全部内容</view> </view> </view> - +<view class='showall' wx:if='{{noMore&&noData}}'>已显示全部内容</view> <view class='noData' wx:if='{{!noData}}'> 暂无相关数据 </view> \ No newline at end of file diff --git a/pages/myblock/history/history.wxss b/pages/myblock/history/history.wxss index 51211b4..b7b394c 100644 --- a/pages/myblock/history/history.wxss +++ b/pages/myblock/history/history.wxss @@ -1,5 +1,7 @@ @import '../../homeblock/zhinengselect/zhinengselect.wxss'; @import '../../jiudan/jiudan.wxss'; +@import '../../findblock/zhuanjiapinjiu/zhuanjiapinjiu.wxss'; +@import '../../findblock/niangjiushi/niangjiushi.wxss'; page{ width: 100%; @@ -236,10 +238,7 @@ page{ background: #E81825; color: #FFF; } -.img_box{ - overflow: auto; - border-radius: 0; -} + .shareAction .more{ margin-right: 0!important; } \ No newline at end of file diff --git a/pages/myblock/huanbangshouji/huanbangshouji.js b/pages/myblock/huanbangshouji/huanbangshouji.js index 7e9ed9d..3d12593 100644 --- a/pages/myblock/huanbangshouji/huanbangshouji.js +++ b/pages/myblock/huanbangshouji/huanbangshouji.js @@ -1,11 +1,16 @@ // pages/myblock/huanbangshouji/huanbangshouji.js +const app = getApp(); Page({ /** * 页面的初始数据 */ data: { + params:{ + }, + getting: true, + code: 60 }, /** @@ -14,6 +19,66 @@ Page({ onLoad: function (options) { }, + getCode(){ + let phone = this.data.params.mobile, url ='/user/Profile/getNewCode',that = this; + if (!(/^1[3456789]\d{9}$/.test(phone))){ + wx.showToast({ + title: '请输入正确的手机号', + icon:'none' + }) + }else{ + let params = { + mobile: this.data.params.mobile + },code=60; + app.post(url,params).then(r=>{ + that.setData({ + getting: false + }) + let interval = setInterval(()=>{ + that.setData({ + code: code + }) + code--; + if (code == 0) { + that.setData({ + getting: true, + code: 60 + }) + clearInterval(interval); + } + },1000) + }) + } + }, + inputCode(e){ + let type = e.currentTarget.dataset.type; + this.data.params[type]=e.detail.value; + this.setData({ + params:this.data.params + }) + }, + subBand(){ + let phone = this.data.params.mobile, url ='/user/Profile/bind_new_mobile'; + if (!(/^1[3456789]\d{9}$/.test(phone))) { + wx.showToast({ + title: '请输入正确的手机号', + icon: 'none' + }) + } else { + app.post(url, this.data.params).then(r => { + wx.showToast({ + title: '换绑手机号成功', + icon:'none' + }) + setTimeout(()=>{ + wx.navigateBack({ + + }) + },1500) + + }) + } + }, /** * 生命周期函数--监听页面初次渲染完成 diff --git a/pages/myblock/huanbangshouji/huanbangshouji.wxml b/pages/myblock/huanbangshouji/huanbangshouji.wxml index 1087c5f..6526178 100644 --- a/pages/myblock/huanbangshouji/huanbangshouji.wxml +++ b/pages/myblock/huanbangshouji/huanbangshouji.wxml @@ -1,11 +1,18 @@ <view class="bangshouji"> - <view class="huanbangleft"> - <input password type="number" placeholder='请输入手机号' placeholder-class='enterphone'/> - </view> - - <view class="huanbangright">获取验证码</view> + <view class="huanbangleft"> + <input type="number" placeholder='请输入手机号' placeholder-class='enterphone' maxlength='11' bindinput='inputCode' data-type='mobile' /> + </view> + <view class="huanbangright" bindtap='getCode' wx:if='{{getting}}' >获取验证码</view> + <view class="huanbangright" wx:else>{{code}}S</view> </view> - <view class="bangshouji enteryan"> - <input password type="number" placeholder='请输入验证码' placeholder-class='enterphone'/> + <input type="number" placeholder='请输入验证码' maxlength='6' placeholder-class='enterphone' value='{{verification_code}}' bindinput='inputCode' data-type='verification_code' /> </view> + +<view class='sub_btn' wx:if='{{!params.verification_code}}'> + 验证后绑定新手机号 +</view> + +<view class='sub_btn active' wx:else bindtap='subBand'> + 确认绑定 +</view> \ No newline at end of file diff --git a/pages/myblock/huanbangshouji/huanbangshouji.wxss b/pages/myblock/huanbangshouji/huanbangshouji.wxss index b5ba9a2..4532f85 100644 --- a/pages/myblock/huanbangshouji/huanbangshouji.wxss +++ b/pages/myblock/huanbangshouji/huanbangshouji.wxss @@ -53,4 +53,20 @@ page{ margin-top:32rpx; color:#1A1A1A; font-size: 30rpx; +} +.sub_btn{ + width: 540rpx; + height: 100rpx; + background: #CCC; + font-size: 30rpx; + margin: 0 auto; + margin-top: 130rpx; + color: #FFF; + border-radius: 50rpx; + align-items: center; + display: flex; + justify-content: center; +} +.sub_btn.active{ + background: #E81825; } \ No newline at end of file diff --git a/pages/myblock/jiupin/jiupin.js b/pages/myblock/jiupin/jiupin.js new file mode 100644 index 0000000..aef6e9d --- /dev/null +++ b/pages/myblock/jiupin/jiupin.js @@ -0,0 +1,89 @@ +// pages/myblock/jiupin/jiupin.js +const app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + page:1, + noData: true, + noMore: false, + list:[] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getList(); + }, + getList() { + let url = 'user/Center/favorite_wine' , params = { + page: this.data.page + }; + app.post(url, params).then(r => { + var list = this.data.page == 1 ? r.list : this.data.list.concat(r.list); + this.setData({ + list: list, + totalPage: r.total_page, + noData: list.length > 0 ? true : false, + noMore: r.totalPage == r.page ? !0 : !1 + }) + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + !this.data.noMore ?(this.setData({ + page: page + 1 + }), this.list()) : wx.showToast({ + title: '没有更多了', + icon: 'none' + }) + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/myblock/jiupin/jiupin.json b/pages/myblock/jiupin/jiupin.json new file mode 100644 index 0000000..9199b55 --- /dev/null +++ b/pages/myblock/jiupin/jiupin.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "酒品" +} \ No newline at end of file diff --git a/pages/myblock/jiupin/jiupin.wxml b/pages/myblock/jiupin/jiupin.wxml new file mode 100644 index 0000000..602e689 --- /dev/null +++ b/pages/myblock/jiupin/jiupin.wxml @@ -0,0 +1,28 @@ +<view class='list_box'> + <view class="searchitem" wx:for='{{list}}' wx:key=''> + <view class="searchitemleft"> + <view class="itemleftimg"> + <image src="{{item.logo}}"></image> + </view> + <view class="itemiddle"> + <view class="itemidelename">{{item.name}}</view> + <view class="nambottom"> + <text class="namebottomitem">{{item.degree_name}}</text> + <text class="namebottomitem">{{item.odor_name}}</text> + <text class="namebottomitem">{{item.price}}</text> + <text class="namebottomitem">{{item.ml}}</text> + </view> + </view> + </view> + <view class="starimg"> + <!-- aicon_010x.png --> + <image src="{{item.is_favorite==0?'/img/aicon_09.png':'/img/aicon_10.png'}}"></image> + </view> + </view> +</view> + + +<view class='showall' wx:if='{{noMore&&noData}}'>已显示全部内容</view> +<view class='noData' wx:if='{{!noData}}'> + 暂无相关数据 +</view> \ No newline at end of file diff --git a/pages/myblock/jiupin/jiupin.wxss b/pages/myblock/jiupin/jiupin.wxss new file mode 100644 index 0000000..7cb7f37 --- /dev/null +++ b/pages/myblock/jiupin/jiupin.wxss @@ -0,0 +1,2 @@ +/* pages/myblock/jiupin/jiupin.wxss */ +@import '../../homeblock/search/search.wxss'; \ No newline at end of file diff --git a/pages/myblock/message/message.js b/pages/myblock/message/message.js new file mode 100644 index 0000000..2375e5c --- /dev/null +++ b/pages/myblock/message/message.js @@ -0,0 +1,91 @@ +// pages/myblock/message/message.js +const formMate = require('../../../utils/util.js'); +const app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + page: 1, + list: [], + noData: true, + noMore: !1, + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getList(); + }, + getList() { + let url = 'user/Center/my_message', params = { + page: this.data.page + }; + app.post(url, params).then(r => { + for(var obj of r.list){ + obj.create_time = formMate.formatTime(new Date(obj.create_time)) + } + var list = this.data.page == 1 ? r.list : this.data.list.concat(r.list); + this.setData({ + list: list, + totalPage: r.total_page, + noData: list.length > 0 ? true : false, + noMore: r.totalPage == r.page ? !0 : !1 + }) + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + this.data.page < this.data.totalPage ? this.list() + : wx.showToast({ + title: '没有更多了', + icon: 'none' + }) + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/myblock/message/message.json b/pages/myblock/message/message.json new file mode 100644 index 0000000..914ca0c --- /dev/null +++ b/pages/myblock/message/message.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "消息通知" +} \ No newline at end of file diff --git a/pages/myblock/message/message.wxml b/pages/myblock/message/message.wxml new file mode 100644 index 0000000..5ba2bae --- /dev/null +++ b/pages/myblock/message/message.wxml @@ -0,0 +1,9 @@ +<!--pages/myblock/message/message.wxml--> +<view class='message_list'> + <view class='message_item' wx:for='{{list}}' wx:key=''> + <view class='time'>{{item.create_time}}</view> + <view class='message_content'> + {{item.content}} + </view> + </view> +</view> diff --git a/pages/myblock/message/message.wxss b/pages/myblock/message/message.wxss new file mode 100644 index 0000000..c1225e3 --- /dev/null +++ b/pages/myblock/message/message.wxss @@ -0,0 +1,22 @@ +/* pages/myblock/message/message.wxss */ +page{ + background: #F2F2F2; +} +.message_item{ + +} +.message_item .time{ + color: #999999; + font-size: 24rpx; + text-align: center; + padding: 36rpx 0; + +} +.message_content{ + margin: 0 67rpx; + padding: 38rpx 44rpx; + background-color: #FFF; + font-size:26rpx; + color: #333; + border-radius: 5rpx; +} \ No newline at end of file diff --git a/pages/myblock/personpage/personpage.js b/pages/myblock/personpage/personpage.js index 73b3112..9a0289f 100644 --- a/pages/myblock/personpage/personpage.js +++ b/pages/myblock/personpage/personpage.js @@ -12,9 +12,10 @@ Page({ sexarray:['男','女'], birthday:'', reginname: '北京 北京市 东城区', - region: ['北京', '北京市', '东城区'] + region: ['北京', '北京市', '东城区'], + xingzuo:[''] }, - + /** * 生命周期函数--监听页面加载 */ @@ -24,20 +25,75 @@ Page({ birthday: app.newnowDate() }) + this.getUserInfo(); + }, + uploadImg(e){ + let that = this; + wx.chooseImage({ + count: 1, + sizeType: [], + sourceType: [], + success: function(res) { + wx.uploadFile({ + url: app.globalData.baseUrl +'/user/upload/one', + filePath: res.tempFilePaths[0], + name: 'file', + header: { + 'XX-Token':wx.getStorageSync('token'), + 'XX-Device-Type':'wxapp' + }, + formData: { + file: res.tempFilePaths[0] + }, + success: function(res) { + let data = JSON.parse(res.data) + + that.setData({ + 'userInfo.avatar': data.data.url + }); + that.saveUserInfo(); + }, + fail: function(res) {}, + complete: function(res) {}, + }) + }, + fail: function(res) {}, + complete: function(res) {}, + }) + }, + getUserInfo(){ + let url = '/user/Center/get_userinfo'; + app.post(url,{}).then(r=>{ + this.setData({ + userInfo: r, + sexindex: r.sex == 1 ?0:2, + sexname: r.sex == 1?'男':'女' + }) + }) + }, + saveUserInfo(){ + let url = 'user/Center/set_userinfo'; + app.post(url,this.data.userInfo).then(r=>{}) + }, + inputUserInfo(e){ + let type = e.currentTarget.dataset.type; + this.data.userInfo[type] = e.detail.value + this.setData({ + userInfo: this.data.userInfo + }); + this.saveUserInfo(); }, bindhospitaltypeChange(e) { let that = this; that.setData({ - sexindex: e.detail.value, - sexname: that.data.sexarray[e.detail.value] - + sexname: that.data.sexarray[e.detail.value], + 'userInfo.sex': that.data.sexarray[e.detail.value]=='男'?1:2 }) }, //生日选择 bindDateChange: function (e) { - this.setData({ birthday: e.detail.value }) diff --git a/pages/myblock/personpage/personpage.wxml b/pages/myblock/personpage/personpage.wxml index 0a1bc2d..85dfb31 100644 --- a/pages/myblock/personpage/personpage.wxml +++ b/pages/myblock/personpage/personpage.wxml @@ -1,15 +1,15 @@ <view class="headtop"> <view class="headtopitem"> <view class="headtopleft">我的头像</view> - <view class="touxiang"> - <image src="{{url}}/aicon_77@2x.png"></image> + <view class="touxiang" bindtap='uploadImg'> + <image src="{{userInfo.avatar}}"></image> </view> </view> <view class="headtopitem"> <view class="headtopleft">昵称</view> <view class="entername"> - <input placeholder='请输入昵称' placeholder-class='enterming' /> + <input placeholder='请输入昵称' placeholder-class='enterming' value='{{userInfo.user_nickname}}' bindinput='inputUserInfo' data-type='user_nickname' /> </view> </view> @@ -34,91 +34,78 @@ </view> <view class="headtopitem"> <view class="headtopleft">生日</view> - <picker mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindDateChange"> - + <picker mode="date" value="{{userInfo.birthday}}" bindchange="bindDateChange"> <view class="selectoption"> <view class="sexname"> {{birthday}} </view> - <view class="rowimg"> <image src="/img/aicon_61.png"></image> </view> </view> - </picker> </view> <view class="headtopitem"> <view class="headtopleft">地区</view> - <picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}"> - + <picker mode="region" bindchange="bindRegionChange" value="{{userInfo.region}}" custom-item="{{customItem}}"> <view class="selectoption"> <view class="sexname"> {{reginname}} </view> - <view class="rowimg"> <image src="/img/aicon_61.png"></image> </view> </view> - </picker> </view> <view class="headtopitem"> <view class="headtopleft">个人签名</view> <view class="entername qianming"> - <input placeholder='请输入个性签名' placeholder-class='enterming' /> + <input placeholder='请输入个性签名' placeholder-class='enterming' value='{{userInfo.sign}}' bindinput='inputUserInfo' data-type='sign' /> </view> </view> - </view> <view class="headtop"> <view class="headtopitem"> <view class="headtopleft">星座</view> <view class="entername"> - <input placeholder='请输入星座' placeholder-class='enterming' /> + <input placeholder='请输入星座' placeholder-class='enterming' value='{{userInfo.constellation}}' bindinput='getUserInfo' data-type='constellation' /> </view> </view> - <view class="headtopitem"> <view class="headtopleft">身高</view> <view class="entername"> - <input placeholder='请输入身高' placeholder-class='enterming' /> + <input placeholder='请输入身高' placeholder-class='enterming' value='{{userInfo.height}}' bindinput='inputUserInfo' data-type='height'/> </view> </view> - <view class="headtopitem"> <view class="headtopleft">体重</view> <view class="entername"> - <input placeholder='请输入体重' placeholder-class='enterming' /> + <input placeholder='请输入体重' placeholder-class='enterming' value='{{userInfo.weight}}' bindinput='inputUserInfo' data-type='weight'/> </view> </view> - - </view> <view class="headtop"> <view class="headtopitem"> <view class="headtopleft">职业</view> <view class="entername"> - <input placeholder='请输入职业' placeholder-class='enterming' /> + <input placeholder='请输入职业' placeholder-class='enterming' value='{{userInfo.major}}' bindinput='inputUserInfo' data-type='major'/> </view> </view> <view class="headtopitem"> <view class="headtopleft">收入</view> <view class="entername"> - <input placeholder='请输入收入' placeholder-class='enterming' /> + <input placeholder='请输入收入' placeholder-class='enterming' value='{{userInfo.income}}' bindinput='inputUserInfo' data-type='income'/> </view> </view> <view class="headtopitem"> <view class="headtopleft">兴趣爱好</view> <view class="entername"> - <input placeholder='请输入兴趣爱好' placeholder-class='enterming' /> + <input placeholder='请输入兴趣爱好' placeholder-class='enterming' value='{{userInfo.interest}}' bindinput='inputUserInfo' data-type='interest'/> </view> </view> - - </view> \ No newline at end of file diff --git a/pages/myblock/personpage/personpage.wxss b/pages/myblock/personpage/personpage.wxss index ea8140a..f6639a1 100644 --- a/pages/myblock/personpage/personpage.wxss +++ b/pages/myblock/personpage/personpage.wxss @@ -35,7 +35,7 @@ text-align: right } .enterming{ - color:#999999; + color:#666; font-size:28rpx; text-align: right } @@ -47,7 +47,7 @@ height:48rpx; line-height: 48rpx; text-align: right; - color:#999999; + color:#666; font-size:28rpx; margin-right:22rpx; @@ -60,4 +60,7 @@ .selectoption{ display:flex; align-items: center; +} +input{ + color: #666 } \ No newline at end of file diff --git a/pages/myblock/pinpai/pinpai.js b/pages/myblock/pinpai/pinpai.js new file mode 100644 index 0000000..15a4905 --- /dev/null +++ b/pages/myblock/pinpai/pinpai.js @@ -0,0 +1,99 @@ +// pages/myblock/jiupin/jiupin.js +const app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + page: 1, + noData: true, + noMore: false, + list: [] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getList(); + }, + collect(e) { + let id = e.currentTarget.id, url = '/index/Common/favorite', index = e.currentTarget.dataset.index, params = { + sort: 2, + id: id + }; + app.post(url, params).then(r => { + this.data.list.splice(index,1); + wx.showToast({ + title: '操作成功', + icon:'none', + duration: 1300 + }) + this.setData({ + list: this.data.list + }) + }) + }, + getList() { + let url = 'user/Center/favorite_brand', params = { + page: this.data.page + }; + app.post(url, params).then(r => { + var list = this.data.page == 1 ? r.list : this.data.list.concat(r.list); + this.setData({ + list: list, + totalPage: r.total_page, + noData: list.length > 0 ? true : false, + noMore: r.totalPage == r.page ? !0 : !1 + }) + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + !this.data.noMore ? (this.setData({ + page: page + 1 + }), this.list()) : wx.showToast({ + title: '没有更多了', + icon: 'none' + }) + }, + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/myblock/pinpai/pinpai.json b/pages/myblock/pinpai/pinpai.json new file mode 100644 index 0000000..17f686d --- /dev/null +++ b/pages/myblock/pinpai/pinpai.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "品牌" +} \ No newline at end of file diff --git a/pages/myblock/pinpai/pinpai.wxml b/pages/myblock/pinpai/pinpai.wxml new file mode 100644 index 0000000..9ead2ca --- /dev/null +++ b/pages/myblock/pinpai/pinpai.wxml @@ -0,0 +1,28 @@ +<view class='list_box'> + <view class="searchitem" wx:for='{{list}}' wx:key=''> + <view class="searchitemleft"> + <view class="itemleftimg"> + <image src="{{item.logo}}" mode='widthFix'></image> + </view> + <view class="itemiddle"> + <view class="itemidelename">{{item.name}}</view> + <view class="nambottom"> + <text class="namebottomitem">{{item.sort_name}}</text> + <text class="namebottomitem">{{item.country}}</text> + <text class="namebottomitem">{{item.city}}</text> + <text class="namebottomitem">{{item.odor_name}}</text> + </view> + </view> + </view> + <view class="starimg" id='{{item.id}}' data-index='{{index}}' bindtap='collect'> + <!-- aicon_010x.png --> + <image src="{{item.is_favorite==0?'/img/aicon_09.png':'/img/aicon_10.png'}}"></image> + </view> + </view> +</view> + + +<view class='showall' wx:if='{{noMore&&noData}}'>已显示全部内容</view> +<view class='noData' wx:if='{{!noData}}'> + 暂无相关数据 +</view> \ No newline at end of file diff --git a/pages/myblock/pinpai/pinpai.wxss b/pages/myblock/pinpai/pinpai.wxss new file mode 100644 index 0000000..7cb7f37 --- /dev/null +++ b/pages/myblock/pinpai/pinpai.wxss @@ -0,0 +1,2 @@ +/* pages/myblock/jiupin/jiupin.wxss */ +@import '../../homeblock/search/search.wxss'; \ No newline at end of file diff --git a/pages/myblock/rule/rule.js b/pages/myblock/rule/rule.js new file mode 100644 index 0000000..c65b8a2 --- /dev/null +++ b/pages/myblock/rule/rule.js @@ -0,0 +1,74 @@ +// pages/myblock/rule/rule.js +let WxParse = require('../../../wxParse/wxParse.js'); +const app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getRule(); + }, + getRule(){ + let url = '/index/Common/protocol'; + app.post(url,{}).then(r=>{ + WxParse.wxParse('contentHtml', 'html', r.content, this, 5) + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/myblock/rule/rule.json b/pages/myblock/rule/rule.json new file mode 100644 index 0000000..b843009 --- /dev/null +++ b/pages/myblock/rule/rule.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "协议规则" +} \ No newline at end of file diff --git a/pages/myblock/rule/rule.wxml b/pages/myblock/rule/rule.wxml new file mode 100644 index 0000000..a50ba56 --- /dev/null +++ b/pages/myblock/rule/rule.wxml @@ -0,0 +1,5 @@ +<!--pages/myblock/rule/rule.wxml--> +<view class='content'> + <import src="/wxParse/wxParse.wxml" /> + <template is="wxParse" data="{{wxParseData:contentHtml.nodes}}" /> + </view> diff --git a/pages/myblock/rule/rule.wxss b/pages/myblock/rule/rule.wxss new file mode 100644 index 0000000..2059d64 --- /dev/null +++ b/pages/myblock/rule/rule.wxss @@ -0,0 +1,6 @@ +/* pages/myblock/rule/rule.wxss */ +.content{ + font-size: 30rpx; + padding: 30rpx; + color: #666; +} \ No newline at end of file diff --git a/pages/myblock/shezhimima/shezhimima.js b/pages/myblock/shezhimima/shezhimima.js index 1665091..70a80b0 100644 --- a/pages/myblock/shezhimima/shezhimima.js +++ b/pages/myblock/shezhimima/shezhimima.js @@ -18,7 +18,32 @@ Page({ }) }, - + inputPass(e){ + this.setData({ + password: e.detail.value + }) + }, + confirmPassWord(){ + let params = { + password: this.data.password + }, url ='/user/Profile/set_password'; + if(params.password.length<6){ + wx.showToast({ + title: '请输入6位数以上的密码', + }) + }else{ + app.post(url,params).then(r=>{ + wx.showToast({ + title: '设置成功', + duration: 1300 + }) + setTimeout(()=>{ + wx.navigateBack({ + }) + },1200) + }) + } + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/myblock/shezhimima/shezhimima.wxml b/pages/myblock/shezhimima/shezhimima.wxml index f10b4b5..06349f6 100644 --- a/pages/myblock/shezhimima/shezhimima.wxml +++ b/pages/myblock/shezhimima/shezhimima.wxml @@ -1,15 +1,10 @@ <view class="setmima"> <view class="setmimaleft"> - <input placeholder='设置密码' placeholder-class='shemi'/> - + <input password placeholder='设置密码' bindinput='inputPass' /> </view> <view class="mimaeye"> <image src="{{url}}/bicon_14x.png"></image> </view> </view> - -<view class="que">确认</view> - +<view class="que" bindtap='confirmPassWord'>确认</view> <view class="needmi">需要有6-20位数字、字母或符号组成,至少两种</view> - -<view class="mimasuccess">密码设置成功</view> diff --git a/pages/myblock/zhanghaobangding/zhanghaobangding.js b/pages/myblock/zhanghaobangding/zhanghaobangding.js index 9da3b93..f6b1391 100644 --- a/pages/myblock/zhanghaobangding/zhanghaobangding.js +++ b/pages/myblock/zhanghaobangding/zhanghaobangding.js @@ -1,20 +1,36 @@ // pages/myblock/zhanghaobangding/zhanghaobangding.js +const app = getApp(); Page({ /** * 页面的初始数据 */ data: { - + info:{} }, - /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - + this.getBindInfo(); }, + getBindInfo(){ + let url = '/user/Center/user_bind'; + app.post(url,{}).then(r=>{ + this.setData({ + info:r + }) + }) + }, + changeBind(){ + wx.showToast({ + title: '由于功能限制请前往APP进行相关操作', + icon: 'none' + }) + }, + getUserInfo(e){ + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/myblock/zhanghaobangding/zhanghaobangding.wxml b/pages/myblock/zhanghaobangding/zhanghaobangding.wxml index 682111e..7c1cc6b 100644 --- a/pages/myblock/zhanghaobangding/zhanghaobangding.wxml +++ b/pages/myblock/zhanghaobangding/zhanghaobangding.wxml @@ -1,30 +1,30 @@ <view class="zhanghao"> <view class="zhanghaoitem"> <view class="zhanghaoleft">手机号绑定</view> - <view class="zhanghaoright"> - <view class="zhanghaoname">136****7686</view> + <navigator class="zhanghaoright" url='/pages/myblock/huanbangshouji/huanbangshouji'> + <view class="zhanghaoname">{{info.mobile}}</view> <view class="rowimg"> <image src="/img/aicon_61.png"></image> </view> - </view> - + </navigator> </view> <view class="zhanghaoitem"> <view class="zhanghaoleft">微信绑定</view> - - <view class="zhanghaoright"> - <view class="zhanghaoname">好时光</view> + <view class="zhanghaoright" bindtap='changeBind'> + <view class="zhanghaoname" wx:if='{{info.wechat}}'>{{info.wechat}}</view> + <view class="zhanghaoname bangname" wx:else>去绑定</view> <view class="rowimg"> <image src="/img/aicon_61.png"></image> </view> + </view> </view> <view class="zhanghaoitem"> <view class="zhanghaoleft">QQ绑定</view> - - <view class="zhanghaoright"> - <view class="zhanghaoname bangname">去绑定</view> + <view class="zhanghaoright" bindtap='changeBind'> + <view class="zhanghaoname" wx:if='{{info.qq}}'>{{info.qq}}</view> + <view class="zhanghaoname bangname" wx:else>去绑定</view> <view class="rowimg"> <image src="/img/aicon_61.png"></image> </view> @@ -33,8 +33,9 @@ <view class="zhanghaoitem"> <view class="zhanghaoleft">新浪微博绑定</view> - <view class="zhanghaoright"> - <view class="zhanghaoname bangname">去绑定</view> + <view class="zhanghaoright" bindtap='changeBind'> + <view class="zhanghaoname" wx:if='{{info.weibo}}'>{{info.weibo}}</view> + <view class="zhanghaoname bangname" wx:else>去绑定</view> <view class="rowimg"> <image src="/img/aicon_61.png"></image> </view> diff --git a/pages/myblock/zhanghaobangding/zhanghaobangding.wxss b/pages/myblock/zhanghaobangding/zhanghaobangding.wxss index e9124b6..9a69aa3 100644 --- a/pages/myblock/zhanghaobangding/zhanghaobangding.wxss +++ b/pages/myblock/zhanghaobangding/zhanghaobangding.wxss @@ -34,6 +34,15 @@ page{ .zhanghaoright{ display:flex; align-items: center; + position: relative; +} +.authInfo{ + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; } .zhanghaoname{ color:#999999; diff --git a/pages/myblock/zhanghaoyuanquan/zhanghaoyuanquan.wxml b/pages/myblock/zhanghaoyuanquan/zhanghaoyuanquan.wxml index e7d0372..30bd963 100644 --- a/pages/myblock/zhanghaoyuanquan/zhanghaoyuanquan.wxml +++ b/pages/myblock/zhanghaoyuanquan/zhanghaoyuanquan.wxml @@ -1,18 +1,17 @@ <view class="zhanghao"> - <view class="zhanghaoitem"> + <navigator class="zhanghaoitem" url='/pages/myblock/zhanghaobangding/zhanghaobangding'> <view class="zhanghaoleft">账号绑定</view> - <view class="rowimg"> <image src="/img/aicon_61.png"></image> </view> - </view> + </navigator> - <view class="zhanghaoitem"> + <navigator class="zhanghaoitem" url='/pages/myblock/shezhimima/shezhimima'> <view class="zhanghaoleft">设置密码</view> <view class="rowimg"> <image src="/img/aicon_61.png"></image> </view> - </view> + </navigator> </view> <view class="question">常见问题</view> \ No newline at end of file diff --git a/project.config.json b/project.config.json index 339d658..e4e5ca1 100644 --- a/project.config.json +++ b/project.config.json @@ -49,7 +49,7 @@ "list": [] }, "miniprogram": { - "current": 37, + "current": 43, "list": [ { "id": -1, @@ -305,15 +305,58 @@ }, { "id": -1, - "name": "每日新酒", - "pathName": "pages/findblock/meirixinjiu/meirixinjiu", + "name": "历史", + "pathName": "pages/myblock/history/history", "query": "", "scene": null }, { "id": -1, - "name": "名人酒单", - "pathName": "pages/findblock/jiulist/jiulist", + "name": "个人中心收藏品牌", + "pathName": "pages/myblock/pinpai/pinpai", + "query": "", + "scene": null + }, + { + "id": 38, + "name": "消息", + "pathName": "pages/myblock/message/message", + "query": "", + "scene": null + }, + { + "id": 39, + "name": "用户反馈", + "pathName": "pages/myblock/feedback/feedback", + "query": "", + "scene": null + }, + { + "id": -1, + "name": "账号绑定", + "pathName": "pages/myblock/zhanghaobangding/zhanghaobangding", + "query": "", + "scene": null + }, + { + "id": -1, + "name": "换绑手机", + "pathName": "pages/myblock/huanbangshouji/huanbangshouji", + "query": "", + "scene": null + }, + { + "id": -1, + "name": "设置密码", + "pathName": "pages/myblock/shezhimima/shezhimima", + "query": "", + "scene": null + }, + { + "id": -1, + "name": "协议规则", + "pathName": "pages/myblock/rule/rule", + "query": "", "scene": null } ]