专题
This commit is contained in:
@@ -33,7 +33,7 @@ Component({
|
||||
|
||||
//组件的初始数据
|
||||
data: {
|
||||
headImg:app.getStorageByKey("userInfo").headimg,
|
||||
//headImg:app.getStorageByKey("userInfo").headimg,
|
||||
defaultQrcode: _.config.imgUrl + 'common/qr.jpg',
|
||||
imgs: [],
|
||||
tempPosterPath: '',
|
||||
@@ -48,7 +48,7 @@ Component({
|
||||
observers: {
|
||||
'isCreateQrcode': function (e) {
|
||||
if (e) {
|
||||
this.getAppUdataFcms()
|
||||
this.getMaterialHomeQrcode()
|
||||
}
|
||||
},
|
||||
'isShow': function (e) {
|
||||
@@ -61,9 +61,9 @@ Component({
|
||||
},
|
||||
'customImg': function (e) {
|
||||
if (e) {
|
||||
this.setData({
|
||||
headImg:app.getStorageByKey("userInfo").headimg,
|
||||
})
|
||||
// this.setData({
|
||||
// headImg:app.getStorageByKey("userInfo").headimg,
|
||||
// })
|
||||
//头像
|
||||
//this.getImageInfo(this.data.headImg, 4)
|
||||
this.getImageInfo(this.data.customImg, 3)
|
||||
@@ -97,17 +97,16 @@ Component({
|
||||
},
|
||||
|
||||
//获取二维码
|
||||
getAppUdataFcms() {
|
||||
|
||||
this.getImageInfo('https://img.liche.cn/liche/wx_8877c06d8591ac51.png', 2)
|
||||
|
||||
// _.apiQuery.getAppUdataFcms({
|
||||
// id: this.data.qccodeid,
|
||||
// }).then(res => {
|
||||
// this.getImageInfo(res.data.img, 2)
|
||||
// }).catch(res => {
|
||||
// //this.getImageInfo(this.data.defaultQrcode, 2)
|
||||
// })
|
||||
getMaterialHomeQrcode() {
|
||||
let params = {};
|
||||
params['page'] = 'pages/special2/index';
|
||||
params['scene'] = this.data.qccodeid+'_'+app.getStorageByKey("userInfo").biz_id;
|
||||
params['width'] = 260;
|
||||
_.apiQuery.getMaterialHomeQrcode(params).then(res => {
|
||||
this.getImageInfo(res.data.url, 2)
|
||||
}).catch(res => {
|
||||
//this.getImageInfo(this.data.defaultQrcode, 2)
|
||||
})
|
||||
},
|
||||
|
||||
//自定义海报
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
<!-- components/poster/index.wxml -->
|
||||
<view class="poster fixed {{isShow?'show':'hide'}}">
|
||||
<view class="poster-bg absolute top-0 bottom-0 left-0 right-0" bindtap="hidePoster"></view>
|
||||
<view class="poster-main absolute top-0 bottom-0 left-0 right-0">
|
||||
<view class="poster-main-img absolute box-center-middle">
|
||||
<canvas canvas-id='postercanvas' class='canvas absolute box-center-middle' style="width:{{canvasInfo.width}};height:{{canvasInfo.height}}"></canvas>
|
||||
<view wx:if="{{showOptBtn}}"><image class="block wp100 ulib-r10" wx:if="{{tempPosterPath}}" src="{{tempPosterPath}}" mode="widthFix" catchtap="preview" /></view>
|
||||
<view class="mt40 fn-flex" wx:if="{{showOptBtn}}">
|
||||
<button class="fn-flex-item bds-2-fff btn-no-bg font-32 color-fff ulib-r750 text-center ml20 mr20" catchtap="pushLink" data-url="/pages/distribute/special/index?iscall=0">专题预览</button>
|
||||
<button class=" fn-flex-item btn-f9394d font-32 color-fff ulib-r750 text-center ml20 mr20" hover-class="btn-f9394d-hover" catchtap="saveToAblum">保存分享</button>
|
||||
</view>
|
||||
<view class="poster-main poster-main-img absolute box-center-middle">
|
||||
<canvas canvas-id='postercanvas' class='canvas absolute box-center-middle' style="width:{{canvasInfo.width}};height:{{canvasInfo.height}}"></canvas>
|
||||
<view wx:if="{{showOptBtn}}"><image class="block wp100 ulib-r10" wx:if="{{tempPosterPath}}" src="{{tempPosterPath}}" mode="widthFix" catchtap="preview" /></view>
|
||||
<view class="mt40 fn-flex" wx:if="{{showOptBtn}}">
|
||||
<button class="fn-flex-item bds-2-fff btn-no-bg font-32 color-fff ulib-r750 text-center ml20 mr20" catchtap="pushLink" data-url="/pages/distribute/special/index?id={{qccodeid}}">专题预览</button>
|
||||
<button class=" fn-flex-item btn-f9394d font-32 color-fff ulib-r750 text-center ml20 mr20" hover-class="btn-f9394d-hover" catchtap="saveToAblum">保存分享</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,5 +1,4 @@
|
||||
import Utils from '../../commons/js/utils/util'
|
||||
const app = getApp()
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
@@ -15,7 +14,7 @@ Component({
|
||||
},
|
||||
bgColor: {
|
||||
type: String,
|
||||
value: '#fe2643'
|
||||
value: '#1a1a1a'
|
||||
},
|
||||
isShowBg: {
|
||||
type: Boolean,
|
||||
@@ -57,7 +56,7 @@ Component({
|
||||
isShowRetBtn: true
|
||||
})
|
||||
}
|
||||
if (Utils.getCurrentPath().url == 'pages/index/index') {
|
||||
if (Utils.getCurrentPath().url == 'pages/index/index'||Utils.getCurrentPath().url == 'pages/login/index'||Utils.getCurrentPath().url == 'pages/customer/index'||Utils.getCurrentPath().url == 'pages/order/index'||Utils.getCurrentPath().url == 'pages/channel/index'||Utils.getCurrentPath().url == 'pages/dataAnalysis/index') {
|
||||
this.setData({
|
||||
isShowHomeBtn: true
|
||||
})
|
||||
@@ -89,19 +88,9 @@ Component({
|
||||
})
|
||||
},
|
||||
home: function () {
|
||||
// wx.switchTab({
|
||||
// url: '/pages/index/index'
|
||||
// })
|
||||
if(app.getStorageByKey("userInfo").group_id==4){
|
||||
wx.reLaunch({
|
||||
url: '/pages/channel/index'
|
||||
})
|
||||
}else{
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
|
||||
wx.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"lcb-searchBar": "/components/searchBar/index"
|
||||
"lc-searchBar": "/components/searchBar/index"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<view>
|
||||
<view class="fixed top-0 left-0 right-0 z-index-1" style="height: {{status + navHeight}}px;background-color:{{bgColor}}" wx:if="{{isShowBg}}"></view>
|
||||
<view class="fixed top-0 left-0 right-0 z-index-2" style="height: {{status + navHeight}}px;background-color:{{bgColor}}" wx:if="{{isShowBg}}"></view>
|
||||
<view class="fixed top-0 left-0 right-0 z-index-9999" style="height: {{status + navHeight}}px;">
|
||||
<view style='height: {{status}}px;'></view>
|
||||
<view class="relative" style='height:{{navHeight}}px;line-height:{{navHeight}}px;' wx:if="{{type=='home'}}">
|
||||
@@ -12,16 +12,12 @@
|
||||
<view class='relative' style='height:{{navHeight}}px;' wx:else>
|
||||
<view class="absolute left-0 box-middle" style="width:80px;height:32px;margin-left:7px;box-sizing:border-box;" wx:if="{{!isShowRetBtn}}">
|
||||
<view class="absolute left-0 box-middle pl15 pr15" bindtap='back'>
|
||||
<i class="lcb-icon mr10 icon-fanhui" style="font-size:22px;color:{{txtColor}};"></i>
|
||||
<i class="iconfont mr10 icon-fanhui" style="font-size:22px;color:{{txtColor}};"></i>
|
||||
</view>
|
||||
<!-- <view class="absolute top-0 bottom-0 mt15 mb15 box-center bls-ddd" style="width:10rpx;"></view> -->
|
||||
<!-- <view class="absolute right-0 box-middle pl20 pr20" bindtap='home' wx:if="{{!isShowHomeBtn}}">
|
||||
<i class="lcb-icon icon-shouye1" style="font-size:22px;color:{{txtColor}}"></i>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="absolute left-0 box-middle" style="width:40px;height:32px;margin-left:7px;box-sizing:border-box;" wx:else>
|
||||
<view class="absolute box-center-middle" bindtap='home' wx:if="{{!isShowHomeBtn}}">
|
||||
<i class="lcb-icon icon-shouye1" style="font-size:22px;color:{{txtColor}}"></i>
|
||||
<i class="iconfont icon-shouye1" style="font-size:22px;color:{{txtColor}}"></i>
|
||||
</view>
|
||||
</view>
|
||||
<view class='navbarTitle absolute box-center-middle wp40 text-center text-nowrap text-bold' style="color:{{txtColor}};">{{titleText}}</view>
|
||||
|
||||
Reference in New Issue
Block a user