This commit is contained in:
faiz 2024-03-24 15:28:42 +08:00
parent 46246cfa82
commit 7bfc426b8e
8 changed files with 101 additions and 14 deletions

View File

@ -26,7 +26,8 @@
"Share" : {},
"iBeacon" : {},
"Geolocation" : {},
"Maps" : {}
"Maps" : {},
"Barcode" : {}
},
"safearea" : {
"bottom" : {

View File

@ -56,16 +56,14 @@
{
"path": "pages/shop/index",
"style": {
"navigationStyle": "custom"
// #ifdef MP || APP-PLUS
,
"navigationBarBackgroundColor": "#F2F2F2"
// #endif
"enablePullDownRefresh": true,
"navigationBarTitleText": "门店"
}
},
{
"path": "pages/shop_details/index",
"style": {
"navigationStyle": "custom",
"navigationStyle": "custom"
// #ifdef MP || APP-PLUS
,

View File

@ -1557,6 +1557,7 @@
// #ifdef H5
arr2 = [that.posterbackgd, await that.imgToBase(that.storeImage), await that.imgToBase(that.codeImg), await that.imgToBase(that.share_pic)];
// #endif
console.log(arr2);
//广
that.$util.goodsPosterCanvas(arr2, that.storeInfo.store_name, that.storeInfo.price, that.site_name, that.storeInfo.ot_price, function(tempFilePath) {
that.$set(that, 'posterImage', tempFilePath);

View File

@ -2,7 +2,7 @@
<view class="shop_details">
<view class="head">
<swipers :imgUrls="shopInfo.swiper_image"></swipers>
<view class="back"><i class="iconfont icon-xiangzuo"></i></view>
<view class="back" @tap="toRouter"><i class="iconfont icon-xiangzuo"></i></view>
</view>
<view class="main">
<view class="title">
@ -15,7 +15,7 @@
<text>评分4.5</text>
</view>
<view class="desc">位置好找菜味道不错价格实惠</view>
<view class="site">北京市东城区朝阳门内大街···</view>
<view class="site" @tap="openMap">北京市东城区朝阳门内大街···</view>
</view>
</view>
<view class="business">
@ -34,27 +34,74 @@
</view>
<view class="tabs">
<view class="tabs_nav">
<view class="tabs_item">信息</view>
<view class="tabs_item">评论</view>
<view class="tabs_item" v-for="(item,index) in tabList" :class="actIndex==index?'active':''" @tap='handleTab(index)'>{{item.name}}</view>
</view>
<view class='conter'>
<!-- #ifndef APP-PLUS -->
<!-- <jyf-parser v-if="description.type == 0" :domain='domain' :html="description.content.replace(/<br\/>/ig, '')" ref="article" :tag-style="tagStyle"></jyf-parser> -->
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<!-- <view v-if="description.type == 0" class="description" v-html="description.content.replace(/<br\/>/ig, '')"></view> -->
<!-- #endif -->
<view class="product_content">
欢迎来到我们的火锅店我们是一个有着悠久历史和传统美食文化的品牌我们的火锅是采用新鲜的食材和秘制的调料烹饪而成每一口都充满了浓郁的鲜香和醇厚的口感
</view>
<view class="product_content">
我们的品牌特色在于选用上等食材如草原鲜嫩肥羊天然海鲜等以及秘制香料和特色锅底店内环境优雅舒适服务周到细致为您打造一处独具特色的火锅天地
</view>
</view>
</view>
</view>
<view class="btn" @tap="handlePay">去付款</view>
</view>
</template>
<script>
import swipers from '@/components/swipers';
import parser from "@/components/jyf-parser/jyf-parser";
export default {
components:{swipers},
components:{swipers,"jyf-parser": parser},
data(){
return {
shopInfo:{
swiper_image:[{img:'/static/images/shop_bg.png'}]
}
swiper_image:[{img:'/static/images/shop_bg.png'}],
},
tabList:[{name:'商家信息'}],
actIndex:0
}
},
methods:{
handleTab(i){
this.actIndex = i
},
handlePay(){
//
// #ifdef APP-PLUS
uni.scanCode({
scanType:['qrCode'],
success: function (res) {
console.log('二维码信息:' + res);
}
});
// #endif
},
toRouter(){
uni.navigateBack()
},
openMap() {
uni.openLocation({
latitude: Number(this.shopInfo.latitude),
longitude: Number(this.shopInfo.longitude),
name: this.shopInfo.scenicName,
address: this.shopInfo.address,
success: function () {
console.log('success');
},
fail: function (error) {
console.log('error', error);
}
});
},
}
}
</script>
@ -149,11 +196,35 @@
flex-direction: row;
}
&_item{
font-size: 32rpx;
color: #999;
& + .tabs_item{
margin-left: 68rpx;
}
}
.active{
color: #333;
}
}
.conter{
margin-top: 28rpx;
.product_content{
color: #666;
}
}
}
.btn{
position: fixed;
bottom: 30rpx;
width: 80%;
height: 92rpx;
background: #1372F5;
border-radius: 60rpx;
text-align: center;
line-height: 92rpx;
color: #fff;
left: 50%;
transform: translateX(-50%);
}
}
</style>

View File

@ -94,6 +94,7 @@
<view class="iconfont icon-xiaoxi"></view>
<text class="iconnum" v-if="userInfo.total_unread">{{userInfo.total_unread}}</text>
</view>
<view class="iconfont icon-saoma" @tap='handleBorcode'></view>
</view>
</view>
</view>
@ -347,6 +348,17 @@
}, 500)
},
methods: {
handleBorcode() {
//
// #ifdef APP-PLUS
uni.scanCode({
scanType:['qrCode'],
success: function (res) {
console.log('二维码信息:' + res);
}
});
// #endif
},
authTo(url){
if(this.isLogin){
uni.navigateTo({

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -327,17 +327,21 @@ export default {
that.handleBorderRect(ctx, 30, 108, WIDTH-60, WIDTH-20, 12);
ctx.clip();
ctx.drawImage(arr2[1], 30, 108, WIDTH-60, WIDTH-20);
console.log(ctx);
ctx.draw(true, function() {
console.log('sss');
uni.canvasToTempFilePath({
canvasId: 'myCanvas',
fileType: 'png',
destWidth: WIDTH,
destHeight: HEIGHT,
success: function(res) {
console.log(res);
uni.hideLoading();
successFn && successFn(res.tempFilePath);
},
fail: function(err) {
console.log(res);
uni.hideLoading();
errFun && errFun(err);
}