Commit 7c6192f5 by 谢中龙

优化功能

parent 92a93d4b
......@@ -59,6 +59,10 @@ Component({
this.setData({
show: false
})
//关闭事件
wxService.nextTick(() => {
this.triggerEvent('modalClose')
})
},
_selectCoupon(e){
this.setData({
......@@ -113,7 +117,6 @@ Component({
this.setData({
proList: data
})
console.log(data)
}
}).finally(() => {
})
......
......@@ -19,7 +19,10 @@
</view>
<view class="coupon-list">
<relate-order-item wx:if="{{proList && proList.length > 0}}" bind:_selectCoupon="_selectCoupon" selectShow="{{show}}" proList="{{proList}}" />
<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}}">
......
......@@ -100,7 +100,7 @@
margin-top: 95rpx;
}
.modal-info {
min-height: 900rpx;
min-height: 800rpx;
overflow: scroll;
}
.empty-coupon {
......
......@@ -59,6 +59,11 @@ Component({
this.setData({
showSelectTabModal: false
})
//关闭事件
wxService.nextTick(() => {
this.triggerEvent('modalClose')
})
},
confirm() {
......
......@@ -7,7 +7,7 @@
<view class="modal-info">
<view class="tab-wrap">
<view class="tab-list" wx:for="{{tabList}}" wx:key="{{index}}">
<view class="tab-list" wx:for="{{tabList}}" wx:key="*this">
<view class="tab-title" >
<view class="tab-item-title">{{item.name}}</view>
<view class="more-tab" wx:if="{{item.contentTagsList.length > 3}}">
......@@ -15,10 +15,24 @@
<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 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="*this"
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="*this"
bindtap="selectTab"
data-id="{{tagItem.id}}"
data-name="{{tagItem.name}}">{{tagItem.name}}</view>
</view>
</view>
......
......@@ -24,7 +24,7 @@ const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test , 测试门
//2992 山东盛联微商城 wx53dedc202ae0d0c2
//2002 巴黎贝甜 wx21968cb3a486d4ab
const BRANCH_ID = 2006
const BRANCH_ID = 3001
const isMall = true
// const needMock = '' //
......
......@@ -73,6 +73,25 @@ wxService.page({
this.getPageData();
this.updateFavoriteAndShareNumById();
},
//发布种草按钮
onTapToReleaseContent() {
//判断当前登录用户是不是有导购身份
let userInfo = wx.getStorageSync('_baseUserInfo') ? wx.getStorageSync('_baseUserInfo') : null;
if (!userInfo) {
wx.showToast({
title: '请先登录!',
icon: 'none'
});
}
else if (!userInfo.member.qiyeInfo) {
wxService.router(`/subPackage/page/pages/grassCommunity/grassCommunity`)
}
else {
wxService.router(`/shoppingGuid/page/pages/releaseContent/releaseContent`);
}
},
//根据详情那边过来的点赞分享数据 更改列表中对应的数据
updateFavoriteAndShareNumById(){
let articleInfo = wx.getStorageSync('articleInfo');
......
......@@ -39,11 +39,9 @@
<view wx:if="{{currentHasUserInfo}}">
<block wx:if="{{contentPermission}}">
<navigator open-type="navigate" url="/subPackage/page/pages/grassCommunity/grassCommunity">
<view class="add">
<image src='/assets/imgs/icon_plus.png' mode='aspectFit'></image>
</view>
</navigator>
<view class="add" bindtap="onTapToReleaseContent">
<image src='/assets/imgs/icon_plus.png' mode='aspectFit'></image>
</view>
</block>
</view>
<card-modal
......
......@@ -13,7 +13,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.8.2",
"appid": "wx40fec8944623c8b3",
"appid": "wx313ec36b710125d4",
"projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E",
"debugOptions": {
"hidedInDevtools": []
......@@ -233,7 +233,7 @@
"id": 28,
"name": "我的发布_种草详情",
"pathName": "subPackage/page/pages/myReleaseDetail/myReleaseDetail",
"query": "id=690150609835417600",
"query": "id=691599391294898176",
"scene": null
},
{
......
......@@ -238,7 +238,6 @@ wxService.page({
*/
onShow: function () {
let chooseProducts = wx.getStorageSync('guiderReleaseProducts') ? wx.getStorageSync('guiderReleaseProducts') : [];
console.log(chooseProducts)
if(chooseProducts.length > 0){
this.setData({
proGoods: chooseProducts,
......@@ -328,7 +327,7 @@ wxService.page({
sspList.forEach(item => {
if (isFirst == 0 && item.url){
item.cover = 1;
count++
isFirst ++ ;
}
else{
item.cover = 0;
......@@ -349,8 +348,8 @@ wxService.page({
let param = {};
param.article = this.data.article;
param.headline = this.data.headline;
param.sspList = this.data.sspList;
param.stcList = this.data.checkedProducts;
param.sspList = sspList;
param.stcList = checkedProducts;
param.tagsId = this.data.tagsId;
param.userId = memberId;
param.id = this.data.id;
......@@ -362,6 +361,8 @@ wxService.page({
title: '发布成功',
});
wx.removeStorageSync('guiderReleaseProducts');
wx.redirectTo({
url: '/subPackage/page/pages/myRelease/myRelease',
});
......
......@@ -18,7 +18,7 @@
<view class="flex-wrp">
<view class="flex-item" wx:for="{{uploadImgs}}" wx:key="*this" wx:for-index="index" wx:for-item="item">
<icon size="16" type="clear" bindtap="deleteImage" data-index="{{index}}" />
<image class="item-img" src="{{item}}" />
<image class="item-img" src="{{item}}" mode="aspectFit" />
</view>
<view class="flex-item" hidden="{{pics.length >= 5}}">
<view class="upload-wrap" bindtap="uploadImg">
......
......@@ -26,7 +26,8 @@ wxService.page({
pageNo: 1,
pageSize: 100,
requesting: false,
showSelectTabModal: false
showSelectTabModal: false,
isHidden : false,
},
/**
......@@ -124,9 +125,9 @@ wxService.page({
// 关联商品
handleRelatedGoods() {
console.log('关联商品')
this.setData({
showSelectRelatedGoods: true
showSelectRelatedGoods: true,
isHidden : true,
})
},
uploadImg() {
......@@ -148,7 +149,6 @@ wxService.page({
that.setData({
pics: pics
});
// console.log(',..............',that.data.pics)
that.moreImgUpload({
url: url,//这里是你图片上传的接口
path: imgsrcs//这里是选取的图片的地址数组
......@@ -165,34 +165,41 @@ wxService.page({
// 关联商品
_selectGoods(e) {
this.setData({
proGoods: e.detail
})
this.data.proGoods = e.detail;
let stcList = []
for (var i in this.data.proGoods) {
stcList.push({
commodityId: this.data.proGoods[i].productId
})
this.setData({
'params.stcList': stcList
})
}
this.setData({
'params.stcList': stcList,
isHidden: false,
proGoods: this.data.proGoods,
})
},
//选择商品关闭事件
modalClose(){
this.setData({
isHidden: false,
})
},
//关联标签
_selectTab(e) {
console.log(e)
this.setData({
'params.tagsId': e.detail.id,
tabName: e.detail.name
tabName: e.detail.name,
isHidden: false,
})
},
// 标签选择
selectTab() {
this.setData({
showSelectTabModal: true
showSelectTabModal: true,
isHidden : true,
})
},
......@@ -232,8 +239,7 @@ wxService.page({
i++;
if (i == data.path.length) { //当图片传完时,停止调用
} else {//若图片还没有传完,则继续调用函数
console.log('00000', i);
} else {//若图片还没有传完,则继续调用函数
data.i = i;
data.success = success;
data.fail = fail;
......@@ -277,7 +283,6 @@ wxService.page({
var sspList = this.data.params.sspList
for (var i in sspList) {
if (sspList[i].videoUrl) {
console.log(i)
sspList.splice(i, 1)
}
}
......@@ -303,25 +308,9 @@ wxService.page({
},
// 发布笔记
formSubmit(e) {
console.log('e', this.data.requesting)
if (this.data.requesting) {
return;
}
// if (!this.data.params.sspList || this.data.params.sspList.length < 1) {
// wx.showToast({
// title: '请上传至少一张图片',
// icon: 'none'
// })
// return;
// }
// if (this.data.params.sspList && this.data.params.sspList[0].videoUrl && !this.data.params.sspList[1]) {
// wx.showToast({
// title: '请上传视频',
// // title: '请上传至少一张图片',
// icon: 'none'
// })
// return;
// }
const { sspList } = this.data.params
if (!sspList.length) {
wx.showToast({
......
......@@ -24,10 +24,14 @@
</view>
<view class="title-border-text">
<!--<input placeholder="这一刻想说什么..." name="article" value="{{params.article}}" />-->
<textarea bindblur="bindWordLimit"
<view class="span-textarea" hidden="{{!isHidden}}">{{params.article}}</view>
<textarea
bindblur="bindWordLimit"
style="width: 100%;"
class='textarea-text' name="article"
class='textarea-text'
name="article"
value="{{params.article}}"
hidden="{{isHidden}}"
auto-height
placeholder="这一刻想说什么..." />
</view>
......@@ -54,7 +58,7 @@
<!--goHome-->
<go-home />
<floatNav bind:getAuth="_getUserInfo" bind:updatePage="updatePage"/>
<select-tab showSelectTabModal="{{showSelectTabModal}}" bind:_selectTab="_selectTab" />
<select-related-goods show="{{showSelectRelatedGoods}}" bind:_selectGoods="_selectGoods" pro-goods="{{proGoods}}"/>
<select-tab showSelectTabModal="{{showSelectTabModal}}" bind:modalClose="modalClose" bind:_selectTab="_selectTab" />
<select-related-goods show="{{showSelectRelatedGoods}}" bind:modalClose="modalClose" bind:_selectGoods="_selectGoods" pro-goods="{{proGoods}}"/>
<go-guid/>
\ No newline at end of file
......@@ -16,6 +16,11 @@ page{
min-height: 300rpx;
}
.span-textarea{
width: 100%;
min-height: 300rpx;
}
.upload-tip {
height: 28prx;
color: rgba(170, 170, 170, 1);
......
......@@ -84,6 +84,24 @@ wxService.page({
},
//发布种草按钮
onTapToReleaseContent(){
//判断当前登录用户是不是有导购身份
let userInfo = wx.getStorageSync('_baseUserInfo') ? wx.getStorageSync('_baseUserInfo') : null;
if (!userInfo) {
wx.showToast({
title: '请先登录!',
icon : 'none'
});
}
else if (!userInfo.member.qiyeInfo) {
wxService.router(`/subPackage/page/pages/grassCommunity/grassCommunity`)
}
else {
wxService.router(`/shoppingGuid/page/pages/releaseContent/releaseContent`);
}
},
// 发布内容权限
getContentPermission() {
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
......
......@@ -26,12 +26,9 @@
</button>
<view wx:if="{{currentHasUserInfo}}">
<block wx:if="{{contentPermission}}">
<navigator open-type="navigate" url="/subPackage/page/pages/grassCommunity/grassCommunity">
<view class="add">
<image src="/assets/imgs/icon_plus.png" mode="aspectFit"></image>
<!-- <text>+</text> -->
</view>
</navigator>
<view class="add" bindtap="onTapToReleaseContent">
<image src="/assets/imgs/icon_plus.png" mode="aspectFit"></image>
</view>
</block>
</view>
<!--goHome-->
......
......@@ -44,7 +44,7 @@
<text class="share-number">{{contentInfo.enjoySum || 0}}</text>
</view>
<view class="share-oprate" bindtap="onTapShare">
<image class="share-img" src="https://img3.bigaka.com/prd/3001/202003/20200309/3001843570f0-4ff8-4e72-8d69-9710269420bf.png" />
<image class="share-img" src="/assets/imgs/7_1_0/08_22/share.png" />
<text class="share-number">{{contentInfo.transmitSum || 0}}</text>
</view>
</view>
......@@ -52,9 +52,6 @@
<view class="weui-flex">
<view class="action-del" bindtap="handleDel"> 删除 </view>
<view class="action-edit" bindtap='onTapEdit' data-item="{{contentInfo}}"> 编辑 </view>
<!-- <navigator url="/subPackage/page/pages/grassCommunity/grassCommunity?id={{contentInfo.id}}" hover-class="none">
</navigator> -->
</view>
<navigator url="/subPackage/page/pages/orderBenefit/orderBenefit?id={{contentInfo.id}}" hover-class="none">
<view class="action-check"> 查看收益 </view>
......
......@@ -47,6 +47,7 @@ page{
position: fixed;
bottom: 0;
width: 100%;
background: #ffffff;
}
.action-share {
border-bottom: 1rpx solid rgba(151, 151, 151, 0.5);
......@@ -54,6 +55,11 @@ page{
.action, .action-share{
padding: 10rpx 30rpx;
}
.action-share{
padding: 30rpx;
}
.action {
height: 88rpx;
background-color: rgba(255, 255, 255, 1);
......
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