Commit 7c6192f5 by 谢中龙

优化功能

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