Commit a9b7ad36 by 赵雅纹

标签

parent 612ecd06
......@@ -124,9 +124,9 @@ App({
cityJson: cityJson,
// brandId: 2711,
// brandId: 2005,
// brandId: 1001,
brandId: 1001,
// brandId: 1002,
brandId: 3001,
// brandId: 3001,
// brandId: 3002,
}
})
......@@ -9,13 +9,9 @@ Component({
* 组件的属性列表
*/
properties: {
show: { // 显示标识
showSelectTabModal: { // 显示标识
type: Boolean,
value: false
},
proGoods: { // 显示标识
type: Array,
value: ''
}
},
......@@ -23,9 +19,13 @@ Component({
* 组件的初始数据
*/
data: {
proList: [],
tabList: [],
proData: [],
productName: ''
productName: '',
pageNum: '1',
pageSize: '10000',
currentTab:'',
currentTabName:''
},
observers: {
......@@ -41,11 +41,11 @@ Component({
}
}
},
show() {
const { show } = this.data
if (show) {
showSelectTabModal() {
const { showSelectTabModal } = this.data
if (showSelectTabModal) {
wxService.nextTick(() => {
this.getProList();
this.geTabList();
})
}
}
......@@ -57,29 +57,30 @@ Component({
methods: {
hidePopup: function () { // 隐藏弹出框
this.setData({
show: false
})
},
_selectCoupon(e) {
console.log(e)
this.setData({
proData: e.detail
showSelectTabModal: false
})
},
confirm() {
if (this.data.proData.length < 1) {
if(!this.data.currentTab){
wx.showToast({
title: '请选择关联商品',
title: '请选择标签',
icon: 'none'
})
return false;
}
let params = {
id: this.data.currentTab,
name: this.data.currentTabName
}
this.setData({
show: false
})
showSelectTabModal: false
},()=>{
wxService.nextTick(() => {
this.triggerEvent('_selectGoods', this.data.proData)
this.triggerEvent('_selectTab', params)
})
})
},
// 点击键盘完成时触发
......@@ -89,37 +90,41 @@ Component({
})
},
// 搜索商品search
search() {
if (!this.data.productName) {
wx.showToast({
title: '请输入商品名称',
icon: 'none'
})
return false
}
this.getProList()
},
// 商品列表
getProList() {
wxService.post(`/sale/product/buyer/listWithMember`, {
productName: this.data.productName
geTabList(){
wxService.post(`/merchant/contentTags/getTagsGroupedListC?pageNum=${this.data.pageNum}&pageSize=${this.data.pageSize}`, {
}).then(res => {
const { result, data } = res.data
if (result == 0) {
data.forEach(item => {
item.isSelect = false
})
this.setData({
proList: data
tabList: data
})
console.log(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
})
}
},
})
<view class="modal-container{{show ? ' active' : ''}}" bindtap="hidePopup" />
<view class="modal-content{{show ? ' active' : ''}}">
<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" />
<text class="modal-title">选择订单商品</text>
<image
class="modal-close"
mode="widthFix"
src="/assets/imgs/7_1_0/close.png"
bindtap="hidePopup"
/>
</view>
<view class="modal-info">
<view class="order-input weui-flex weui-progress">
<input class="order-name border_box" placeholder=" 请输入商品名称" value="{{productName}}" bindblur="onTapConfirm"/>
<text class="order-search" bindtap="search">搜索</text>
<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 class="coupon-list">
<relate-order-item wx:if="{{proList && proList.length > 0}}" bind:_selectCoupon="_selectCoupon" selectShow="{{show}}" proList="{{proList}}" />
</view>
<view class="empty-coupon" wx:if="{{!proList || proList.length < 1}}">
暂无订单商品哦~
<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 class="post-notes fixed-bottom0" bindtap="confirm">确认添加</view>
</view>
<view class="post-notes fixed-bottom0" bindtap="confirm">确认</view>
</view>
/* component/selectTab/selectTab.wxss */
@import '/app.wxss';
@import './../../base/base.wxss';
.order-input {
height: 112rpx;
line-height: 112rpx;
background-color: rgba(246, 246, 246, 1);
}
.order-name {
width: 550rpx;
height: 60rpx;
border-radius: 5rpx;
margin: 0 20rpx;
background-color: rgba(255, 255, 255, 1);
}
.order-search {
width: 122rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 5rpx;
background-color: rgba(203, 60, 60, 1);
color: rgba(255, 255, 255, 1);
font-size: 28rpx;
text-align: left;
font-family: PingFangSC-Regular;
text-align: center;
}
.modal-container {
position: fixed;
width: 100%;
......@@ -81,50 +58,49 @@
top: 35rpx;
transform: rotate(180deg);
}
.modal-title {
color: #333333;
font-size: 32rpx;
position: absolute;
left: 295rpx;
top: 28rpx;
}
.coupon-list {
width: 702rpx;
height: 174rpx;
position: relative;
margin-bottom: 25rpx;
}
.modal-info {
padding: 0 24rpx;
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;
}
.modal-info {
min-height: 900rpx;
overflow: scroll;
}
.empty-coupon {
width: 100%;
color: #aaaaaa;
margin-top: 211rpx;
text-align: center;
}
.coupon-radio {
width: 32rpx;
height: 32rpx;
border-radius: 50%;
border: 1rpx solid rgba(0, 0, 0, 0.2);
line-height: 26rpx;
text-align: center;
}
.tick-success {
width: 18rpx;
}
.select-radio {
position: absolute;
top: 71rpx;
right: 30rpx;
.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);
}
.theme-color {
border: none;
.tab-list{
margin-bottom: 34rpx;
}
\ No newline at end of file
......@@ -14,12 +14,12 @@
</view>
<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}}">
{{currentType == 1 ? '待审核' : (currentType == 3 ? '已驳回' : '已通过')}}
</view>
<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>
<view>
......@@ -52,7 +52,7 @@
</view>
<view class="share-oprate"
catchtap="onTapShare"
data-title="{{headline}}"
data-title="{{explain}}"
data-url="{{url}}"
data-headline="{{headline}}"
data-describe="{{describe}}"
......@@ -65,9 +65,9 @@
<!-- 标签 -->
<view class="tabs-list">
<image class="lock-image" src="/assets/imgs/7_1_0/lock.png"></image>
<view class="tab-item">
<view class="tab-item" wx:if="{{tagsName}}">
<image class="tab-image" src="/assets/imgs/7_1_0/tab.png"></image>
<text class="tab-text">爆改大赛</text>
<text class="tab-text">{{tagsName}}</text>
</view>
</view>
</view>
......
const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test, 预生产 pre
const PROJECT_ENV = 'dev' // 生产 prod, 开发 dev, 测试 test, 预生产 pre
const needMock = '' //
// appid_dev_wx wxc3b64b09b1d3dfc2
......
......@@ -13,7 +13,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.8.2",
"appid": "wx313ec36b710125d4",
"appid": "wxc3b64b09b1d3dfc2",
"projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E",
"debugOptions": {
"hidedInDevtools": []
......
......@@ -19,12 +19,15 @@ wxService.page({
headline: "",
sspList: [],
stcList: [],
userId: memberId
userId: memberId,
tagsId:''
},
tabName:'',
video:'',
pageNo:1,
pageSize:100,
requesting: false
requesting: false,
showSelectTabModal: false
},
/**
......@@ -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) {
......
......@@ -5,6 +5,7 @@
"upload-video": "/component/uploadVideo/uploadVideo",
"grass-item": "/component/grassItem/grassItem",
"select-related-goods": "/component/selectRelatedGoods/selectRelatedGoods",
"select-tab":"/component/selectTab/selectTab",
"go-home": "/component/goHome/goHome"
}
}
\ No newline at end of file
......@@ -25,9 +25,9 @@
<view class="title-border">
<input placeholder="这一刻想说什么..." name="article" value="{{params.article}}" />
</view>
<view class="title-border">
<view class="title-border" bindtap="selectTab">
<image class="tab-icon" src="/assets/imgs/7_1_0/tab.png"></image>
<input class="tab-input" placeholder="选择标签" name="article" value="{{params.article}}" />
<input class="tab-input" placeholder="选择标签" value="{{tabName}}" disabled="" />
</view>
<view class="related-goods" bindtap="handleRelatedGoods">
......@@ -41,6 +41,7 @@
<button class="post-notes fixed-bottom0" form-type="submit">发布笔记</button>
</form>
<!--goHome-->
<go-home />
<go-home />
<select-tab showSelectTabModal="{{showSelectTabModal}}" bind:_selectTab="_selectTab" />
<select-related-goods show="{{showSelectRelatedGoods}}" bind:_selectGoods="_selectGoods" pro-goods="{{proGoods}}"/>
......@@ -39,7 +39,7 @@ wxService.page({
let memberId = options.memberId;
if (memberId) {
let content = {
title: this.data.contentInfo.headline,
title: this.data.contentInfo.explain,
id: this.data.contentInfo.id,
article: this.data.contentInfo.article,
url: this.data.contentInfo.sspList[0].url
......@@ -49,7 +49,7 @@ wxService.page({
contentId: this.data.contentInfo.id,
tentacleId: memberId,
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:智能营销
}
......@@ -81,7 +81,7 @@ wxService.page({
onTapShare(){
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
let content = {
title: this.data.contentInfo.headline,
title: this.data.contentInfo.explain,
id: this.data.contentInfo.id,
article: this.data.contentInfo.article,
url: this.getImageInSspList()
......@@ -90,7 +90,7 @@ wxService.page({
content: JSON.stringify(content),
contentId: this.data.contentInfo.id,
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:智能营销
}
......@@ -105,7 +105,7 @@ wxService.page({
let scene = 'i=' + id + '&t=' + tentacleId
this.setData({
showCardModal: true,
cardTitle: this.data.contentInfo.headline,
cardTitle: this.data.contentInfo.explain,
cardUrl: this.getImageInSspList(),
pagePath:path,
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