作者 朱振飞

Merge branch 'master' of http://114.215.101.231:8099/miniprogram/jiuzidian into Branch_zhu

正在显示 74 个修改的文件 包含 3147 行增加601 行删除
1 { 1 {
2 "pages": [ 2 "pages": [
3 - "pages/login/login",  
4 "pages/homapage/homepage", 3 "pages/homapage/homepage",
  4 + "pages/forgetmima/forgetmima",
  5 + "pages/setmima/setmima",
  6 + "pages/myblock/shezhimima/shezhimima",
  7 + "pages/enteryanzheng/enteryanzheng",
  8 + "pages/login/login",
5 "pages/homeblock/zhinengselect/zhinengselect", 9 "pages/homeblock/zhinengselect/zhinengselect",
6 "pages/homeblock/search/search", 10 "pages/homeblock/search/search",
7 "pages/find/find", 11 "pages/find/find",
@@ -24,14 +28,11 @@ @@ -24,14 +28,11 @@
24 "pages/myblock/huanbangshouji/huanbangshouji", 28 "pages/myblock/huanbangshouji/huanbangshouji",
25 "pages/myblock/guanzhu/guanzhu", 29 "pages/myblock/guanzhu/guanzhu",
26 "pages/myblock/pinglun/pinglun", 30 "pages/myblock/pinglun/pinglun",
27 - "pages/enteryanzheng/enteryanzheng",  
28 - "pages/forgetmima/forgetmima",  
29 "pages/wanshangeren/wanshangeren", 31 "pages/wanshangeren/wanshangeren",
30 "pages/peopleinfo/peopleinfo", 32 "pages/peopleinfo/peopleinfo",
31 "pages/myblock/jifenjilu/jifenjilu", 33 "pages/myblock/jifenjilu/jifenjilu",
32 "pages/myblock/pingjia/pingjia", 34 "pages/myblock/pingjia/pingjia",
33 "pages/myblock/niangjiulist/niangjiulist", 35 "pages/myblock/niangjiulist/niangjiulist",
34 - "pages/myblock/shezhimima/shezhimima",  
35 "pages/homeblock/video/video", 36 "pages/homeblock/video/video",
36 "pages/homeblock/shuxing/shuxing", 37 "pages/homeblock/shuxing/shuxing",
37 "pages/homeblock/selectcity/selectcity", 38 "pages/homeblock/selectcity/selectcity",
@@ -49,7 +50,9 @@ @@ -49,7 +50,9 @@
49 "pages/myblock/about/about", 50 "pages/myblock/about/about",
50 "pages/findblock/meirixinjiu/meirixinjiu", 51 "pages/findblock/meirixinjiu/meirixinjiu",
51 "pages/findblock/jiulist/jiulist", 52 "pages/findblock/jiulist/jiulist",
52 - "pages/findblock/putongwenzhang/putongwenzhang" 53 + "pages/findblock/putongwenzhang/putongwenzhang",
  54 + "pages/findblock/wenzhangdetail/wenzhangdetail",
  55 + "pages/homeblock/bofangexample/bofangexample"
53 ], 56 ],
54 "window": { 57 "window": {
55 "backgroundTextStyle": "light", 58 "backgroundTextStyle": "light",
@@ -76,24 +76,29 @@ image { @@ -76,24 +76,29 @@ image {
76 line-height: 50rpx; 76 line-height: 50rpx;
77 } 77 }
78 78
79 -/* 上三角 */ 79 + /* 上三角 */
  80 + .boxright{
  81 + width:26rpx;
  82 + height:15rpx;
  83 + font-size: 0
  84 + }
  85 + .noData{
  86 + height: 360rpx;
  87 + width: 750rpx;
  88 + text-align: center;
  89 + display: flex;
  90 + align-items: center;
  91 + font-size: 26rpx;
  92 + color: #999;
  93 + justify-content: center;
  94 + }
  95 + .nodata{
  96 + color:#999;
  97 + font-size: 30rpx;
  98 + text-align: center;
  99 + margin-top:30rpx;
  100 + }
80 101
81 -.boxright {  
82 - width: 26rpx;  
83 - height: 15rpx;  
84 - font-size: 0;  
85 -}  
86 -  
87 -.noData {  
88 - height: 360rpx;  
89 - width: 750rpx;  
90 - text-align: center;  
91 - display: flex;  
92 - align-items: center;  
93 - font-size: 26rpx;  
94 - color: #999;  
95 - justify-content: center;  
96 -}  
97 102
98 .showall { 103 .showall {
99 color: #999; 104 color: #999;
1 // pages/enteryanzheng/enteryanzheng.js 1 // pages/enteryanzheng/enteryanzheng.js
2 let interval = null; 2 let interval = null;
3 -const app=getApp() 3 +const app = getApp()
4 Page({ 4 Page({
5 5
6 /** 6 /**
7 * 页面的初始数据 7 * 页面的初始数据
8 */ 8 */
9 data: { 9 data: {
10 - Length: 6, //输入框个数  
11 - isFocus: true, //聚焦  
12 - Value: "", //输入的内容 10 + Length: 6, //输入框个数
  11 + isFocus: true, //聚焦
  12 + Value: "", //输入的内容
13 ispassword: true, 13 ispassword: true,
14 currentTime: 60, 14 currentTime: 60,
15 - time:'',  
16 - phonenum:''  
17 - 15 + time: '',
  16 + phonenum: ''
  17 +
18 }, 18 },
19 19
20 /** 20 /**
21 * 生命周期函数--监听页面加载 21 * 生命周期函数--监听页面加载
22 */ 22 */
23 - onLoad: function (options) { 23 + onLoad: function(options) {
24 console.log(options.phonenum) 24 console.log(options.phonenum)
25 this.setData({ 25 this.setData({
26 - phonenum:options.phonenum 26 + phonenum: options.phonenum,
  27 + type:options.type,
  28 + id:options.id
27 }) 29 })
28 30
29 this.getcode() 31 this.getcode()
30 }, 32 },
31 33
32 //获取验证码 34 //获取验证码
33 - getcode(){ 35 + getcode() {
34 let that = this; 36 let that = this;
35 let currentTime = that.data.currentTime; 37 let currentTime = that.data.currentTime;
36 that.setData({ 38 that.setData({
37 disable: true 39 disable: true
38 }) 40 })
39 - interval = setInterval(function () { 41 + interval = setInterval(function() {
40 currentTime--; 42 currentTime--;
41 that.setData({ 43 that.setData({
42 time: currentTime + 's后再次发送', 44 time: currentTime + 's后再次发送',
@@ -74,15 +76,15 @@ Page({ @@ -74,15 +76,15 @@ Page({
74 }) 76 })
75 }, 77 },
76 78
77 - entercode(){  
78 - if (this.data.time == '重新发送'){ 79 + entercode() {
  80 + if (this.data.time == '重新发送') {
79 this.getcode() 81 this.getcode()
80 } 82 }
81 }, 83 },
82 - 84 +
83 Focus(e) { 85 Focus(e) {
84 var that = this; 86 var that = this;
85 - let arr=that.data.arr; 87 + let arr = that.data.arr;
86 console.log(e.detail.value.length); 88 console.log(e.detail.value.length);
87 89
88 // arr.push(e.detail.value); 90 // arr.push(e.detail.value);
@@ -93,27 +95,47 @@ Page({ @@ -93,27 +95,47 @@ Page({
93 len: e.detail.value.length 95 len: e.detail.value.length
94 }) 96 })
95 97
96 - if (that.data.Value.length==6){ 98 + if (that.data.Value.length == 6) {
97 that.yanzhenglogin() 99 that.yanzhenglogin()
98 } 100 }
99 101
100 - 102 +
101 }, 103 },
102 104
103 - yanzhenglogin(){  
104 - let that=this; 105 + yanzhenglogin() {
  106 + let that = this;
105 var url = '/user/Profile/bind_mobile'; 107 var url = '/user/Profile/bind_mobile';
106 var params = { 108 var params = {
107 mobile: that.data.phonenum, 109 mobile: that.data.phonenum,
108 - verification_code:that.data.Value 110 + verification_code: that.data.Value
109 } 111 }
110 112
111 app.post(url, params).then((res) => { 113 app.post(url, params).then((res) => {
112 console.log(res); 114 console.log(res);
113 wx.setStorageSync('token', res.token) 115 wx.setStorageSync('token', res.token)
114 - wx.switchTab({  
115 - url: '/pages/homapage/homepage',  
116 - }) 116 + if (res.is_password == 0) {
  117 + wx.navigateTo({
  118 + url: '/pages/setmima/setmima',
  119 + })
  120 + } else {
  121 + if(that.data.type==1){
  122 + let url = wx.getStorageSync("url")
  123 + wx.navigateTo({
  124 + url: url+'?id=' + that.data.id,
  125 + })
  126 + } else if (that.data.type == 2){
  127 + let url = wx.getStorageSync("url")
  128 + wx.navigateTo({
  129 + url: url + '?id=' + that.data.id,
  130 + })
  131 + }else{
  132 + wx.switchTab({
  133 + url: '/pages/homapage/homepage',
  134 + })
  135 + }
  136 +
  137 + }
  138 +
117 139
118 }).catch((err) => { 140 }).catch((err) => {
119 console.log(err) 141 console.log(err)
@@ -138,49 +160,49 @@ Page({ @@ -138,49 +160,49 @@ Page({
138 /** 160 /**
139 * 生命周期函数--监听页面初次渲染完成 161 * 生命周期函数--监听页面初次渲染完成
140 */ 162 */
141 - onReady: function () { 163 + onReady: function() {
142 164
143 }, 165 },
144 166
145 /** 167 /**
146 * 生命周期函数--监听页面显示 168 * 生命周期函数--监听页面显示
147 */ 169 */
148 - onShow: function () { 170 + onShow: function() {
149 171
150 }, 172 },
151 173
152 /** 174 /**
153 * 生命周期函数--监听页面隐藏 175 * 生命周期函数--监听页面隐藏
154 */ 176 */
155 - onHide: function () { 177 + onHide: function() {
156 178
157 }, 179 },
158 180
159 /** 181 /**
160 * 生命周期函数--监听页面卸载 182 * 生命周期函数--监听页面卸载
161 */ 183 */
162 - onUnload: function () { 184 + onUnload: function() {
163 185
164 }, 186 },
165 187
166 /** 188 /**
167 * 页面相关事件处理函数--监听用户下拉动作 189 * 页面相关事件处理函数--监听用户下拉动作
168 */ 190 */
169 - onPullDownRefresh: function () { 191 + onPullDownRefresh: function() {
170 192
171 }, 193 },
172 194
173 /** 195 /**
174 * 页面上拉触底事件的处理函数 196 * 页面上拉触底事件的处理函数
175 */ 197 */
176 - onReachBottom: function () { 198 + onReachBottom: function() {
177 199
178 }, 200 },
179 201
180 /** 202 /**
181 * 用户点击右上角分享 203 * 用户点击右上角分享
182 */ 204 */
183 - onShareAppMessage: function () { 205 + onShareAppMessage: function() {
184 206
185 } 207 }
186 }) 208 })
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 10
11 </view> 11 </view>
12 12
13 - <input name="password" password="{{true}}" class='ipt' maxlength="{{Length}}" focus="{{isFocus}}" bindinput="Focus"></input> 13 + <input name="number" password="{{true}}" class='ipt' maxlength="{{Length}}" focus="{{isFocus}}" bindinput="Focus"></input>
14 14
15 <view class="daojishi" bindtap="entercode">{{time}}</view> 15 <view class="daojishi" bindtap="entercode">{{time}}</view>
16 16
@@ -64,6 +64,7 @@ Page({ @@ -64,6 +64,7 @@ Page({
64 //跳页 64 //跳页
65 jump(e){ 65 jump(e){
66 let type=e.currentTarget.dataset.type; 66 let type=e.currentTarget.dataset.type;
  67 + let id=e.currentTarget.dataset.id
67 console.log(type) 68 console.log(type)
68 if(type==1){ 69 if(type==1){
69 wx.navigateTo({ 70 wx.navigateTo({
@@ -79,7 +80,7 @@ Page({ @@ -79,7 +80,7 @@ Page({
79 }) 80 })
80 } else if (type == 4){ 81 } else if (type == 4){
81 wx.navigateTo({ 82 wx.navigateTo({
82 - url: '/pages/findblock/putongwenzhang/putongwenzhang', 83 + url: '/pages/findblock/putongwenzhang/putongwenzhang?id='+id,
83 }) 84 })
84 } 85 }
85 }, 86 },
@@ -135,6 +136,38 @@ Page({ @@ -135,6 +136,38 @@ Page({
135 url: '/pages/myblock/pingjia/pingjia?type=' + type + '&id=' + id + '&winemaker_id=' + winemaker_id, 136 url: '/pages/myblock/pingjia/pingjia?type=' + type + '&id=' + id + '&winemaker_id=' + winemaker_id,
136 }) 137 })
137 }, 138 },
  139 +
  140 + //新闻详情页
  141 + jumpnewdetail(e){
  142 + let id=e.currentTarget.dataset.id
  143 + wx.navigateTo({
  144 + url: '/pages/homeblock/jiuzidian/jiuzidian?id=' + id,
  145 + })
  146 + },
  147 + //酒单推荐详情页
  148 + enterdetail(e){
  149 + let id=e.currentTarget.dataset.id;
  150 + let type=e.currentTarget.dataset.type;
  151 + let winemaker_id = e.currentTarget.dataset.winemaker_id
  152 + if(type==1){
  153 + wx.navigateTo({
  154 + url: '/pages/findblock/jiudandetail/jiudandetail?id=' + id,
  155 + })
  156 + }else if(type==2){
  157 + wx.navigateTo({
  158 + url: '/pages/findblock/zhuanjiapinjiudetail/zhuanjiapinjiudetail?id=' + id,
  159 + })
  160 + }else if(type==3){
  161 + wx.navigateTo({
  162 + url: '/pages/homeblock/niangjiuteacher/niangjiuteacher?id=' + winemaker_id,
  163 + })
  164 + }else{
  165 + wx.navigateTo({
  166 + url: '/pages/findblock/wenzhangdetail/wenzhangdetail?id=' + id,
  167 + })
  168 + }
  169 +
  170 + },
138 /** 171 /**
139 * 生命周期函数--监听页面初次渲染完成 172 * 生命周期函数--监听页面初次渲染完成
140 */ 173 */
@@ -180,7 +213,42 @@ Page({ @@ -180,7 +213,42 @@ Page({
180 /** 213 /**
181 * 用户点击右上角分享 214 * 用户点击右上角分享
182 */ 215 */
183 - onShareAppMessage: function () {  
184 - 216 + onShareAppMessage: function (e) {
  217 + let that = this;
  218 + console.log(e)
  219 + let id=e.target.dataset.id;
  220 + console.log(id)
  221 + let type=e.target.dataset.type;
  222 + let url=''
  223 + let winemaker_id = e.target.dataset.winemaker_id;
  224 +
  225 +
  226 + if(type==1){
  227 + url = '/pages/findblock/jiudandetail/jiudandetail?id=' + id
  228 + }else if(type==2){
  229 + url = '/pages/findblock/zhuanjiapinjiudetail/zhuanjiapinjiudetail?id=' + id
  230 + }else if(type==3){
  231 + url = '/pages/homeblock/niangjiuteacher/niangjiuteacher?id=' + winemaker_id
  232 + }else if(type==4){
  233 + url = '/pages/findblock/wenzhangdetail/wenzhangdetail?id=' + id
  234 + }
  235 +
  236 +
  237 + return {
  238 + title: '发现', // 转发后 所显示的title
  239 + // path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径
  240 +
  241 + path: url,//建档攻略分享1
  242 + // path:'',
  243 + success: (res) => { // 成功后要做的事情
  244 + console.log(res)
  245 +
  246 + },
  247 + fail: function (res) {
  248 + // 分享失败
  249 + console.log(res)
  250 + }
  251 + }
  252 +
185 } 253 }
186 }) 254 })
1 <view class="swiper_image"> 1 <view class="swiper_image">
2 <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange"> 2 <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange">
3 <block wx:for="{{imgUrls}}" wx:key="doct"> 3 <block wx:for="{{imgUrls}}" wx:key="doct">
4 - <swiper-item style="border-radius:10px;">  
5 - <image src="{{item.image}}" data-index='{{index}}' class="slide-image" bindtap='viewImg' width="355" height="150" /> 4 + <swiper-item >
  5 + <image src="{{item.image}}" data-index='{{index}}' class="slide-image" width="355" height="150" />
6 </swiper-item> 6 </swiper-item>
7 </block> 7 </block>
8 </swiper> 8 </swiper>
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 34
35 </view> 35 </view>
36 <view class="dayjiu" bindtap="everyjiu"> 36 <view class="dayjiu" bindtap="everyjiu">
37 -<view class="tast" wx:for="{{news}}" wx:key=''> 37 +<view class="tast" wx:for="{{news}}" wx:key='' catchtap="jumpnewdetail" data-id="{{item.wine_id}}">
38 <view class="tastimg"> 38 <view class="tastimg">
39 <image src="{{item.thumb}}"></image> 39 <image src="{{item.thumb}}"></image>
40 </view> 40 </view>
@@ -48,7 +48,7 @@ @@ -48,7 +48,7 @@
48 </view> 48 </view>
49 49
50 50
51 -<view class="wineblock" wx:for="{{list}}" wx:key="" bindtap="jump" data-type="{{item.type}}"> 51 +<view class="wineblock" wx:for="{{list}}" wx:key="" bindtap="jump" data-type="{{item.type}}" data-id="{{item.id}}">
52 <view class="middlehead"> 52 <view class="middlehead">
53 <view class="rilihead"> 53 <view class="rilihead">
54 <view class="rili"> 54 <view class="rili">
@@ -67,18 +67,18 @@ @@ -67,18 +67,18 @@
67 </view> 67 </view>
68 68
69 </view> 69 </view>
70 - <view class="winetitle">{{item.article.share_content}}</view> 70 + <view class="winetitle" catchtap='enterdetail' data-id="{{item.article.id}}" data-type="{{item.type}}">{{item.article.share_content}}</view>
71 71
72 72
73 73
74 - <view class="wineimg" wx:if="{{item.type==2}}" data-url="{{item.article.video}}" catchtap='entervideo'> 74 + <view class="wineimg" wx:if="{{item.type==2}}" data-url="{{item.article.video}}" catchtap='entervideo' catchtap='enterdetail' data-id="{{item.article.id}}" data-type="{{item.type}}">
75 <image src="{{item.article.video_image}}"></image> 75 <image src="{{item.article.video_image}}"></image>
76 76
77 <view class="vioimg"> 77 <view class="vioimg">
78 <image src="{{url}}/aicon_70x.png"></image> 78 <image src="{{url}}/aicon_70x.png"></image>
79 </view> 79 </view>
80 </view> 80 </view>
81 - <view class="wineimg" wx:else> 81 + <view class="wineimg" wx:else catchtap='enterdetail' data-id="{{item.article.id}}" data-type="{{item.type}}" data-winemaker_id="{{item.article.winemaker_id}}">
82 <image src="{{item.article.thumb}}"></image> 82 <image src="{{item.article.thumb}}"></image>
83 </view> 83 </view>
84 84
@@ -108,9 +108,11 @@ @@ -108,9 +108,11 @@
108 </view> 108 </view>
109 109
110 <view class="winerighttou"> 110 <view class="winerighttou">
111 - <view class="winerighttouimg"> 111 + <view class="winerighttouimg" catchtap='share'>
112 <image src="{{url}}aicon_68x.png"></image> 112 <image src="{{url}}aicon_68x.png"></image>
  113 + <button class="lj_share" bindtap="buildshare" open-type='share' data-id="{{item.article.id}}" data-type="{{item.type}}" data-winemaker_id="{{item.article.winemaker_id}}"></button>
113 </view> 114 </view>
  115 +
114 116
115 </view> 117 </view>
116 </view> 118 </view>
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 width:100%; 14 width:100%;
15 height:100%; 15 height:100%;
16 /* box-shadow:0px -1px 6px 0px rgba(212,137,96,0.11); */ 16 /* box-shadow:0px -1px 6px 0px rgba(212,137,96,0.11); */
17 - border-radius:10px; 17 + /* border-radius:10px; */
18 } 18 }
19 .swiper_item_img swiper-item{ 19 .swiper_item_img swiper-item{
20 width:750rpx; 20 width:750rpx;
@@ -193,7 +193,22 @@ image{ @@ -193,7 +193,22 @@ image{
193 .winerighttouimg{ 193 .winerighttouimg{
194 width:30rpx; 194 width:30rpx;
195 height:28rpx; 195 height:28rpx;
196 - font-size: 0 196 + font-size: 0;
  197 + position:relative;
  198 +}
  199 +.lj_share{
  200 + width:60rpx;
  201 + height:40rpx;
  202 + border:none;
  203 + position: absolute;
  204 + right:0;
  205 + top:0;
  206 + background: transparent
  207 +
  208 +}
  209 +button::after{
  210 + border:none;
  211 + background: transparent
197 } 212 }
198 .winerighttou{ 213 .winerighttou{
199 display:flex; 214 display:flex;
@@ -6,7 +6,11 @@ Page({ @@ -6,7 +6,11 @@ Page({
6 * 页面的初始数据 6 * 页面的初始数据
7 */ 7 */
8 data: { 8 data: {
9 - url:'' 9 + url:'',
  10 + id:'',
  11 + page:1,
  12 + rec_list:[],
  13 + info:""
10 }, 14 },
11 15
12 /** 16 /**
@@ -14,10 +18,136 @@ Page({ @@ -14,10 +18,136 @@ Page({
14 */ 18 */
15 onLoad: function (options) { 19 onLoad: function (options) {
16 this.setData({ 20 this.setData({
17 - url: app.globalData.url 21 + url: app.globalData.url,
  22 + id:options.id
  23 + })
  24 +
  25 + let token=wx.getStorageSync("token");
  26 + if(token==''){
  27 + wx.navigateTo({
  28 + url: '/pages/login/login?id='+this.data.id+'&type='+1,//type=1发现的首页酒单推荐
  29 + })
  30 +
  31 + wx.setStorageSync("url", "/pages/findblock/jiudandetail/jiudandetail")
  32 + }
  33 +
  34 + },
  35 + //获取酒单详情
  36 + getjiudandetail(){
  37 + let that = this;
  38 + let url = 'index/Find/rec_detail', params = {
  39 + id:that.data.id,
  40 + page:that.data.page
  41 +
  42 + }
  43 + app.post(url, params).then((res) => {
  44 + console.log(res);
  45 + that.setData({
  46 + rec_list: that.data.rec_list.concat(res.info.rec_list),
  47 + info:res.info
  48 + })
  49 +
  50 + console.log(that.data.rec_list)
  51 +
  52 +
  53 +
  54 + }).catch((err) => {
  55 +
  56 + })
  57 + },
  58 + //收藏
  59 + collect(e){
  60 + let id=e.currentTarget.dataset.id;
  61 +
  62 + let that = this;
  63 + let url = 'index/Common/favorite', params = {
  64 + sort:3,
  65 + id:id
  66 +
  67 + }
  68 + app.post(url, params).then((res) => {
  69 + console.log(res);
  70 + wx.showToast({
  71 + title: res,
  72 + icon:'none'
  73 + })
  74 +
  75 + that.getjiudandetail()
  76 +
  77 +
  78 + }).catch((err) => {
  79 +
18 }) 80 })
19 }, 81 },
20 82
  83 + //评论
  84 + pinglun(e){
  85 + let id=e.currentTarget.dataset.id;
  86 + wx.navigateTo({
  87 + url: '/pages/myblock/pingjia/pingjia?id='+id+'&type='+1,
  88 + })
  89 + },
  90 + //点赞
  91 + dianzan(e){
  92 + let id=e.currentTarget.dataset.id;
  93 +
  94 + let that = this;
  95 + let url = 'index/Common/good', params = {
  96 + sort:1,
  97 + id:id
  98 +
  99 + }
  100 + app.post(url, params).then((res) => {
  101 + console.log(res);
  102 + wx.showToast({
  103 + title: res,
  104 + icon:'none'
  105 + })
  106 + that.getjiudandetail()
  107 +
  108 +
  109 +
  110 + }).catch((err) => {
  111 +
  112 + })
  113 + },
  114 +//酒单收藏
  115 + scollect(e){
  116 + let id=e.currentTarget.dataset.id;
  117 + let that = this;
  118 + let url = 'index/Common/favorite', params = {
  119 + sort:1,
  120 + id:id
  121 +
  122 + }
  123 + app.post(url, params).then((res) => {
  124 + console.log(res);
  125 + wx.showToast({
  126 + title: res,
  127 + icon:'none'
  128 + })
  129 +
  130 + let newrec_list = that.data.rec_list;
  131 + for (var obj of newrec_list){
  132 + if(obj.id==id){
  133 + if (obj.is_favorite == 0) {
  134 + obj.is_favorite = 1
  135 + } else {
  136 + obj.is_favorite = 0
  137 + }
  138 + }
  139 +
  140 + }
  141 + that.setData({
  142 + rec_list: newrec_list
  143 + })
  144 +
  145 +
  146 +
  147 + }).catch((err) => {
  148 +
  149 + })
  150 + },
21 151
22 /** 152 /**
23 * 生命周期函数--监听页面初次渲染完成 153 * 生命周期函数--监听页面初次渲染完成
@@ -30,7 +160,7 @@ Page({ @@ -30,7 +160,7 @@ Page({
30 * 生命周期函数--监听页面显示 160 * 生命周期函数--监听页面显示
31 */ 161 */
32 onShow: function () { 162 onShow: function () {
33 - 163 + this.getjiudandetail()
34 }, 164 },
35 165
36 /** 166 /**
@@ -58,13 +188,38 @@ Page({ @@ -58,13 +188,38 @@ Page({
58 * 页面上拉触底事件的处理函数 188 * 页面上拉触底事件的处理函数
59 */ 189 */
60 onReachBottom: function () { 190 onReachBottom: function () {
61 - 191 + let page=this.data.page;
  192 + page++;
  193 + this.setData({
  194 + page:page
  195 + })
  196 + this.getjiudandetail()
62 }, 197 },
63 198
64 /** 199 /**
65 * 用户点击右上角分享 200 * 用户点击右上角分享
66 */ 201 */
67 onShareAppMessage: function () { 202 onShareAppMessage: function () {
68 - 203 + let that=this;
  204 +
  205 + let url = '/pages/findblock/jiudandetail/jiudandetail?id='+ that.data.id
  206 +
  207 +
  208 +
  209 + return {
  210 + title: '发现', // 转发后 所显示的title
  211 + // path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径
  212 +
  213 + path: url,//建档攻略分享1
  214 + // path:'',
  215 + success: (res) => { // 成功后要做的事情
  216 + console.log(res)
  217 +
  218 + },
  219 + fail: function (res) {
  220 + // 分享失败
  221 + console.log(res)
  222 + }
  223 + }
69 } 224 }
70 }) 225 })
@@ -3,41 +3,45 @@ @@ -3,41 +3,45 @@
3 <view class="jiudandetailhead"> 3 <view class="jiudandetailhead">
4 <view class="edtaileft"> 4 <view class="edtaileft">
5 <view class="edtaileftimg"> 5 <view class="edtaileftimg">
6 - <image src="{{url}}/aicon_77@2x.png"></image> 6 + <image src="{{info.avatar}}"></image>
7 </view> 7 </view>
8 <view class="editmiddle"> 8 <view class="editmiddle">
9 - <view class="middletop">万丈红尘一人醉</view>  
10 - <view class="middlebottom">lv12</view> 9 + <view class="middletop">{{info.user_nickname}}</view>
  10 + <view class="middlebottom">lv{{info.level}}</view>
11 </view> 11 </view>
12 12
13 </view> 13 </view>
14 - <view class="atten">关注</view> 14 + <!-- <view class="atten">关注</view> -->
15 </view> 15 </view>
16 16
17 <view class="jiudanfen"> 17 <view class="jiudanfen">
18 <view class="jiudanfenitem"> 18 <view class="jiudanfenitem">
19 - <view class="jiudanfenimg">  
20 - <image src="{{url}}/aicon_09x.png"></image> 19 + <view class="jiudanfenimg" bindtap="collect" data-id="{{info.user_id}}">
  20 + <image src="{{url}}/aicon_10x.png" wx:if="{{info.is_favorite==1}}"></image>
  21 + <image src="{{url}}/aicon_09x.png" wx:else></image>
21 </view> 22 </view>
22 <view class="collect">收藏</view> 23 <view class="collect">收藏</view>
23 </view> 24 </view>
24 <view class="jiudanfenitem"> 25 <view class="jiudanfenitem">
25 <view class="jiudanfenimg zhuan"> 26 <view class="jiudanfenimg zhuan">
26 <image src="{{url}}/aicon_68x.png"></image> 27 <image src="{{url}}/aicon_68x.png"></image>
  28 + <button class="lj_share" catchtap="buildshare" open-type='share'></button>
27 </view> 29 </view>
28 <view class="collect">转发</view> 30 <view class="collect">转发</view>
29 </view> 31 </view>
30 - <view class="jiudanfenitem"> 32 + <view class="jiudanfenitem" bindtap="pinglun" data-id="{{info.id}}">
31 <view class="jiudanfenimg"> 33 <view class="jiudanfenimg">
32 <image src="{{url}}/aicon_67x.png"></image> 34 <image src="{{url}}/aicon_67x.png"></image>
33 </view> 35 </view>
34 - <view class="collect">54</view> 36 + <view class="collect">{{info.comment_count}}</view>
35 </view> 37 </view>
36 - <view class="jiudanfenitem"> 38 + <view class="jiudanfenitem" bindtap="dianzan" data-id="{{info.user_id}}">
37 <view class="jiudanfenimg"> 39 <view class="jiudanfenimg">
38 - <image src="{{url}}/aicon_66x.png"></image> 40 + <image src="{{url}}/aicon_46x.png" wx:if="{{info.is_good==1}}"></image>
  41 + <image src="{{url}}/aicon_47x.png" wx:else></image>
  42 +
39 </view> 43 </view>
40 - <view class="collect">362</view> 44 + <view class="collect">{{info.good_count}}</view>
41 </view> 45 </view>
42 </view> 46 </view>
43 47
@@ -46,24 +50,24 @@ @@ -46,24 +50,24 @@
46 50
47 <view class="jiupin" > 51 <view class="jiupin" >
48 52
49 - <view class="searchitem" > 53 + <view class="searchitem" wx:for="{{rec_list}}" wx:key=''>
50 <view class="searchitemleft"> 54 <view class="searchitemleft">
51 <view class="itemleftimg"> 55 <view class="itemleftimg">
52 <image src="{{item.logo}}"></image> 56 <image src="{{item.logo}}"></image>
53 </view> 57 </view>
54 58
55 <view class="itemiddle"> 59 <view class="itemiddle">
56 - <view class="itemidelename">222</view> 60 + <view class="itemidelename">{{item.name}}</view>
57 <view class="nambottom"> 61 <view class="nambottom">
58 - <text class="namebottomitem">sadf</text>  
59 - <text class="namebottomitem">asf</text>  
60 - <text class="namebottomitem">ds</text>  
61 - <text class="namebottomitem">d</text> 62 + <text class="namebottomitem">{{item.degree_name}}</text>
  63 + <text class="namebottomitem">{{item.odor_name}}</text>
  64 + <text class="namebottomitem">官方价{{item.price}}元</text>
  65 + <text class="namebottomitem">{{item.ml}}</text>
62 </view> 66 </view>
63 </view> 67 </view>
64 </view> 68 </view>
65 69
66 - <view class="starimg" catchtap="collect" data-id="{{item.id}}"> 70 + <view class="starimg" catchtap="scollect" data-id="{{item.id}}">
67 <image src="{{url}}aicon_10x.png" wx:if="{{item.is_favorite==1}}"></image> 71 <image src="{{url}}aicon_10x.png" wx:if="{{item.is_favorite==1}}"></image>
68 <image src="{{url}}aicon_09x.png" wx:else></image> 72 <image src="{{url}}aicon_09x.png" wx:else></image>
69 73
@@ -9,13 +9,18 @@ @@ -9,13 +9,18 @@
9 .edtaileftimg{ 9 .edtaileftimg{
10 width:96rpx; 10 width:96rpx;
11 height:96rpx; 11 height:96rpx;
12 - font-size: 0 12 + font-size: 0;
  13 + border-radius:50%;
  14 +
13 } 15 }
14 16
15 image{ 17 image{
16 width:100%; 18 width:100%;
17 height:100%; 19 height:100%;
18 } 20 }
  21 +.edtaileftimg image{
  22 + border-radius: 50%;
  23 +}
19 .edtaileft{ 24 .edtaileft{
20 display:flex; 25 display:flex;
21 align-items: center; 26 align-items: center;
@@ -52,12 +57,14 @@ image{ @@ -52,12 +57,14 @@ image{
52 .jiudanfenimg{ 57 .jiudanfenimg{
53 width:42rpx; 58 width:42rpx;
54 height:40rpx; 59 height:40rpx;
55 - font-size: 0 60 + font-size: 0;
  61 + position: relative
56 } 62 }
57 .collect{ 63 .collect{
58 color:#666666; 64 color:#666666;
59 font-size: 28rpx; 65 font-size: 28rpx;
60 margin-top:13rpx; 66 margin-top:13rpx;
  67 + text-align: center
61 } 68 }
62 .jiudanfenitem:first-child{ 69 .jiudanfenitem:first-child{
63 margin-left:20rpx; 70 margin-left:20rpx;
@@ -137,4 +144,18 @@ image{ @@ -137,4 +144,18 @@ image{
137 text-align: center; 144 text-align: center;
138 line-height: 50rpx; 145 line-height: 50rpx;
139 146
140 - }  
  147 + }
  148 + .lj_share{
  149 + width:45rpx;
  150 + height:50rpx;
  151 + border:none;
  152 + position: absolute;
  153 + right:0;
  154 + top:0;
  155 + background: transparent
  156 +
  157 +}
  158 +button::after{
  159 + border:none;
  160 + outline:none;
  161 +}
@@ -127,10 +127,28 @@ Page({ @@ -127,10 +127,28 @@ Page({
127 } 127 }
128 app.post(url, params).then((res) => { 128 app.post(url, params).then((res) => {
129 console.log(res); 129 console.log(res);
130 - // wx.showToast({  
131 - // title: res,  
132 - // icon:'none'  
133 - // }) 130 + wx.showToast({
  131 + title: res,
  132 + icon:'none'
  133 + })
  134 +
  135 + let newpeoplelist = that.data.peoplelist
  136 + for (var obj of newpeoplelist) {
  137 + for (var p of obj.list) {
  138 + if (p.user_id == id) {
  139 + if (p.is_favorite==0){
  140 + p.is_favorite=1
  141 + }else{
  142 + p.is_favorite = 0
  143 + }
  144 + }
  145 +
  146 + }
  147 + }
  148 +
  149 + that.setData({
  150 + peoplelist: newpeoplelist
  151 + })
134 152
135 153
136 154
@@ -146,6 +164,13 @@ Page({ @@ -146,6 +164,13 @@ Page({
146 url: '/pages/myblock/pingjia/pingjia?id='+id+'&type='+this.data.type, 164 url: '/pages/myblock/pingjia/pingjia?id='+id+'&type='+this.data.type,
147 }) 165 })
148 }, 166 },
  167 + //进入详情页
  168 + detail(e){
  169 + let id=e.currentTarget.dataset.id;
  170 + wx.navigateTo({
  171 + url: '/pages/findblock/jiudandetail/jiudandetail?id='+id,
  172 + })
  173 + },
149 /** 174 /**
150 * 生命周期函数--监听页面初次渲染完成 175 * 生命周期函数--监听页面初次渲染完成
151 */ 176 */
@@ -201,7 +226,30 @@ Page({ @@ -201,7 +226,30 @@ Page({
201 /** 226 /**
202 * 用户点击右上角分享 227 * 用户点击右上角分享
203 */ 228 */
204 - onShareAppMessage: function () { 229 + onShareAppMessage: function (e) {
  230 + let that = this;
  231 + console.log(e)
  232 + let id = e.target.dataset.id;
  233 + console.log(id)
  234 +
  235 + let url = '/pages/findblock/jiudandetail/jiudandetail?id=' + id
  236 +
  237 +
  238 +
  239 + return {
  240 + title: '发现', // 转发后 所显示的title
  241 + // path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径
205 242
  243 + path: url,//建档攻略分享1
  244 + // path:'',
  245 + success: (res) => { // 成功后要做的事情
  246 + console.log(res)
  247 +
  248 + },
  249 + fail: function (res) {
  250 + // 分享失败
  251 + console.log(res)
  252 + }
  253 + }
206 } 254 }
207 }) 255 })
1 <view class="wineblock" wx:for="{{peoplelist}}" wx:key=''> 1 <view class="wineblock" wx:for="{{peoplelist}}" wx:key=''>
2 <view class="date">{{item.date}}</view> 2 <view class="date">{{item.date}}</view>
3 <view class='wine_list' > 3 <view class='wine_list' >
4 - <view class='list_item' wx:for="{{item.list}}" wx:key=""> 4 + <view class='list_item' wx:for="{{item.list}}" wx:key="" bindtap="detail" data-id="{{item.id}}">
5 <view class='img_box'> 5 <view class='img_box'>
6 <image src='{{item.avatar}}'></image> 6 <image src='{{item.avatar}}'></image>
7 </view> 7 </view>
8 <view class='wine_title'>{{item.title}}</view> 8 <view class='wine_title'>{{item.title}}</view>
9 <view class='wine_name'>{{item.user_nickname}}</view> 9 <view class='wine_name'>{{item.user_nickname}}</view>
10 - <view class='wine_leavel'>{{item.level}}</view> 10 + <view class='wine_leavel'>lv{{item.level}}</view>
11 <view class='action_box'> 11 <view class='action_box'>
12 - <view class='single_action' bindtap="zan" data-id="{{item.user_id}}"> 12 + <view class='single_action' catchtap="zan" data-id="{{item.user_id}}">
13 <view class='zan_icon'> 13 <view class='zan_icon'>
14 <image src='/img/aicon_46.png' mode='widthFix' wx:if="{{item.is_good==1}}"></image> 14 <image src='/img/aicon_46.png' mode='widthFix' wx:if="{{item.is_good==1}}"></image>
15 <image src='/img/aicon_47.png' mode='widthFix' wx:else></image> 15 <image src='/img/aicon_47.png' mode='widthFix' wx:else></image>
16 </view> 16 </view>
17 {{item.good_count}} 17 {{item.good_count}}
18 </view> 18 </view>
19 - <view class='single_action' bindtap="pinglun" data-id="{{item.id}}"> 19 + <view class='single_action' catchtap="pinglun" data-id="{{item.id}}">
20 <view class='zan_icon'> 20 <view class='zan_icon'>
21 <image src='/img/aicon_67.png' mode='widthFix'></image> 21 <image src='/img/aicon_67.png' mode='widthFix'></image>
22 </view> 22 </view>
23 {{item.comment_count}} 23 {{item.comment_count}}
24 </view> 24 </view>
25 - <view class='single_action {{item.choose?"active":""}}' bindtap='shareAction' data-id="{{item.id}}"> 25 + <view class='single_action {{item.choose?"active":""}}' catchtap='shareAction' data-id="{{item.id}}">
26 <image src='/img/gengduo.png' mode='widthFix' class='moreIcon'></image> 26 <image src='/img/gengduo.png' mode='widthFix' class='moreIcon'></image>
27 <view class='min_action_box'> 27 <view class='min_action_box'>
28 - <view class='action_btn' wx:if="{{item.is_favorite==0}}" bindtap="collect" data-id="{{item.user_id}}">收藏</view>  
29 - <view class='action_btn' wx:else bindtap="collect" data-id="{{item.user_id}}">取消收藏</view> 28 + <view class='action_btn' wx:if="{{item.is_favorite==0}}" catchtap="collect" data-id="{{item.user_id}}">收藏</view>
  29 + <view class='action_btn yishou' wx:else catchtap="collect" data-id="{{item.user_id}}">已收藏</view>
30 30
31 <view class='action_btn'>分享</view> 31 <view class='action_btn'>分享</view>
  32 + <button class="lj_share" catchtap="buildshare" open-type='share' data-id="{{item.id}}" ></button>
32 </view> 33 </view>
33 </view> 34 </view>
34 </view> 35 </view>
@@ -92,6 +92,7 @@ page{ @@ -92,6 +92,7 @@ page{
92 border-radius: 5rpx; 92 border-radius: 5rpx;
93 box-shadow:0px 8px 16px 0px rgba(44,49,63,0.1); 93 box-shadow:0px 8px 16px 0px rgba(44,49,63,0.1);
94 display: none; 94 display: none;
  95 +
95 } 96 }
96 .action_btn{ 97 .action_btn{
97 width: 100%; 98 width: 100%;
@@ -121,4 +122,23 @@ page{ @@ -121,4 +122,23 @@ page{
121 background: #F2F2F2; 122 background: #F2F2F2;
122 color:#666666; 123 color:#666666;
123 font-size: 24rpx; 124 font-size: 24rpx;
  125 +}
  126 +.yishou{
  127 + color:#E81825;
  128 +}
  129 +
  130 +.lj_share{
  131 + width:94rpx;
  132 + height:57rpx;
  133 + border:none;
  134 + position: absolute;
  135 + right:20rpx;
  136 + bottom:20rpx;
  137 + background: transparent
  138 +
  139 +}
  140 +button::after{
  141 + border:none;
  142 + outline: none;
  143 + background: transparent
124 } 144 }
@@ -57,14 +57,39 @@ Page({ @@ -57,14 +57,39 @@ Page({
57 icon:'none' 57 icon:'none'
58 }) 58 })
59 59
60 - that.getwinelist()  
61 - 60 + let newwinelist = that.data.winelist;
  61 + console.log(newwinelist)
  62 + for(var obj of newwinelist){
  63 + for(var p of obj.list){
  64 + if (p.wine_id == id) {
  65 + if (p.is_favorite == 0) {
  66 + p.is_favorite = 1
  67 + } else {
  68 + p.is_favorite = 0
  69 + }
  70 + }
  71 + }
  72 +
  73 + }
  74 + that.setData({
  75 + winelist: newwinelist
  76 + })
62 77
63 78
64 }).catch((err) => { 79 }).catch((err) => {
65 80
66 }) 81 })
67 }, 82 },
  83 +
  84 + jump(e){
  85 + let id=e.currentTarget.dataset.id;
  86 + console.log(id)
  87 + wx.navigateTo({
  88 + url: '/pages/homeblock/jiuzidian/jiuzidian?id=' + id,
  89 + })
  90 + },
  91 +
  92 +
68 /** 93 /**
69 * 生命周期函数--监听页面初次渲染完成 94 * 生命周期函数--监听页面初次渲染完成
70 */ 95 */
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 <view class="date">{{item.date}}</view> 3 <view class="date">{{item.date}}</view>
4 4
5 - <view class="searchitem" wx:for="{{item.list}}" wx:key=""> 5 + <view class="searchitem" wx:for="{{item.list}}" wx:key="" bindtap="jump" data-id="{{item.wine_id}}">
6 <view class="searchitemleft"> 6 <view class="searchitemleft">
7 <view class="itemleftimg"> 7 <view class="itemleftimg">
8 <image src="{{item.thumb}}"></image> 8 <image src="{{item.thumb}}"></image>
@@ -6,7 +6,9 @@ Page({ @@ -6,7 +6,9 @@ Page({
6 * 页面的初始数据 6 * 页面的初始数据
7 */ 7 */
8 data: { 8 data: {
9 - url:'' 9 + url:'',
  10 + page:1,
  11 + list:[]
10 }, 12 },
11 13
12 /** 14 /**
@@ -16,6 +18,127 @@ Page({ @@ -16,6 +18,127 @@ Page({
16 this.setData({ 18 this.setData({
17 url: app.globalData.url 19 url: app.globalData.url
18 }) 20 })
  21 +
  22 + },
  23 + //获取酿酒大师列表
  24 + getniangju(){
  25 + let that = this;
  26 + let url = 'index/Find/master_list', params = {
  27 + page: that.data.page
  28 +
  29 + }
  30 + app.post(url, params).then((res) => {
  31 + console.log(res);
  32 + that.setData({
  33 + list:that.data.list.concat(res.list)
  34 + })
  35 +
  36 +
  37 +
  38 + }).catch((err) => {
  39 +
  40 + })
  41 +
  42 +
  43 + },
  44 +
  45 + //关注
  46 + atten(e){
  47 + let id=e.currentTarget.dataset.id;
  48 +
  49 + let that = this;
  50 + let url = 'index/Common/concern', params = {
  51 + sort:2,
  52 + id:id
  53 +
  54 +
  55 + }
  56 + app.post(url, params).then((res) => {
  57 + console.log(res);
  58 +
  59 + wx.showToast({
  60 + title: res,
  61 + icon:'none'
  62 + })
  63 +
  64 + let newlist=that.data.list;
  65 + for(var obj of newlist){
  66 + if (obj.winemaker_id==id){
  67 + if (obj.is_concern==0){
  68 + obj.is_concern=1
  69 + }else{
  70 + obj.is_concern=0
  71 + }
  72 + }
  73 + }
  74 +
  75 + that.setData({
  76 + list:newlist
  77 + })
  78 +
  79 +
  80 + }).catch((err) => {
  81 +
  82 + })
  83 + },
  84 + //点赞和取消点赞
  85 + zan(e){
  86 + let that = this;
  87 + let id = e.currentTarget.dataset.id;
  88 + let url = 'index/Common/good', params = {
  89 + id:id,
  90 + sort:3
  91 +
  92 +
  93 + }
  94 + app.post(url, params).then((res) => {
  95 + console.log(res);
  96 + wx.showToast({
  97 + title: res,
  98 + icon:'none'
  99 + })
  100 +
  101 + let newlist=that.data.list;
  102 + for(var obj of newlist){
  103 + if (obj.winemaker_id==id){
  104 + if (obj.is_good==0){
  105 + obj.is_good=1;
  106 + obj.good_count = obj.good_count+1
  107 + }else{
  108 + obj.is_good = 0;
  109 + if (obj.good_count==0){
  110 + obj.good_count=0
  111 + }else{
  112 + obj.good_count = obj.good_count-1
  113 + }
  114 + }
  115 + }
  116 + }
  117 +
  118 + that.setData({
  119 + list:newlist
  120 + })
  121 +
  122 +
  123 +
  124 +
  125 + }).catch((err) => {
  126 +
  127 + })
  128 + },
  129 + //评论
  130 + ping(e){
  131 + let id=e.currentTarget.dataset.id;
  132 + wx.navigateTo({
  133 + url: '/pages/myblock/pingjia/pingjia?winemaker_id='+id+'&type='+3,
  134 + })
  135 + },
  136 + //酿酒大师详情
  137 + niangjiuteacherdetail(e){
  138 + let id=e.currentTarget.dataset.id;
  139 + wx.navigateTo({
  140 + url: '/pages/homeblock/niangjiuteacher/niangjiuteacher?id='+id,
  141 + })
19 }, 142 },
20 143
21 /** 144 /**
@@ -29,7 +152,11 @@ Page({ @@ -29,7 +152,11 @@ Page({
29 * 生命周期函数--监听页面显示 152 * 生命周期函数--监听页面显示
30 */ 153 */
31 onShow: function () { 154 onShow: function () {
32 - 155 + this.setData({
  156 + page:1,
  157 + list:[]
  158 + })
  159 + this.getniangju()
33 }, 160 },
34 161
35 /** 162 /**
@@ -57,13 +184,40 @@ Page({ @@ -57,13 +184,40 @@ Page({
57 * 页面上拉触底事件的处理函数 184 * 页面上拉触底事件的处理函数
58 */ 185 */
59 onReachBottom: function () { 186 onReachBottom: function () {
60 - 187 + let page=this.data.page;
  188 + page++;
  189 + this.setData({
  190 + page:page
  191 + })
  192 + this.getniangju()
61 }, 193 },
62 194
63 /** 195 /**
64 * 用户点击右上角分享 196 * 用户点击右上角分享
65 */ 197 */
66 - onShareAppMessage: function () { 198 + onShareAppMessage: function (e) {
  199 + let that = this;
  200 +
  201 + let id = e.target.dataset.id;
  202 +
  203 +
  204 + let url = '/pages/homeblock/niangjiuteacher/niangjiuteacher?id=' + id
  205 +
  206 +
  207 + return {
  208 + title: '发现', // 转发后 所显示的title
  209 + // path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径
  210 +
  211 + path: url,//建档攻略分享1
  212 + // path:'',
  213 + success: (res) => { // 成功后要做的事情
  214 + console.log(res)
67 215
  216 + },
  217 + fail: function (res) {
  218 + // 分享失败
  219 + console.log(res)
  220 + }
  221 + }
68 } 222 }
69 }) 223 })
1 <view class="niangjiulist"> 1 <view class="niangjiulist">
2 - <view class="niangjiuitem">  
3 - <view class="teachimg">  
4 - <image src="{{url}}/aicon_77@2x.png"></image>  
5 - </view>  
6 - <view class="jiuname">徐强</view>  
7 -  
8 - <view class="atten">关注</view>  
9 -  
10 - <view class="jiubottom">  
11 - <view class="jiuleft">  
12 - <view class="jiuleftimg">  
13 - <image src="{{url}}/aicon_66x.png"></image>  
14 - </view>  
15 - <view class="jiuzan">618</view>  
16 - </view>  
17 -  
18 - <view class="jiumiddle">  
19 - <view class="middleimg">  
20 - <image src="{{url}}/aicon_67x.png"></image>  
21 - </view>  
22 - <view class="tiao">54</view>  
23 - </view>  
24 -  
25 - <view class="jiuright">  
26 - <image src="{{url}}/aicon_68x.png"></image>  
27 - </view>  
28 - </view>  
29 - </view>  
30 - <view class="niangjiuitem">  
31 - <view class="teachimg">  
32 - <image src="{{url}}/aicon_77@2x.png"></image>  
33 - </view>  
34 - <view class="jiuname">徐强</view>  
35 -  
36 - <view class="atten">关注</view>  
37 -  
38 - <view class="jiubottom">  
39 - <view class="jiuleft">  
40 - <view class="jiuleftimg">  
41 - <image src="{{url}}/aicon_66x.png"></image>  
42 - </view>  
43 - <view class="jiuzan">618</view>  
44 - </view>  
45 -  
46 - <view class="jiumiddle">  
47 - <view class="middleimg">  
48 - <image src="{{url}}/aicon_67x.png"></image>  
49 - </view>  
50 - <view class="tiao">54</view>  
51 - </view>  
52 -  
53 - <view class="jiuright">  
54 - <image src="{{url}}/aicon_68x.png"></image>  
55 - </view>  
56 - </view>  
57 - </view>  
58 - <view class="niangjiuitem">  
59 - <view class="teachimg">  
60 - <image src="{{url}}/aicon_77@2x.png"></image>  
61 - </view>  
62 - <view class="jiuname">徐强</view>  
63 -  
64 - <view class="atten">关注</view>  
65 -  
66 - <view class="jiubottom">  
67 - <view class="jiuleft">  
68 - <view class="jiuleftimg">  
69 - <image src="{{url}}/aicon_66x.png"></image>  
70 - </view>  
71 - <view class="jiuzan">618</view>  
72 - </view>  
73 -  
74 - <view class="jiumiddle">  
75 - <view class="middleimg">  
76 - <image src="{{url}}/aicon_67x.png"></image>  
77 - </view>  
78 - <view class="tiao">54</view>  
79 - </view>  
80 -  
81 - <view class="jiuright">  
82 - <image src="{{url}}/aicon_68x.png"></image>  
83 - </view>  
84 - </view>  
85 - </view>  
86 - <view class="niangjiuitem">  
87 - <view class="teachimg">  
88 - <image src="{{url}}/aicon_77@2x.png"></image>  
89 - </view>  
90 - <view class="jiuname">徐强</view>  
91 -  
92 - <view class="atten">关注</view>  
93 -  
94 - <view class="jiubottom">  
95 - <view class="jiuleft">  
96 - <view class="jiuleftimg">  
97 - <image src="{{url}}/aicon_66x.png"></image>  
98 - </view>  
99 - <view class="jiuzan">618</view>  
100 - </view>  
101 -  
102 - <view class="jiumiddle">  
103 - <view class="middleimg">  
104 - <image src="{{url}}/aicon_67x.png"></image>  
105 - </view>  
106 - <view class="tiao">54</view>  
107 - </view>  
108 -  
109 - <view class="jiuright">  
110 - <image src="{{url}}/aicon_68x.png"></image>  
111 - </view>  
112 - </view>  
113 - </view>  
114 - <view class="niangjiuitem">  
115 - <view class="teachimg">  
116 - <image src="{{url}}/aicon_77@2x.png"></image>  
117 - </view>  
118 - <view class="jiuname">徐强</view>  
119 -  
120 - <view class="atten">关注</view>  
121 -  
122 - <view class="jiubottom">  
123 - <view class="jiuleft">  
124 - <view class="jiuleftimg">  
125 - <image src="{{url}}/aicon_66x.png"></image>  
126 - </view>  
127 - <view class="jiuzan">618</view>  
128 - </view>  
129 -  
130 - <view class="jiumiddle">  
131 - <view class="middleimg">  
132 - <image src="{{url}}/aicon_67x.png"></image>  
133 - </view>  
134 - <view class="tiao">54</view>  
135 - </view>  
136 -  
137 - <view class="jiuright">  
138 - <image src="{{url}}/aicon_68x.png"></image>  
139 - </view>  
140 - </view>  
141 - </view>  
142 -</view>  
  2 + <view class="niangjiuitem" wx:for="{{list}}" wx:key="" bindtap="niangjiuteacherdetail" data-id="{{item.winemaker_id}}">
  3 + <view class="teachimg">
  4 + <image src="{{item.avatar}}"></image>
  5 + </view>
  6 + <view class="jiuname">{{item.name}}</view>
  7 +
  8 + <view class="atten" wx:if="{{item.is_concern==0}}" catchtap="atten" data-id="{{item.winemaker_id}}">关注</view>
  9 + <view class="atten aten1" wx:else catchtap="atten" data-id="{{item.winemaker_id}}">取消关注</view>
  10 +
  11 + <view class="jiubottom">
  12 + <view class="jiuleft">
  13 + <view class="jiuleftimg" catchtap="zan" data-id="{{item.winemaker_id}}">
  14 + <image src="{{url}}/aicon_47x.png" wx:if="{{item.is_good==0}}"></image>
  15 + <image src="{{url}}/aicon_46x.png" wx:else></image>
  16 + </view>
  17 + <view class="jiuzan">{{item.good_count}}</view>
  18 + </view>
  19 +
  20 + <view class="jiumiddle" catchtap="ping" data-id="{{item.winemaker_id}}">
  21 + <view class="middleimg">
  22 + <image src="{{url}}/aicon_67x.png"></image>
  23 + </view>
  24 + <view class="tiao">{{item.comment_count}}</view>
  25 + </view>
  26 +
  27 + <view class="jiuright">
  28 + <image src="{{url}}/aicon_68x.png"></image>
  29 + <button class="lj_share" bindtap="buildshare" open-type='share' data-id="{{item.winemaker_id}}" ></button>
  30 + </view>
  31 + </view>
  32 + </view>
  33 +
  34 +</view>
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 12
13 } 13 }
14 .teachimg image{ 14 .teachimg image{
15 - width:100%; 15 + width:100%;
16 height:100%; 16 height:100%;
17 border-radius:50%; 17 border-radius:50%;
18 } 18 }
@@ -32,9 +32,14 @@ @@ -32,9 +32,14 @@
32 margin-top:14rpx; 32 margin-top:14rpx;
33 } 33 }
34 .atten{ 34 .atten{
35 - width:100rpx; 35 + width:80rpx;
  36 + /* padding: 0 20 */
36 margin:20rpx auto 0; 37 margin:20rpx auto 0;
37 } 38 }
  39 +.aten1{
  40 + width:120rpx;
  41 + margin:20rpx auto 0;
  42 +}
38 .jiubottom{ 43 .jiubottom{
39 display:flex; 44 display:flex;
40 align-items: center; 45 align-items: center;
@@ -76,5 +81,22 @@ image{ @@ -76,5 +81,22 @@ image{
76 .jiuright{ 81 .jiuright{
77 width:26rpx; 82 width:26rpx;
78 height:26rpx; 83 height:26rpx;
79 - font-size: 0 84 + font-size: 0;
  85 + position: relative
  86 +}
  87 +
  88 +.lj_share{
  89 + width:38rpx;
  90 + height:40rpx;
  91 + border:none;
  92 + position: absolute;
  93 + right:0rpx;
  94 + top:0rpx;
  95 + background: transparent
  96 +
  97 +}
  98 +button::after{
  99 + border:none;
  100 + outline: none;
  101 + background: transparent
80 } 102 }
@@ -6,7 +6,10 @@ Page({ @@ -6,7 +6,10 @@ Page({
6 * 页面的初始数据 6 * 页面的初始数据
7 */ 7 */
8 data: { 8 data: {
9 - url:'' 9 + url:'',
  10 + id:'',
  11 + page:1,
  12 + list:[]
10 }, 13 },
11 14
12 /** 15 /**
@@ -14,10 +17,92 @@ Page({ @@ -14,10 +17,92 @@ Page({
14 */ 17 */
15 onLoad: function (options) { 18 onLoad: function (options) {
16 this.setData({ 19 this.setData({
17 - url: app.globalData.url 20 + url: app.globalData.url,
  21 + id:options.id
  22 + })
  23 +
  24 +
  25 + },
  26 +
  27 + //获取文章列表
  28 + getarticlelist(){
  29 + let that = this;
  30 + let url = 'index/Find/article_list', params = {
  31 + category_id:that.data.id,
  32 + page:that.data.page
  33 +
  34 + }
  35 + app.post(url, params).then((res) => {
  36 + console.log(res);
  37 + that.setData({
  38 + list:that.data.list.concat(res.list)
  39 + })
  40 +
  41 +
  42 +
  43 + }).catch((err) => {
  44 +
  45 + })
  46 + },
  47 +
  48 +//点赞和取消点赞
  49 + dianzan(e){
  50 + let that = this;
  51 + let id=e.currentTarget.dataset.id;
  52 +
  53 + let url = 'index/Common/good', params = {
  54 + sort:4,
  55 + id:id
  56 + }
  57 + app.post(url, params).then((res) => {
  58 + console.log(res);
  59 + wx.showToast({
  60 + title: res,
  61 + icon:'none'
  62 + })
  63 +
  64 + let newlist=that.data.list;
  65 + for(var obj of newlist){
  66 + if (obj.is_good==0){
  67 + obj.is_good=1;
  68 + obj.good_count = obj.good_count+1
  69 + }else{
  70 + obj.is_good=0;
  71 + if (obj.good_count==0){
  72 + obj.obj.good_count=0
  73 + }else{
  74 + obj.good_count = obj.good_count-1
  75 + }
  76 + }
  77 + }
  78 +
  79 + that.setData({
  80 + list:newlist
  81 + })
  82 +
  83 +
  84 +
  85 +
  86 + }).catch((err) => {
  87 +
  88 + })
  89 + },
  90 +
  91 + //进入评论页面
  92 + ping(e){
  93 + let id=e.currentTarget.dataset.id;
  94 + wx.navigateTo({
  95 + url: '/pages/myblock/pingjia/pingjia?id='+id+'&type='+4,
18 }) 96 })
19 }, 97 },
20 98
  99 + //详情页面
  100 + detail(e){
  101 + let id=e.currentTarget.dataset.id;
  102 + wx.navigateTo({
  103 + url: '/pages/findblock/wenzhangdetail/wenzhangdetail?id='+id,
  104 + })
  105 + },
21 /** 106 /**
22 * 生命周期函数--监听页面初次渲染完成 107 * 生命周期函数--监听页面初次渲染完成
23 */ 108 */
@@ -29,7 +114,12 @@ Page({ @@ -29,7 +114,12 @@ Page({
29 * 生命周期函数--监听页面显示 114 * 生命周期函数--监听页面显示
30 */ 115 */
31 onShow: function () { 116 onShow: function () {
32 - 117 +
  118 + this.setData({
  119 + page:1,
  120 + list:[]
  121 + })
  122 + this.getarticlelist()
33 }, 123 },
34 124
35 /** 125 /**
@@ -57,13 +147,42 @@ Page({ @@ -57,13 +147,42 @@ Page({
57 * 页面上拉触底事件的处理函数 147 * 页面上拉触底事件的处理函数
58 */ 148 */
59 onReachBottom: function () { 149 onReachBottom: function () {
60 - 150 + let page = this.data.page;
  151 + page++;
  152 + this.setData({
  153 + page: page,
  154 +
  155 + })
  156 + this.getarticlelist()
61 }, 157 },
62 158
63 /** 159 /**
64 * 用户点击右上角分享 160 * 用户点击右上角分享
65 */ 161 */
66 - onShareAppMessage: function () { 162 + onShareAppMessage: function (e) {
  163 + let that = this;
  164 +
  165 + let id = e.target.dataset.id;
  166 +
  167 +
  168 + let url = '/pages/findblock/wenzhangdetail/wenzhangdetail?id=' + id
  169 +
  170 +
  171 + return {
  172 + title: '发现', // 转发后 所显示的title
  173 + // path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径
  174 +
  175 + path: url,//建档攻略分享1
  176 + // path:'',
  177 + success: (res) => { // 成功后要做的事情
  178 + console.log(res)
  179 +
  180 + },
  181 + fail: function (res) {
  182 + // 分享失败
  183 + console.log(res)
  184 + }
  185 + }
67 186
68 } 187 }
69 }) 188 })
1 -<view class="wineblock">  
2 -  
3 - <view class="winetitle">浓香酒酿酒大师:沈才宏</view>  
4 -  
5 - <view class="wineimg">  
6 - <image src="{{url}}aicon_64.png"></image>  
7 - </view>  
8 -  
9 - <view class="winebottom">  
10 - <view class="winebottomleft">  
11 - <view class="winebottomleftimg">  
12 - <image src="{{url}}aicon_65x.png"></image>  
13 - </view>  
14 - <view class="wineeng">WinesBook</view>  
15 - </view>  
16 - <view class="winebottonright">  
17 1
18 - <view class="winerighttou">  
19 - <view class="winerighttouimg">  
20 - <image src="{{url}}aicon_66x.png"></image>  
21 - </view>  
22 - <view class="winezan">18</view>  
23 - </view>  
24 - <view class="winerighttou">  
25 - <view class="winerighttouimg">  
26 - <image src="{{url}}aicon_67x.png"></image>  
27 - </view>  
28 - <view class="winezan">54</view>  
29 - </view>  
30 -  
31 - <view class="winerighttou">  
32 - <view class="winerighttouimg">  
33 - <image src="{{url}}aicon_68x.png"></image>  
34 - </view>  
35 -  
36 - </view>  
37 - </view>  
38 -  
39 - </view>  
40 -  
41 -</view>  
42 -<view class="wineblock"> 2 +<view class="nodata" wx:if="{{list.length==0}}" class="nodata">暂无数据</view>
  3 +<block wx:else>
  4 +<view class="wineblock" wx:for="{{list}}" wx:key='' bindtap="detail" data-id="{{item.id}}">
43 5
44 - <view class="winetitle">浓香酒酿酒大师:沈才宏</view> 6 + <view class="winetitle">{{item.title}}</view>
45 7
46 <view class="wineimg"> 8 <view class="wineimg">
47 - <image src="{{url}}aicon_64.png"></image> 9 + <image src="{{item.thumb}}"></image>
48 </view> 10 </view>
49 11
50 <view class="winebottom"> 12 <view class="winebottom">
51 <view class="winebottomleft"> 13 <view class="winebottomleft">
52 <view class="winebottomleftimg"> 14 <view class="winebottomleftimg">
53 - <image src="{{url}}aicon_65x.png"></image> 15 + <image src="{{item.avatar}}"></image>
54 </view> 16 </view>
55 - <view class="wineeng">WinesBook</view> 17 + <view class="wineeng">{{item.name}}</view>
56 </view> 18 </view>
57 <view class="winebottonright"> 19 <view class="winebottonright">
58 20
59 <view class="winerighttou"> 21 <view class="winerighttou">
60 - <view class="winerighttouimg">  
61 - <image src="{{url}}aicon_66x.png"></image> 22 + <view class="winerighttouimg" catchtap="dianzan" data-id="{{item.id}}">
  23 + <image src="{{url}}aicon_47x.png" wx:if="{{item.is_good==0}}"></image>
  24 + <image src="{{url}}aicon_46x.png" wx:else></image>
62 </view> 25 </view>
63 - <view class="winezan">18</view> 26 + <view class="winezan">{{item.good_count}}</view>
64 </view> 27 </view>
65 - <view class="winerighttou"> 28 + <view class="winerighttou" catchtap='ping' data-id="{{item.id}}">
66 <view class="winerighttouimg"> 29 <view class="winerighttouimg">
67 <image src="{{url}}aicon_67x.png"></image> 30 <image src="{{url}}aicon_67x.png"></image>
68 </view> 31 </view>
69 - <view class="winezan">54</view> 32 + <view class="winezan">{{item.comment_count}}</view>
70 </view> 33 </view>
71 34
72 <view class="winerighttou"> 35 <view class="winerighttou">
73 <view class="winerighttouimg"> 36 <view class="winerighttouimg">
74 <image src="{{url}}aicon_68x.png"></image> 37 <image src="{{url}}aicon_68x.png"></image>
  38 + <button class="lj_share" catchtap="buildshare" open-type='share' data-id="{{item.id}}" ></button>
75 </view> 39 </view>
76 40
77 </view> 41 </view>
@@ -79,4 +43,5 @@ @@ -79,4 +43,5 @@
79 43
80 </view> 44 </view>
81 45
82 -</view>  
  46 +</view>
  47 +</block>
@@ -35,7 +35,8 @@ @@ -35,7 +35,8 @@
35 .winerighttouimg{ 35 .winerighttouimg{
36 width:30rpx; 36 width:30rpx;
37 height:28rpx; 37 height:28rpx;
38 - font-size: 0 38 + font-size: 0;
  39 + position:relative
39 } 40 }
40 .winerighttou{ 41 .winerighttou{
41 display:flex; 42 display:flex;
@@ -49,7 +50,7 @@ @@ -49,7 +50,7 @@
49 .winezan{ 50 .winezan{
50 color:#666666; 51 color:#666666;
51 font-size:28rpx; 52 font-size:28rpx;
52 - margin-left:5rpx; 53 + margin-left:10rpx;
53 } 54 }
54 .wineblock{ 55 .wineblock{
55 border-bottom: 1rpx solid #f5f5f5; 56 border-bottom: 1rpx solid #f5f5f5;
@@ -61,3 +62,29 @@ @@ -61,3 +62,29 @@
61 height:32rpx; 62 height:32rpx;
62 font-size: 0 63 font-size: 0
63 } 64 }
  65 +.lj_share{
  66 + width:38rpx;
  67 + height:40rpx;
  68 + border:none;
  69 + position: absolute;
  70 + right:0rpx;
  71 + top:0rpx;
  72 + background: transparent
  73 +
  74 +}
  75 +button::after{
  76 + border:none;
  77 + outline: none;
  78 + background: transparent
  79 +}
  80 +
  81 +.lj_share{
  82 + width:20rpx;
  83 + height:30rpx;
  84 + border:none;
  85 + position: absolute;
  86 + right:0;
  87 + top:0;
  88 + background: transparent
  89 +
  90 +}
  1 +// pages/homeblock/niangjiuteacher/niangjiuteacher.js
  2 +var WxParse = require('../../../wxParse/wxParse.js');
  3 +const app = getApp()
  4 +Page({
  5 +
  6 + /**
  7 + * 页面的初始数据
  8 + */
  9 + data: {
  10 + url: '',
  11 + id: '',
  12 + page: 1
  13 + },
  14 +
  15 + /**
  16 + * 生命周期函数--监听页面加载
  17 + */
  18 + onLoad: function (options) {
  19 + this.setData({
  20 + url: app.globalData.url,
  21 + id: options.id
  22 + })
  23 + let token=wx.getStorageSync("token");
  24 + if(token==''){
  25 + wx.navigateTo({
  26 + url: '/pages/login/login?id=' + this.data.id + '&type=' + 1,//type=1发现的首页专家品酒
  27 + })
  28 +
  29 + wx.setStorageSync("url", "/pages/findblock/wenzhangdetail/wenzhangdetail")
  30 + }
  31 +
  32 + },
  33 + //获取酿酒师
  34 + getniangjiu() {
  35 + let that = this;
  36 + let url = 'index/Find/article_detail', params = {
  37 + id: that.data.id,
  38 +
  39 +
  40 + }
  41 + app.post(url, params).then((res) => {
  42 + console.log(res);
  43 + that.setData({
  44 + info: res.info,
  45 +
  46 + })
  47 +
  48 +
  49 +
  50 + WxParse.wxParse('article', 'html', res.info.content, that, 5)
  51 +
  52 +
  53 + }).catch((err) => {
  54 +
  55 + })
  56 + },
  57 + showinfo(e) {
  58 + let idx = e.currentTarget.dataset.idx;
  59 + console.log(idx)
  60 + let newattr = this.data.attr;
  61 + for (var i = 0; i < newattr.length; i++) {
  62 + if (i == idx) {
  63 + newattr[i].show = !newattr[i].show
  64 + }
  65 + }
  66 + this.setData({
  67 + attr: newattr
  68 + })
  69 + },
  70 +
  71 +
  72 + //点赞
  73 + zan(e) {
  74 + let that = this;
  75 + let id = e.currentTarget.dataset.id;
  76 +
  77 + let url = 'index/Common/good', params = {
  78 + sort: 4,
  79 + id: id
  80 +
  81 + }
  82 + app.post(url, params).then((res) => {
  83 + console.log(res);
  84 + wx.showToast({
  85 + title: res,
  86 + icon: "none"
  87 + })
  88 +
  89 + let newinfo = that.data.info;
  90 + console.log(newinfo)
  91 + if (newinfo.is_good == 0) {
  92 + newinfo.is_good = 1;
  93 + newinfo.good_count = newinfo.good_count + 1
  94 + } else {
  95 + newinfo.is_good = 0;
  96 + if (newinfo.good_count == 0) {
  97 + newinfo.good_count = 0
  98 + } else {
  99 + newinfo.good_count = newinfo.good_count - 1
  100 + }
  101 + }
  102 +
  103 +
  104 + that.setData({
  105 + info: newinfo
  106 + })
  107 +
  108 + console.log(that.data.info)
  109 +
  110 +
  111 + }).catch((err) => {
  112 +
  113 + })
  114 + },
  115 + //评论
  116 + ping(e) {
  117 + let id = e.currentTarget.dataset.id;
  118 + wx.navigateTo({
  119 + url: '/pages/myblock/pingjia/pingjia?id=' + id + '&type=' + 4,
  120 + })
  121 + },
  122 + /**
  123 + * 生命周期函数--监听页面初次渲染完成
  124 + */
  125 + onReady: function () {
  126 +
  127 + },
  128 +
  129 + /**
  130 + * 生命周期函数--监听页面显示
  131 + */
  132 + onShow: function () {
  133 + this.getniangjiu()
  134 + },
  135 +
  136 + /**
  137 + * 生命周期函数--监听页面隐藏
  138 + */
  139 + onHide: function () {
  140 +
  141 + },
  142 +
  143 + /**
  144 + * 生命周期函数--监听页面卸载
  145 + */
  146 + onUnload: function () {
  147 +
  148 + },
  149 +
  150 + /**
  151 + * 页面相关事件处理函数--监听用户下拉动作
  152 + */
  153 + onPullDownRefresh: function () {
  154 +
  155 + },
  156 +
  157 + /**
  158 + * 页面上拉触底事件的处理函数
  159 + */
  160 + onReachBottom: function () {
  161 +
  162 + },
  163 +
  164 + /**
  165 + * 用户点击右上角分享
  166 + */
  167 + onShareAppMessage: function () {
  168 + let that = this;
  169 +
  170 + let url = url = '/pages/findblock/wenzhangdetail/wenzhangdetail?id=' + that.data.id
  171 + return {
  172 + title: '发现', // 转发后 所显示的title
  173 + // path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径
  174 +
  175 + path: url,//建档攻略分享1
  176 + // path:'',
  177 + success: (res) => { // 成功后要做的事情
  178 + console.log(res)
  179 +
  180 + },
  181 + fail: function (res) {
  182 + // 分享失败
  183 + console.log(res)
  184 + }
  185 + }
  186 +
  187 + }
  188 +})
  1 +{
  2 + "usingComponents": {}
  3 +}
  1 +<import src="../../../wxParse/wxParse.wxml" />
  2 +<view class="teacherhead">
  3 + <view class="teacherleft">
  4 + <view class="teacimg">
  5 + <image src="{{info.avatar}}"></image>
  6 + </view>
  7 +
  8 + <view class="teacname">{{info.name}}</view>
  9 + <view class="teacgouimg">
  10 + <image src="{{url}}aicon_20x.png"></image>
  11 + </view>
  12 + </view>
  13 +
  14 +
  15 +</view>
  16 +
  17 +<view class="jiubottom">
  18 + <view class="jiuleft">
  19 + <view class="jiuleftimg" catchtap="zan" data-id="{{info.id}}">
  20 + <image src="{{url}}/aicon_47x.png" wx:if="{{info.is_good==0}}"></image>
  21 + <image src="{{url}}/aicon_46x.png" wx:else></image>
  22 + </view>
  23 + <view class="jiuzan">{{info.good_count}}</view>
  24 + </view>
  25 +
  26 + <view class="jiumiddle" catchtap="ping" data-id="{{info.id}}">
  27 + <view class="middleimg">
  28 + <image src="{{url}}/aicon_67x.png"></image>
  29 + </view>
  30 + <view class="tiao">{{info.comment_count}}</view>
  31 + </view>
  32 +
  33 + <view class="lastimg">
  34 +
  35 + <view class="jiuright">
  36 + <image src="{{url}}/aicon_68x.png"></image>
  37 + <button class="lj_share" catchtap="buildshare" open-type='share'></button>
  38 + </view>
  39 + <view class="tiao">分享</view>
  40 +
  41 + </view>
  42 +
  43 +
  44 +</view>
  45 +
  46 +<view class="wineimg">
  47 + <image src="{{info.thumb}}"></image>
  48 +</view>
  49 +
  50 +
  51 +<view class="niangjiubox">
  52 +
  53 +
  54 +
  55 +
  56 + <view class="brandtext">
  57 +
  58 + <template is="wxParse" data="{{wxParseData:article.nodes}}" />
  59 +
  60 +
  61 +
  62 + </view>
  63 +
  64 +
  65 +
  66 +
  67 +</view>
  1 +@import '../../homeblock/brandpage/brandpage.wxss';
  2 +
  3 +image{
  4 + width:100%;
  5 + height:100%;
  6 +}
  7 +
  8 +.teacherhead{
  9 + display:flex;
  10 + justify-content: space-between;
  11 + align-items: center;
  12 + padding: 17rpx 32rpx;
  13 + box-sizing: border-box;
  14 + border-top:1rpx solid #f5f5f5;
  15 +}
  16 +.teacherleft{
  17 + display:flex;
  18 + align-items: center;
  19 +
  20 +}
  21 +.teacimg{
  22 + width:60rpx;
  23 + height:60rpx;
  24 + border-radius:50%;
  25 +}
  26 +.teacimg image{
  27 + border-radius: 50%;
  28 +}
  29 +.teacname{
  30 + color:#1A1A1A;
  31 + margin-left:30rpx;
  32 + font-size:28rpx;
  33 + font-family:PingFang-SC-Medium;
  34 + font-weight:500;
  35 +
  36 +}
  37 +.teacgouimg{
  38 + width:24rpx;
  39 + height:24rpx;
  40 + font-size: 0;
  41 + margin-left:20rpx;
  42 +}
  43 +.wineimg{
  44 + width:750rpx;
  45 + height:328rpx;
  46 + margin-top:20rpx;
  47 +}
  48 +.boxtopleft{
  49 + font-weight: bold
  50 +}
  51 +.baisinfo{
  52 + padding: 38rpx 0;
  53 + box-sizing: border-box;
  54 + border-bottom: 1rpx solid #f5f5f5;
  55 + display:flex;
  56 + align-items: center;
  57 +
  58 +}
  59 +.baisinfo:last-child{
  60 + border-bottom: none;
  61 +}
  62 +.basinfoleft{
  63 + display:block;
  64 + width:114rpx;
  65 + color:#999999;
  66 + font-size: 26rpx;
  67 +}
  68 +.baisinforight{
  69 + margin-left:95rpx;
  70 +}
  71 +.brandboxitem:first-child{
  72 + padding-bottom: 0
  73 +}
  74 +.brandlsit{
  75 + color:#666666;
  76 + font-size: 26rpx;
  77 +
  78 +}
  79 +.jiubottom{
  80 + display:flex;
  81 + align-items: center;
  82 + justify-content: space-between;
  83 + padding: 0rpx 78rpx;
  84 + box-sizing: border-box
  85 +
  86 +}
  87 +.jiuleft{
  88 + display:flex;
  89 + align-items: center;
  90 +}
  91 +.jiumiddle{
  92 + display:flex;
  93 + align-items: center
  94 +}
  95 +.jiuleftimg{
  96 + width:30rpx;
  97 + height:28rpx;
  98 + font-size: 0
  99 +}
  100 +image{
  101 + width:100%;
  102 + height:100%;
  103 +}
  104 +.jiuzan{
  105 + color:#666666;
  106 + font-size: 28rpx;
  107 + margin-left:16rpx;
  108 +}
  109 +.middleimg{
  110 + width:29rpx;
  111 + height:27rpx;
  112 + font-size: 0
  113 +}
  114 +.tiao{
  115 + color:#666666;
  116 + font-size: 28rpx;
  117 + margin-left:16rpx;
  118 +}
  119 +.jiuright{
  120 + width:26rpx;
  121 + height:26rpx;
  122 + font-size: 0;
  123 + position: relative;
  124 +}
  125 +.lastimg{
  126 + display:flex;
  127 + align-items: center
  128 +}
  129 +
  130 +.lj_share{
  131 + width:20rpx;
  132 + height:30rpx;
  133 + border:none;
  134 + position: absolute;
  135 + right:0;
  136 + top:0;
  137 + background: transparent
  138 +
  139 +}
  140 +button::after{
  141 + border:none;
  142 + outline:none;
  143 +}
@@ -6,7 +6,9 @@ Page({ @@ -6,7 +6,9 @@ Page({
6 * 页面的初始数据 6 * 页面的初始数据
7 */ 7 */
8 data: { 8 data: {
9 - url:'' 9 + url:'',
  10 + page:1,
  11 + list:[]
10 }, 12 },
11 13
12 /** 14 /**
@@ -16,6 +18,99 @@ Page({ @@ -16,6 +18,99 @@ Page({
16 this.setData({ 18 this.setData({
17 url: app.globalData.url 19 url: app.globalData.url
18 }) 20 })
  21 +
  22 + },
  23 + //获取专家酒品列表
  24 + getjiulist(){
  25 + let that = this;
  26 + let url = 'index/Find/expert_list', params = {
  27 + page: that.data.page
  28 +
  29 + }
  30 + app.post(url, params).then((res) => {
  31 + console.log(res);
  32 + that.setData({
  33 + list:that.data.list.concat(res.list)
  34 + })
  35 +
  36 +
  37 +
  38 + }).catch((err) => {
  39 +
  40 + })
  41 + },
  42 +
  43 + //进入视频
  44 + entervideo(e) {
  45 + let url = e.currentTarget.dataset.url;
  46 + wx.navigateTo({
  47 + url: '/pages/homeblock/video/video?url=' + url,
  48 + })
  49 + },
  50 +
  51 + //点赞
  52 + dianzan(e){
  53 + let id=e.currentTarget.dataset.id;
  54 + let that = this;
  55 + let url = 'index/Common/good', params = {
  56 + id:id,
  57 + sort:2
  58 +
  59 +
  60 + }
  61 + app.post(url, params).then((res) => {
  62 + console.log(res);
  63 + wx.showToast({
  64 + title: res,
  65 + icon:'none'
  66 + })
  67 +
  68 + let newlist = that.data.list;
  69 + for(var obj of newlist){
  70 + if(obj.id==id){
  71 + if (obj.is_good==0){
  72 + obj.is_good=1;
  73 + obj.good_count++
  74 + }else{
  75 + obj.is_good = 0
  76 + if (obj.good_count==0){
  77 + obj.good_count=0
  78 + }else{
  79 + obj.good_count = obj.good_count-1
  80 + }
  81 +
  82 +
  83 + }
  84 + }
  85 + }
  86 +
  87 + that.setData({
  88 + list:newlist
  89 + })
  90 +
  91 +
  92 +
  93 + }).catch((err) => {
  94 +
  95 + })
  96 + },
  97 +
  98 + //进入评论页面
  99 + ping(e) {
  100 + let id = e.currentTarget.dataset.id;
  101 + let type = 2
  102 + // let winemaker_id = e.currentTarget.dataset.winemaker_id
  103 + wx.navigateTo({
  104 + url: '/pages/myblock/pingjia/pingjia?type=' + type + '&id=' + id
  105 + })
  106 + },
  107 +
  108 + //专家酒品详情页
  109 + detail(e){
  110 + let id=e.currentTarget.dataset.id;
  111 + wx.navigateTo({
  112 + url: '/pages/findblock/zhuanjiapinjiudetail/zhuanjiapinjiudetail?id='+id,
  113 + })
19 }, 114 },
20 115
21 /** 116 /**
@@ -29,7 +124,11 @@ Page({ @@ -29,7 +124,11 @@ Page({
29 * 生命周期函数--监听页面显示 124 * 生命周期函数--监听页面显示
30 */ 125 */
31 onShow: function () { 126 onShow: function () {
32 - 127 + this.setData({
  128 + page:1,
  129 + list:[]
  130 + })
  131 + this.getjiulist()
33 }, 132 },
34 133
35 /** 134 /**
@@ -57,13 +156,42 @@ Page({ @@ -57,13 +156,42 @@ Page({
57 * 页面上拉触底事件的处理函数 156 * 页面上拉触底事件的处理函数
58 */ 157 */
59 onReachBottom: function () { 158 onReachBottom: function () {
  159 + let page=this.data.page;
  160 + page++;
  161 + this.setData({
  162 + page:page
  163 + })
60 164
  165 + this.getjiulist()
61 }, 166 },
62 167
63 /** 168 /**
64 * 用户点击右上角分享 169 * 用户点击右上角分享
65 */ 170 */
66 - onShareAppMessage: function () { 171 + onShareAppMessage: function (e) {
  172 + let that = this;
  173 + console.log(e)
  174 + let id = e.target.dataset.id;
  175 + console.log(id)
  176 +
  177 + let url = '/pages/findblock/zhuanjiapinjiudetail/zhuanjiapinjiudetail?id=' + id
  178 +
  179 +
  180 +
  181 + return {
  182 + title: '发现', // 转发后 所显示的title
  183 + // path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径
  184 +
  185 + path: url,//建档攻略分享1
  186 + // path:'',
  187 + success: (res) => { // 成功后要做的事情
  188 + console.log(res)
67 189
  190 + },
  191 + fail: function (res) {
  192 + // 分享失败
  193 + console.log(res)
  194 + }
  195 + }
68 } 196 }
69 }) 197 })
1 -<view class="wineblock">  
2 - <view class="winetitle">浓香酒酿酒大师:沈才宏</view>  
3 - <view class="wineimg">  
4 - <image src="{{url}}aicon_64.png"></image>  
5 - </view>  
6 - <view class="winebottom">  
7 - <view class="winebottomleft">  
8 - <view class="winebottomleftimg">  
9 - <image src="{{url}}aicon_65x.png"></image>  
10 - </view>  
11 - <view class="wineeng">WinesBook</view> 1 +<view class="wineblock" wx:for="{{list}}" wx:key='' bindtap="detail" data-id="{{item.id}}">
  2 + <view class="winetitle">{{item.title}}</view>
  3 + <view class="wineimg" catchtap="entervideo" data-url="{{item.video}}">
  4 + <image src="{{item.video_image}}"></image>
  5 + <view class="vimg">
  6 + <image src="{{url}}/aicon_70x.png"></image>
12 </view> 7 </view>
13 <view class="winebottonright"> 8 <view class="winebottonright">
14 <view class="winerighttou"> 9 <view class="winerighttou">
@@ -42,28 +37,30 @@ @@ -42,28 +37,30 @@
42 <view class="winebottom"> 37 <view class="winebottom">
43 <view class="winebottomleft"> 38 <view class="winebottomleft">
44 <view class="winebottomleftimg"> 39 <view class="winebottomleftimg">
45 - <image src="{{url}}aicon_65x.png"></image> 40 + <image src="{{item.avatar}}"></image>
46 </view> 41 </view>
47 - <view class="wineeng">WinesBook</view> 42 + <view class="wineeng">{{item.name}}</view>
48 </view> 43 </view>
49 <view class="winebottonright"> 44 <view class="winebottonright">
50 45
51 <view class="winerighttou"> 46 <view class="winerighttou">
52 - <view class="winerighttouimg">  
53 - <image src="{{url}}aicon_66x.png"></image> 47 + <view class="winerighttouimg" catchtap="dianzan" data-id="{{item.id}}">
  48 + <image src="{{url}}aicon_46x.png" wx:if="{{item.is_good==1}}"></image>
  49 + <image src="{{url}}aicon_47x.png" wx:else></image>
54 </view> 50 </view>
55 - <view class="winezan">18</view> 51 + <view class="winezan">{{item.good_count}}</view>
56 </view> 52 </view>
57 - <view class="winerighttou"> 53 + <view class="winerighttou" catchtap="ping" data-id="{{item.id}}">
58 <view class="winerighttouimg"> 54 <view class="winerighttouimg">
59 <image src="{{url}}aicon_67x.png"></image> 55 <image src="{{url}}aicon_67x.png"></image>
60 </view> 56 </view>
61 - <view class="winezan">54</view> 57 + <view class="winezan">{{item.comment_count}}</view>
62 </view> 58 </view>
63 59
64 <view class="winerighttou"> 60 <view class="winerighttou">
65 <view class="winerighttouimg"> 61 <view class="winerighttouimg">
66 <image src="{{url}}aicon_68x.png"></image> 62 <image src="{{url}}aicon_68x.png"></image>
  63 + <button class="lj_share" catchtap="buildshare" open-type='share' data-id="{{item.id}}" ></button>
67 </view> 64 </view>
68 65
69 </view> 66 </view>
@@ -71,4 +68,4 @@ @@ -71,4 +68,4 @@
71 68
72 </view> 69 </view>
73 70
74 -</view>  
  71 +</view>
@@ -10,15 +10,6 @@ @@ -10,15 +10,6 @@
10 margin:30rpx auto 0; 10 margin:30rpx auto 0;
11 position: relative; 11 position: relative;
12 } 12 }
13 -.video_play{  
14 - position: absolute;  
15 - top: 50%;  
16 - left: 50%;  
17 - width: 80rpx;  
18 - height: 80rpx;  
19 - transform: translate(-50%,-50%);  
20 - -webkit-transform: translate(-50%,-50%);  
21 -}  
22 .winebottom{ 13 .winebottom{
23 display:flex; 14 display:flex;
24 justify-content: space-between; 15 justify-content: space-between;
@@ -33,6 +24,11 @@ @@ -33,6 +24,11 @@
33 border-radius: 50%; 24 border-radius: 50%;
34 overflow: hidden; 25 overflow: hidden;
35 } 26 }
  27 +.winebottomleftimg image{
  28 + width:100%;
  29 + height:100%;
  30 + border-radius: 50%;
  31 +}
36 .winebottomleft{ 32 .winebottomleft{
37 display:flex; 33 display:flex;
38 align-items: center 34 align-items: center
@@ -46,7 +42,8 @@ @@ -46,7 +42,8 @@
46 .winerighttouimg{ 42 .winerighttouimg{
47 width:30rpx; 43 width:30rpx;
48 height:28rpx; 44 height:28rpx;
49 - font-size: 0 45 + font-size: 0;
  46 + position: relative
50 } 47 }
51 .winerighttou{ 48 .winerighttou{
52 display:flex; 49 display:flex;
@@ -60,7 +57,7 @@ @@ -60,7 +57,7 @@
60 .winezan{ 57 .winezan{
61 color:#666666; 58 color:#666666;
62 font-size:28rpx; 59 font-size:28rpx;
63 - margin-left:5rpx; 60 + margin-left:10rpx;
64 } 61 }
65 .wineblock{ 62 .wineblock{
66 border-bottom: 1rpx solid #f5f5f5; 63 border-bottom: 1rpx solid #f5f5f5;
@@ -73,3 +70,41 @@ @@ -73,3 +70,41 @@
73 height:32rpx; 70 height:32rpx;
74 font-size: 0 71 font-size: 0
75 } 72 }
  73 +.lj_share{
  74 + width:26rpx;
  75 + height:40rpx;
  76 + border:none;
  77 + position: absolute;
  78 + right:0;
  79 + top:0;
  80 + background: transparent
  81 +
  82 +}
  83 +button::after{
  84 + border:none;
  85 + outline:none;
  86 +}
  87 +
  88 +
  89 +.video_play{
  90 + position: absolute;
  91 + top: 50%;
  92 + left: 50%;
  93 + width: 80rpx;
  94 + height: 80rpx;
  95 + transform: translate(-50%,-50%);
  96 + -webkit-transform: translate(-50%,-50%);
  97 +}
  98 +.vimg{
  99 + width:100rpx;
  100 + height:100rpx;
  101 + font-size: 0;
  102 + position: absolute;
  103 + top:50%;
  104 + left:50%;
  105 + transform: translate(-50%,-50%)
  106 +}
  107 +.vimg image{
  108 + width:100%;
  109 + height:100%
  110 +}
@@ -6,7 +6,13 @@ Page({ @@ -6,7 +6,13 @@ Page({
6 * 页面的初始数据 6 * 页面的初始数据
7 */ 7 */
8 data: { 8 data: {
9 - url:'' 9 + url:'',
  10 + id:'',
  11 + page:1,
  12 + comment_list:[],
  13 + info:'',
  14 + show:false,
  15 + content:''
10 }, 16 },
11 17
12 /** 18 /**
@@ -14,10 +20,158 @@ Page({ @@ -14,10 +20,158 @@ Page({
14 */ 20 */
15 onLoad: function (options) { 21 onLoad: function (options) {
16 this.setData({ 22 this.setData({
17 - url: app.globalData.url 23 + url: app.globalData.url,
  24 + id:options.id
18 }) 25 })
  26 + this.getzhuanjiadetail();
  27 + this.gettype();
  28 + let token=wx.getStorageSync("token")
  29 + if (token == '') {
  30 + wx.navigateTo({
  31 + url: '/pages/login/login?id=' + this.data.id + '&type=' + 1,//type=1发现的首页专家品酒
  32 + })
  33 +
  34 + wx.setStorageSync("url", "/pages/findblock/zhuanjiapinjiudetail/zhuanjiapinjiudetail")
  35 + }
  36 +
19 37
20 }, 38 },
  39 + //获取专家酒品详情
  40 + getzhuanjiadetail(){
  41 + let that = this;
  42 + let url = 'index/Find/expert_detail', params = {
  43 + id:that.data.id,
  44 + page:that.data.page
  45 + }
  46 + app.post(url, params).then((res) => {
  47 + console.log(res);
  48 + that.setData({
  49 + info:res.info,
  50 + comment_list: that.data.comment_list.concat(res.info.comment_list)
  51 + })
  52 +
  53 + console.log(that.data.info)
  54 +
  55 +
  56 +
  57 +
  58 +
  59 + }).catch((err) => {
  60 +
  61 + })
  62 + },
  63 +
  64 + gettype(){
  65 + let that=this;
  66 + wx.getNetworkType({
  67 + success: function (res) {
  68 + console.log(res)
  69 + // 返回网络类型, 有效值:
  70 + // wifi/2g/3g/4g/unknown(Android下不常见的网络类型)/none(无网络)
  71 + var networkType = res.networkType;
  72 + console.log('23874723883924', networkType)
  73 + if (networkType !='wifi'){
  74 + that.setData({
  75 + show:true
  76 + })
  77 + }else{
  78 + that.setData({
  79 + show:false
  80 + })
  81 + }
  82 +
  83 + }
  84 + })
  85 + },
  86 +
  87 +
  88 +
  89 +
  90 +
  91 + //进入视频
  92 + entervideo(e) {
  93 + let url = e.currentTarget.dataset.url;
  94 + wx.navigateTo({
  95 + url: '/pages/homeblock/video/video?url=' + url,
  96 + })
  97 + },
  98 +
  99 + jientervideo(e){
  100 +
  101 + wx.setStorageSync('show', false)
  102 + let url = e.currentTarget.dataset.url;
  103 + wx.navigateTo({
  104 + url: '/pages/homeblock/video/video?url=' + url,
  105 + })
  106 + },
  107 +
  108 + //点赞
  109 + dianzan(e){
  110 + let id=e.currentTarget.dataset.id;
  111 + let that = this;
  112 + let url = 'index/Common/good', params = {
  113 + sort:2,
  114 + id:id
  115 +
  116 + }
  117 + app.post(url, params).then((res) => {
  118 + console.log(res);
  119 + wx.showToast({
  120 + title: res,
  121 + icon:'none'
  122 + })
  123 +
  124 + that.getzhuanjiadetail()
  125 +
  126 +
  127 +
  128 + }).catch((err) => {
  129 +
  130 + })
  131 +
  132 + },
  133 + //写评论内容
  134 + entercontent(e){
  135 + this.setData({
  136 + content:e.detail.value
  137 + })
  138 + },
  139 + send(e){
  140 + let that=this;
  141 + let content=e.detail.value;
  142 + if(content==''){
  143 + wx.showToast({
  144 + title: '请输入评论内容',
  145 + })
  146 + }else{
  147 + let url = 'index/Common/comment', params = {
  148 + sort:2,
  149 + id:that.data.id,
  150 + content:that.data.content
  151 +
  152 + }
  153 + app.post(url, params).then((res) => {
  154 + console.log(res);
  155 + wx.showToast({
  156 + title: res,
  157 + icon:'none'
  158 + })
  159 + that.setData({
  160 + page:1,
  161 + comment_list:[]
  162 +
  163 + })
  164 +
  165 + that.getzhuanjiadetail()
  166 +
  167 +
  168 +
  169 + }).catch((err) => {
  170 +
  171 + })
  172 +
  173 + }
  174 + },
21 175
22 /** 176 /**
23 * 生命周期函数--监听页面初次渲染完成 177 * 生命周期函数--监听页面初次渲染完成
@@ -30,7 +184,14 @@ Page({ @@ -30,7 +184,14 @@ Page({
30 * 生命周期函数--监听页面显示 184 * 生命周期函数--监听页面显示
31 */ 185 */
32 onShow: function () { 186 onShow: function () {
33 - 187 + // let show = wx.getStorageSync("show");
  188 +
  189 + // this.setData({
  190 + // show: show
  191 + // })
  192 +
  193 + // console.log('348783490', this.data.show)
  194 +
34 }, 195 },
35 196
36 /** 197 /**
@@ -58,13 +219,35 @@ Page({ @@ -58,13 +219,35 @@ Page({
58 * 页面上拉触底事件的处理函数 219 * 页面上拉触底事件的处理函数
59 */ 220 */
60 onReachBottom: function () { 221 onReachBottom: function () {
61 - 222 + let page=this.data.page;
  223 + page++;
  224 + this.setData({
  225 + page:page
  226 + })
  227 + this.getzhuanjiadetail()
62 }, 228 },
63 229
64 /** 230 /**
65 * 用户点击右上角分享 231 * 用户点击右上角分享
66 */ 232 */
67 onShareAppMessage: function () { 233 onShareAppMessage: function () {
68 - 234 + let that=this;
  235 + let url = '/pages/findblock/zhuanjiapinjiudetail/zhuanjiapinjiudetail?id=' + that.data.id
  236 +
  237 + return {
  238 + title: '发现', // 转发后 所显示的title
  239 + // path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径
  240 +
  241 + path: url,//建档攻略分享1
  242 + // path:'',
  243 + success: (res) => { // 成功后要做的事情
  244 + console.log(res)
  245 +
  246 + },
  247 + fail: function (res) {
  248 + // 分享失败
  249 + console.log(res)
  250 + }
  251 + }
69 } 252 }
70 }) 253 })
1 -<view class="detailhead"> 1 +<view class="detailhead" wx:if="{{show}}" >
2 <view class="liuliang">播放将消耗7.72MB流量,是否需要在WIFI环境下播放</view> 2 <view class="liuliang">播放将消耗7.72MB流量,是否需要在WIFI环境下播放</view>
3 - <view class="goon">继续播放</view> 3 + <view class="goon" bindtap="jientervideo" data-url="{{info.video}}">继续播放</view>
  4 +</view>
  5 +
  6 +<view class="detailhead" bindtap="entervideo" data-url="{{info.video}}" wx:else>
  7 + <image src="{{info.video_image}}"></image>
  8 + <view class="vimg">
  9 + <image src="{{url}}/aicon_70x.png"></image>
  10 + </view>
4 </view> 11 </view>
5 12
6 <view class="winebottom"> 13 <view class="winebottom">
7 <view class="winebottomleft"> 14 <view class="winebottomleft">
8 <view class="winebottomleftimg"> 15 <view class="winebottomleftimg">
9 - <image src="{{url}}aicon_65x.png"></image> 16 + <image src="{{info.avatar}}"></image>
10 </view> 17 </view>
11 - <view class="wineeng">WinesBook</view> 18 + <view class="wineeng">{{info.name}}</view>
12 </view> 19 </view>
13 <view class="winebottonright"> 20 <view class="winebottonright">
14 21
15 <view class="winerighttou zantou"> 22 <view class="winerighttou zantou">
16 - <view class="winerighttouimg">  
17 - <image src="{{url}}aicon_66x.png"></image> 23 + <view class="winerighttouimg" bindtap="dianzan" data-id="{{info.id}}">
  24 + <image src="{{url}}aicon_47x.png" wx:if="{{info.is_good==0}}"></image>
  25 + <image src="{{url}}aicon_46x.png" wx:else></image>
18 </view> 26 </view>
19 - <view class="winezan">12</view> 27 + <view class="winezan">{{info.good_count}}</view>
20 </view> 28 </view>
21 29
22 30
23 <view class="winerighttou"> 31 <view class="winerighttou">
24 <view class="winerighttouimg"> 32 <view class="winerighttouimg">
25 <image src="{{url}}aicon_68x.png"></image> 33 <image src="{{url}}aicon_68x.png"></image>
  34 + <button class="lj_share" bindtap="buildshare" open-type='share' ></button>
26 </view> 35 </view>
27 36
28 </view> 37 </view>
@@ -32,102 +41,26 @@ @@ -32,102 +41,26 @@
32 41
33 42
34 <view class="commentlist"> 43 <view class="commentlist">
35 - <view class="commentitem">  
36 - <view class="commentleft">  
37 - <image src="{{url}}/aicon_77@2x.png"></image>  
38 - </view>  
39 -  
40 - <view class="commentright">  
41 - <view class="rightname">小叶子</view>  
42 - <view class="rightdate">2019年11月5日</view>  
43 - <view class="righttext">我怎么这么好看</view>  
44 - </view>  
45 - </view>  
46 - <view class="commentitem">  
47 - <view class="commentleft">  
48 - <image src="{{url}}/aicon_77@2x.png"></image>  
49 - </view>  
50 -  
51 - <view class="commentright">  
52 - <view class="rightname">小叶子</view>  
53 - <view class="rightdate">2019年11月5日</view>  
54 - <view class="righttext">我怎么这么好看</view>  
55 - </view>  
56 - </view>  
57 - <view class="commentitem">  
58 - <view class="commentleft">  
59 - <image src="{{url}}/aicon_77@2x.png"></image>  
60 - </view>  
61 -  
62 - <view class="commentright">  
63 - <view class="rightname">小叶子</view>  
64 - <view class="rightdate">2019年11月5日</view>  
65 - <view class="righttext">我怎么这么好看</view>  
66 - </view>  
67 - </view>  
68 - <view class="commentitem">  
69 - <view class="commentleft">  
70 - <image src="{{url}}/aicon_77@2x.png"></image>  
71 - </view>  
72 -  
73 - <view class="commentright">  
74 - <view class="rightname">小叶子</view>  
75 - <view class="rightdate">2019年11月5日</view>  
76 - <view class="righttext">我怎么这么好看</view>  
77 - </view>  
78 - </view>  
79 - <view class="commentitem">  
80 - <view class="commentleft">  
81 - <image src="{{url}}/aicon_77@2x.png"></image>  
82 - </view>  
83 -  
84 - <view class="commentright">  
85 - <view class="rightname">小叶子</view>  
86 - <view class="rightdate">2019年11月5日</view>  
87 - <view class="righttext">我怎么这么好看</view>  
88 - </view>  
89 - </view>  
90 - <view class="commentitem">  
91 - <view class="commentleft">  
92 - <image src="{{url}}/aicon_77@2x.png"></image>  
93 - </view>  
94 -  
95 - <view class="commentright">  
96 - <view class="rightname">小叶子</view>  
97 - <view class="rightdate">2019年11月5日</view>  
98 - <view class="righttext">我怎么这么好看</view>  
99 - </view>  
100 - </view>  
101 - <view class="commentitem">  
102 - <view class="commentleft">  
103 - <image src="{{url}}/aicon_77@2x.png"></image>  
104 - </view>  
105 -  
106 - <view class="commentright">  
107 - <view class="rightname">小叶子</view>  
108 - <view class="rightdate">2019年11月5日</view>  
109 - <view class="righttext">我怎么这么好看</view>  
110 - </view>  
111 - </view>  
112 - <view class="commentitem"> 44 + <view class="commentitem" wx:for="{{comment_list}}" wx:key=''>
113 <view class="commentleft"> 45 <view class="commentleft">
114 - <image src="{{url}}/aicon_77@2x.png"></image> 46 + <image src="{{item.avatar}}"></image>
115 </view> 47 </view>
116 48
117 <view class="commentright"> 49 <view class="commentright">
118 - <view class="rightname">小叶子</view> 50 + <view class="rightname">{{item.user_nickname}}</view>
119 <view class="rightdate">2019年11月5日</view> 51 <view class="rightdate">2019年11月5日</view>
120 - <view class="righttext">我怎么这么好看</view> 52 + <view class="righttext">{{item.content}}</view>
121 </view> 53 </view>
122 </view> 54 </view>
  55 +
123 56
124 57
125 58
126 </view> 59 </view>
127 <view class="pingjiabottom"> 60 <view class="pingjiabottom">
128 <view class="pbleft"> 61 <view class="pbleft">
129 - <input placeholder='输入评论的内容' placeholder-class='enterping' /> 62 + <input placeholder='输入评论的内容' placeholder-class='enterping' bindinput="entercontent"/>
130 </view> 63 </view>
131 64
132 - <view class="pbright">发送</view> 65 + <view class="pbright" bindtap="send">发送</view>
133 </view> 66 </view>
@@ -3,8 +3,22 @@ @@ -3,8 +3,22 @@
3 height: 483rpx; 3 height: 483rpx;
4 background: #000; 4 background: #000;
5 overflow: hidden; 5 overflow: hidden;
  6 + position: relative
6 } 7 }
7 - 8 +.detailhead image{
  9 + width:100%;
  10 + height:100%;
  11 +}
  12 +.vimg{
  13 + width:100rpx;
  14 + height:100rpx;
  15 + font-size: 0;
  16 + position: absolute;
  17 + left:50%;
  18 + top:50%;
  19 + transform: translate(-50%,-50%)
  20 +
  21 + }
8 .liuliang { 22 .liuliang {
9 color: #fff; 23 color: #fff;
10 font-size: 24rpx; 24 font-size: 24rpx;
@@ -37,6 +51,10 @@ @@ -37,6 +51,10 @@
37 width: 60rpx; 51 width: 60rpx;
38 height: 60rpx; 52 height: 60rpx;
39 font-size: 0; 53 font-size: 0;
  54 + border-radius:50%
  55 +}
  56 +.winebottomleftimg image{
  57 + border-radius:50%;
40 } 58 }
41 59
42 .winebottomleft { 60 .winebottomleft {
@@ -55,6 +73,7 @@ @@ -55,6 +73,7 @@
55 width: 30rpx; 73 width: 30rpx;
56 height: 28rpx; 74 height: 28rpx;
57 font-size: 0; 75 font-size: 0;
  76 + position: relative
58 } 77 }
59 78
60 .winerighttou { 79 .winerighttou {
@@ -109,10 +128,15 @@ @@ -109,10 +128,15 @@
109 border-radius: 50%; 128 border-radius: 50%;
110 } 129 }
111 130
  131 +
112 image { 132 image {
113 width: 100%; 133 width: 100%;
114 height: 100%; 134 height: 100%;
115 - border-radius: 50%; 135 +
  136 +}
  137 +
  138 +.commentleft image{
  139 + border-radius: 50%;
116 } 140 }
117 141
118 .commentright { 142 .commentright {
@@ -185,3 +209,19 @@ image { @@ -185,3 +209,19 @@ image {
185 text-align: center; 209 text-align: center;
186 line-height: 60rpx; 210 line-height: 60rpx;
187 } 211 }
  212 +
  213 +
  214 +.lj_share{
  215 + width:25rpx;
  216 + height:40rpx;
  217 + border:none;
  218 + position: absolute;
  219 + right:0;
  220 + top:0;
  221 + background: transparent
  222 +
  223 +}
  224 +button::after{
  225 + border:none;
  226 + outline:none;
  227 +}
  1 +// pages/forgetmima.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 +
  9 + },
  10 +
  11 + /**
  12 + * 生命周期函数--监听页面加载
  13 + */
  14 + onLoad: function (options) {
  15 +
  16 + },
  17 +
  18 + //获取验证码
  19 + getcode() {
  20 + let that = this;
  21 + let currentTime = that.data.currentTime;
  22 + that.setData({
  23 + disable: true
  24 + })
  25 + interval = setInterval(function () {
  26 + currentTime--;
  27 + that.setData({
  28 + time: currentTime + 's后再次发送',
  29 +
  30 + })
  31 + if (currentTime <= 0) {
  32 + clearInterval(interval)
  33 + that.setData({
  34 + time: '重新发送',
  35 + currentTime: 61,
  36 + disable: false
  37 + })
  38 + }
  39 + }, 1000)
  40 +
  41 +
  42 + var url = '/user/Profile/getCode';
  43 + var params = {
  44 + mobile: that.data.phonenum,
  45 +
  46 + }
  47 +
  48 + app.post(url, params).then((res) => {
  49 + console.log(res);
  50 + if (res.code) {
  51 +
  52 + }
  53 +
  54 + }).catch((err) => {
  55 + console.log(err)
  56 + wx.showToast({
  57 + title: err.ResultMsg,
  58 + icon: "none"
  59 + })
  60 + })
  61 + },
  62 +
  63 + /**
  64 + * 生命周期函数--监听页面初次渲染完成
  65 + */
  66 + onReady: function () {
  67 +
  68 + },
  69 +
  70 + /**
  71 + * 生命周期函数--监听页面显示
  72 + */
  73 + onShow: function () {
  74 +
  75 + },
  76 +
  77 + /**
  78 + * 生命周期函数--监听页面隐藏
  79 + */
  80 + onHide: function () {
  81 +
  82 + },
  83 +
  84 + /**
  85 + * 生命周期函数--监听页面卸载
  86 + */
  87 + onUnload: function () {
  88 +
  89 + },
  90 +
  91 + /**
  92 + * 页面相关事件处理函数--监听用户下拉动作
  93 + */
  94 + onPullDownRefresh: function () {
  95 +
  96 + },
  97 +
  98 + /**
  99 + * 页面上拉触底事件的处理函数
  100 + */
  101 + onReachBottom: function () {
  102 +
  103 + },
  104 +
  105 + /**
  106 + * 用户点击右上角分享
  107 + */
  108 + onShareAppMessage: function () {
  109 +
  110 + }
  111 +})
  1 +{
  2 + "usingComponents": {}
  3 +}
  1 +<!--pages/forgetmima.wxml-->
  2 +<text>pages/forgetmima.wxml</text>
  1 +/* pages/forgetmima.wxss */
1 // pages/forgetmima/forgetmima.js 1 // pages/forgetmima/forgetmima.js
  2 +let interval = null;
2 const app=getApp() 3 const app=getApp()
3 Page({ 4 Page({
4 5
@@ -9,7 +10,14 @@ Page({ @@ -9,7 +10,14 @@ Page({
9 first:true, 10 first:true,
10 second:false, 11 second:false,
11 url:'', 12 url:'',
12 - phone:'' 13 + phone:'',
  14 + forgetshow:true,
  15 + currentTime:60,
  16 + time: '60秒后再次发送',
  17 + disabled:false,
  18 + yanzhengcode:'',
  19 + newpassword:'',
  20 + dengshow:false
13 }, 21 },
14 22
15 /** 23 /**
@@ -19,12 +27,172 @@ Page({ @@ -19,12 +27,172 @@ Page({
19 this.setData({ 27 this.setData({
20 url: app.globalData.url 28 url: app.globalData.url
21 }) 29 })
  30 +
  31 +
22 }, 32 },
23 33
24 enterphone(e){ 34 enterphone(e){
25 this.setData({ 35 this.setData({
26 phone:e.detail.value 36 phone:e.detail.value
27 }) 37 })
  38 + this.yanhzengphone()
  39 +
  40 + },
  41 +
  42 + yanhzengphone(){
  43 + let value = this.data.phone
  44 + if (value.length == 11) {
  45 + this.setData({
  46 + forgetshow: false
  47 + })
  48 + }else{
  49 + this.setData({
  50 + forgetshow: true
  51 + })
  52 + }
  53 + },
  54 + clearphone(){
  55 + console.log(342)
  56 + this.setData({
  57 + phone:''
  58 + })
  59 + },
  60 +
  61 + next(){
  62 + let reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
  63 + if(!reg.test(this.data.phone)){
  64 + wx.showToast({
  65 + title: '请输入正确的手机号',
  66 + icon:'none'
  67 + })
  68 + }else{
  69 + this.setData({
  70 + first:false,
  71 + second:true
  72 + })
  73 +
  74 + this.getcode()
  75 + }
  76 +
  77 + },
  78 +
  79 +
  80 + //获取验证码
  81 + getcode() {
  82 + let that = this;
  83 + let currentTime = that.data.currentTime;
  84 +
  85 + that.setData({
  86 + disabled: true
  87 + })
  88 + interval = setInterval(function () {
  89 + currentTime--;
  90 + that.setData({
  91 + time: currentTime + 's后再次发送',
  92 +
  93 + })
  94 +
  95 +
  96 + if (currentTime <= 0) {
  97 + clearInterval(interval)
  98 + that.setData({
  99 + time: '60秒后再次发送',
  100 + currentTime: 60,
  101 + disabled: false
  102 + })
  103 + }
  104 + }, 1000)
  105 +
  106 +
  107 + var url = '/user/Profile/getCode';
  108 + var params = {
  109 + mobile: that.data.phone,
  110 +
  111 + }
  112 +
  113 + app.post(url, params).then((res) => {
  114 + console.log(res);
  115 + if (res.code) {
  116 +
  117 + }
  118 +
  119 + }).catch((err) => {
  120 + console.log(err)
  121 + wx.showToast({
  122 + title: err.ResultMsg,
  123 + icon: "none"
  124 + })
  125 + })
  126 + },
  127 +
  128 + chongxin(){
  129 + console.log(34378478)
  130 + this.getcode();
  131 + },
  132 +
  133 + yanzheng(){
  134 + if (this.data.yanzhengcode.length > 0 && this.data.newpassword.length>0){
  135 + this.setData({
  136 + dengshow:true
  137 + })
  138 + }else{
  139 + this.setData({
  140 + dengshow:false
  141 + })
  142 + }
  143 + },
  144 +
  145 + shuruyanzheng(e){
  146 + this.setData({
  147 + yanzhengcode:e.detail.value
  148 + })
  149 + this.yanzheng()
  150 + },
  151 +
  152 + setnewmima(e){
  153 + this.setData({
  154 + newpassword:e.detail.value
  155 + })
  156 + this.yanzheng()
  157 + },
  158 +
  159 + //登陆
  160 + denglu(){
  161 + console.log(47832342789);
  162 + let that = this;
  163 + console.log(that.data.newpassword.length)
  164 + if (that.data.newpassword.length < 6 || that.data.newpassword.length>20){
  165 + wx.showToast({
  166 + title: '请输入6-20位的密码',
  167 + icon:'none'
  168 + })
  169 + }else{
  170 + let url = 'user/Profile/reset_password', params = {
  171 + mobile: that.data.phone,
  172 + verification_code: that.data.yanzhengcode,
  173 + password: that.data.newpassword
  174 +
  175 + }
  176 + app.post(url, params).then((res) => {
  177 + console.log(res);
  178 + // wx.switchTab({
  179 + // url: '/pages/homapage/homepage',
  180 + // })
  181 + wx.navigateTo({
  182 + url: '/pages/login/login',
  183 + })
  184 +
  185 +
  186 +
  187 + }).catch((err) => {
  188 + wx.showToast({
  189 + title: err.data.msg,
  190 + icon: "none"
  191 + })
  192 + })
  193 + }
  194 +
  195 +
28 }, 196 },
29 197
30 /** 198 /**
@@ -9,16 +9,17 @@ @@ -9,16 +9,17 @@
9 9
10 <view class="yanzhengmiddle"> 10 <view class="yanzhengmiddle">
11 11
12 - <input placeholder='请输入手机号' placeholder-class='enterphone' bindinput="enterphone" type="number"/> 12 + <input placeholder='请输入手机号' placeholder-class='enterphone' bindinput="enterphone" type="number" value="{{phone}}"/>
13 </view> 13 </view>
14 - <view class="chaimg"> 14 + <view class="chaimg" bindtap="clearphone">
15 <image src="{{url}}/aicon_07x.png"></image> 15 <image src="{{url}}/aicon_07x.png"></image>
16 </view> 16 </view>
17 </view> 17 </view>
18 18
19 <view class="safe">为了安全,我们会向您的手机发送验证码</view> 19 <view class="safe">为了安全,我们会向您的手机发送验证码</view>
20 20
21 - <view class="login">下一步</view> 21 + <view class="login" wx:if="{{forgetshow}}">下一步</view>
  22 + <view class="login nextlogin" bindtap="next" wx:else>下一步</view>
22 23
23 24
24 </view> 25 </view>
@@ -30,16 +31,17 @@ @@ -30,16 +31,17 @@
30 31
31 <view class="yanzhengmiddle"> 32 <view class="yanzhengmiddle">
32 33
33 - <input placeholder='请输入验证码' placeholder-class='enterphone' /> 34 + <input placeholder='请输入验证码' placeholder-class='enterphone' value="{{yanzhengcode}}" bindinput="shuruyanzheng"/>
34 </view> 35 </view>
35 36
36 - <view class="fasong">重新发送52</view> 37 + <view class="fasong" wx:if="{{disabled==true}}">{{time}}</view>
  38 + <view class="fasong" wx:else bindtap="chongxin">重新发送</view>
37 39
38 </view> 40 </view>
39 <view class="yanzheng mima"> 41 <view class="yanzheng mima">
40 <view class="yanzhengmiddle yanzhengma"> 42 <view class="yanzhengmiddle yanzhengma">
41 43
42 - <input placeholder='设置新密码' placeholder-class='enterphone' /> 44 + <input placeholder='设置新密码' placeholder-class='enterphone' bindinput="setnewmima" type="password" value="{{newpassword}}"/>
43 </view> 45 </view>
44 <view class="mimaimg"> 46 <view class="mimaimg">
45 47
@@ -54,6 +56,8 @@ @@ -54,6 +56,8 @@
54 56
55 57
56 58
57 - <view class="login">登录</view> 59 + <view class="login" wx:if="{{dengshow==false}}">登录</view>
  60 +
  61 + <view class="login newlogin" wx:else bindtap="denglu">登录</view>
58 62
59 </view> 63 </view>
@@ -53,7 +53,7 @@ page { @@ -53,7 +53,7 @@ page {
53 53
54 .yanzhengmiddle { 54 .yanzhengmiddle {
55 55
56 - width: 285rpx; 56 + width: 257rpx;
57 color: #999; 57 color: #999;
58 font-size: 30rpx; 58 font-size: 30rpx;
59 border-right:1rpx solid #f5f5f5; 59 border-right:1rpx solid #f5f5f5;
@@ -99,6 +99,12 @@ page { @@ -99,6 +99,12 @@ page {
99 font-size: 30rpx; 99 font-size: 30rpx;
100 margin: 74rpx auto 0; 100 margin: 74rpx auto 0;
101 } 101 }
  102 +.newlogin{
  103 + background: #E81825
  104 +}
  105 +.nextlogin{
  106 + background: #E81825
  107 +}
102 108
103 .firlogin { 109 .firlogin {
104 color: #999; 110 color: #999;
@@ -124,7 +130,9 @@ page { @@ -124,7 +130,9 @@ page {
124 align-items: center 130 align-items: center
125 } 131 }
126 .yanzhengma { 132 .yanzhengma {
  133 + width:395rpx;
127 margin-left: 0; 134 margin-left: 0;
  135 + border-right:none;
128 } 136 }
129 .eyeimg{ 137 .eyeimg{
130 width:34rpx; 138 width:34rpx;
@@ -180,8 +180,15 @@ Page({ @@ -180,8 +180,15 @@ Page({
180 }) 180 })
181 console.log(this.data.url) 181 console.log(this.data.url)
182 this.getshailist(); 182 this.getshailist();
183 - this.gethomeindex();  
184 - this.getcity() 183 +
  184 + this.getcity();
  185 + let token=wx.getStorageSync("token");
  186 + console.log(token);
  187 + if(token==''){
  188 + wx.navigateTo({
  189 + url: '/pages/login/login',
  190 + })
  191 + }
185 }, 192 },
186 193
187 //进入搜索页 194 //进入搜索页
@@ -199,6 +206,34 @@ Page({ @@ -199,6 +206,34 @@ Page({
199 }) 206 })
200 }, 207 },
201 208
  209 + //扫码
  210 + saoma(){
  211 + let that = this;
  212 + wx.scanCode({
  213 + success(res) {
  214 + console.log(res)
  215 + let number = res.result;
  216 + console.log(number)
  217 +
  218 + let url = 'index/Index/scan', params = {
  219 + number: number
  220 +
  221 + }
  222 + app.post(url, params).then((res) => {
  223 + console.log(res);
  224 +
  225 + wx.navigateTo({
  226 + url: '/pages/homeblock/jiuzidian/jiuzidian?id=' + res.info.id,
  227 + })
  228 +
  229 + }).catch((err) => {
  230 +
  231 + })
  232 + }
  233 + })
  234 +
  235 + },
  236 +
202 237
203 //获取用户当前位置 238 //获取用户当前位置
204 getcity() { 239 getcity() {
@@ -210,12 +245,7 @@ Page({ @@ -210,12 +245,7 @@ Page({
210 var latitude = res.latitude 245 var latitude = res.latitude
211 var longitude = res.longitude 246 var longitude = res.longitude
212 247
213 - // that.setData({  
214 - // wd: latitude,  
215 - // jd: longitude  
216 - // })  
217 -  
218 - // that.gethostipallist() 248 +
219 var aK = that.data.aK 249 var aK = that.data.aK
220 wx.request({ 250 wx.request({
221 url: 'https://api.map.baidu.com/geocoder/v2/?ak=y8jPDTMIuAnaVscUztce1RKfNx8v5sok&location=' + latitude + ',' + longitude + '&output=json', 251 url: 'https://api.map.baidu.com/geocoder/v2/?ak=y8jPDTMIuAnaVscUztce1RKfNx8v5sok&location=' + latitude + ',' + longitude + '&output=json',
@@ -226,23 +256,15 @@ Page({ @@ -226,23 +256,15 @@ Page({
226 success: function (res) { 256 success: function (res) {
227 console.log('1234567890', res) 257 console.log('1234567890', res)
228 var province = res.data.result.addressComponent.province; 258 var province = res.data.result.addressComponent.province;
229 - let district = res.data.result.addressComponent.district 259 + let district = res.data.result.addressComponent.district
230 that.setData({ 260 that.setData({
231 currentCity: province 261 currentCity: province
232 }) 262 })
233 wx.setStorageSync('city', province) 263 wx.setStorageSync('city', province)
234 - wx.request({  
235 - // url: 'xxx' + city,  
236 - // data: {},  
237 - // header: {  
238 - // 'content-type': 'application/json'  
239 - // },  
240 - // success: function (res) {  
241 - // that.setData({  
242 - // county: res.data,  
243 - // })  
244 - // },  
245 - }) 264 + wx.setStorageSync('cityname', '')
  265 + // wx.request({
  266 +
  267 + // })
246 } 268 }
247 }) 269 })
248 270
@@ -496,7 +518,7 @@ Page({ @@ -496,7 +518,7 @@ Page({
496 //筛选首页内容 518 //筛选首页内容
497 gethomeindex() { 519 gethomeindex() {
498 let that = this; 520 let that = this;
499 - var url = "/index/Index/index" 521 + var url = "index/Index/index"
500 var params = { 522 var params = {
501 sort_id: that.data.sort_id, 523 sort_id: that.data.sort_id,
502 country: that.data.country, 524 country: that.data.country,
@@ -679,6 +701,8 @@ Page({ @@ -679,6 +701,8 @@ Page({
679 currentCity: city 701 currentCity: city
680 }) 702 })
681 } 703 }
  704 +
  705 + this.gethomeindex();
682 // this.getshailist() 706 // this.getshailist()
683 }, 707 },
684 708
@@ -714,6 +738,9 @@ Page({ @@ -714,6 +738,9 @@ Page({
714 * 用户点击右上角分享 738 * 用户点击右上角分享
715 */ 739 */
716 onShareAppMessage: function() { 740 onShareAppMessage: function() {
717 - 741 +
  742 +
718 } 743 }
  744 +
  745 +
719 }) 746 })
@@ -81,7 +81,7 @@ @@ -81,7 +81,7 @@
81 <input placeholder='已收录298653款酒品' placeholder-class='seachenter' value="{{record}}" /> 81 <input placeholder='已收录298653款酒品' placeholder-class='seachenter' value="{{record}}" />
82 </view> 82 </view>
83 83
84 - <view class="saoma"> 84 + <view class="saoma" catchtap="saoma">
85 <image src="{{url}}bicon_04@2x.png"></image> 85 <image src="{{url}}bicon_04@2x.png"></image>
86 </view> 86 </view>
87 </view> 87 </view>
@@ -135,7 +135,7 @@ @@ -135,7 +135,7 @@
135 <view class='new_city_text' wx:for='{{newcity}}' wx:key='this' data-types='new' catchtap='cityTap' data-val='{{item}}'> 135 <view class='new_city_text' wx:for='{{newcity}}' wx:key='this' data-types='new' catchtap='cityTap' data-val='{{item}}'>
136 <view class="hotgood" bindtap="jumpbrand" data-id="{{item.id}}"> 136 <view class="hotgood" bindtap="jumpbrand" data-id="{{item.id}}">
137 <view class="imgleft"> 137 <view class="imgleft">
138 - <image src="{{item.logo}}" mode='widthFix'></image> 138 + <image src="{{item.logo}}" mode='aspectFit'></image>
139 </view> 139 </view>
140 <view class="contentright"> 140 <view class="contentright">
141 <view class="contenttop">{{item.name}}</view> 141 <view class="contenttop">{{item.name}}</view>
@@ -156,13 +156,13 @@ @@ -156,13 +156,13 @@
156 156
157 157
158 <view class='city_list_box'> 158 <view class='city_list_box'>
159 - <block wx:for='{{citylist}}' wx:key='this' wx:for-item='letterItem' wx:for-index='letterIndex'> 159 + <block wx:for='{{citylist}}' wx:key='this' wx:for-item='letterItem' wx:for-index='letterIndex' >
160 <view class='city_first_letter' id='{{letterItem.name}}'>{{letterItem.name}}</view> 160 <view class='city_first_letter' id='{{letterItem.name}}'>{{letterItem.name}}</view>
161 <!-- {{item.cityName}} --> 161 <!-- {{item.cityName}} -->
162 - <view class='city_name' wx:for='{{letterItem.list}}' id='{{letterItem.name}}' wx:key='this' data-types='list' catchtap='cityTap' data-index='{{index}}' data-val='{{item}}'> 162 + <view class='city_name' wx:for='{{letterItem.list}}' id='{{letterItem.name}}' wx:key='this' data-types='list' bindtap="jumpbrand" data-id="{{item.id}}" data-index='{{index}}' data-val='{{item}}'>
163 163
164 <view class="imgleft"> 164 <view class="imgleft">
165 - <image src="{{item.logo}}"></image> 165 + <image src="{{item.logo}}" mode="aspectFit"></image>
166 </view> 166 </view>
167 <view class="contentright"> 167 <view class="contentright">
168 <view class="contenttop">{{item.name}}</view> 168 <view class="contenttop">{{item.name}}</view>
@@ -186,7 +186,8 @@ page{ @@ -186,7 +186,8 @@ page{
186 left:0; 186 left:0;
187 /* transform: translate(-50%,-50%); */ 187 /* transform: translate(-50%,-50%); */
188 display:flex; 188 display:flex;
189 - flex-wrap: wrap 189 + flex-wrap: wrap;
  190 + padding-bottom:15rpx;
190 191
191 } 192 }
192 .selcounitem{ 193 .selcounitem{
@@ -202,7 +203,9 @@ page{ @@ -202,7 +203,9 @@ page{
202 padding: 21rpx; 203 padding: 21rpx;
203 box-sizing: border-box; 204 box-sizing: border-box;
204 margin-left:20rpx; 205 margin-left:20rpx;
205 - line-height: 1 206 + line-height: 1;
  207 + border:1rpx solid #f5f5f5;
  208 + margin-top:15rpx;
206 209
207 } 210 }
208 .imgleft{ 211 .imgleft{
@@ -323,7 +326,8 @@ page{ @@ -323,7 +326,8 @@ page{
323 border-right:none; 326 border-right:none;
324 } 327 }
325 .selact{ 328 .selact{
326 - color:#E81825 329 + background:#E81825;
  330 + color:#fff;
327 } 331 }
328 332
329 .countryitem{ 333 .countryitem{
@@ -336,7 +340,6 @@ page{ @@ -336,7 +340,6 @@ page{
336 height:40rpx; 340 height:40rpx;
337 font-size: 0 341 font-size: 0
338 } 342 }
339 -  
340 .nodata{ 343 .nodata{
341 color:#999; 344 color:#999;
342 font-size:30rpx; 345 font-size:30rpx;
  1 +// pages/homeblock/bofangexample/bofangexample.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + url:''
  9 + },
  10 +
  11 + /**
  12 + * 生命周期函数--监听页面加载
  13 + */
  14 + onLoad: function (options) {
  15 + console.log(options)
  16 + let url=wx.getStorageSync("quanurl")
  17 + this.setData({
  18 + url: url
  19 + })
  20 + },
  21 +
  22 + /**
  23 + * 生命周期函数--监听页面初次渲染完成
  24 + */
  25 + onReady: function () {
  26 +
  27 + },
  28 +
  29 + /**
  30 + * 生命周期函数--监听页面显示
  31 + */
  32 + onShow: function () {
  33 +
  34 + },
  35 +
  36 + /**
  37 + * 生命周期函数--监听页面隐藏
  38 + */
  39 + onHide: function () {
  40 +
  41 + },
  42 +
  43 + /**
  44 + * 生命周期函数--监听页面卸载
  45 + */
  46 + onUnload: function () {
  47 +
  48 + },
  49 +
  50 + /**
  51 + * 页面相关事件处理函数--监听用户下拉动作
  52 + */
  53 + onPullDownRefresh: function () {
  54 +
  55 + },
  56 +
  57 + /**
  58 + * 页面上拉触底事件的处理函数
  59 + */
  60 + onReachBottom: function () {
  61 +
  62 + },
  63 +
  64 + /**
  65 + * 用户点击右上角分享
  66 + */
  67 + onShareAppMessage: function () {
  68 +
  69 + }
  70 +})
  1 +{
  2 + "navigationBarTitleText": ""
  3 +}
  1 +<view class="page-section page-section-gap">
  2 + <web-view src="{{url}}"></web-view>
  3 +</view>
  1 +/* pages/homeblock/bofangexample/bofangexample.wxss */
@@ -50,22 +50,4 @@ @@ -50,22 +50,4 @@
50 </block> 50 </block>
51 </view> 51 </view>
52 </view> 52 </view>
53 -  
54 - <!-- <view class="brandboxitem">  
55 - <view class="boxtop">  
56 - <view class="boxtopleft">  
57 - 品牌文化  
58 - </view>  
59 - <view class="boxright">  
60 - <image src="{{url}}aicon_24x.png"></image>  
61 - </view>  
62 - </view>  
63 -  
64 -  
65 - <view class="brandimg">  
66 - <image src="{{url}}aicon_23@2x.png"></image>  
67 - </view>  
68 -  
69 - </view> -->  
70 -  
71 </view> 53 </view>
@@ -98,6 +98,7 @@ image{ @@ -98,6 +98,7 @@ image{
98 color:#1A1A1A; 98 color:#1A1A1A;
99 font-size: 26rpx; 99 font-size: 26rpx;
100 margin-top:28rpx; 100 margin-top:28rpx;
  101 + padding: 0 30rpx;
101 } 102 }
102 .brandimg{ 103 .brandimg{
103 width:686rpx; 104 width:686rpx;
@@ -9,7 +9,9 @@ Page({ @@ -9,7 +9,9 @@ Page({
9 url: '', 9 url: '',
10 id: "", 10 id: "",
11 picture:[], 11 picture:[],
12 - banner:[] 12 + banner:[],
  13 + arrbanner: [],
  14 + arrpicture: []
13 }, 15 },
14 16
15 /** 17 /**
@@ -37,6 +39,23 @@ Page({ @@ -37,6 +39,23 @@ Page({
37 banner:res.banner, 39 banner:res.banner,
38 picture: res.picture 40 picture: res.picture
39 }) 41 })
  42 + let bannerarr=[];
  43 + let picturearr=[]
  44 +
  45 + let newbanner=that.data.banner;
  46 + let newpicture = that.data.picture
  47 + for(var obj of newbanner){
  48 + bannerarr.push(obj.url)
  49 + }
  50 +
  51 + for (var obj of newpicture){
  52 + picturearr.push(obj.url)
  53 + }
  54 +
  55 + that.setData({
  56 + arrbanner: bannerarr,
  57 + arrpicture: picturearr
  58 + })
40 59
41 60
42 61
@@ -44,6 +63,35 @@ Page({ @@ -44,6 +63,35 @@ Page({
44 63
45 }) 64 })
46 }, 65 },
  66 +
  67 + //图片预览标准图
  68 + viewImg(e) {
  69 + let that = this;
  70 + let index = e.currentTarget.dataset.index;
  71 +
  72 + wx.previewImage({
  73 + current: that.data.banner[index].url,
  74 + urls: that.data.arrbanner,
  75 + success: function (res) { },
  76 + fail: function (res) { },
  77 + complete: function (res) { },
  78 + })
  79 + },
  80 +
  81 +//图片预览写真图
  82 + viewImg1(e) {
  83 + let that = this;
  84 + let index = e.currentTarget.dataset.index;
  85 +
  86 +
  87 + wx.previewImage({
  88 + current: that.data.picture[index].url,
  89 + urls: that.data.arrpicture,
  90 + success: function (res) { },
  91 + fail: function (res) { },
  92 + complete: function (res) { },
  93 + })
  94 + },
47 /** 95 /**
48 * 生命周期函数--监听页面初次渲染完成 96 * 生命周期函数--监听页面初次渲染完成
49 */ 97 */
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 3
4 </view> 4 </view>
5 <view class="biaozhaunbox"> 5 <view class="biaozhaunbox">
6 - <view class="biaozhuanitem" wx:for="{{banner}}" wx:key=""> 6 + <view class="biaozhuanitem" wx:for="{{banner}}" wx:key="" bindtap='viewImg' data-index="{{index}}">
7 <image src="{{item.url}}"></image> 7 <image src="{{item.url}}"></image>
8 </view> 8 </view>
9 9
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 16
17 </view> 17 </view>
18 <view class="biaozhaunbox"> 18 <view class="biaozhaunbox">
19 - <view class="biaozhuanitem" wx:for="{{picture}}" wx:key=''> 19 + <view class="biaozhuanitem" wx:for="{{picture}}" wx:key='' bindtap='viewImg1' data-index="{{index}}">
20 <image src="{{item.url}}"></image> 20 <image src="{{item.url}}"></image>
21 </view> 21 </view>
22 22
@@ -25,7 +25,10 @@ Page({ @@ -25,7 +25,10 @@ Page({
25 jiushishow:true, 25 jiushishow:true,
26 othercontent:[], 26 othercontent:[],
27 qiyearr:[], 27 qiyearr:[],
28 - score:'' 28 + score:'',
  29 + panorama:[],
  30 + imglogo:'',
  31 + videoimg:''
29 32
30 }, 33 },
31 34
@@ -33,6 +36,7 @@ Page({ @@ -33,6 +36,7 @@ Page({
33 * 生命周期函数--监听页面加载 36 * 生命周期函数--监听页面加载
34 */ 37 */
35 onLoad: function (options) { 38 onLoad: function (options) {
  39 + console.log(options)
36 this.setData({ 40 this.setData({
37 url: app.globalData.url, 41 url: app.globalData.url,
38 id:options.id, 42 id:options.id,
@@ -40,7 +44,15 @@ Page({ @@ -40,7 +44,15 @@ Page({
40 }) 44 })
41 45
42 46
43 - this.getwinedetail() 47 + this.getwinedetail();
  48 + let token=wx.getStorageSync("token");
  49 + if(token==''){
  50 + wx.navigateTo({
  51 + url: '/pages/login/login?id=' + this.data.id+'&type=' +2,//type=2酒字典详情页
  52 + })
  53 +
  54 + wx.setStorageSync("url", "/pages/homeblock/jiuzidian/jiuzidian")
  55 + }
44 }, 56 },
45 //获取酒品详情 57 //获取酒品详情
46 getwinedetail(){ 58 getwinedetail(){
@@ -54,10 +66,15 @@ Page({ @@ -54,10 +66,15 @@ Page({
54 that.setData({ 66 that.setData({
55 wineinfo:res, 67 wineinfo:res,
56 navarr: res.wine_attr, 68 navarr: res.wine_attr,
57 - score: res.score*10 69 + score: res.score*10,
  70 + panorama: res.panorama,
  71 + imglogo: res.panorama[0].product_thumbnail,
  72 + videoimg: res.panorama[0].product_url,
58 }) 73 })
59 74
60 - console.log(that.data.score) 75 + wx.setStorageSync("quanurl", res.panorama[0].product_url)
  76 +
  77 +
61 78
62 let newnavarr = that.data.navarr; 79 let newnavarr = that.data.navarr;
63 for (var obj of newnavarr){ 80 for (var obj of newnavarr){
@@ -223,6 +240,36 @@ Page({ @@ -223,6 +240,36 @@ Page({
223 this.setData({ 240 this.setData({
224 kind:e.currentTarget.dataset.kind 241 kind:e.currentTarget.dataset.kind
225 }) 242 })
  243 + let kind = e.currentTarget.dataset.kind;
  244 + if(kind==0){
  245 + this.setData({
  246 + imglogo: this.data.panorama[0].product_thumbnail,
  247 + videoimg: this.data.panorama[0].product_url
  248 + })
  249 +
  250 + wx.setStorageSync("quanurl", this.data.panorama[0].product_url)
  251 + }else if(kind==1){
  252 + this.setData({
  253 + imglogo: this.data.panorama[1].product_thumbnail,
  254 + videoimg: this.data.panorama[1].product_url
  255 + })
  256 + wx.setStorageSync("quanurl", this.data.panorama[1].product_url)
  257 + }else {
  258 + this.setData({
  259 + imglogo: this.data.panorama[2].product_thumbnail,
  260 + videoimg: this.data.panorama[2].product_url
  261 + })
  262 +
  263 + wx.setStorageSync("quanurl", this.data.panorama[2].product_url)
  264 + }
  265 + },
  266 + entervideo(e){
  267 + console.log(e)
  268 + let url=e.currentTarget.dataset.url;
  269 + wx.setStorageSync('quanurl', url)
  270 + wx.navigateTo({
  271 + url: '/pages/homeblock/bofangexample/bofangexample',
  272 + })
226 }, 273 },
227 select(e) { 274 select(e) {
228 console.log(e) 275 console.log(e)
@@ -250,6 +297,10 @@ Page({ @@ -250,6 +297,10 @@ Page({
250 wx.navigateTo({ 297 wx.navigateTo({
251 url: '/pages/homeblock/shortvideo/shortvideo?wineid='+this.data.id, 298 url: '/pages/homeblock/shortvideo/shortvideo?wineid='+this.data.id,
252 }) 299 })
  300 + }else if(pic==0){
  301 + wx.navigateTo({
  302 + url: '/pages/homeblock/bofangexample/bofangexample',
  303 + })
253 } 304 }
254 305
255 306
@@ -357,6 +408,23 @@ Page({ @@ -357,6 +408,23 @@ Page({
357 * 用户点击右上角分享 408 * 用户点击右上角分享
358 */ 409 */
359 onShareAppMessage: function () { 410 onShareAppMessage: function () {
  411 + let that = this;
  412 +
  413 + let url = '/pages/homeblock/jiuzidian/jiuzidian?id=' + that.data.id
  414 + return {
  415 + title: '发现', // 转发后 所显示的title
  416 + // path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径
  417 +
  418 + path: url,//建档攻略分享1
  419 + // path:'',
  420 + success: (res) => { // 成功后要做的事情
  421 + console.log(res)
360 422
  423 + },
  424 + fail: function (res) {
  425 + // 分享失败
  426 + console.log(res)
  427 + }
  428 + }
361 } 429 }
362 }) 430 })
1 <import src="../../../wxParse/wxParse.wxml" /> 1 <import src="../../../wxParse/wxParse.wxml" />
2 <!-- 展示图 --> 2 <!-- 展示图 -->
3 <view class="showpic"> 3 <view class="showpic">
4 - <image src="{{wineinfo.logo}}"></image> 4 + <image src="{{imglogo}}" mode="aspectFit" data-url="{{videoimg}}" bindtap="entervideo"></image>
  5 + <!-- <view class="heig">
  6 + <view class="page-section page-section-gap">
  7 + <web-view src="https://www.othkin.com/3DExp/ShowH5.html?eleblacklist=MoreButton&gyro=1&id=65f0221f710c8ffca254e93ce7e37741"></web-view>
  8 +</view>
  9 + </view> -->
  10 +
5 11
6 <view class="kindlist"> 12 <view class="kindlist">
7 <view class="kinditem {{kind==0?'kindactive':''}}" data-kind='0' bindtap="selectkind">瓶</view> 13 <view class="kinditem {{kind==0?'kindactive':''}}" data-kind='0' bindtap="selectkind">瓶</view>
@@ -53,7 +53,8 @@ page{ @@ -53,7 +53,8 @@ page{
53 width:750rpx; 53 width:750rpx;
54 height:560rpx; 54 height:560rpx;
55 font-size: 0; 55 font-size: 0;
56 - position: relative 56 + position: relative;
  57 + background: #fff;
57 } 58 }
58 .kindlist{ 59 .kindlist{
59 width:198rpx; 60 width:198rpx;
@@ -167,4 +168,13 @@ page{ @@ -167,4 +168,13 @@ page{
167 bottom:81rpx; 168 bottom:81rpx;
168 right:56rpx; 169 right:56rpx;
169 170
  171 +}
  172 +.page-section{
  173 + height:100rpx;
  174 +}
  175 +.section web-view {
  176 + height:100rpx;
  177 +}
  178 +.heig{
  179 + height:100rpx;
170 } 180 }
1 // pages/homeblock/niangjiuteacher/niangjiuteacher.js 1 // pages/homeblock/niangjiuteacher/niangjiuteacher.js
  2 +var WxParse = require('../../../wxParse/wxParse.js');
2 const app=getApp() 3 const app=getApp()
3 Page({ 4 Page({
4 5
@@ -6,7 +7,9 @@ Page({ @@ -6,7 +7,9 @@ Page({
6 * 页面的初始数据 7 * 页面的初始数据
7 */ 8 */
8 data: { 9 data: {
9 - url:'' 10 + url:'',
  11 + id:'',
  12 + page:1
10 }, 13 },
11 14
12 /** 15 /**
@@ -14,10 +17,157 @@ Page({ @@ -14,10 +17,157 @@ Page({
14 */ 17 */
15 onLoad: function (options) { 18 onLoad: function (options) {
16 this.setData({ 19 this.setData({
17 - url: app.globalData.url 20 + url: app.globalData.url,
  21 + id:options.id
18 }) 22 })
  23 + let token=wx.getStorageSync("token");
  24 + if(token==''){
  25 + wx.navigateTo({
  26 + url: '/pages/login/login?id=' + this.data.id + '&type=' + 1,//type=1发现的首页酿酒师
  27 + })
  28 +
  29 + wx.setStorageSync("url", "/pages/homeblock/niangjiuteacher/niangjiuteacher")
  30 + }
  31 +
19 }, 32 },
  33 + //获取酿酒师
  34 + getniangjiu(){
  35 + let that = this;
  36 + let url = 'index/Winemaker/detail', params = {
  37 + id:that.data.id,
  38 +
20 39
  40 + }
  41 + app.post(url, params).then((res) => {
  42 + console.log(res);
  43 + that.setData({
  44 + info:res,
  45 + attr:res.attr
  46 + })
  47 +
  48 +
  49 +
  50 + let newattr = res.attr;
  51 + for (let i = 0; i < newattr.length; i++) {
  52 + newattr[i].show = true
  53 +
  54 + WxParse.wxParse('content' + i, 'html', newattr[i]['content'], that, 5);
  55 +
  56 + if (i === newattr.length - 1) {
  57 +
  58 + WxParse.wxParseTemArray("artileList", 'content', newattr.length, that)
  59 + }
  60 + }
  61 +
  62 + that.setData({
  63 + attr: newattr
  64 + })
  65 +
  66 +
  67 +
  68 + }).catch((err) => {
  69 +
  70 + })
  71 + },
  72 + showinfo(e) {
  73 + let idx = e.currentTarget.dataset.idx;
  74 + console.log(idx)
  75 + let newattr = this.data.attr;
  76 + for (var i = 0; i < newattr.length; i++) {
  77 + if (i == idx) {
  78 + newattr[i].show = !newattr[i].show
  79 + }
  80 + }
  81 + this.setData({
  82 + attr: newattr
  83 + })
  84 + },
  85 + //关注和取消关注
  86 + attention(e){
  87 + let that = this;
  88 + let id=e.currentTarget.dataset.id;
  89 +
  90 +
  91 + let url = 'index/Common/concern', params = {
  92 + sort:2,
  93 + id:id
  94 +
  95 + }
  96 + app.post(url, params).then((res) => {
  97 + console.log(res);
  98 + wx.showToast({
  99 + title: res,
  100 + icon:'none'
  101 + })
  102 +
  103 + let newinfo=that.data.info;
  104 + if (newinfo.is_concern==0){
  105 + newinfo.is_concern=1
  106 + }else{
  107 + newinfo.is_concern = 0
  108 + }
  109 +
  110 +
  111 + that.setData({
  112 + info:newinfo
  113 + })
  114 +
  115 +
  116 + }).catch((err) => {
  117 +
  118 + })
  119 + },
  120 +
  121 + //点赞
  122 + zan(e){
  123 + let that = this;
  124 + let id=e.currentTarget.dataset.id;
  125 +
  126 + let url = 'index/Common/good', params = {
  127 + sort:3,
  128 + id:id
  129 +
  130 + }
  131 + app.post(url, params).then((res) => {
  132 + console.log(res);
  133 + wx.showToast({
  134 + title: res,
  135 + icon:"none"
  136 + })
  137 +
  138 + let newinfo = that.data.info;
  139 + console.log(newinfo)
  140 + if (newinfo.is_good == 0) {
  141 + newinfo.is_good = 1;
  142 + newinfo.good_count = newinfo.good_count+1
  143 + } else {
  144 + newinfo.is_good = 0;
  145 + if (newinfo.good_count==0){
  146 + newinfo.good_count=0
  147 + }else{
  148 + newinfo.good_count = newinfo.good_count-1
  149 + }
  150 + }
  151 +
  152 +
  153 + that.setData({
  154 + info: newinfo
  155 + })
  156 +
  157 + console.log(that.data.info)
  158 +
  159 +
  160 + }).catch((err) => {
  161 +
  162 + })
  163 + },
  164 + //评论
  165 + ping(e){
  166 + let id=e.currentTarget.dataset.id;
  167 + wx.navigateTo({
  168 + url: '/pages/myblock/pingjia/pingjia?winemaker_id='+id+'&type='+3,
  169 + })
  170 + },
21 /** 171 /**
22 * 生命周期函数--监听页面初次渲染完成 172 * 生命周期函数--监听页面初次渲染完成
23 */ 173 */
@@ -29,7 +179,7 @@ Page({ @@ -29,7 +179,7 @@ Page({
29 * 生命周期函数--监听页面显示 179 * 生命周期函数--监听页面显示
30 */ 180 */
31 onShow: function () { 181 onShow: function () {
32 - 182 + this.getniangjiu()
33 }, 183 },
34 184
35 /** 185 /**
@@ -64,6 +214,23 @@ Page({ @@ -64,6 +214,23 @@ Page({
64 * 用户点击右上角分享 214 * 用户点击右上角分享
65 */ 215 */
66 onShareAppMessage: function () { 216 onShareAppMessage: function () {
67 - 217 + let that = this;
  218 +
  219 + let url = '/pages/homeblock/niangjiuteacher/niangjiuteacher?id='+ that.data.id
  220 + return {
  221 + title: '发现', // 转发后 所显示的title
  222 + // path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径
  223 +
  224 + path: url,//建档攻略分享1
  225 + // path:'',
  226 + success: (res) => { // 成功后要做的事情
  227 + console.log(res)
  228 +
  229 + },
  230 + fail: function (res) {
  231 + // 分享失败
  232 + console.log(res)
  233 + }
  234 + }
68 } 235 }
69 }) 236 })
  1 +<import src="../../../wxParse/wxParse.wxml" />
1 <view class="teacherhead"> 2 <view class="teacherhead">
2 <view class="teacherleft"> 3 <view class="teacherleft">
3 <view class="teacimg"> 4 <view class="teacimg">
4 - <image src="{{url}}aicon_77@2x.png"></image> 5 + <image src="{{info.avatar}}"></image>
5 </view> 6 </view>
6 7
7 - <view class="teacname">徐强</view> 8 + <view class="teacname">{{info.name}}</view>
8 <view class="teacgouimg"> 9 <view class="teacgouimg">
9 <image src="{{url}}aicon_20x.png"></image> 10 <image src="{{url}}aicon_20x.png"></image>
10 </view> 11 </view>
11 </view> 12 </view>
12 13
13 - <view class="atten"> 14 + <view class="atten" bindtap="attention" data-id="{{info.id}}" wx:if="{{info.is_concern==0}}">
14 关注 15 关注
15 </view> 16 </view>
  17 + <view class="atten" bindtap="attention" data-id="{{info.id}}" wx:else>
  18 + 取消关注
  19 + </view>
  20 +</view>
  21 +
  22 +<view class="jiubottom">
  23 + <view class="jiuleft">
  24 + <view class="jiuleftimg" catchtap="zan" data-id="{{info.id}}">
  25 + <image src="{{url}}/aicon_47x.png" wx:if="{{info.is_good==0}}"></image>
  26 + <image src="{{url}}/aicon_46x.png" wx:else></image>
  27 + </view>
  28 + <view class="jiuzan">{{info.good_count}}</view>
  29 + </view>
  30 +
  31 + <view class="jiumiddle" catchtap="ping" data-id="{{info.id}}">
  32 + <view class="middleimg">
  33 + <image src="{{url}}/aicon_67x.png"></image>
  34 + </view>
  35 + <view class="tiao">{{info.comment_count}}</view>
  36 + </view>
  37 +
  38 + <view class="lastimg">
  39 +
  40 + <view class="jiuright">
  41 + <image src="{{url}}/aicon_68x.png"></image>
  42 + <button class="lj_share" catchtap="buildshare" open-type='share'></button>
  43 + </view>
  44 + <view class="tiao">分享</view>
  45 +
  46 + </view>
  47 +
  48 +
16 </view> 49 </view>
17 50
18 <view class="wineimg"> 51 <view class="wineimg">
19 - <image src="{{url}}aicon_91x.png"></image> 52 + <image src="{{info.thumb}}"></image>
20 </view> 53 </view>
21 54
  55 +
22 <view class="niangjiubox"> 56 <view class="niangjiubox">
23 57
24 - <view class="brandboxitem"> 58 + <!-- <view class="brandboxitem">
25 <view class="boxtop"> 59 <view class="boxtop">
26 <view class="boxtopleft"> 60 <view class="boxtopleft">
27 基本信息 61 基本信息
@@ -47,30 +81,24 @@ @@ -47,30 +81,24 @@
47 </view> 81 </view>
48 82
49 83
50 - </view>  
51 - <view class="brandboxitem"> 84 + </view> -->
  85 + <view class="brandboxitem" wx:for='{{attr}}' wx:key='' wx:for-index="idxs">
52 <view class="boxtop"> 86 <view class="boxtop">
53 <view class="boxtopleft"> 87 <view class="boxtopleft">
54 - 专业履历 88 + {{item.name}}
55 </view> 89 </view>
56 - <view class="boxright">  
57 - <image src="{{url}}aicon_24x.png"></image> 90 + <view class="boxright" bindtap="showinfo" data-idx="{{idxs}}">
  91 + <image src="{{url}}aicon_53x.png" wx:if="{{item.show}}"></image>
  92 + <image src="{{url}}aicon_52x.png" wx:else></image>
58 </view> 93 </view>
59 </view> 94 </view>
60 95
61 - <view class="brandtext">  
62 - <view class="brandlsit">  
63 - 2009年接触葡萄酒。  
64 - </view>  
65 - <view class="brandlsit">  
66 - 2010年—2011年在郑大工学院和财经学院任教计算机3D设计教师。  
67 - </view>  
68 - <view class="brandlsit">  
69 - 2012年考取ESW葡萄酒中级品酒师证。  
70 - </view>  
71 - <view class="brandlsit">  
72 - 2012年至今在优传葡萄酒有限公司从事葡萄酒销售,酒会承办工作。同时从事企业礼仪茶培训。  
73 - </view> 96 + <view class="brandtext" wx:if="{{item.show==true}}">
  97 + <block wx:for="{{artileList}}" wx:for-item="item" wx:for-index="idx" wx:key=''>
  98 + <block wx:if="{{idxs==idx}}">
  99 + <template is="wxParse" data="{{wxParseData:item}}" />
  100 + </block>
  101 + </block>
74 102
75 103
76 104
@@ -80,7 +108,7 @@ @@ -80,7 +108,7 @@
80 108
81 </view> 109 </view>
82 110
83 - <view class="brandboxitem"> 111 + <!-- <view class="brandboxitem">
84 <view class="boxtop"> 112 <view class="boxtop">
85 <view class="boxtopleft"> 113 <view class="boxtopleft">
86 代表作品 114 代表作品
@@ -110,6 +138,6 @@ @@ -110,6 +138,6 @@
110 </view> 138 </view>
111 139
112 140
113 - </view> 141 + </view> -->
114 142
115 </view> 143 </view>
@@ -43,6 +43,7 @@ image{ @@ -43,6 +43,7 @@ image{
43 .wineimg{ 43 .wineimg{
44 width:750rpx; 44 width:750rpx;
45 height:328rpx; 45 height:328rpx;
  46 + margin-top:20rpx;
46 } 47 }
47 .boxtopleft{ 48 .boxtopleft{
48 font-weight: bold 49 font-weight: bold
@@ -74,4 +75,68 @@ image{ @@ -74,4 +75,68 @@ image{
74 color:#666666; 75 color:#666666;
75 font-size: 26rpx; 76 font-size: 26rpx;
76 77
  78 +}
  79 +.jiubottom{
  80 + display:flex;
  81 + align-items: center;
  82 + justify-content: space-between;
  83 + padding: 0rpx 78rpx;
  84 + box-sizing: border-box
  85 +
  86 +}
  87 +.jiuleft{
  88 + display:flex;
  89 + align-items: center;
  90 +}
  91 +.jiumiddle{
  92 + display:flex;
  93 + align-items: center
  94 +}
  95 +.jiuleftimg{
  96 + width:30rpx;
  97 + height:28rpx;
  98 + font-size: 0
  99 +}
  100 +image{
  101 + width:100%;
  102 + height:100%;
  103 +}
  104 +.jiuzan{
  105 + color:#666666;
  106 + font-size: 28rpx;
  107 + margin-left:16rpx;
  108 +}
  109 +.middleimg{
  110 + width:29rpx;
  111 + height:27rpx;
  112 + font-size: 0
  113 +}
  114 +.tiao{
  115 + color:#666666;
  116 + font-size: 28rpx;
  117 + margin-left:16rpx;
  118 +}
  119 +.jiuright{
  120 + width:26rpx;
  121 + height:26rpx;
  122 + font-size: 0;
  123 + position: relative
  124 +}
  125 +.lastimg{
  126 + display:flex;
  127 + align-items: center
  128 +}
  129 +.lj_share{
  130 + width:20rpx;
  131 + height:30rpx;
  132 + border:none;
  133 + position: absolute;
  134 + right:0;
  135 + top:0;
  136 + background: transparent
  137 +
  138 +}
  139 +button::after{
  140 + border:none;
  141 + outline:none;
77 } 142 }
@@ -134,7 +134,20 @@ Page({ @@ -134,7 +134,20 @@ Page({
134 icon:'none' 134 icon:'none'
135 }) 135 })
136 136
137 - that.getlist() 137 + let newsearchlistarr = that.data.searchlistarr;
  138 + for (var obj of newsearchlistarr){
  139 + if(obj.id==id){
  140 + if (obj.is_favorite==0){
  141 + obj.is_favorite=1
  142 + }else{
  143 + obj.is_favorite=0
  144 + }
  145 + }
  146 + }
  147 +
  148 + that.setData({
  149 + searchlistarr:newsearchlistarr
  150 + })
138 151
139 152
140 153
@@ -158,7 +171,20 @@ Page({ @@ -158,7 +171,20 @@ Page({
158 icon: 'none' 171 icon: 'none'
159 }) 172 })
160 173
161 - that.getlist() 174 + let newsearchlistarr = that.data.searchlistarr;
  175 + for (var obj of newsearchlistarr) {
  176 + if (obj.id == id) {
  177 + if (obj.is_concern == 0) {
  178 + obj.is_concern = 1
  179 + } else {
  180 + obj.is_concern = 0
  181 + }
  182 + }
  183 + }
  184 +
  185 + that.setData({
  186 + searchlistarr: newsearchlistarr
  187 + })
162 188
163 189
164 190
@@ -218,9 +244,16 @@ Page({ @@ -218,9 +244,16 @@ Page({
218 //跳页 244 //跳页
219 jumpbrand(e){ 245 jumpbrand(e){
220 let id=e.currentTarget.dataset.id 246 let id=e.currentTarget.dataset.id
221 - wx.navigateTo({  
222 - url: '/pages/homeblock/brandlist/brandlist?id='+id,  
223 - }) 247 + if(this.data.select==1){
  248 + wx.navigateTo({
  249 + url: '/pages/homeblock/jiuzidian/jiuzidian?id=' + id,
  250 + })
  251 + }else if(this.data.select==2){
  252 + wx.navigateTo({
  253 + url: '/pages/homeblock/brandlist/brandlist?id=' + id,
  254 + })
  255 + }
  256 +
224 }, 257 },
225 //酒企 258 //酒企
226 jumpcompany(e){ 259 jumpcompany(e){
@@ -229,6 +262,18 @@ Page({ @@ -229,6 +262,18 @@ Page({
229 url: '/pages/homeblock/companyintro/companyintro?id=' + id, 262 url: '/pages/homeblock/companyintro/companyintro?id=' + id,
230 }) 263 })
231 }, 264 },
  265 + enterjiuqi(e){
  266 + let id=e.currentTarget.dataset.id
  267 + wx.navigateTo({
  268 + url: '/pages/homeblock/companyintro/companyintro?id=' + id,
  269 + })
  270 + },
  271 + enterpinpai(e){
  272 + let id=e.currentTarget.dataset.id
  273 + wx.navigateTo({
  274 + url: '/pages/homeblock/brandlist/brandlist?id=' + id,
  275 + })
  276 + },
232 /** 277 /**
233 * 生命周期函数--监听页面初次渲染完成 278 * 生命周期函数--监听页面初次渲染完成
234 */ 279 */
@@ -46,7 +46,10 @@ @@ -46,7 +46,10 @@
46 <view class="textbox"> 46 <view class="textbox">
47 47
48 <view class="seahead"> 48 <view class="seahead">
49 - <view class="searword" wx:for="{{list}}" wx:key="" bindtap="enterwine" data-id="{{item.id}}">{{item.name}}</view> 49 +
  50 + <view class="searword" wx:for="{{list}}" wx:key="" bindtap="enterwine" data-id="{{item.id}}" wx:if="{{select==1}}">{{item.name}}</view>
  51 + <view class="searword" wx:for="{{list}}" wx:key="" bindtap="enterpinpai" data-id="{{item.id}}" wx:if="{{select==2}}">{{item.name}}</view>
  52 + <view class="searword" wx:for="{{list}}" wx:key="" bindtap="enterjiuqi" data-id="{{item.id}}" wx:if="{{select==3}}">{{item.name}}</view>
50 53
51 </view> 54 </view>
52 55
@@ -72,7 +75,9 @@ @@ -72,7 +75,9 @@
72 </view> 75 </view>
73 76
74 <view class="seahead"> 77 <view class="seahead">
75 - <view class="searword" wx:for="{{favorite}}" wx:key=''>{{item.name}}</view> 78 + <view class="searword" wx:for="{{favorite}}" wx:key='' wx:key="" bindtap="enterwine" data-id="{{item.id}}" wx:if="{{select==1}}">{{item.name}}</view>
  79 + <view class="searword" wx:for="{{favorite}}" wx:key='' wx:key="" bindtap="enterpinpai" data-id="{{item.id}}" wx:if="{{select==2}}">{{item.name}}</view>
  80 + <view class="searword" wx:for="{{favorite}}" wx:key='' wx:key="" bindtap="enterjiuqi" data-id="{{item.id}}" wx:if="{{select==3}}">{{item.name}}</view>
76 81
77 </view> 82 </view>
78 83
@@ -191,4 +191,10 @@ image{ @@ -191,4 +191,10 @@ image{
191 text-align: center; 191 text-align: center;
192 line-height: 50rpx; 192 line-height: 50rpx;
193 193
  194 + }
  195 + .nodata{
  196 + color:#999;
  197 + font-size: 30rpx;
  198 + text-align: center;
  199 + margin-top:30rpx;
194 } 200 }
@@ -9,7 +9,8 @@ Page({ @@ -9,7 +9,8 @@ Page({
9 data: { 9 data: {
10 url:"", 10 url:"",
11 id:'', 11 id:'',
12 - shipaiarr:[] 12 + shipaiarr:[],
  13 + shiarr:[]
13 }, 14 },
14 15
15 /** 16 /**
@@ -24,6 +25,20 @@ Page({ @@ -24,6 +25,20 @@ Page({
24 this.getshipai() 25 this.getshipai()
25 }, 26 },
26 27
  28 + //图片预览
  29 + viewImg(e) {
  30 + let that=this;
  31 + let index = e.currentTarget.dataset.index;
  32 +
  33 + wx.previewImage({
  34 + current: that.data.shipaiarr[index].url,
  35 + urls: that.data.shiarr,
  36 + success: function (res) { },
  37 + fail: function (res) { },
  38 + complete: function (res) { },
  39 + })
  40 + },
  41 +
27 //获取官图 42 //获取官图
28 getshipai(){ 43 getshipai(){
29 let that = this; 44 let that = this;
@@ -37,6 +52,14 @@ Page({ @@ -37,6 +52,14 @@ Page({
37 that.setData({ 52 that.setData({
38 shipaiarr:res.list 53 shipaiarr:res.list
39 }) 54 })
  55 + let newarr=[];
  56 + let newshipaiarr = that.data.shipaiarr;
  57 + for (var obj of newshipaiarr){
  58 + newarr.push(obj.url)
  59 + }
  60 + that.setData({
  61 + shiarr: newarr
  62 + })
40 63
41 }).catch((err) => { 64 }).catch((err) => {
42 65
1 <view class="containerbox"> 1 <view class="containerbox">
2 - <view class="boxitem" wx:for="{{shipaiarr}}" wx:key=''>  
3 - <view class="itemimg"> 2 + <view class="boxitem" wx:for="{{shipaiarr}}" wx:key='' >
  3 + <view class="itemimg" bindtap='viewImg' data-index="{{index}}">
4 <image src="{{item.url}}"></image> 4 <image src="{{item.url}}"></image>
5 </view> 5 </view>
6 6
@@ -42,6 +42,7 @@ Page({ @@ -42,6 +42,7 @@ Page({
42 current: 0, 42 current: 0,
43 zhinengwrap: false, 43 zhinengwrap: false,
44 citychose: false, 44 citychose: false,
  45 + pricechose:false,
45 use_id: '', 46 use_id: '',
46 odor_id: '', 47 odor_id: '',
47 package_id: '', 48 package_id: '',
@@ -52,7 +53,9 @@ Page({ @@ -52,7 +53,9 @@ Page({
52 type: '', 53 type: '',
53 zhinengarr: [], 54 zhinengarr: [],
54 zhinenglist: [], 55 zhinenglist: [],
55 - page:1 56 + page:1,
  57 + priceyuan:'0元',
  58 + pricevalue:0
56 }, 59 },
57 60
58 /** 61 /**
@@ -66,7 +69,6 @@ Page({ @@ -66,7 +69,6 @@ Page({
66 69
67 70
68 this.getshaicontent() 71 this.getshaicontent()
69 -  
70 this.getmorenconetent(); 72 this.getmorenconetent();
71 73
72 }, 74 },
@@ -92,30 +94,54 @@ Page({ @@ -92,30 +94,54 @@ Page({
92 console.log(999) 94 console.log(999)
93 this.setData({ 95 this.setData({
94 citychose: true, 96 citychose: true,
95 - zhinengwrap: false 97 + zhinengwrap: false,
  98 + pricechose: false
  99 + })
  100 +
  101 + } else {
  102 + this.setData({
  103 + citychose: false,
  104 + zhinengwrap: false,
  105 + pricechose: false
  106 +
  107 +
  108 + })
  109 + }
  110 + }else if(type==2){
  111 + if (newnavarr[i].sel == true) {
  112 + console.log(999)
  113 + this.setData({
  114 + citychose: false,
  115 + zhinengwrap: false,
  116 + pricechose:true
96 117
97 }) 118 })
98 119
99 } else { 120 } else {
100 this.setData({ 121 this.setData({
101 citychose: false, 122 citychose: false,
102 - zhinengwrap: false 123 + zhinengwrap: false,
  124 + pricechose:false
103 125
104 }) 126 })
105 } 127 }
106 - } else { 128 + }else {
107 if (newnavarr[i].sel == true) { 129 if (newnavarr[i].sel == true) {
108 console.log(999) 130 console.log(999)
109 this.setData({ 131 this.setData({
110 citychose: false, 132 citychose: false,
111 - zhinengwrap: true 133 + zhinengwrap: true,
  134 + pricechose: false
  135 +
112 136
113 }) 137 })
114 138
115 } else { 139 } else {
116 this.setData({ 140 this.setData({
117 citychose: false, 141 citychose: false,
118 - zhinengwrap: false 142 + zhinengwrap: false,
  143 + pricechose: false
  144 +
119 145
120 }) 146 })
121 } 147 }
@@ -124,8 +150,6 @@ Page({ @@ -124,8 +150,6 @@ Page({
124 } else { 150 } else {
125 newnavarr[i].sel = false 151 newnavarr[i].sel = false
126 } 152 }
127 -  
128 -  
129 } 153 }
130 154
131 155
@@ -484,11 +508,12 @@ Page({ @@ -484,11 +508,12 @@ Page({
484 //获取默认数据 508 //获取默认数据
485 getmorenconetent() { 509 getmorenconetent() {
486 let that = this; 510 let that = this;
  511 + console.log(that.data.pricevalues)
487 let url = 'index/Filter/index', 512 let url = 'index/Filter/index',
488 params = { 513 params = {
489 use_id: that.data.use_id, 514 use_id: that.data.use_id,
490 odor_id: that.data.odor_id, 515 odor_id: that.data.odor_id,
491 - pce:that.data.price, 516 + price: that.data.pricevalues,
492 package_id: that.data.package_id, 517 package_id: that.data.package_id,
493 city: that.data.city, 518 city: that.data.city,
494 score: that.data.score, 519 score: that.data.score,
@@ -533,7 +558,29 @@ Page({ @@ -533,7 +558,29 @@ Page({
533 558
534 }) 559 })
535 }, 560 },
  561 + changing(e){
  562 + console.log(e);
  563 + this.setData({
  564 + priceyuan:e.detail.value+'元',
  565 + pricevalue:e.detail.value
  566 + })
  567 + },
536 568
  569 + hideprice(){
  570 + this.setData({
  571 + pricechose:false
  572 + })
  573 + let newnavarr = this.data.navarr;
  574 + for (var obj of newnavarr) {
  575 + obj.sel = false
  576 + }
  577 + newnavarr[1].name =this.data.priceyuan
  578 + this.setData({
  579 + navarr: newnavarr
  580 + })
  581 +
  582 + this.getmorenconetent()
  583 + },
537 /** 584 /**
538 * 生命周期函数--监听页面初次渲染完成 585 * 生命周期函数--监听页面初次渲染完成
539 */ 586 */
@@ -23,6 +23,21 @@ @@ -23,6 +23,21 @@
23 23
24 </view> 24 </view>
25 </view> 25 </view>
  26 +<!-- 价格 -->
  27 +<view class="register" wx:if="{{pricechose}}" bindtap="hideprice">
  28 + <view class="registerwrap">
  29 +
  30 + <view class="section section_gap">
  31 +
  32 + <view class="pyuan">{{priceyuan}}</view>
  33 +
  34 + <view class="body-view">
  35 + <slider bindchange="slider2change" step="5" backgroundColor="#f5f5f5" activeColor="red" block-size="8" step="1" bindchanging="changing" value="{{pricevalue}}" max="{{zhinengarr[0].max}}" min="{{zhinengarr[0].min}}"/>
  36 + </view>
  37 + </view>
  38 +
  39 + </view>
  40 +</view>
26 41
27 <view class="shaisel"> 42 <view class="shaisel">
28 <view class="kind"> 43 <view class="kind">
@@ -42,34 +57,34 @@ @@ -42,34 +57,34 @@
42 57
43 <view class="zhinengbox"> 58 <view class="zhinengbox">
44 59
45 -<view class="nodata" wx:if="{{zhinenglist.length==0}}">暂无数据</view>  
46 -<block wx:else>  
47 - <view class="searchitem" wx:for="{{zhinenglist}}" wx:key="">  
48 - <view class="searchitemleft">  
49 - <view class="itemleftimg">  
50 - <image src="{{item.logo}}"></image>  
51 - </view> 60 + <view class="nodata" wx:if="{{zhinenglist.length==0}}">暂无数据</view>
  61 + <block wx:else>
  62 + <view class="searchitem" wx:for="{{zhinenglist}}" wx:key="">
  63 + <view class="searchitemleft">
  64 + <view class="itemleftimg">
  65 + <image src="{{item.logo}}"></image>
  66 + </view>
52 67
53 - <view class="itemiddle">  
54 - <view class="itemidelename">{{item.name}}</view>  
55 - <view class="nambottom">  
56 - <text class="namebottomitem">{{item.degree_name}}</text>  
57 - <text class="namebottomitem">{{item.odor_name}}</text>  
58 - <text class="namebottomitem">官方价{{item.price}}元</text>  
59 - <text class="namebottomitem">{{item.ml}}</text> 68 + <view class="itemiddle">
  69 + <view class="itemidelename">{{item.name}}</view>
  70 + <view class="nambottom">
  71 + <text class="namebottomitem">{{item.degree_name}}</text>
  72 + <text class="namebottomitem">{{item.odor_name}}</text>
  73 + <text class="namebottomitem">官方价{{item.price}}元</text>
  74 + <text class="namebottomitem">{{item.ml}}</text>
  75 + </view>
60 </view> 76 </view>
61 </view> 77 </view>
62 - </view>  
63 78
64 - <view class="starimg" bindtap="collect" data-id="{{item.id}}"> 79 + <view class="starimg" bindtap="collect" data-id="{{item.id}}">
65 80
66 81
67 82
68 - <image src="{{url}}aicon_10x.png" wx:if="{{item.is_favorite==1}}"></image>  
69 - <image src="{{url}}aicon_09x.png" wx:else></image>  
70 - </view> 83 + <image src="{{url}}aicon_10x.png" wx:if="{{item.is_favorite==1}}"></image>
  84 + <image src="{{url}}aicon_09x.png" wx:else></image>
  85 + </view>
71 86
72 - </view>  
73 -</block> 87 + </view>
  88 + </block>
74 89
75 </view> 90 </view>
@@ -137,3 +137,11 @@ page { @@ -137,3 +137,11 @@ page {
137 height: 40rpx; 137 height: 40rpx;
138 font-size: 0; 138 font-size: 0;
139 } 139 }
  140 +.section{
  141 + width:100%;
  142 +}
  143 +.pyuan{
  144 + color:#E81825;
  145 + font-size: 28rpx;
  146 + margin:20rpx 0 0 20rpx;
  147 +}
@@ -11,8 +11,10 @@ Page({ @@ -11,8 +11,10 @@ Page({
11 url:'', 11 url:'',
12 phonenum:'', 12 phonenum:'',
13 currentTime: 60, 13 currentTime: 60,
14 - mimaphone:'18902082533',  
15 - mima:'qqqqqq' 14 + mimaphone:'',
  15 + mima:'',
  16 + type:'',
  17 + id:''
16 }, 18 },
17 19
18 /** 20 /**
@@ -20,7 +22,9 @@ Page({ @@ -20,7 +22,9 @@ Page({
20 */ 22 */
21 onLoad: function (options) { 23 onLoad: function (options) {
22 this.setData({ 24 this.setData({
23 - url: app.globalData.url 25 + url: app.globalData.url,
  26 + type:options.type,
  27 + id:options.id
24 }) 28 })
25 }, 29 },
26 yanzheng(){ 30 yanzheng(){
@@ -41,8 +45,10 @@ Page({ @@ -41,8 +45,10 @@ Page({
41 }, 45 },
42 //清空手机号 46 //清空手机号
43 clearphone(){ 47 clearphone(){
  48 + console.log(43823489)
44 this.setData({ 49 this.setData({
45 - phonenum:'' 50 + phonenum:'',
  51 + phone:''
46 }) 52 })
47 }, 53 },
48 54
@@ -69,7 +75,7 @@ Page({ @@ -69,7 +75,7 @@ Page({
69 } else { 75 } else {
70 76
71 wx.navigateTo({ 77 wx.navigateTo({
72 - url: '/pages/enteryanzheng/enteryanzheng?phonenum='+that.data.phonenum, 78 + url: '/pages/enteryanzheng/enteryanzheng?phonenum='+that.data.phonenum+'&type='+that.data.type+'&id='+that.data.id,
73 }) 79 })
74 80
75 81
@@ -128,9 +134,31 @@ Page({ @@ -128,9 +134,31 @@ Page({
128 app.post(url, params).then((res) => { 134 app.post(url, params).then((res) => {
129 console.log(res); 135 console.log(res);
130 wx.setStorageSync('token', res.token) 136 wx.setStorageSync('token', res.token)
131 - wx.switchTab({  
132 - url: '/pages/homapage/homepage',  
133 - }) 137 + if (res.is_update==0){
  138 + wx.navigateTo({
  139 + url: '/pages/peopleinfo/peopleinfo',
  140 + })
  141 + }else{
  142 + //type=1 发现首页的分享
  143 + if(that.data.type==1){
  144 + let url=wx.getStorageSync("url")
  145 + wx.navigateTo({
  146 + url: url+'?id='+that.data.id
  147 + })
  148 + } else if (that.data.type == 2){
  149 + let url = wx.getStorageSync("url")
  150 + wx.navigateTo({
  151 + url: url + '?id=' + that.data.id
  152 + })
  153 + }else{
  154 + wx.switchTab({
  155 + url: '/pages/homapage/homepage',
  156 + })
  157 + }
  158 +
  159 +
  160 + }
  161 +
134 }).catch((err) => { 162 }).catch((err) => {
135 console.log(err) 163 console.log(err)
136 wx.showToast({ 164 wx.showToast({
@@ -147,7 +175,16 @@ Page({ @@ -147,7 +175,16 @@ Page({
147 url: '/pages/forgetmima/forgetmima', 175 url: '/pages/forgetmima/forgetmima',
148 }) 176 })
149 }, 177 },
150 - 178 + clearphone(){
  179 + this.setData({
  180 + mimaphone:''
  181 + })
  182 + },
  183 + clearmima(){
  184 + this.setData({
  185 + mima:''
  186 + })
  187 + },
151 /** 188 /**
152 * 生命周期函数--监听页面初次渲染完成 189 * 生命周期函数--监听页面初次渲染完成
153 */ 190 */
@@ -24,9 +24,10 @@ @@ -24,9 +24,10 @@
24 <view class="chaimg" bindtap="clearphone"> 24 <view class="chaimg" bindtap="clearphone">
25 <image src="{{url}}/aicon_07x.png"></image> 25 <image src="{{url}}/aicon_07x.png"></image>
26 </view> 26 </view>
27 - </view>  
28 - 27 + </view>
  28 +
29 <view class="login" bindtap="login">登录</view> 29 <view class="login" bindtap="login">登录</view>
  30 +
30 31
31 <view class="firlogin">首次登录会自动创建新账号</view> 32 <view class="firlogin">首次登录会自动创建新账号</view>
32 </view> 33 </view>
@@ -47,7 +48,7 @@ @@ -47,7 +48,7 @@
47 48
48 <input placeholder='请输入手机号' placeholder-class='enterphone' value="{{mimaphone}}" type="number" bindinput="mimaphone" /> 49 <input placeholder='请输入手机号' placeholder-class='enterphone' value="{{mimaphone}}" type="number" bindinput="mimaphone" />
49 </view> 50 </view>
50 - <view class="chaimg"> 51 + <view class="chaimg" bindtap="clearphone">
51 <image src="{{url}}/aicon_07x.png"></image> 52 <image src="{{url}}/aicon_07x.png"></image>
52 </view> 53 </view>
53 </view> 54 </view>
@@ -56,7 +57,7 @@ @@ -56,7 +57,7 @@
56 57
57 <input placeholder='请输入密码' placeholder-class='enterphone' bindinput="shumima" type="password" value="{{mima}}"/> 58 <input placeholder='请输入密码' placeholder-class='enterphone' bindinput="shumima" type="password" value="{{mima}}"/>
58 </view> 59 </view>
59 - <view class="mimaimg"> 60 + <view class="mimaimg" bindtap="clearmima">
60 <view class="chaimg"> 61 <view class="chaimg">
61 <image src="{{url}}/aicon_07x.png"></image> 62 <image src="{{url}}/aicon_07x.png"></image>
62 </view> 63 </view>
@@ -19,6 +19,7 @@ Page({ @@ -19,6 +19,7 @@ Page({
19 * 生命周期函数--监听页面加载 19 * 生命周期函数--监听页面加载
20 */ 20 */
21 onLoad: function (options) { 21 onLoad: function (options) {
  22 + console.log(options)
22 this.setData({ 23 this.setData({
23 url: app.globalData.url 24 url: app.globalData.url
24 }) 25 })
@@ -6,9 +6,13 @@ Page({ @@ -6,9 +6,13 @@ Page({
6 * 页面的初始数据 6 * 页面的初始数据
7 */ 7 */
8 data: { 8 data: {
9 - region: ['广东省', '广州市', '海珠区'], 9 + region: ['北京', '北京市', '东城区'],
10 url:'', 10 url:'',
11 - sex:1 11 + sex:1,
  12 + imglogol:'',
  13 + chuantouxiang:'',
  14 + user_nickname:''
  15 +
12 }, 16 },
13 17
14 /** 18 /**
@@ -23,6 +27,7 @@ Page({ @@ -23,6 +27,7 @@ Page({
23 this.setData({ 27 this.setData({
24 sex:e.currentTarget.dataset.sex 28 sex:e.currentTarget.dataset.sex
25 }) 29 })
  30 +
26 }, 31 },
27 bindRegionChange: function (e) { 32 bindRegionChange: function (e) {
28 console.log('picker发送选择改变,携带值为', e.detail.value) 33 console.log('picker发送选择改变,携带值为', e.detail.value)
@@ -30,6 +35,81 @@ Page({ @@ -30,6 +35,81 @@ Page({
30 region: e.detail.value 35 region: e.detail.value
31 }) 36 })
32 }, 37 },
  38 + //输入昵称
  39 + enterusername(e){
  40 + this.setData({
  41 + user_nickname:e.detail.value
  42 + })
  43 +
  44 + },
  45 +
  46 + //添加图片
  47 + chooseImage() {
  48 + let that = this;
  49 + wx.chooseImage({
  50 + count: 1,
  51 + sizeType: ['original', 'compressed'],
  52 + success: function (res) {
  53 + console.log(res)
  54 + app.upload('image', res.tempFilePaths[0]).then((res) => {
  55 +
  56 + console.log('上传文件' + res);
  57 + let data = JSON.parse(JSON.stringify(res))
  58 + console.log(data)
  59 + that.setData({
  60 + chuantouxiang: res.local_url,
  61 + imglogol:res.url
  62 + })
  63 + // let arr = that.data.images;
  64 + // let chuanarr = that.data.chuanimages;
  65 + // chuanarr.push(data.local_url)
  66 + // arr.push(data.url)
  67 + // that.setData({
  68 + // images: arr,
  69 + // chuanimages: chuanarr
  70 + // })
  71 +
  72 + console.log(that.data.chuanimages)
  73 + }).catch((err) => {
  74 + console.log(err)
  75 + })
  76 + },
  77 + fail: function (res) { }
  78 + })
  79 + },
  80 + //修改个人信息
  81 + changeinfo(){
  82 +
  83 + let that = this;
  84 + let url = 'user/Center/set_userinfo', params = {
  85 + avatar: that.data.chuantouxiang,
  86 + region:that.data.region,
  87 + user_nickname:that.data.user_nickname,
  88 + sex:that.data.sex
  89 +
  90 + }
  91 + app.post(url, params).then((res) => {
  92 + console.log(res);
  93 + wx.showToast({
  94 + title: '修改成功',
  95 + icon:'none'
  96 + })
  97 +
  98 + setTimeout(function(){
  99 + wx.switchTab({
  100 + url: '/pages/homapage/homepage',
  101 + })
  102 +
  103 + },1500)
  104 +
  105 +
  106 +
  107 + }).catch((err) => {
  108 +
  109 + })
  110 + },
  111 +
  112 +
33 /** 113 /**
34 * 生命周期函数--监听页面初次渲染完成 114 * 生命周期函数--监听页面初次渲染完成
35 */ 115 */
1 -<view class="upimg">  
2 - <image src="/"></image> 1 +<view class="upimg" bindtap="chooseImage">
  2 +<image src="{{imglogol}}" wx:if="{{imglogol!=''}}"></image>
  3 + <image src="/img/cc.png" wx:else></image>
  4 +
3 </view> 5 </view>
4 6
5 <view class="enternicheng"> 7 <view class="enternicheng">
6 - <input placeholder='请输入昵称' placeholder-class='shuruni' /> 8 + <input placeholder='请输入昵称' placeholder-class='shuruni' bindinput="enterusername"/>
7 </view> 9 </view>
8 10
9 <view class="sleectrigion "> 11 <view class="sleectrigion ">
@@ -28,4 +30,4 @@ @@ -28,4 +30,4 @@
28 <view class="sexoption {{sex==2?'sexactive':''}}" data-sex="2" bindtap='sexselect'>女</view> 30 <view class="sexoption {{sex==2?'sexactive':''}}" data-sex="2" bindtap='sexselect'>女</view>
29 </view> 31 </view>
30 32
31 -<view class="save">保存</view>  
  33 +<view class="save" bindtap="changeinfo">保存</view>
@@ -6,11 +6,13 @@ page { @@ -6,11 +6,13 @@ page {
6 width: 160rpx; 6 width: 160rpx;
7 height: 160rpx; 7 height: 160rpx;
8 border-radius: 50%; 8 border-radius: 50%;
  9 + font-size: 0;
  10 + margin:90rpx auto 0;
9 } 11 }
10 12
11 .upimg image { 13 .upimg image {
12 border-radius: 50%; 14 border-radius: 50%;
13 - margin: 90rpx auto 0; 15 +
14 } 16 }
15 17
16 .enternicheng { 18 .enternicheng {
@@ -85,6 +87,7 @@ page { @@ -85,6 +87,7 @@ page {
85 color: #1a1a1a; 87 color: #1a1a1a;
86 text-align: center; 88 text-align: center;
87 line-height: 100rpx; 89 line-height: 100rpx;
  90 + border:1rpx solid transparent
88 } 91 }
89 92
90 .save { 93 .save {
  1 +// pages/setmima/setmima.js
  2 +const app=getApp()
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + url:'',
  10 + password:'',
  11 + currentTime: 60,
  12 + time: '',
  13 + },
  14 +
  15 + /**
  16 + * 生命周期函数--监听页面加载
  17 + */
  18 + onLoad: function (options) {
  19 + this.setData({
  20 + url: app.globalData.url
  21 + })
  22 +
  23 + },
  24 +
  25 + shezhimima(e){
  26 +
  27 + this.setData({
  28 + password: e.detail.value
  29 + })
  30 +
  31 +
  32 + },
  33 +
  34 + queding(){
  35 + let that = this;
  36 + let value=that.data.password;
  37 + if (value.length < 6 || value.length > 20) {
  38 + wx.showToast({
  39 + title: '请输入6-20位的密码',
  40 + icon: 'none'
  41 + })
  42 + } else {
  43 +
  44 +
  45 +
  46 + let url = 'user/Profile/set_password', params = {
  47 + password:value
  48 + }
  49 + app.post(url, params).then((res) => {
  50 + console.log(res);
  51 + wx.showToast({
  52 + title: '设置密码成功',
  53 + icon:"none"
  54 + })
  55 +
  56 + setTimeout(function(){
  57 + wx.switchTab({
  58 + url: '/pages/homapage/homepage',
  59 + })
  60 + },1500)
  61 +
  62 +
  63 +
  64 + }).catch((err) => {
  65 +
  66 + })
  67 + }
  68 + },
  69 +
  70 +
  71 +
  72 +
  73 + /**
  74 + * 生命周期函数--监听页面初次渲染完成
  75 + */
  76 + onReady: function () {
  77 +
  78 + },
  79 +
  80 + /**
  81 + * 生命周期函数--监听页面显示
  82 + */
  83 + onShow: function () {
  84 +
  85 + },
  86 +
  87 + /**
  88 + * 生命周期函数--监听页面隐藏
  89 + */
  90 + onHide: function () {
  91 +
  92 + },
  93 +
  94 + /**
  95 + * 生命周期函数--监听页面卸载
  96 + */
  97 + onUnload: function () {
  98 +
  99 + },
  100 +
  101 + /**
  102 + * 页面相关事件处理函数--监听用户下拉动作
  103 + */
  104 + onPullDownRefresh: function () {
  105 +
  106 + },
  107 +
  108 + /**
  109 + * 页面上拉触底事件的处理函数
  110 + */
  111 + onReachBottom: function () {
  112 +
  113 + },
  114 +
  115 + /**
  116 + * 用户点击右上角分享
  117 + */
  118 + onShareAppMessage: function () {
  119 +
  120 + }
  121 +})
  1 +{
  2 + "navigationBarTitleText": "设置密码"
  3 +}
  1 +
  2 +<view class="shemima">设置密码后你可以用手机号和密码登录</view>
  3 +<view class="setmima">
  4 + <view class="setmimaleft">
  5 + <input placeholder='设置密码' placeholder-class='shemi' bindinput="shezhimima" type="password"/>
  6 +
  7 + </view>
  8 + <view class="mimaeye">
  9 + <image src="{{url}}/bicon_14x.png"></image>
  10 + </view>
  11 +</view>
  12 +
  13 +<view class="que" bindtap="queding">确认</view>
  14 +
  15 +<view class="needmi">需要有6-20位数字、字母或符号组成,至少两种</view>
  16 +<!--
  17 +<view class="mimasuccess">密码设置成功</view> -->
  1 +page{
  2 + background: #F2F2F2
  3 +}
  4 +.setmima{
  5 + width:540rpx;
  6 + height:120rpx;
  7 + background:rgba(255,255,255,1);
  8 + border-radius:5rpx;
  9 + margin:74rpx auto 0;
  10 + display:flex;
  11 + align-items: center;
  12 + justify-content: space-between;
  13 + padding: 0 30rpx;
  14 + box-sizing: border-box
  15 +}
  16 +.setmimaleft{
  17 + width:420rpx;
  18 + color:#1A1A1A;
  19 + font-size: 30rpx;
  20 +
  21 +}
  22 +.shemi{
  23 + color:#1A1A1A;
  24 + font-size: 30rpx;
  25 +}
  26 +.mimaeye{
  27 + width:34rpx;
  28 + height:16rpx;
  29 + font-size: 0
  30 +}
  31 +.que{
  32 + width:540rpx;
  33 + height:100rpx;
  34 + background:rgba(232,24,37,1);
  35 + border-radius:50rpx;
  36 + color:#fff;
  37 + font-size: 30rpx;
  38 + text-align: center;
  39 + line-height: 100rpx;
  40 + margin:90rpx auto 0;
  41 +}
  42 +.needmi{
  43 + color:#999999;
  44 + font-size: 24rpx;
  45 + text-align: center;
  46 + margin-top:32rpx;
  47 +}
  48 +.mimasuccess{
  49 + width:290rpx;
  50 + height:60rpx;
  51 + background:rgba(0,0,0,1);
  52 + opacity:0.8;
  53 + border-radius:10rpx;
  54 + color:#fff;
  55 + font-size: 24rpx;
  56 + text-align: center;
  57 + line-height: 60rpx;
  58 + margin:468rpx auto 0;
  59 +}
  60 +.shemima{
  61 + color:#1A1A1A;
  62 + font-size: 28rpx;
  63 + font-weight: bold;
  64 + text-align: center;
  65 + margin-top: 106rpx;
  66 +
  67 +}
@@ -315,6 +315,7 @@ @@ -315,6 +315,7 @@
315 "name": "个人中心收藏品牌", 315 "name": "个人中心收藏品牌",
316 "pathName": "pages/myblock/pinpai/pinpai", 316 "pathName": "pages/myblock/pinpai/pinpai",
317 "query": "", 317 "query": "",
  318 + "query": "",
318 "scene": null 319 "scene": null
319 }, 320 },
320 { 321 {