作者 lihongjuan

1

//app.js
App({
onLaunch: function () {
//自动更新版本
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
})
updateManager.onUpdateReady(function () {
wx.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success: function (res) {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
}
}
})
})
updateManager.onUpdateFailed(function () {
// 新的版本下载失败
wx.showModal({
title: '更新提示',
content: '新版本下载失败',
showCancel: false
})
})
// 展示本地存储能力
wx.hideTabBar()
var logs = wx.getStorageSync('logs') || []
... ... @@ -41,7 +69,7 @@ App({
//init
let that = this;
let postData = data;
let baseUrl = 'http://delicacy.w.brotop.cn/api/';
let baseUrl = 'https://delicacy.w.broing.cn/api/';
//网络请求
let header = {
// 'XX-Device-Type': 'wxapp',
... ... @@ -95,7 +123,7 @@ App({
wx.showLoading({
title: '上传中',
})
let url = 'http://delicacy.w.brotop.cn/api/common/upload';
let url = 'https://delicacy.w.broing.cn/api/common/upload';
let head = {
'token': wx.getStorageSync('token'),
'XX-Device-Type': ''
... ...
... ... @@ -259,5 +259,7 @@ button::after{
border:none;
outline: none;
}
.comtop {
padding: 0 20rpx;
}
... ...
... ... @@ -136,14 +136,14 @@
</view> -->
<view class="imagebox flexone">
<view class="picbox flexone">
<view class="imgItem" wx:for="{{image}}" wx:key="">
<view class="imgItem" wx:for="{{image}}" wx:key="">
<image mode="aspectFill" src="{{item}}" />
<view class="chahao" bindtap="del" data-url="{{item}}">
<image src="/img/chahao.png"></image>
</view>
</view>
<view class="imgItem" bindtap="chooseImage">
<image mode="aspectFill" src="/img/jiang.png" />
<view class="imgItem" bindtap="chooseImage">
<image mode="aspectFill" src="/img/jiang.png" />
</view>
</view>
... ...
... ... @@ -46,13 +46,35 @@ Page({
that.setData({
commentdetail: res
})
// var imagesk=[];
// console.log(that.data.commentdetail.images.length)
// if(that.data.commentdetail.images.length>9){
// for(var i=0;i<that.data.commentdetail.images.length;i++){
// if(i<9){
// imagesk.push(that.data.commentdetail.images[i])
// }
// }
// that.data.commentdetail.images=imagesk
// }
// that.setData({
// commentdetail:that.data.commentdetail
// })
}).catch((err) => {
})
},
// 进入主页
personpage(e){
console.log(e)
let userid=e.currentTarget.dataset.userid;
wx.navigateTo({
url: '/pages/personpage/personpage?userid='+userid,
})
},
// 输入评论内容
enterword(e) {
this.setData({
... ... @@ -65,6 +87,21 @@ Page({
})
},
// 评论图片预览
previewimgk(e){
let index=e.currentTarget.dataset.index;
wx.previewImage({
current: this.data.commentdetail.images[index],
urls:this.data.commentdetail.images,
success: function (res) { },
fail: function (res) { },
complete: function (res) { },
})
},
// 发送评论
send(){
let that = this;
... ...
... ... @@ -15,7 +15,7 @@
<view wx:else>
<view class="photo">
<view class="commentbox">
<view class="comtop flextwo">
<view class="comtop flextwo" catchtap="personpage" data-userid="{{commentdetail.user_id}}">
<view class="comleft">
<image src="{{commentdetail.avatar}}"></image>
</view>
... ... @@ -89,13 +89,15 @@
</view>
<view class="fen">{{commentdetail.score}}分</view>
</view>
<view class="text">
<text class="textk">
{{commentdetail.content}}
</view>
</text>
<view class="textboximg flexone" wx:if="{{commentdetail.images.length!=0}}">
<view class="boxitem" wx:for="{{commentdetail.images}}" wx:key="">
<image src="{{item}}"></image>
<!-- wx:for="{{commentdetail.images}}" wx:key="" -->
<view class="boxitem" wx:for="{{commentdetail.images}}" wx:key="" >
<image src="{{item}}" mode="aspectFill" bindtap="previewimgk" data-index="index"></image>
</view>
</view>
</view>
</view>
... ...
@import '../morecomment/morecomment.wxss';
@import '../examine/examine.wxss';
.photo {
/* width:686rpx; */
margin-top: 0;
/* margin:0 auto; */
background: #fff;
}
... ... @@ -10,8 +12,12 @@
}
.boxitem {
width: 186rpx;
height: 186rpx;
width: 184rpx;
height: 184rpx;
font-size: 0;
margin-right: 20rpx;
margin-bottom: 20rpx;
}
.star {
... ... @@ -121,6 +127,14 @@
width:560rpx;
}
.commentbox{
padding: 40rpx;
padding: 40rpx 20rpx;
box-sizing: border-box;
}
.textk{
color: #06121e;
font-size: 24rpx;
/* margin-top:10rpx; */
/* line-height: 1; */
display:inline-block
}
... ...
... ... @@ -35,7 +35,8 @@ Page({
composite_id: '',
city_id:'',
footersel:1,
show:false
show:false,
num:0
},
/**
... ... @@ -44,7 +45,7 @@ Page({
onLoad: function(options) {
this.getcountry();
// 获取banner
this.getbanner()
this.getbanner();
},
// 底部导航切换
// 切换底部导航
... ... @@ -334,7 +335,23 @@ Page({
console.log('9999', app.globalData.cityname)
that.getshanguqan();
let newnum=wx.getStorageSync('num');
console.log(newnum)
if(newnum==''){
wx.setStorageSync('num', 1);
this.setData({
page:1,
goodlist:[]
})
that.gethomelist()
}else{
this.setData({
page:1,
goodlist:wx.getStorageSync('goodlist')
})
}
... ... @@ -381,6 +398,8 @@ Page({
that.setData({
goodlist:newArr
})
wx.setStorageSync('goodlist', that.data.goodlist)
if(that.data.goodlist.lenfth==0){
that.setData({
show:true
... ... @@ -554,11 +573,26 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.setData({
page:1,
goodlist:[]
})
this.getuserinfo();
// let newnum=wx.getStorageSync('num');
// console.log(newnum)
// if(newnum==''){
// wx.setStorageSync('num', 1);
// this.setData({
// page:1,
// goodlist:[]
// })
// }else{
// this.setData({
// page:1,
// goodlist:wx.getStorageSync('goodlist')
// })
// }
// //获取首页列表
// this.gethomelist();
},
... ...
... ... @@ -68,6 +68,7 @@
<view class="hualist flexone" wx:if="{{item.score!=false}}">
<view class="flowername">米其林</view>
<view class="pingfen" wx:if="{{item.score!=false}}">{{item.score}}星</view>
<!-- wx:if="{{item.score>=1}}" -->
<!-- <view class="huaitem">
<image src="/img/flower.png"></image>
... ... @@ -81,7 +82,7 @@
<image src="/img/flower.png"></image>
</view> -->
<view class="pingfen" wx:if="{{item.score!=false}}">{{item.score}}分</view>
</view>
<view class="ping flexone">
<view class="kuaizifen">Tabelog</view>
... ...
... ... @@ -135,7 +135,7 @@ swiper-item {
background: #fff;
}
.goodbot{
padding: 0 20rpx;
padding: 0 10rpx;
box-sizing: border-box;
}
... ... @@ -199,9 +199,9 @@ swiper-item {
color: #fca052;
font-size: 18rpx;
margin-right:10rpx;
font-weight: bold;
}
.pingfen {
overflow: hidden;
text-overflow: ellipsis;
color: #fca052;
... ... @@ -209,21 +209,23 @@ swiper-item {
margin-left: 6rpx;
text-align: right;
margin-right:8rpx;
font-weight: bold;
}
.introleft {
/* width: 188rpx; */
padding: 0 20rpx;
padding: 0 10rpx;
box-sizing: border-box;
height: 42rpx;
background: rgba(255, 255, 255, 1);
border:1px solid rgba(112, 112, 112, 1);
border:2rpx solid rgba(112, 112, 112, 1);
opacity: 1;
border-radius: 180rpx;
color: #3d444d;
font-size: 22rpx;
font-size: 18rpx;
text-align: center;
line-height: 42rpx;
}
.introright {
... ... @@ -305,9 +307,10 @@ page {
float: left;
}
.flowername{
color:#F0ABA5;
font-size:20rpx;
color: #fca052;
font-size:18rpx;
margin-right:10rpx;
font-weight: bold;
}
.noitem{
box-shadow: none;
... ...
... ... @@ -12,6 +12,7 @@
.bottomtextright {
width: 360rpx;
height: 80rpx;
line-height: 80rpx;
background: rgba(253, 172, 48, 1);
border: 2rpx solid rgba(253, 170, 42, 1);
opacity: 1;
... ...
... ... @@ -6,11 +6,13 @@ Page({
* 页面的初始数据
*/
data: {
comentarr: ['全部', '好评', '差评', '带图评论'],
// '好评', '差评',
comentarr: ['全部', '带图评论'],
coment:0,
page:1,
shopid:'',
commentlist:[]
commentlist:[],
chuantype:0
},
... ... @@ -32,6 +34,15 @@ Page({
page:1,
commentlist:[]
})
if(e.currentTarget.dataset.index==0){
this.setData({
chuantype:0
})
}else{
this.setData({
chuantype:3
})
}
console.log(this.data.coment)
this.getmorecomment()
... ... @@ -45,7 +56,7 @@ Page({
page: that.data.page,
shop_id:that.data.shopid,
limit:15,
type:that.data.coment
type:that.data.chuantype
}
app.post(url, params,"post").then((res) => {
... ... @@ -53,13 +64,44 @@ Page({
that.setData({
commentlist: that.data.commentlist.concat(res.data)
})
that.data.commentlist.forEach(function(value,index,array){
console.log('484389843',value)
var imagesk=[];
if(value.images.length>9){
for(var i=0;i<value.images.length;i++){
if(i<9){
imagesk.push(value.images[i])
}
}
value.images=imagesk
}
})
that.setData({
commentlist:that.data.commentlist
})
}).catch((err) => {
})
},
// 评论图片预览
previewimgk(e){
console.log(e)
let pindex=e.currentTarget.dataset.pindex;
let index=e.currentTarget.dataset.index;
wx.previewImage({
current: this.data.commentlist[pindex].images[index],
urls:this.data.commentlist[pindex].images,
success: function (res) { },
fail: function (res) { },
complete: function (res) { },
})
},
// 点评详情
comentdetail(e) {
let commentid = e.currentTarget.dataset.id
... ...
... ... @@ -3,15 +3,15 @@
</view>
<view class="nodata" wx:if="{{commentlist.length==0}}">暂无评论</view>
<view class="bodybox" wx:else>
<view class="photo" wx:for="{{commentlist}}" wx:key="">
<view class="jianintro commentbox" bindtap="comentdetail" data-id="{{item.id}}">
<view class="photo" wx:for="{{commentlist}}" wx:key="" wx:for-index="cellindex">
<view class="jianintro commentbox commentk" bindtap="comentdetail" data-id="{{item.id}}" >
<view class="comtop flextwo">
<view class="comleft">
<image src="{{item.avatar}}"></image>
</view>
<view class="comright">
<view class="comrtop flextwo">
<view class="comrtop flexone">
<view class="comrname">{{item.nickname}}</view>
<view class="star starone flexone">
<view class="staritem">
... ... @@ -82,12 +82,12 @@
</view>
<view class="fen">{{item.score}}分</view>
</view>
<view class="text">
<text class="text">
{{item.content}}
</view>
</text>
<view class="textboximg flexone">
<view class="boxitem" wx:for='{{item.images}}' wx:key="">
<image src="{{item}}"></image>
<view class="boxitem" wx:for='{{item.images}}' wx:key="" catchtap="previewimgk" data-index="{{index}}" data-pindex="{{cellindex}}">
<image src="{{item}}" mode="aspectFill"></image>
</view>
<!-- <view class="boxitem">
<image src="/img/photo.png"></image>
... ...
... ... @@ -23,4 +23,11 @@
}
.commentbox{
margin-top:0
}
.star {
margin-left:20rpx;
}
.commentk{
padding: 40rpx 0;
box-sizing: border-box;
}
\ No newline at end of file
... ...
<view class="noimg" wx:if="{images.length==0}}">
<view class="noimg" wx:if="{{images.length==0}}">
<view class="nodataimg" >
<image src="/img/nodataimg.png"></image>
</view>
<view class="nomoer nomoredata">没有更多了哦~</view>
</view>
<view class="photoptop flexone" wx:else>
<view class="photoitem" wx:for='{{images}}' wx:key="" bindtap="previewimg" data-index="{{index}}">
<image src="{{item}}"></image>
<view class="photoitemk" wx:for='{{images}}' wx:key="" bindtap="previewimg" data-index="{{index}}">
<image src="{{item}}" mode="aspectFill"></image>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -6,12 +6,18 @@
padding: 30rpx;
box-sizing: border-box;
}
.photoitem{
width:214rpx;
height:214rpx;
.photoitemk{
width:342rpx;
height:342rpx;
padding-right: 0;
margin-right:25rpx;
}
.photoitemk:nth-child(2n){
margin-right:0
}
.photoptop{
padding: 30rpx 12rpx 30rpx 30rpx;
padding: 20rpx;
flex-wrap: wrap
}
\ No newline at end of file
... ...
... ... @@ -13,7 +13,7 @@
<view class="bodybox" wx:else>
<view class="photo" wx:for="{{commentlist}}" wx:key="" wx:for-index="cellindex">
<view class="jianintro commentitem" bindtap="comentdetail" data-id="{{item.id}}" data-shopid="{{item.shop_id}}">
<view class="jianintro commentitem commentk" bindtap="comentdetail" data-id="{{item.id}}" data-shopid="{{item.shop_id}}">
<view class="comtop flextwo">
<view class="comleft">
<image src="{{item.avatar}}"></image>
... ... @@ -83,7 +83,7 @@
<!-- <view class="all">全部</view> -->
<view class="textboximg flexone" wx:if="{{item.images.length!=0}}">
<view class="boxitem" wx:for="{{item.images}}" wx:key="">
<image src="{{item}}" catchtap="previewimgk" data-index="{{index}}" data-pindex="{{cellindex}}" mode="aspectFit"></image>
<image src="{{item}}" catchtap="previewimgk" data-index="{{index}}" data-pindex="{{cellindex}}" mode="aspectFill"></image>
</view>
</view>
... ...
... ... @@ -151,4 +151,12 @@
}
.textboximg{
flex-wrap: wrap;
}
.shouprice{
color:#000000;
font-size: 24rpx;
}
.commentk{
padding: 40rpx 0;
box-sizing: border-box;
}
\ No newline at end of file
... ...
... ... @@ -59,41 +59,62 @@
<view class='list-masonry'>
<view class='item-masonry' bindtap="goodtail" wx:for="{{goodlist}}" wx:key="" data-id="{{item.id}}">
<image src='{{item.image}}' mode='widthFix'></image>
<view class="goodbot">
<view class="goodname">{{item.name}}</view>
<view class="goodname riname" wx:if="{{item.name_jap!=null}}">{{item.name_jap}}</view>
<view class="intro flextwo">
<view class="introleft">
{{item.series_name}}
</view>
<view class="introright">
<view class="ping flexone">
<view class="pingleft">
<image src='/img/kuaizi.png'></image>
</view>
<view class="pingfen">{{item.level}}</view>
</view>
<view class="hualist flexone">
<view class="huaitem">
<image src="/img/flower.png"></image>
</view>
<view class="huaitem">
<image src="/img/flower.png"></image>
</view>
<view class="huaitem">
<image src="/img/flower.png"></image>
</view>
</view>
<view class="hualist flexone" wx:if="{{item.score!=false}}">
<view class="flowername">米其林</view>
<view class="pingfen" wx:if="{{item.score!=false}}">{{item.score}}星</view>
<!-- wx:if="{{item.score>=1}}" -->
<!-- <view class="huaitem">
<image src="/img/flower.png"></image>
</view> -->
<!-- wx:if="{{item.score>=2}}" -->
<!-- <view class="huaitem" >
<image src="/img/flower.png"></image>
</view> -->
<!-- wx:if="{{item.score>=3}}" -->
<!-- <view class="huaitem" >
<image src="/img/flower.png"></image>
</view> -->
</view>
<view class="ping flexone">
<view class="kuaizifen">Tabelog</view>
<!-- <view class="pingleft">
<image src='/img/kuaizi.png'></image>
</view> -->
<view class="pingfen">{{item.tabelog}}分</view>
</view>
</view>
</view>
<view class="shou">
<text class="shoumoney">¥{{item.price}}</text>
<text class="shouren">/人</text>
</view>
<view class="addname flexone">
<view class="flextwo pricetwo" >
<view class="shou">
<text class="shoumoney">¥{{item.price}}</text>
<text class="shouren">/人</text>
</view>
<view class="addname flexone">
<view class="addimg">
<image src="/img/huangweizhi.png"></image>
</view>
<view class="dizhi commnameone">{{item.city_name}}</view>
</view>
</view>
</view>
</view>
<!-- <view class='item-masonry'>
<image src='/img/deng.png' mode='widthFix'></image>
... ...
... ... @@ -41,7 +41,7 @@
</view>
</view>
<view class="starlevel flextwo">
<!-- <view class="starlevel flextwo">
<view class="levelstar">
<image src="/img/star.png"></image>
</view>
... ... @@ -53,12 +53,12 @@
<image src="/img/star.png"></image>
</view>
</view>
</view>
<view class="level">
</view> -->
<!-- <view class="level">
<view class="neilevel" style="width:{{userinfo.percent}}"></view>
</view>
</view> -->
<view class="startext">{{userinfo.num}}/{{userinfo.max_num}}</view>
<!-- <view class="startext">{{userinfo.num}}/{{userinfo.max_num}}</view> -->
</view>
... ...
... ... @@ -32,7 +32,7 @@
margin-top:10rpx;
}
.topbu{
height:360rpx;
/* height:360rpx; */
box-shadow:none;
background: #fff;
position: unset;
... ... @@ -52,4 +52,7 @@ page{
margin:24rpx auto 0;
line-height: 1.5
}
.topbu {
height:256rpx;
}
\ No newline at end of file
... ...
... ... @@ -87,6 +87,7 @@ Page({
selhotcity(e) {
console.log(e)
wx.setStorageSync('num', "")
let id = e.currentTarget.dataset.id;
console.log(id)
let cityname = e.currentTarget.dataset.cityname;
... ... @@ -103,6 +104,7 @@ Page({
// 当前城市切换
selectcurrent(){
wx.setStorageSync('num', "")
let id=this.data.cityid;
this.changecity(id);
app.globalData.cityname = this.data.currentcity;
... ...
... ... @@ -56,40 +56,55 @@
</view>
<view class="goodbot">
<view class="goodname">{{item.name}}</view>
<view class="goodname riname" wx:if="{{item.name_jap!=null}}">{{item.name_jap}}</view>
<view class="intro flextwo">
<view class="introleft">
{{item.series_name}}
</view>
<view class="introright">
<view class="ping flexone">
<view class="pingleft">
<image src='/img/kuaizi.png'></image>
</view>
<view class="pingfen">{{item.synthetical_score}}</view>
</view>
<view class="hualist flexone">
<view class="huaitem">
<image src="/img/flower.png"></image>
</view>
<view class="huaitem">
<image src="/img/flower.png"></image>
</view>
<view class="huaitem">
<image src="/img/flower.png"></image>
</view>
</view>
<view class="hualist flexone" wx:if="{{item.score!=false}}">
<view class="flowername">米其林</view>
<view class="pingfen" wx:if="{{item.score!=false}}">{{item.score}}星</view>
<!-- wx:if="{{item.score>=1}}" -->
<!-- <view class="huaitem">
<image src="/img/flower.png"></image>
</view> -->
<!-- wx:if="{{item.score>=2}}" -->
<!-- <view class="huaitem" >
<image src="/img/flower.png"></image>
</view> -->
<!-- wx:if="{{item.score>=3}}" -->
<!-- <view class="huaitem" >
<image src="/img/flower.png"></image>
</view> -->
</view>
<view class="ping flexone">
<view class="kuaizifen">Tabelog</view>
<!-- <view class="pingleft">
<image src='/img/kuaizi.png'></image>
</view> -->
<view class="pingfen">{{item.tabelog}}分</view>
</view>
</view>
</view>
<view class="shou">
<view class="flextwo pricetwo">
<view class="shou">
<text class="shoumoney">¥{{item.price}}</text>
<text class="shouren">/人</text>
</view>
<view class="addname flexone">
<view class="addname flexone">
<view class="addimg">
<image src="/img/huangweizhi.png"></image>
</view>
<view class="dizhi commnameone">{{item.business_name}}</view>
</view>
</view>
</view>
... ...
... ... @@ -20,7 +20,8 @@ Page({
pic:[],
shoplist:[],
posterurl:'',
postershow:false
postershow:false,
remarklen:''
},
swiperChange: function(e) {
... ... @@ -115,16 +116,19 @@ share(){
},
xiangce() {
console.log(33443)
if(this.data.pic.length!=0){
wx.navigateTo({
url: '/pages/morepic/morepic',
})
}else{
wx.showToast({
title: '没有更多图片了~',
icon:'none'
})
}
wx.navigateTo({
url: '/pages/morepic/morepic',
})
// if(this.data.pic.length!=0){
// wx.navigateTo({
// url: '/pages/morepic/morepic',
// })
// }else{
// wx.showToast({
// title: '没有更多图片了~',
// icon:'none'
// })
// }
},
// 隐藏遮罩层
... ... @@ -308,26 +312,34 @@ share(){
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
remarklen:res.remarks.length
})
let image=[]
console.log(res.images.length)
// res.synthetical_score.tofixed("1");
var pic=[]
for(var j=0;j<res.images.length;j++){
pic.push(res.images[j])
}
that.setData({
pic:pic
})
app.globalData.images=pic;
console.log( app.globalData.images)
if (res.images.length>6){
var pic=[]
for(var i=0;i<=6;i++){
image.push(res.images[i])
}
for(var j=7;j<res.images.length;j++){
pic.push(res.images[j])
}
that.setData({
images:image,
pic:pic
})
app.globalData.images=pic
images: image
})
}else{
that.setData({
... ... @@ -348,6 +360,26 @@ share(){
that.setData({
shopdetail: res
})
// 评论里的图片保留9张
that.data.shopdetail.remarks.forEach(function(value,index,array){
console.log('484389843',value)
var imagesk=[];
if(value.images.length>9){
for(var i=0;i<value.images.length;i++){
if(i<=9){
imagesk.push(value.images[i])
}
}
value.images=imagesk
}
})
that.setData({
shopdetail:that.data.shopdetail
})
let token=wx.getStorageSync("token");
if(token==''){
wx.showToast({
... ... @@ -473,6 +505,111 @@ share(){
})
},
// 分享到朋友圈
shareimg(){
var that = this
wx.getSetting({
success(res) {
if (!res.authSetting['scope.writePhotosAlbum']) {
wx.authorize({
scope: 'scope.writePhotosAlbum',
success() { //这里是用户同意授权后的回调
wx.saveImageToPhotosAlbum({
filePath: that.data.posterurl,
success(res) {
wx.showModal({
content: '图片已保存到相册,快去朋友圈分享吧~',
showCancel: false,
confirmText: '好的',
confirmColor: '#333',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
/* 该隐藏的隐藏 */
that.setData({
maskHidden: false
})
}
},
fail: function (res) {
}
})
}
})
},
fail() { //这里是用户拒绝授权后的回调
// wx.openSetting({
// success: function (data) {
// console.log(data)
// if (data.authSetting["scope.writePhotosAlbum"] === true) {
// console.log("是否授权成功")
// } else {
// applyApi.toast("授权失败");
// }
// }
// })
wx.showModal({
title: '提示',
content: '您取消授权,无法保存图片,点击确定打开权限',
success(res) {
if (res.confirm) {
console.log('用户点击确定')
wx.openSetting({
success(res) {
console.log(res.authSetting)
// res.authSetting = {
// "scope.userInfo": true,
// "scope.userLocation": true
// }
}
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
}
})
} else { //用户已经授权过了
console.log(that.data.codeurl)
wx.saveImageToPhotosAlbum({
filePath: that.data.posterurl,
success(res) {
wx.showModal({
content: '图片已保存到相册,快去朋友圈分享吧~',
showCancel: false,
confirmText: '好的',
confirmColor: '#333',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
/* 该隐藏的隐藏 */
that.setData({
maskHidden: false
})
}
},
fail: function (res) {
}
})
}
})
}
}
})
},
hideposter(){
this.setData({
postershow:false
... ...
... ... @@ -47,7 +47,9 @@
<view class="cai flex">
<view class="flower flexone" wx:if="{{shopdetail.miqilin_score!=false}}">
<view class="flowername">米其林</view>
<view class="floweritem" wx:if="{{shopdetail.miqilin_score>=1}}">
<view class="starnametext">{{shopdetail.miqilin_score}}星</view>
<!-- <view class="floweritem" wx:if="{{shopdetail.miqilin_score>=1}}">
<image src="/img/hua.png"></image>
</view>
<view class="floweritem" wx:if="{{shopdetail.miqilin_score>=2}}">
... ... @@ -61,11 +63,48 @@
</view>
<view class="floweritem" wx:if="{{shopdetail.miqilin_score>=5}}">
<image src="/img/hua.png"></image>
</view>
</view> -->
</view>
<!-- <view class="fen" wx:if="{{shopdetail.miqilin_score!=false}}">{{shopdetail.miqilin_score}} 分</view> -->
<view class="huaname">{{shopdetail.series_name}}</view>
</view>
<view class="commentone flexone">
<view class="kuaizinum">Tabelog</view>
<!-- <view class="sanleft">
<image src="/img/kuai.png"></image>
</view> -->
<!-- <view class="star flexone">
<view class="staritem">
<image src="/img/pingfenshi.png" wx:if="{{shopdetail.tabelog>=1}}"></image>
<image src="/img/lingfen_icon.png" wx:if="{{shopdetail.tabelog<0.5}}"></image>
<image src="/img/banke.png" wx:if="{{shopdetail.tabelog>=0.5&&shopdetail.tabelog<1}}"></image>
</view>
<view class="staritem">
<image src="/img/pingfenshi.png" wx:if="{{shopdetail.tabelog>=2}}"></image>
<image src="/img/lingfen_icon.png" wx:if="{{shopdetail.tabelog<1.5}}"></image>
<image src="/img/banke.png" wx:if="{{shopdetail.tabelog>=1.5&&shopdetail.tabelog<2}}"></image>
</view>
<view class="staritem">
<image src="/img/pingfenshi.png" wx:if="{{shopdetail.tabelog>=3}}"></image>
<image src="/img/lingfen_icon.png" wx:if="{{shopdetail.tabelog<2.5}}"></image>
<image src="/img/banke.png" wx:if="{{shopdetail.tabelog>=2.5&&shopdetail.tabelog<3}}"></image>
</view>
<view class="staritem">
<image src="/img/pingfenshi.png" wx:if="{{shopdetail.tabelog>=4}}"></image>
<image src="/img/lingfen_icon.png" wx:if="{{shopdetail.tabelog<3.5}}"></image>
<image src="/img/banke.png" wx:if="{{shopdetail.tabelog>=3.5&&shopdetail.tabelog<4}}"></image>
</view>
<view class="staritem">
<image src="/img/pingfenshi.png" wx:if="{{shopdetail.tabelog>=5}}"></image>
<image src="/img/lingfen_icon.png" wx:if="{{shopdetail.tabelog<4.5}}"></image>
<image src="/img/banke.png" wx:if="{{shopdetail.tabelog>=4.5&&shopdetail.tabelog<5}}"></image>
</view>
</view> -->
<view class="fen" wx:if="{{shopdetail.tabelog!=0}}">{{shopdetail.tabelog}}分</view>
<view class="fen" wx:else>无评论</view>
</view>
<view class="comment flexone">
<view class="sanleft">
<image src="/img/sanxing.png"></image>
... ... @@ -103,41 +142,7 @@
<view class="fen" wx:else>无评论</view>
<view class="tiao">({{shopdetail.remark_num}}条)</view>
</view>
<view class="commentone flexone">
<view class="sanleft">
<image src="/img/kuai.png"></image>
</view>
<view class="star flexone">
<view class="staritem">
<image src="/img/pingfenshi.png" wx:if="{{shopdetail.tabelog>=1}}"></image>
<image src="/img/lingfen_icon.png" wx:if="{{shopdetail.tabelog<0.5}}"></image>
<image src="/img/banke.png" wx:if="{{shopdetail.tabelog>=0.5&&shopdetail.tabelog<1}}"></image>
</view>
<view class="staritem">
<image src="/img/pingfenshi.png" wx:if="{{shopdetail.tabelog>=2}}"></image>
<image src="/img/lingfen_icon.png" wx:if="{{shopdetail.tabelog<1.5}}"></image>
<image src="/img/banke.png" wx:if="{{shopdetail.tabelog>=1.5&&shopdetail.tabelog<2}}"></image>
</view>
<view class="staritem">
<image src="/img/pingfenshi.png" wx:if="{{shopdetail.tabelog>=3}}"></image>
<image src="/img/lingfen_icon.png" wx:if="{{shopdetail.tabelog<2.5}}"></image>
<image src="/img/banke.png" wx:if="{{shopdetail.tabelog>=2.5&&shopdetail.tabelog<3}}"></image>
</view>
<view class="staritem">
<image src="/img/pingfenshi.png" wx:if="{{shopdetail.tabelog>=4}}"></image>
<image src="/img/lingfen_icon.png" wx:if="{{shopdetail.tabelog<3.5}}"></image>
<image src="/img/banke.png" wx:if="{{shopdetail.tabelog>=3.5&&shopdetail.tabelog<4}}"></image>
</view>
<view class="staritem">
<image src="/img/pingfenshi.png" wx:if="{{shopdetail.tabelog>=5}}"></image>
<image src="/img/lingfen_icon.png" wx:if="{{shopdetail.tabelog<4.5}}"></image>
<image src="/img/banke.png" wx:if="{{shopdetail.tabelog>=4.5&&shopdetail.tabelog<5}}"></image>
</view>
</view>
<view class="fen" wx:if="{{shopdetail.tabelog!=0}}">{{shopdetail.tabelog}}分</view>
<view class="fen" wx:else>无评论</view>
</view>
</view>
</view>
... ... @@ -161,7 +166,7 @@
</view>
<view class="jianintro photobox">
<view class="photoitem" wx:for="{{images}}" wx:key="" catchtap='previewimg' data-index="{{index}}">
<image src="{{item}}"></image>
<image src="{{item}}" mode="aspectFill" ></image>
</view>
</view>
</view>
... ... @@ -170,7 +175,7 @@
<view class="phototop flextwo">
<view class="phototopleft flexone">
<view class="xiang">评价 </view>
<view class="tiao">({{shopdetail.remarks.length}}条)</view>
<view class="tiao">({{remarklen}}条)</view>
</view>
<view class="photoright flexone" bindtap="morecomment">
<view class="morename">更多</view>
... ... @@ -183,16 +188,16 @@
<view class="dianbox">
<!-- wx:for='{{shopdetail.remarks}}' wx:key="" -->
<view class="jianintro commentitem " bindtap="comentdetail" data-id="{{item.id}}" wx:for='{{shopdetail.remarks}}' wx:key="" wx:for-index="cellindex">
<view class="jianintro commentitem pingjiac" bindtap="comentdetail" data-id="{{item.id}}" wx:for='{{shopdetail.remarks}}' wx:key="" wx:for-index="cellindex">
<view class="comtop flextwo" catchtap="personpage" data-userid="{{item.user_id}}">
<view class="comleft">
<image src="{{item.avatar}}"></image>
</view>
<view class="comright">
<view class="comrtop flextwo">
<view class="comrtop flexone">
<view class="comrname">{{item.nickname}}</view>
<view class="star starone flexone">
<view class="star starone flexone pingji">
<view class="staritem">
<image src="/img/star.png" wx:if="{{item.user_level>=1}}"></image>
<image src="/img/huangkong.png" wx:if="{{item.user_level<1}}"></image>
... ... @@ -266,7 +271,7 @@
<view class="textboximg flexone">
<view class="boxitem" wx:for='{{item.images}}' wx:key="">
<image src="{{item}}" catchtap="previewimgk" data-index="{{index}}" data-pindex="{{cellindex}}" mode="aspectFit"></image>
<image src="{{item}}" catchtap="previewimgk" data-index="{{index}}" data-pindex="{{cellindex}}" mode="aspectFill"></image>
</view>
</view>
</view>
... ... @@ -356,7 +361,7 @@
<!-- 推荐店铺 -->
<view class="photo" wx:if="{{shoplist.length!=0}}">
<view class="xiang" bindtap="xiangce shopname">店铺推荐</view>
<view class="xiang" bindtap="xiangce shopname">其他推荐</view>
<view class='case-page'>
<view class='list-masonry'>
<view class='item-masonry {{shoplist.length==1?"noitem":""}}' bindtap="goodtail" data-id="{{item.id}}" wx:for="{{shoplist}}" wx:key="">
... ... @@ -388,7 +393,7 @@
<image src="/img/flower.png"></image>
</view> -->
<view class="pingfen" wx:if="{{item.score!=false}}">{{item.score}}</view>
<view class="pingfen" wx:if="{{item.score!=false}}">{{item.score}}</view>
</view>
<view class="ping flexone">
<view class="kuaizifen">Tabelog</view>
... ... @@ -669,8 +674,13 @@
<!-- 分享海报遮罩层 -->
<view class="register" wx:if="{{postershow}}" bindtap="hideposter">
<view class="posterwrap" catchlongpress="baocun">
<image src="{{posterurl}}"></image>
<view class="posterwrap" >
<image src="{{posterurl}}" mode="widthFix"></image>
</view>
<view class="flextwo btnshare">
<view class="sharebtn" catchtap="baocun">保存到相册</view>
<view class="sharebtn" catchtap="shareimg">分享到朋友圈</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -128,6 +128,8 @@ swiper {
color: #000;
font-size: 36rpx;
font-weight: bold;
}
/* 菜系 */
... ... @@ -140,21 +142,23 @@ swiper {
}
.huaname {
height: 40rpx;
border:2rpx solid rgba(140, 145, 152, 1);
opacity: 1;
border-radius: 8rpx;
color: #8c9198;
font-size: 22rpx;
text-align: center;
line-height: 40rpx;
margin-left: 12rpx;
padding: 0 16rpx;
box-sizing: border-box;
padding: 0 10rpx;
box-sizing: border-box;
height: 42rpx;
background: rgba(255, 255, 255, 1);
border: 2rpx solid rgba(112, 112, 112, 1);
opacity: 1;
border-radius: 180rpx;
color: #3d444d;
font-size: 20rpx;
text-align: center;
line-height: 42rpx;
margin-left:20rpx;
}
.cai {
margin-top: 20rpx;
margin-top: 10rpx;
}
.sanleft {
... ... @@ -168,12 +172,13 @@ swiper {
}
.comment {
margin-top: 32rpx;
margin-top: 20rpx;
}
.fen {
color: #000;
font-size: 28rpx;
color: #fca052;
font-size: 24rpx;
font-weight: bold;
margin-left: 16rpx;
}
... ... @@ -184,11 +189,11 @@ swiper {
}
.commentone {
margin-top: 18rpx;
margin-top: 20rpx;
}
.jianintro {
width: 686rpx;
/* width: 686rpx; */
background: rgba(255, 255, 255, 1);
opacity: 1;
border-radius: 8rpx;
... ... @@ -213,6 +218,7 @@ page {
.jiantext {
color: #707070;
line-height: 2.5;
}
... ... @@ -232,7 +238,7 @@ page {
}
.photobox {
width: 686rpx;
/* width: 686rpx; */
display: flex;
flex-wrap: no-wrap;
align-items: center;
... ... @@ -245,13 +251,14 @@ page {
width: 245rpx;
height: 188rpx;
font-size: 0;
padding-right: 15rpx;
/* padding-right: 15rpx; */
margin-bottom: 20rpx;
margin-right:15rpx;
flex: 0 0 auto;
}
.photoitem:last-child {
margin-right: 32rpx;
padding-right: 32rpx;
}
.morename {
... ... @@ -301,19 +308,28 @@ page {
.text {
color: #06121e;
font-size: 24rpx;
margin-top: 26rpx;
line-height: 1.5;
/* margin-top: 26rpx; */
line-height: 1.47;
display:block;
/* height:138rpx; */
overflow-y: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
overflow: hidden;
}
.boxitem {
width: 154rpx;
height: 154rpx;
width: 184rpx;
height: 184rpx;
font-size: 0;
margin-right: 18rpx;
margin-right: 10rpx;
margin-bottom:10rpx;
}
.textboximg {
margin-top: 26rpx;
/* margin-top: 26rpx; */
}
.clockwrap {
... ... @@ -560,10 +576,17 @@ button::after {
margin-top:24rpx;
}
.flowername{
color:#F0ABA5;
font-size:26rpx;
color: #fca052;
font-size: 24rpx;
font-weight: bold;
margin-right:10rpx;
}
.starnametext{
color: #fca052;
font-size: 24rpx;
font-weight: bold;
}
.case-page{
padding: 0;
margin-top:24rpx;
... ... @@ -583,13 +606,47 @@ button::after {
/* 海报图 */
.posterwrap{
width:648rpx;
height:646rpx;
width:480rpx;
/* height:646rpx; */
font-size: 0;
background: #fff;
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
}
.kuaizinum{
color: #fca052;
font-size: 24rpx;
margin-right: 10rpx;
font-weight: bold;
}
.textboximg {
flex-wrap: wrap;
margin-top:20rpx;
}
.btnshare{
width:480rpx;
position:absolute ;
top:76%;
left:50%;
transform: translateX(-50%);
}
.sharebtn{
width:210rpx;
height:70rpx;
background:rgba(66,66,66,1);
border-radius:40rpx;
color:#ECD17C;
font-size: 28rpx;
text-align: center;
line-height: 70rpx;
}
.pingji{
margin-left:20rpx;
}
.pingjiac{
padding: 40rpx 0;
box-sizing: border-box;
}
\ No newline at end of file
... ...
... ... @@ -44,7 +44,7 @@
</view>
</view>
<view class="zhuyeright" wx:else bindtap="userlogin">
<view class="zhuyeright logink" wx:else bindtap="userlogin">
<view class="tieziname">微信登录</view>
</view>
... ... @@ -78,7 +78,7 @@
<image src="/img/leftrow.png " mode=""></image>
</view>
</view>
<view class="jumpitem flextwo" bindtap="mycollect" data-id="3">
<!-- <view class="jumpitem flextwo" bindtap="mycollect" data-id="3">
<view class='jumpleft flexone'>
<view class="jumpimg">
<image src="/img/xiangce.png" mode=""></image>
... ... @@ -88,7 +88,7 @@
<view class="ordertopright">
<image src="/img/leftrow.png " mode=""></image>
</view>
</view>
</view> -->
<view class="jumpitem flextwo" bindtap="mycollect" data-id="4">
<view class='jumpleft flexone'>
... ...
... ... @@ -279,4 +279,7 @@ overflow: hidden;
position:absolute;
right:30rpx;
top:26rpx;
}
.logink{
margin-top:45rpx;
}
\ No newline at end of file
... ...
... ... @@ -4,16 +4,23 @@
"ignore": []
},
"setting": {
"urlCheck": false,
"urlCheck": true,
"es6": true,
"postcss": true,
"minified": true,
"newFeature": true,
"autoAudits": false,
"checkInvalidKey": true,
"coverView": true,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false
"scopeDataCheck": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"compileType": "miniprogram",
"libVersion": "2.10.1",
... ...