作者 lihongjuan

2345243

正在显示 47 个修改的文件 包含 1281 行增加159 行删除
... ... @@ -61,9 +61,9 @@
}
.pp{
display:flex;
justify-content: space-around;
/* justify-content: space-around; */
align-items: center;
margin:0 auto;
/* margin-left:100rpx; */
}
.item{
width:2rpx;
... ...
... ... @@ -156,6 +156,12 @@ Page({
console.log(e.detail.value.password);
},
userxieyi(){
wx.navigateTo({
url: '/pages/yonghuxieyi/yonghuxieyi',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
... ...
... ... @@ -15,7 +15,7 @@
<view class="daojishi" bindtap="entercode">{{time}}</view>
<view class="unrigester">未注册用户登录时自动创建账号,且代表您已同意</view>
<view class="xieyi">《用户协议》</view>
<view class="xieyi" bindtap="userxieyi">《用户协议》</view>
<!-- <view>
<button class="btn-area" formType="submit">Submit</button>
... ...
... ... @@ -17,8 +17,14 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that=this;
setTimeout(function(){
that.setData({
url: app.globalData.url,
})
},1000)
this.setData({
url: app.globalData.url,
id:options.id
})
... ... @@ -72,7 +78,18 @@ Page({
icon:'none'
})
that.getjiudandetail()
let newinfo = that.data.info;
if (newinfo.is_favorite == 1){
newinfo.is_favorite =0
}else{
newinfo.is_favorite = 1
}
that.setData({
info:newinfo
})
// that.getjiudandetail()
}).catch((err) => {
... ... @@ -103,8 +120,22 @@ Page({
title: res,
icon:'none'
})
that.getjiudandetail()
// that.getjiudandetail()
let newinfo=that.data.info;
if (newinfo.is_good ==0){
newinfo.is_good=1
newinfo.good_count = newinfo.good_count+1
}else{
newinfo.is_good=0
if (newinfo.good_count==0){
newinfo.good_count=0
}else{
newinfo.good_count = newinfo.good_count-1
}
}
that.setData({
info:newinfo
})
}).catch((err) => {
... ... @@ -118,7 +149,6 @@ Page({
let url = 'index/Common/favorite', params = {
sort:1,
id:id
}
app.post(url, params).then((res) => {
console.log(res);
... ...
... ... @@ -143,6 +143,8 @@ button::after{
background: transparent
}
.tou{
width:300rpx;
margin:0 auto;
display:flex;
flex-direction: column;
align-items: center
... ...
... ... @@ -19,8 +19,14 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that=this;
setTimeout(function(){
that.setData({
url: app.globalData.url,
})
},1000)
this.setData({
url: app.globalData.url,
id:options.id
})
this.getzhuanjiadetail();
... ...
... ... @@ -26,9 +26,12 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
url: app.globalData.url
})
let that=this;
setTimeout(function(){
that.setData({
url: app.globalData.url
})
},1000)
},
enterphone(e){
... ... @@ -56,6 +59,11 @@ Page({
newmima:false
})
},
hidemima(){
this.setData({
newmima: true
})
},
clearphone(){
console.log(342)
this.setData({
... ... @@ -64,6 +72,7 @@ Page({
},
next(){
let that = this;
let reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
if(!reg.test(this.data.phone)){
wx.showToast({
... ... @@ -71,11 +80,25 @@ Page({
icon:'none'
})
}else{
this.setData({
first:false,
second:true
let url = 'user/Profile/forget_password', params = {
mobile: that.data.phone,
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
first: false,
second: true
})
that.getcode()
}).catch((err) => {
})
this.getcode()
}
},
... ...
... ... @@ -47,10 +47,13 @@
</view>
<view class="mimaimg">
<view class="eyeimg" bindtap="showmima">
<view class="eyeimg" bindtap="showmima" wx:if="{{newmima}}">
<image src="{{url}}/bicon_14x.png"></image>
</view>
<view class="eyeimg" bindtap="hidemima" wx:else>
<image src="{{url}}/bicon_13x.png"></image>
</view>
</view>
</view>
... ...
... ... @@ -303,9 +303,10 @@ Page({
}
app.post(url, params).then((res) => {
console.log(res)
that.setData({
record: res.wine_count,
record: '已收录' + res.wine_count+'款酒品',
})
... ...
... ... @@ -30,8 +30,14 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
let that=this;
setTimeout(function(){
that.setData({
url: app.globalData.url,
})
},1000)
this.setData({
url: app.globalData.url,
id: options.wineid
})
... ... @@ -402,18 +408,22 @@ Page({
title: '请滑动选择星星评分',
icon: 'none'
})
}else if (that.data.content==''){
wx.showToast({
title: '请输入评论内容',
icon:'none'
})
} else if (that.data.labelid.length==0){
wx.showToast({
title: '请选择标签',
icon: 'none'
})
}
else{
} else if (that.data.chuanimages.length == 0 && that.data.chuanvideoimg == "") {
wx.showToast({
title: '请上传图片或视频',
icon: 'none'
})
}else if (that.data.content == '') {
wx.showToast({
title: '请输入评论内容',
icon: 'none'
})
}else{
let newfiles = [];
let newimages = that.data.chuanimages;
if (that.data.chuanvideoimg != '') {
... ...
... ... @@ -115,8 +115,16 @@
padding: 30rpx;
color:#666666;
font-size: 28rpx;
/* background: #FAFAFA; */
}
.entersay textarea{
width:697rpx;
height:280rpx;
background: #FAFAFA;
padding: 30rpx;
box-sizing: border-box
}
.saybox{
margin-top:20rpx;
}
... ...
... ... @@ -85,7 +85,27 @@ Page({
})
wx.setStorageSync("quanurl", res.panorama[0].product_url)
if (res.wine_attr[0].id==-1){
that.setData({
selectid:-1
})
} else if (res.wine_attr[0].id == -2){
that.setData({
selectid: -2
})
} else if (res.wine_attr[0].id == -3) {
that.setData({
selectid: -3
})
} else if (res.wine_attr[0].id == -4) {
that.setData({
selectid: -4
})
} else if (res.wine_attr[0].id == -5) {
that.setData({
selectid: -5
})
}
let newnavarr = that.data.navarr;
... ... @@ -224,9 +244,15 @@ Page({
if (newjiushi.is_good == 0) {
newjiushi.is_good = 1
newjiushi.is_good = 1;
newjiushi.good_count = newjiushi.good_count+1
} else {
newjiushi.is_good = 0
newjiushi.is_good = 0;
if (newjiushi.good_count==0){
newjiushi.good_count=0
}else{
newjiushi.good_count = newjiushi.good_count - 1
}
}
that.setData({
jiushi: newjiushi
... ...
... ... @@ -208,14 +208,14 @@
<view class="winezan">{{jiushi.comment_count}}</view>
</view>
<view class="winerighttou">
<!-- <view class="winerighttou">
<view class="winerighttouimg" catchtap='share'>
<image src="{{url}}aicon_68x.png"></image>
<button class="lj_share" open-type='share' data-id="{{jiushi.id}}" data-type="3"></button>
</view>
</view>
</view> -->
</view>
<view class="wineimg">
... ...
... ... @@ -245,7 +245,7 @@ page{
/* width:345rpx; */
display:flex;
align-items: center;
justify-content: space-between;
justify-content: space-around;
padding: 0 32rpx;
box-sizing: border-box
}
... ...
... ... @@ -17,8 +17,14 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that=this;
setTimeout(function(){
that.setData({
url: app.globalData.url,
})
},1000)
this.setData({
url: app.globalData.url,
id:options.id
})
let token=wx.getStorageSync("token");
... ...
... ... @@ -25,9 +25,13 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
url: app.globalData.url
})
let that=this;
setTimeout(function(){
that.setData({
url: app.globalData.url
})
},1000)
this.getsearchtext()
},
... ... @@ -35,14 +39,21 @@ Page({
console.log(3478734878)
this.setData({
keyword:'',
recordshow:true,
searchshow:false,
searchlist:false
// searchlist:false,
// recordshow:true
// searchshow: false,
// recordshow: true,
})
this.getkeyword()
this.getlist()
// this.getkeyword()
// this.getlist()
},
//获取搜索内容
getsearchtext(){
... ... @@ -87,12 +98,14 @@ Page({
this.getsearchtext()
},
//搜索页面
searchlist(){
searchlist(e){
this.setData({
searchlist:true,
searchshow:false,
page:1,
searchlistarr:[]
searchlistarr:[],
keyword:e.currentTarget.dataset.name
})
this.getlist()
... ... @@ -209,6 +222,7 @@ Page({
searchlist:res.list
})
}).catch((err) => {
console.log(err)
this.setData({
searchshow: false,
recordshow: true,
... ...
<!-- 搜索输入框的遮罩层 -->
<view class="searchregister" wx:if="{{searchshow}}">
<view class="searchitem" wx:for="{{searchlist}}" wx:key='' bindtap="searchlist">
<view class="searchitemleft">
<view class="searimg">
<image src="{{url}}aicon_04@2x.png"></image>
</view>
<view class="searchtitle">{{item.name}}</view>
</view>
<view class="searchregister" wx:if="{{searchshow}}" catchtouchmove='true'>
<view class="cannodataimg" wx:if="{{searchlist.length==0}}">
<image src="/img/wushuju.png"></image>
</view>
<block wx:else>
<view class="searchitem" wx:for="{{searchlist}}" wx:key='' bindtap="searchlist" data-name="{{item.name}}">
<view class="searchitemleft">
<view class="searimg">
<image src="{{url}}aicon_04@2x.png"></image>
</view>
<view class="iconfont icon-jiantou listrow "></view>
<view class="searchtitle">{{item.name}}</view>
</view>
</view>
<view class="iconfont icon-jiantou listrow "></view>
</view>
</block>
</view>
<view class="searchhead">
... ... @@ -36,7 +40,7 @@
</view>
</view>
<view class="searchtentr">取消</view>
<view class="searchtentr" bindtap="clear">取消</view>
</view>
<view class="searchrecord" wx:if="{{recordshow}}">
... ... @@ -83,15 +87,18 @@
</view>
</view>
<view class="nodataimg" wx:if="{{searchlistarr.length==0&&searchlist==true}}">
<image src="/img/wushuju.png"></image>
</view>
<view class="searchresult" wx:if="{{searchlist}}">
<view wx:else>
<view class="searchresult" wx:if="{{searchlist}}">
<view class="jiupin" wx:if="{{select==1}}">
<view class="jiupin" wx:if="{{select==1}}">
<view class="nodataimg" wx:if="{{searchlistarr.length==0}}">
<image src="/img/wushuju.png"></image>
</view>
<block wx:else>
<view class="searchitem" wx:for="{{searchlistarr}}" wx:key='' bindtap="jumpbrand" data-id="{{item.id}}">
<view class="searchitemleft">
... ... @@ -117,21 +124,19 @@
</view>
</view>
</block>
</view>
<view class="brand" wx:if="{{select==2}}">
<view class="nodataimg" wx:if="{{searchlistarr.length==0}}">
<image src="/img/wushuju.png"></image>
</view>
<block wx:else>
<view class="brand" wx:if="{{select==2}}">
<view class="searchitem" wx:for="{{searchlistarr}}" wx:key='' bindtap="jumpbrand" data-id="{{item.id}}">
<view class="searchitemleft">
<view class="branditemleftimg">
<image src="{{url}}aicon_12@2x.png"></image>
<image src="{{item.logo}}"></image>
</view>
<view class="itemiddle">
... ... @@ -154,16 +159,13 @@
</view>
</block>
</view>
<view class="brand" wx:if="{{select==3}}">
<view class="nodataimg" wx:if="{{searchlistarr.length==0}}">
<image src="/img/wushuju.png"></image>
</view>
<block>
<view class="brand" wx:if="{{select==3}}">
<view class="searchitem" wx:for="{{searchlistarr}}" wx:key='' bindtap="jumpcompany" data-id="{{item.id}}">
<view class="searchitemleft">
... ... @@ -186,7 +188,8 @@
<view class="atten" data-id="{{item.id}}" wx:else catchtap="attention">关注</view>
</view>
</block>
</view>
</view>
\ No newline at end of file
</view>
</view>
</view>
... ...
... ... @@ -51,6 +51,12 @@ image{
font-size: 26rpx;
margin-left:11rpx;
width:545rpx;
height:60rpx;
line-height: 60rpx;
}
.searcontent input{
height:60rpx;
line-height: 60rpx;
}
.searchtent{
display:flex;
... ... @@ -197,4 +203,7 @@ image{
font-size: 30rpx;
text-align: center;
margin-top:30rpx;
}
.cannodataimg{
margin: 300rpx auto 0;
}
\ No newline at end of file
... ...
... ... @@ -6,10 +6,10 @@
<text class='city_locate_text' style='{{!locateCity&&"color:#33b9ff;"}}'>{{locateCity||'点击定位'}}</text> -->
<view class="slecity">
<image src='{{url}}bicon_01x.png'></image>
<image src='/img/selweizhi.png'></image>
</view>
<view>{{currentCity}}</view>
<view class="cityhistory">{{currentCity}}</view>
</view>
<!-- <view class='national' data-types='national' catchtap='cityTap'>全国</view> -->
<view class='new_city'>
... ...
... ... @@ -49,14 +49,19 @@ page{
display: flex;
flex-wrap: wrap;
background: #fff;
padding: 20rpx 0rpx;
box-sizing: border-box
}
.new_city_text{
width: 200rpx;
text-align: center;
line-height: 70rpx;
background: #fff;
border-radius: 35rpx;
margin:0 0 22rpx 22rpx;
/* background: #fff; */
/* border-radius: 35rpx; */
margin-left:20rpx;
margin-top:10rpx;
background: #f5f5f5
}
.city_first_letter{
line-height: 60rpx;
... ... @@ -82,12 +87,13 @@ page{
}
.slecity{
width:20rpx;
height:24rpx;
font-size:0
height:26rpx;
line-height: 26rpx;
}
.slecity image{
width:100%;
height:100%;
height:100%;
}
.nodata{
color:#999;
... ... @@ -95,4 +101,7 @@ page{
text-align: center;
width:750rpx;
padding: 20rpx 0;
}
.cityhistory{
margin-left:10rpx;
}
\ No newline at end of file
... ...
... ... @@ -218,7 +218,7 @@ Page({
that.setData({
type:2
})
}, 1500)
}, 800)
... ...
... ... @@ -105,10 +105,14 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
let that = this;
this.setData({
url: app.globalData.url
})
let that=this;
setTimeout(function(){
that.setData({
url: app.globalData.url
})
},1000)
// this.getshaicontent();
... ... @@ -194,7 +198,7 @@ Page({
mores(){
let that=this;
this.setData({
morechose:true,
morechose: !this.data.morechose,
citychose: false,
zhinengwrap: false,
pricechose: false,
... ... @@ -204,12 +208,14 @@ Page({
})
let newmorelist = that.data.morelist;
let newmorecan=that.data.morecan
for (var obj of newmorelist) {
obj.sel = false;
// obj.sel = false;
obj.contentarr = []
if (obj.basic_sort == 1) {
for (var p of obj.value_list) {
p.twsel = false;
// p.twsel = false;
}
} else if (obj.basic_sort == 2) {
... ... @@ -225,20 +231,6 @@ Page({
})
console.log(that.data.morelist)
// this.getmorecan()
},
//隐藏更多选项
hidemorechose(){
this.setData({
morechose: false,
citychose: false,
zhinengwrap: false,
pricechose: false,
fenchose: false
})
let newnavarr = this.data.navarr;
for (var obj of newnavarr) {
obj.sel = false
... ... @@ -249,7 +241,30 @@ Page({
})
this.getmorenconetent()
// this.getmorecan()
},
// //隐藏更多选项
// hidemorechose(){
// this.setData({
// morechose: false,
// citychose: false,
// zhinengwrap: false,
// pricechose: false,
// fenchose: false
// })
// let newnavarr = this.data.navarr;
// for (var obj of newnavarr) {
// obj.sel = false
// }
// this.setData({
// navarr: newnavarr
// })
// this.getmorenconetent()
// },
//隐藏评分
hidefen(){
... ...
... ... @@ -33,17 +33,13 @@
<zy-slider id="zy-slider1" minValue="{{leftMin}}" maxValue="{{rightMax}}" min="{{min}}" max="{{max}}" blockColor="#0099FF" backgroundColor="#B0C4DE" selectedColor="#FF1493" bind:lowValueChange="lowValueChangeAction" bind:heighValueChange="heighValueChangeAction"
/>
<!-- style="left:{{ppleft}}rpx; width:{{ppvalue-ppleft}}rpx" -->
<view class="pp" style="width:95%;background:red;height:10rpx;margin:50rpx auto 0">
<!-- <view class="pp" style="width:67%;background:red;height:10rpx;margin:50rpx auto 0">
<view class="ppitem"></view>
<view class="ppitem"></view>
<view class="ppitem"></view>
<view class="ppitem"></view>
</view>
</view> -->
</view>
</view>
</view>
... ... @@ -63,10 +59,7 @@
<!-- 更多筛选 -->
<view class="register" wx:if="{{morechose}}" bindtap="hidemorechose">
<view class="moreregisterwrap">
<view wx:for="{{morelist}}" wx:key="" wx:for-index="par">
<view class="selectbox" wx:if="{{item.basic_sort==1}}">
<view class="selecttop">
<view class="selectopname {{item.sel==true?'selactive':''}}">{{item.name}}</view>
... ...
... ... @@ -323,7 +323,5 @@ page {
.ppitem{
width:1px;
height:50rpx;
background: green;
background: green;
}
\ No newline at end of file
... ...
... ... @@ -13,19 +13,26 @@ Page({
currentTime: 60,
mimaphone:'',
mima:'',
type:'',
type:'password',
id:'',
passtype:true,
shuru:'',
passwordtype:'password'
passwordtype:'password',
phone:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that=this;
setTimeout(function(){
that.setData({
url: app.globalData.url,
})
},1000)
this.setData({
url: app.globalData.url,
type:options.type,
id:options.id
})
... ... @@ -43,7 +50,7 @@ Page({
//输入手机号
enterphone(e){
this.setData({
phonenum:e.detail.value
phone:e.detail.value
})
},
//清空手机号
... ... @@ -61,20 +68,30 @@ Page({
},
showmia(){
this.setData({
type:'text',
passtype:false,
shuru:wx.getStorageSync("mima")
})
},
hidemima(){
this.setData({
type:'password',
passtype: true,
})
},
//验证码登录
login() {
let that = this;
//判断手机验证码
let reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
let phone = that.data.phonenum;
let phone = that.data.phone;
console.log(phone)
if (phone == '') {
wx.showToast({
... ... @@ -83,19 +100,22 @@ Page({
})
} else if (!reg.test(phone)) {
wx.showToast({
title: '请填写正确的手机号',
icon: 'none'
})
} else {
} else{
if (!reg.test(phone)) {
wx.showToast({
title: '请填写正确的手机号',
icon: 'none'
})
} else {
wx.navigateTo({
url: '/pages/enteryanzheng/enteryanzheng?phonenum='+that.data.phonenum+'&type='+that.data.type+'&id='+that.data.id,
})
wx.navigateTo({
url: '/pages/enteryanzheng/enteryanzheng?phonenum=' + that.data.phone + '&type=' + that.data.type + '&id=' + that.data.id,
})
}
}
},
//密码登录输入手机号
... ... @@ -116,6 +136,7 @@ Page({
this.setData({
shuru: e.detail.value
})
wx.setStorageSync('mima', e.detail.value)
},
//密码登录
... ... @@ -151,19 +172,9 @@ Page({
}else{
console.log(that.passtype)
var url ="/user/Profile/login_password"
if(that.data.passtype==true){
var params = {
mobile: that.data.mimaphone,
password: that.data.mima
}
}else{
var params = {
mobile: that.data.mimaphone,
password: that.data.shuru
}
var params = {
mobile: that.data.mimaphone,
password: that.data.mima
}
app.post(url, params).then((res) => {
... ... @@ -173,7 +184,7 @@ Page({
wx.navigateTo({
url: '/pages/peopleinfo/peopleinfo',
})
wx.setStorageSync("mima", "")
}else{
//type=1 发现首页的分享
if(that.data.type==1){
... ... @@ -187,7 +198,7 @@ Page({
url: url + '?id=' + that.data.id
})
}else{
wx.setStorageSync("mima", "")
wx.switchTab({
url: '/pages/homapage/homepage',
})
... ... @@ -219,7 +230,8 @@ Page({
},
clearmima(){
this.setData({
mima:''
mima:'',
})
},
/**
... ...
... ... @@ -54,17 +54,23 @@
</view>
<view class="yanzheng mima">
<view class="yanzhengmiddle yanzhengma">
<input placeholder='请输入密码' placeholder-class='enterphone' bindinput="shumima" type="password" value="{{mima}}" wx:if="{{passtype==true}}"/>
<input placeholder='{{mima}}' placeholder='请输入密码' placeholder-class='enterphone' bindinput="entershuru" type="text" value="{{shuru}}" wx:else/>
<input placeholder='请输入密码' placeholder-class='enterphone' bindinput="shumima" type="password" value="{{mima}}" wx:if="{{passtype}}"/>
<input placeholder='请输入密码' placeholder-class='enterphone' bindinput="shumima" type="text" value="{{mima}}" wx:else/>
<!-- <input placeholder='请输入密码' placeholder-class='enterphone' bindinput="entershuru" type="text" value="{{shuru}}" wx:else/> -->
</view>
<view class="mimaimg" bindtap="clearmima">
<view class="chaimg">
<view class="mimaimg" >
<view class="chaimg" bindtap="clearmima">
<image src="{{url}}/aicon_07x.png"></image>
</view>
<view class="eyeimg" bindtap="showmia">
<view class="eyeimg" bindtap="showmia" wx:if="{{passtype}}">
<image src="{{url}}/bicon_14x.png"></image>
</view>
<view class="eyeimg" bindtap="hidemima" wx:else>
<image src="{{url}}/bicon_13x.png"></image>
</view>
</view>
... ...
... ... @@ -107,9 +107,10 @@ page {
}
.enterphone {
color: #1a1a1a;
font-size: 30rpx;
width: 300rpx;
color: #999;
}
.mima {
... ...
// pages/findblock/jiulist/jiulist.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
type: '',
page: 1,
peoplelist: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// this.setData({
// type: options.type
// })
},
//获取名人酒单列表
getwinelist() {
let that = this;
let url = 'user/Center/favorite_wine_rec', params = {
page: that.data.page
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
peoplelist: that.data.peoplelist.concat(res.list)
})
console.log(that.data.peoplelist)
let newpeoplelist = that.data.peoplelist;
for (var obj of newpeoplelist) {
for (var p of obj.list) {
p.choose = false
}
}
that.setData({
peoplelist: newpeoplelist
})
console.log(that.data.peoplelist)
}).catch((err) => {
})
},
//出现弹层
shareAction(e) {
let id = e.currentTarget.dataset.id;
let newpeoplelist = this.data.peoplelist
for (var p of newpeoplelist) {
if (p.id == id) {
p.choose = !p.choose
}
}
this.setData({
peoplelist: newpeoplelist
})
},
//点赞
zan(e) {
let id = e.currentTarget.dataset.id;
let that = this;
let url = 'index/Common/good', params = {
sort: 1,
id: id
}
app.post(url, params).then((res) => {
console.log(res);
wx.showToast({
title: res,
icon: 'none'
})
let newpeoplelist = that.data.peoplelist;
for (var p of newpeoplelist) {
if (p.user_id == id) {
if (p.is_good == 0) {
p.is_good = 1;
p.good_count = p.good_count + 1
} else {
p.is_good = 0;
if (p.good_count == 0) {
p.good_count = 0
} else {
p.good_count = p.good_count - 1
}
}
}
}
this.setData({
peoplelist: newpeoplelist
})
}).catch((err) => {
})
},
//收藏和取消收藏
collect(e) {
console.log(909090)
let id = e.currentTarget.dataset.id;
console.log(id)
let that = this;
let url = 'index/Common/favorite', params = {
sort: 3,
id: id
}
app.post(url, params).then((res) => {
console.log(res);
wx.showToast({
title: res,
icon: 'none'
})
let newpeoplelist = that.data.peoplelist;
console.log(newpeoplelist)
for (var obj of newpeoplelist) {
if (obj.user_id == id) {
if (obj.is_favorite == 0) {
obj.is_favorite = 1
} else {
obj.is_favorite = 0
}
}
}
that.setData({
peoplelist: newpeoplelist
})
}).catch((err) => {
})
},
pinglun(e) {
let id = e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/myblock/pingjia/pingjia?id=' + id + '&type=' + 1,
})
},
//进入详情页
detail(e) {
let id = e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/findblock/jiudandetail/jiudandetail?id=' + id,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.setData({
page: 1,
peoplelist: []
})
this.getwinelist()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
let page = this.data.page;
page++;
this.setData({
page: page
})
this.getwinelist()
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function (e) {
let that = this;
console.log(e)
let id = e.target.dataset.id;
console.log(id)
let url = '/pages/findblock/jiudandetail/jiudandetail?id=' + id
return {
title: '发现', // 转发后 所显示的title
// path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径
path: url,//建档攻略分享1
// path:'',
success: (res) => { // 成功后要做的事情
console.log(res)
},
fail: function (res) {
// 分享失败
console.log(res)
}
}
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "名人酒单"
}
\ No newline at end of file
... ...
<view class="nodataimg" wx:if="{{peoplelist.length==0}}">
<image src="/img/wushuju.png"></image>
</view>
<!-- <view class="noData" wx:if="{{peoplelist.length==0}}">暂无相关数据</view> -->
<view class='wine_list' wx:else>
<view class='list_item' wx:for="{{peoplelist}}" wx:key="" bindtap="detail" data-id="{{item.id}}">
<view class='img_box'>
<image src='{{item.avatar}}'></image>
</view>
<view class='wine_title'>{{item.title}}</view>
<view class='wine_name'>{{item.user_nickname}}</view>
<view class='wine_leavel'>lv{{item.level}}</view>
<view class='action_box'>
<view class='single_action' catchtap="zan" data-id="{{item.user_id}}">
<view class='zan_icon'>
<image src='/img/aicon_46.png' mode='widthFix' wx:if="{{item.is_good==1}}"></image>
<image src='/img/aicon_47.png' mode='widthFix' wx:else></image>
</view>
{{item.good_count}}
</view>
<view class='single_action' catchtap="pinglun" data-id="{{item.id}}">
<view class='zan_icon'>
<image src='/img/aicon_67.png' mode='widthFix'></image>
</view>
{{item.comment_count}}
</view>
<view class='single_action {{item.choose?"active":""}}' catchtap='shareAction' data-id="{{item.id}}">
<image src='/img/gengduo.png' mode='widthFix' class='moreIcon'></image>
<view class='min_action_box'>
<view class='action_btn' wx:if="{{item.is_favorite==0}}" catchtap="collect" data-id="{{item.user_id}}">收藏</view>
<view class='action_btn yishou' wx:else catchtap="collect" data-id="{{item.user_id}}">已收藏</view>
<view class='action_btn'>分享</view>
<button class="lj_share" catchtap="buildshare" open-type='share' data-id="{{item.id}}" ></button>
</view>
</view>
</view>
</view>
</view>
... ...
/* pages/jiudan/jiudan.wxss */
page{
background: #F2F2F2;
}
.wine_list{
display: flex;
display: -webkit-flex;
flex-wrap: wrap;
}
.list_item{
width: 366rpx;
height: 400rpx;
background: #FFF;
border-radius: 5rpx;
margin-left: 6rpx;
margin-top: 6rpx;
display: flex;
flex-flow: column;
font-size: 28rpx;
align-items: center;
box-sizing: border-box;
padding-top: 40rpx;
}
.img_box{
width: 120rpx;
height: 120rpx;
border-radius: 50%;
overflow: hidden;
}
.wine_title{
color: #1A1A1A;
font-weight: 500;
margin-top: 20rpx;
line-height: 1;
}
.wine_name{
font-size: 26rpx;
color: #666;
margin-top: 10rpx;
}
.wine_leavel{
width: 68rpx;
height: 24rpx;
border: 1rpx solid #E81825;
border-radius: 12rpx;
font-size: 20rpx;
color: #E81825;
display: flex;
align-items: center;
justify-content: center;
margin-top: 14rpx;
}
.action_box{
display: flex;
justify-content: space-around;
color: #999;
width: 100%;
margin-top: 40rpx;
}
.single_action{
padding: 0 10rpx;
display: flex;
align-items: center;
position: relative;
}
.zan_icon{
width: 30rpx;
margin-right: 10rpx;
}
.moreIcon{
width: 5rpx;
}
.min_action_box{
width: 134rpx;
height: 175rpx;
position: absolute;
background-color: #FFF;
z-index: 99;
left: -140rpx;
top: 0;
font-size: 30rpx;
flex-flow: column;
box-sizing: border-box;
padding: 10rpx 0;
justify-content: space-around;
align-items: center;
color: #1A1A1A;
border-radius: 5rpx;
box-shadow:0px 8px 16px 0px rgba(44,49,63,0.1);
display: none;
}
.action_btn{
width: 100%;
text-align: center;
position: relative;
}
.action_btn.active{
color: #E81825;
}
.action_btn button{
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
opacity: 0;
}
.single_action.active .min_action_box{
display: flex;
}
.date{
padding: 11rpx 32rpx;
box-sizing: border-box;
background: #F2F2F2;
color:#666666;
font-size: 24rpx;
}
.yishou{
color:#E81825;
}
.lj_share{
width:94rpx;
height:57rpx;
border:none;
position: absolute;
right:20rpx;
bottom:20rpx;
background: transparent
}
button::after{
border:none;
outline: none;
background: transparent
}
\ No newline at end of file
... ...
// pages/myblock/xiugaimima/xiugaimima.js
const app=getApp()
Page({
/**
* 页面的初始数据
*/
data: {
oldpass:'',
newpass:'',
newpassque:'',
passqueding:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
//输入 原密码
inputold(e){
this.setData({
oldpass:e.detail.value
})
this.panudanmima()
},
//输入新密码
inputnew(e){
this.setData({
newpass:e.detail.value
})
this.panudanmima()
},
//输入确定密码
inputnewque(e){
this.setData({
newpassque: e.detail.value
})
this.panudanmima()
},
panudanmima(){
if (this.data.oldpass.length >= 6 && this.data.oldpass.length <= 20 && this.data.newpass.length >= 6 && this.data.newpass.length <= 20 && this.data.newpassque.length >= 6 && this.data.newpassque.length<=20){
this.setData({
passqueding:true
})
}else{
this.setData({
passqueding: false
})
}
},
//确认修改密码
confirmPassWord(){
let that = this;
let url = 'user/Center/change_user_pwd', params = {
old_password:that.data.oldpass,
new_password:that.data.newpass,
confirm_password:that.data.newpassque
}
app.post(url, params).then((res) => {
console.log(res);
wx.showToast({
title: '修改成功',
icon:'none'
})
setTimeout(function(){
wx.navigateBack({
checked:true
})
},1500)
}).catch((err) => {
wx.showToast({
title: err.data.msg,
icon:'none'
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "修改密码"
}
\ No newline at end of file
... ...
<view class="setmima">
<view class="setmimaleft">
<input password placeholder='原密码' bindinput='inputold' />
</view>
<view class="mimaeye">
<image src="{{url}}/bicon_14x.png"></image>
</view>
</view>
<view class="setmima">
<view class="setmimaleft">
<input password placeholder='新密码' bindinput='inputnew' />
</view>
<view class="mimaeye">
<image src="{{url}}/bicon_14x.png"></image>
</view>
</view>
<view class="setmima">
<view class="setmimaleft">
<input password placeholder='确定新密码' bindinput='inputnewque' />
</view>
<view class="mimaeye">
<image src="{{url}}/bicon_14x.png"></image>
</view>
</view>
<view class="que" bindtap='confirmPassWord' wx:if="{{passqueding}}">确认</view>
<view class="queren" wx:else>确认</view>
<view class="needmi">需要有6-20位数字、字母或符号组成</view>
... ...
page{
background: #F2F2F2
}
.setmima{
width:540rpx;
height:120rpx;
background:rgba(255,255,255,1);
border-radius:5rpx;
margin:26rpx auto 0;
display:flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
box-sizing: border-box
}
.setmima:first-child{
margin:206rpx auto 0;
}
.setmimaleft{
width:420rpx;
color:#1A1A1A;
font-size: 30rpx;
}
.shemi{
color:#1A1A1A;
font-size: 30rpx;
}
.mimaeye{
width:34rpx;
height:16rpx;
font-size: 0
}
.que{
width:540rpx;
height:100rpx;
background:rgba(232,24,37,1);
border-radius:50rpx;
color:#fff;
font-size: 30rpx;
text-align: center;
line-height: 100rpx;
margin:90rpx auto 0;
}
.queren{
width:540rpx;
height:100rpx;
background:#CCCCCC;
border-radius:50rpx;
color:#fff;
font-size: 30rpx;
text-align: center;
line-height: 100rpx;
margin:90rpx auto 0;
}
.needmi{
color:#999999;
font-size: 24rpx;
text-align: center;
margin-top:32rpx;
}
.mimasuccess{
width:290rpx;
height:60rpx;
background:rgba(0,0,0,1);
opacity:0.8;
border-radius:10rpx;
color:#fff;
font-size: 24rpx;
text-align: center;
line-height: 60rpx;
margin:468rpx auto 0;
}
\ No newline at end of file
... ...
// pages/myblock/yonghufankui/yonghufankui.js
const app=getApp()
Page({
/**
* 页面的初始数据
*/
data: {
content:'',
contentlen:0,
istijiao:true
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
enteryijian(e){
this.setData({
content:e.detail.value,
contentlen: e.detail.value.length
})
},
tijiao(){
let that = this;
if(that.data.content==''){
wx.showToast({
title: '请输入反馈内容',
icon:'none'
})
}else{
that.setData({
istijiao: false
})
var url = 'user/Center/feedback';
var params = {
content: that.data.content
}
app.post(url, params).then((res) => {
console.log(res);
wx.showToast({
title: '提交成功',
icon: 'none'
})
setTimeout(function () {
wx.navigateBack({
checked: true
})
}, 1500)
}).catch((err) => {
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "用户反馈"
}
\ No newline at end of file
... ...
<view class="fankuicontent">
<textarea placeholder='请输入您的意见,我们会积极处理并改正的~' placeholder-class='enterclass' bindinput="enteryijian" />
<view class="wordlen">{{contentlen}}/200</view>
</view>
<view class="tijiao" bindtap="tijiao" wx:if="{{istijiao}}">提交</view>
<view class="tijiao" wx:else>提交</view>
\ No newline at end of file
... ...
.fankuicontent{
width:686rpx;
height:300rpx;
margin:39rpx auto 0;
background:rgba(242,242,242,1);
padding: 25rpx;
box-sizing: border-box;
color:#999999;
font-size: 28rpx;
position: relative
}
.enterclass{
color:#999999;
font-size: 28rpx;
}
.wordlen{
color:#999999;
font-size: 24rpx;
position: absolute;
right:25rpx;
bottom:25rpx;
}
.tijiao{
width:660rpx;
height:80rpx;
background:rgba(232,24,37,1);
border-radius:40rpx;
color:#fff;
font-size: 28rpx;
text-align: center;
line-height: 80rpx;
margin:40rpx auto 0;
}
\ No newline at end of file
... ...
// pages/yonghuxieyi/yonghuxieyi.js
const app=getApp();
var WxParse = require('../../wxParse/wxParse.js');
Page({
/**
* 页面的初始数据
*/
data: {
title:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getrule()
},
getrule(){
let that = this;
let url = 'index/Common/protocol', params = {
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
title:res.title
})
wx.setNavigationBarTitle({
title: res.title
})
WxParse.wxParse('article', 'html', res.content, that, 5)
}).catch((err) => {
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": ""
}
\ No newline at end of file
... ...
<import src="../../wxParse/wxParse.wxml"/>
<view class="rulebox">
<template is="wxParse" data="{{wxParseData:article.nodes}}"/>
</view>
... ...
.rulebox{
padding: 30rpx;
box-sizing: border-box;
color:#4D4D4D;
font-size: 28rpx;
}
\ No newline at end of file
... ...