Commit b50abf37 by 赵雅纹

Merge branch 'feature-zyw-7.2.0' into 'dev_7.2.0'

Feature zyw 7.2.0

See merge request !174
parents a40e3013 17db4fec
// component/selectRelatedGoods/selectRelatedGoods.js
var app = getApp()
const wxService = require('../../utils/wxService')
const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo
Component({
/**
* 组件的属性列表
*/
properties: {
showSelectTabModal: { // 显示标识
type: Boolean,
value: false
}
},
/**
* 组件的初始数据
*/
data: {
tabList: [],
proData: [],
productName: '',
pageNum: '1',
pageSize: '10000',
currentTab:'',
currentTabName:''
},
observers: {
proGoods(val) {
for (var i in this.data.proList) {
for (var j in val) {
if (this.data.proList[i].productId == val[j].productId) {
this.data.proList[i].isSelect = true
}
this.setData({
proList: this.data.proList
})
}
}
},
showSelectTabModal() {
const { showSelectTabModal } = this.data
if (showSelectTabModal) {
wxService.nextTick(() => {
this.geTabList();
})
}
}
},
/**
* 组件的方法列表
*/
methods: {
hidePopup: function () { // 隐藏弹出框
this.setData({
showSelectTabModal: false
})
},
confirm() {
if(!this.data.currentTab){
wx.showToast({
title: '请选择标签',
icon: 'none'
})
return false;
}
let params = {
id: this.data.currentTab,
name: this.data.currentTabName
}
this.setData({
showSelectTabModal: false
},()=>{
wxService.nextTick(() => {
this.triggerEvent('_selectTab', params)
})
})
},
// 点击键盘完成时触发
onTapConfirm(e) {
this.setData({
productName: e.detail.value
})
},
geTabList(){
wxService.post(`/merchant/contentTags/getTagsGroupedListC?pageNum=${this.data.pageNum}&pageSize=${this.data.pageSize}`, {
}).then(res => {
const { result, data } = res.data
if (result == 0) {
this.setData({
tabList: data
})
}
}).finally(() => {
})
},
// 点击更多
getMoreTab(e){
let index = e.currentTarget.dataset.index
if (!this.data.tabList[index].flag){
this.data.tabList[index].flag = true
}else{
this.data.tabList[index].flag = false
}
this.setData({
tabList: this.data.tabList
})
},
selectTab(e) {
this.setData({
currentTab: e.currentTarget.dataset.id,
currentTabName: e.currentTarget.dataset.name
})
}
},
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="modal-container{{showSelectTabModal ? ' active' : ''}}" bindtap="hidePopup" />
<view class="modal-content{{showSelectTabModal ? ' active' : ''}}">
<view class="modal-header">
<image src="/assets/imgs/7_1_0/arrow-right.png" class="modal-to-back" mode="widthFix" bindtap="hidePopup" />
</view>
<view class="modal-info">
<view class="tab-wrap">
<view class="tab-list" wx:for="{{tabList}}" wx:key="{{index}}">
<view class="tab-title" >
<view class="tab-item-title">{{item.name}}</view>
<view class="more-tab" wx:if="{{item.contentTagsList.length > 3}}">
<text class="more-text" bindtap="getMoreTab" data-index="{{index}}">{{item.flag ? '收起' : '更多'}}</text>
<image class="arrow-right" src="/assets/imgs/7_1_0/arrow-right.png" mode="widthFix"></image>
</view>
</view>
<view wx:if="{{idx<3}}" class="tab-item {{currentTab == tagItem.id ? 'active' : ''}}" wx:for="{{item.contentTagsList}}" wx:for-index="idx" wx:for-item="tagItem" wx:key="{{idx}}" bindtap="selectTab" data-id="{{tagItem.id}}" data-name="{{tagItem.name}}">{{tagItem.name}}</view>
<view wx:if="{{idx>3 && item.flag}}" class="tab-item {{currentTab == tagItem.id ? 'active' : ''}}" wx:for="{{item.contentTagsList}}" wx:for-index="idx" wx:for-item="tagItem" wx:key="{{idx}}" bindtap="selectTab" data-id="{{tagItem.id}}" data-name="{{tagItem.name}}">{{tagItem.name}}</view>
<!-- <view class="tab-item" wx:for="{{tabItems}}" wx:for-index="tabIndex" wx:for-item="moreTabItem" wx:key="{{tabIndex}}" bindtap="selectTab" data-id="{{moreTabItem.id}}" data-name="{{moreTabItem.name}}">{{moreTabItem.name}}</view> -->
<!-- <view class="tab-item">默认选项</view> -->
</view>
</view>
</view>
<view class="post-notes fixed-bottom0" bindtap="confirm">确认</view>
</view>
/* component/selectTab/selectTab.wxss */
@import '/app.wxss';
@import './../../base/base.wxss';
.modal-container {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.5);
transform: translateY(100%);
opacity: 0;
transition: opacity 200ms;
z-index: 98;
}
.post-notes {
text-align: center;
height: 88rpx;
line-height: 88rpx;
background-color: rgba(203, 60, 60, 1);
color: rgba(255, 255, 255, 1);
font-size: 25rpx;
font-family: PingFangSC-Medium;
}
.modal-container.active {
opacity: 1;
transform: translateY(0);
}
.modal-content.active {
transform: translateY(0);
}
.modal-content {
position: fixed;
z-index: 99999;
width: 100%;
bottom: 0;
left: 0;
background: #ffffff;
transition: transform 300ms;
transform: translateY(100%);
height: 1000rpx;
}
.modal-content .modal-close {
position: absolute;
right: 24rpx;
top: 35rpx;
width: 25rpx;
}
.modal-to-back {
width: 18rpx;
position: absolute;
left: 24rpx;
top: 35rpx;
transform: rotate(180deg);
}
.modal-info {
padding: 0 50rpx;
margin-top: 95rpx;
max-height: 900rpx;
overflow-y: scroll;
}
.tab-title{
display: flex;
align-items: center;
justify-content: space-between;
}
.arrow-right{
width: 10rpx;
margin-left: 6rpx;
vertical-align: middle;
}
.more-text{
font-size: 22rpx;
color: #666666;
vertical-align: middle;
}
.tab-item-title{
font-size: 30rpx;
color: #333333;
}
.tab-item{
color: #808080;
font-size: 26rpx;
line-height: 66rpx;
padding: 0 39rpx;
/* width: 184rpx; */
overflow-x: scroll;
display: inline-block;
border-radius: 10rpx;
background-color: rgba(238, 238, 238, 1);
margin: 25rpx 23rpx 25rpx 0;
}
.tab-item.active{
border: 1px solid rgba(203, 60, 60, 1);
background: #ffffff;
color: rgba(203, 60, 60, 1);
}
.tab-list{
margin-bottom: 34rpx;
}
\ No newline at end of file
...@@ -14,17 +14,15 @@ ...@@ -14,17 +14,15 @@
</view> </view>
<template name="water-list"> <template name="water-list">
<view class="item" data-current-type="{{currentType}}"> <view class="item" data-current-type="{{currentType}}" data-id="{{id}}" bindtap="gotoDetail">
<view class="no-audited" wx:if="{{currentType != 2}}"> <view class="no-audited" wx:if="{{currentType != 2}}">
{{currentType == 1 ? '待审核' : (currentType == 3 ? '已驳回' : '已通过')}} {{currentType == 1 ? '待审核' : (currentType == 3 ? '已驳回' : '已通过')}}
</view> </view>
<image class="item-img" src="{{url}}" data-id="{{id}}" mode="widthFix" bindload="imageLoad" bindtap="gotoDetail"></image> <image class="item-img" src="{{url}}" data-id="{{id}}" mode="widthFix" bindload="imageLoad" bindtap="gotoDetail"></image>
<view class="item-title-box" data-id="{{id}}" bindtap="gotoDetail"> <view class="item-title-box" >
<view class="item-title">{{headline}}</view> <view class="item-title">{{headline}}</view>
</view> </view>
<view> <view>
</view> </view>
<!-- 未登錄時 --> <!-- 未登錄時 -->
<!-- <view class="share-wrap" wx:if="{{!userIsLogin}}"> <!-- <view class="share-wrap" wx:if="{{!userIsLogin}}">
...@@ -54,7 +52,7 @@ ...@@ -54,7 +52,7 @@
</view> </view>
<view class="share-oprate" <view class="share-oprate"
catchtap="onTapShare" catchtap="onTapShare"
data-title="{{headline}}" data-title="{{explain}}"
data-url="{{url}}" data-url="{{url}}"
data-headline="{{headline}}" data-headline="{{headline}}"
data-describe="{{describe}}" data-describe="{{describe}}"
...@@ -64,5 +62,13 @@ ...@@ -64,5 +62,13 @@
<text class="share-number">{{transmitSum || 0}}</text> <text class="share-number">{{transmitSum || 0}}</text>
</view> </view>
</view> </view>
<!-- 标签 -->
<view class="tabs-list">
<image class="lock-image" src="/assets/imgs/7_1_0/lock.png"></image>
<view class="tab-item" wx:if="{{tagsName}}">
<image class="tab-image" src="/assets/imgs/7_1_0/tab.png"></image>
<text class="tab-text">{{tagsName}}</text>
</view>
</view>
</view> </view>
</template> </template>
...@@ -99,4 +99,33 @@ ...@@ -99,4 +99,33 @@
text-align: center; text-align: center;
line-height: 40rpx; line-height: 40rpx;
border-radius: 20rpx; border-radius: 20rpx;
}
.tabs-list{
min-width: 64rpx;
height: 64rpx;
background-color: rgba(0, 0, 0, 0.65);
position: absolute;
bottom: 140rpx;
left: 20rpx;
border-radius: 64rpx;
display: flex;
align-items: center;
justify-content: center;
padding: 0 24rpx;
}
.lock-image{
width: 32rpx;
height: 32rpx;
}
.tab-image{
width: 26rpx;
height: 26rpx;
}
.tab-text{
font-size: 22rpx;
color: #ffffff;
margin-left: 9rpx;
}
.tab-item{
margin-left: 19rpx;
} }
\ No newline at end of file
...@@ -19,12 +19,15 @@ wxService.page({ ...@@ -19,12 +19,15 @@ wxService.page({
headline: "", headline: "",
sspList: [], sspList: [],
stcList: [], stcList: [],
userId: memberId userId: memberId,
tagsId:''
}, },
tabName:'',
video:'', video:'',
pageNo:1, pageNo:1,
pageSize:100, pageSize:100,
requesting: false requesting: false,
showSelectTabModal: false
}, },
/** /**
...@@ -171,6 +174,22 @@ wxService.page({ ...@@ -171,6 +174,22 @@ wxService.page({
}, },
//关联标签
_selectTab(e){
console.log(e)
this.setData({
'params.tagsId': e.detail.id,
tabName: e.detail.name
})
},
// 标签选择
selectTab(){
this.setData({
showSelectTabModal: true
})
},
//多张图片上传 //多张图片上传
moreImgUpload(data) { moreImgUpload(data) {
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"upload-video": "/component/uploadVideo/uploadVideo", "upload-video": "/component/uploadVideo/uploadVideo",
"grass-item": "/component/grassItem/grassItem", "grass-item": "/component/grassItem/grassItem",
"select-related-goods": "/component/selectRelatedGoods/selectRelatedGoods", "select-related-goods": "/component/selectRelatedGoods/selectRelatedGoods",
"select-tab":"/component/selectTab/selectTab",
"go-home": "/component/goHome/goHome" "go-home": "/component/goHome/goHome"
} }
} }
\ No newline at end of file
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
<view class="title-border"> <view class="title-border">
<input placeholder="这一刻想说什么..." name="article" value="{{params.article}}" /> <input placeholder="这一刻想说什么..." name="article" value="{{params.article}}" />
</view> </view>
<view class="title-border" bindtap="selectTab">
<image class="tab-icon" src="/assets/imgs/7_1_0/tab.png"></image>
<input class="tab-input" placeholder="选择标签" value="{{tabName}}" disabled="" />
</view>
<view class="related-goods" bindtap="handleRelatedGoods"> <view class="related-goods" bindtap="handleRelatedGoods">
<image class="relate-img" mode="widthFix" src="/assets/imgs/7_1_0/relation.png"></image> <image class="relate-img" mode="widthFix" src="/assets/imgs/7_1_0/relation.png"></image>
...@@ -37,6 +41,7 @@ ...@@ -37,6 +41,7 @@
<button class="post-notes fixed-bottom0" form-type="submit">发布笔记</button> <button class="post-notes fixed-bottom0" form-type="submit">发布笔记</button>
</form> </form>
<!--goHome--> <!--goHome-->
<go-home /> <go-home />
<select-tab showSelectTabModal="{{showSelectTabModal}}" bind:_selectTab="_selectTab" />
<select-related-goods show="{{showSelectRelatedGoods}}" bind:_selectGoods="_selectGoods" pro-goods="{{proGoods}}"/> <select-related-goods show="{{showSelectRelatedGoods}}" bind:_selectGoods="_selectGoods" pro-goods="{{proGoods}}"/>
...@@ -31,9 +31,17 @@ page{ ...@@ -31,9 +31,17 @@ page{
line-height: 66rpx; line-height: 66rpx;
border-bottom: 1px solid rgba(151, 151, 151, 0.3); border-bottom: 1px solid rgba(151, 151, 151, 0.3);
} }
.tab-icon{
width: 26rpx;
height: 26rpx;
margin-right: 16rpx;
}
.title-border input{ .title-border input{
height: 66rpx; height: 66rpx;
} }
.title-border .tab-input{
display: inline-block;
}
.related-goods { .related-goods {
width: 189rpx; width: 189rpx;
height: 54rpx; height: 54rpx;
......
...@@ -39,7 +39,7 @@ wxService.page({ ...@@ -39,7 +39,7 @@ wxService.page({
let memberId = options.memberId; let memberId = options.memberId;
if (memberId) { if (memberId) {
let content = { let content = {
title: this.data.contentInfo.headline, title: this.data.contentInfo.explain,
id: this.data.contentInfo.id, id: this.data.contentInfo.id,
article: this.data.contentInfo.article, article: this.data.contentInfo.article,
url: this.data.contentInfo.sspList[0].url url: this.data.contentInfo.sspList[0].url
...@@ -49,7 +49,7 @@ wxService.page({ ...@@ -49,7 +49,7 @@ wxService.page({
contentId: this.data.contentInfo.id, contentId: this.data.contentInfo.id,
tentacleId: memberId, tentacleId: memberId,
contentType: app.globalData.contants.SHARE_TYPE.DETAILS_OF_THE_CONTENT, //内容类型 contentType: app.globalData.contants.SHARE_TYPE.DETAILS_OF_THE_CONTENT, //内容类型
title: this.data.contentInfo.headline, //标题 title: this.data.contentInfo.explain, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销 type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
} }
...@@ -81,7 +81,7 @@ wxService.page({ ...@@ -81,7 +81,7 @@ wxService.page({
onTapShare(){ onTapShare(){
const { memberId, member } = wx.getStorageSync('_baseUserInfo') const { memberId, member } = wx.getStorageSync('_baseUserInfo')
let content = { let content = {
title: this.data.contentInfo.headline, title: this.data.contentInfo.explain,
id: this.data.contentInfo.id, id: this.data.contentInfo.id,
article: this.data.contentInfo.article, article: this.data.contentInfo.article,
url: this.getImageInSspList() url: this.getImageInSspList()
...@@ -90,7 +90,7 @@ wxService.page({ ...@@ -90,7 +90,7 @@ wxService.page({
content: JSON.stringify(content), content: JSON.stringify(content),
contentId: this.data.contentInfo.id, contentId: this.data.contentInfo.id,
contentType: app.globalData.contants.SHARE_TYPE.DETAILS_OF_THE_CONTENT, //内容类型 contentType: app.globalData.contants.SHARE_TYPE.DETAILS_OF_THE_CONTENT, //内容类型
title: this.data.contentInfo.headline, //标题 title: this.data.contentInfo.explain, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销 type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
} }
...@@ -105,7 +105,7 @@ wxService.page({ ...@@ -105,7 +105,7 @@ wxService.page({
let scene = 'i=' + id + '&t=' + tentacleId let scene = 'i=' + id + '&t=' + tentacleId
this.setData({ this.setData({
showCardModal: true, showCardModal: true,
cardTitle: this.data.contentInfo.headline, cardTitle: this.data.contentInfo.explain,
cardUrl: this.getImageInSspList(), cardUrl: this.getImageInSspList(),
pagePath:path, pagePath:path,
scene: scene scene: scene
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment