add
This commit is contained in:
parent
46246cfa82
commit
7bfc426b8e
|
@ -26,7 +26,8 @@
|
||||||
"Share" : {},
|
"Share" : {},
|
||||||
"iBeacon" : {},
|
"iBeacon" : {},
|
||||||
"Geolocation" : {},
|
"Geolocation" : {},
|
||||||
"Maps" : {}
|
"Maps" : {},
|
||||||
|
"Barcode" : {}
|
||||||
},
|
},
|
||||||
"safearea" : {
|
"safearea" : {
|
||||||
"bottom" : {
|
"bottom" : {
|
||||||
|
|
|
@ -56,16 +56,14 @@
|
||||||
{
|
{
|
||||||
"path": "pages/shop/index",
|
"path": "pages/shop/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"enablePullDownRefresh": true,
|
||||||
// #ifdef MP || APP-PLUS
|
"navigationBarTitleText": "门店"
|
||||||
,
|
|
||||||
"navigationBarBackgroundColor": "#F2F2F2"
|
|
||||||
// #endif
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/shop_details/index",
|
"path": "pages/shop_details/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
// #ifdef MP || APP-PLUS
|
// #ifdef MP || APP-PLUS
|
||||||
,
|
,
|
||||||
|
|
|
@ -1557,6 +1557,7 @@
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
arr2 = [that.posterbackgd, await that.imgToBase(that.storeImage), await that.imgToBase(that.codeImg), await that.imgToBase(that.share_pic)];
|
arr2 = [that.posterbackgd, await that.imgToBase(that.storeImage), await that.imgToBase(that.codeImg), await that.imgToBase(that.share_pic)];
|
||||||
// #endif
|
// #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.$util.goodsPosterCanvas(arr2, that.storeInfo.store_name, that.storeInfo.price, that.site_name, that.storeInfo.ot_price, function(tempFilePath) {
|
||||||
that.$set(that, 'posterImage', tempFilePath);
|
that.$set(that, 'posterImage', tempFilePath);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<view class="shop_details">
|
<view class="shop_details">
|
||||||
<view class="head">
|
<view class="head">
|
||||||
<swipers :imgUrls="shopInfo.swiper_image"></swipers>
|
<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>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<text>评分4.5分</text>
|
<text>评分4.5分</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="desc">位置好找,菜味道不错,价格实惠</view>
|
<view class="desc">位置好找,菜味道不错,价格实惠</view>
|
||||||
<view class="site">北京市东城区朝阳门内大街···</view>
|
<view class="site" @tap="openMap">北京市东城区朝阳门内大街···</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="business">
|
<view class="business">
|
||||||
|
@ -34,27 +34,74 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="tabs">
|
<view class="tabs">
|
||||||
<view class="tabs_nav">
|
<view class="tabs_nav">
|
||||||
<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 class="tabs_item">评论</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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="btn" @tap="handlePay">去付款</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import swipers from '@/components/swipers';
|
import swipers from '@/components/swipers';
|
||||||
|
import parser from "@/components/jyf-parser/jyf-parser";
|
||||||
export default {
|
export default {
|
||||||
components:{swipers},
|
components:{swipers,"jyf-parser": parser},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
shopInfo:{
|
shopInfo:{
|
||||||
swiper_image:[{img:'/static/images/shop_bg.png'}]
|
swiper_image:[{img:'/static/images/shop_bg.png'}],
|
||||||
}
|
},
|
||||||
|
tabList:[{name:'商家信息'}],
|
||||||
|
actIndex:0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
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>
|
</script>
|
||||||
|
@ -149,11 +196,35 @@
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
&_item{
|
&_item{
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #999;
|
||||||
& + .tabs_item{
|
& + .tabs_item{
|
||||||
margin-left: 68rpx;
|
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>
|
</style>
|
|
@ -94,6 +94,7 @@
|
||||||
<view class="iconfont icon-xiaoxi"></view>
|
<view class="iconfont icon-xiaoxi"></view>
|
||||||
<text class="iconnum" v-if="userInfo.total_unread">{{userInfo.total_unread}}</text>
|
<text class="iconnum" v-if="userInfo.total_unread">{{userInfo.total_unread}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="iconfont icon-saoma" @tap='handleBorcode'></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -347,6 +348,17 @@
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleBorcode() {
|
||||||
|
// 从相机和相册扫码
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
uni.scanCode({
|
||||||
|
scanType:['qrCode'],
|
||||||
|
success: function (res) {
|
||||||
|
console.log('二维码信息:' + res);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
authTo(url){
|
authTo(url){
|
||||||
if(this.isLogin){
|
if(this.isLogin){
|
||||||
uni.navigateTo({
|
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 |
|
@ -327,17 +327,21 @@ export default {
|
||||||
that.handleBorderRect(ctx, 30, 108, WIDTH-60, WIDTH-20, 12);
|
that.handleBorderRect(ctx, 30, 108, WIDTH-60, WIDTH-20, 12);
|
||||||
ctx.clip();
|
ctx.clip();
|
||||||
ctx.drawImage(arr2[1], 30, 108, WIDTH-60, WIDTH-20);
|
ctx.drawImage(arr2[1], 30, 108, WIDTH-60, WIDTH-20);
|
||||||
|
console.log(ctx);
|
||||||
ctx.draw(true, function() {
|
ctx.draw(true, function() {
|
||||||
|
console.log('sss');
|
||||||
uni.canvasToTempFilePath({
|
uni.canvasToTempFilePath({
|
||||||
canvasId: 'myCanvas',
|
canvasId: 'myCanvas',
|
||||||
fileType: 'png',
|
fileType: 'png',
|
||||||
destWidth: WIDTH,
|
destWidth: WIDTH,
|
||||||
destHeight: HEIGHT,
|
destHeight: HEIGHT,
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
|
console.log(res);
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
successFn && successFn(res.tempFilePath);
|
successFn && successFn(res.tempFilePath);
|
||||||
},
|
},
|
||||||
fail: function(err) {
|
fail: function(err) {
|
||||||
|
console.log(res);
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
errFun && errFun(err);
|
errFun && errFun(err);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue