Commit c4dd258a by 谢中龙

Merge branch 'mall_dev_7.9.0' into 'mall_dev_7.9.2'

合并种草优化功能到7.9.2

See merge request !180
parents 5c8232c9 7c6192f5
...@@ -132,6 +132,10 @@ ...@@ -132,6 +132,10 @@
"contactPlugin": { "contactPlugin": {
"version": "1.3.0", "version": "1.3.0",
"provider": "wx104a1a20c3f81ec2" "provider": "wx104a1a20c3f81ec2"
},
"live-player-plugin": {
"version": "1.0.2",
"provider": "wx2b03c6e691cd7370"
} }
}, },
"permission": { "permission": {
......
...@@ -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>
......
...@@ -70,6 +70,7 @@ const prod_brand_config = { ...@@ -70,6 +70,7 @@ const prod_brand_config = {
orderingMustOpenCard : false, //下单是否必须卡开 orderingMustOpenCard : false, //下单是否必须卡开
canUseWechatAddress : true,//是否使用获取微信地址 canUseWechatAddress : true,//是否使用获取微信地址
isOpenSelfMention : true, // 是否开启门店自提 isOpenSelfMention : true, // 是否开启门店自提
canRefundDaysAfterDelivery : 15,//发货后多少天之内可显示申请退款按钮
isNeedGetLocation : true,//是否开启小程序获取位置(提交订单时获取门店信息) isNeedGetLocation : true,//是否开启小程序获取位置(提交订单时获取门店信息)
guiderCanScanQrcode : true,//导购是否有扫一扫功能 guiderCanScanQrcode : true,//导购是否有扫一扫功能
shareTitle: '【舞象星品荟-社交商城】', shareTitle: '【舞象星品荟-社交商城】',
...@@ -90,6 +91,7 @@ const prod_brand_config = { ...@@ -90,6 +91,7 @@ const prod_brand_config = {
hasLiveVideo: true,//是否有直播功能 hasLiveVideo: true,//是否有直播功能
orderingMustOpenCard: true, orderingMustOpenCard: true,
isOpenSelfMention: true, // 是否开启门店自提 isOpenSelfMention: true, // 是否开启门店自提
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
guiderCanScanQrcode: true,//导购是否有扫一扫功能 guiderCanScanQrcode: true,//导购是否有扫一扫功能
isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息) isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息)
shareTitle: '【泰华微商城】', shareTitle: '【泰华微商城】',
...@@ -108,6 +110,7 @@ const prod_brand_config = { ...@@ -108,6 +110,7 @@ const prod_brand_config = {
isMall: isMall, isMall: isMall,
hasLiveVideo: false,//是否有直播功能 hasLiveVideo: false,//是否有直播功能
orderingMustOpenCard: true, orderingMustOpenCard: true,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
isOpenSelfMention: false, // 是否开启门店自提 isOpenSelfMention: false, // 是否开启门店自提
guiderCanScanQrcode: true,//导购是否有扫一扫功能 guiderCanScanQrcode: true,//导购是否有扫一扫功能
isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息) isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息)
...@@ -127,6 +130,7 @@ const prod_brand_config = { ...@@ -127,6 +130,7 @@ const prod_brand_config = {
isMall: isMall, isMall: isMall,
hasLiveVideo: false,//是否有直播功能 hasLiveVideo: false,//是否有直播功能
orderingMustOpenCard: false, orderingMustOpenCard: false,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
guiderCanScanQrcode: true,//导购是否有扫一扫功能 guiderCanScanQrcode: true,//导购是否有扫一扫功能
isOpenSelfMention: false, // 是否开启门店自提 isOpenSelfMention: false, // 是否开启门店自提
isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息) isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息)
...@@ -146,6 +150,7 @@ const prod_brand_config = { ...@@ -146,6 +150,7 @@ const prod_brand_config = {
hasLiveVideo: false,//是否有直播功能 hasLiveVideo: false,//是否有直播功能
isMall: isMall, isMall: isMall,
orderingMustOpenCard: false, orderingMustOpenCard: false,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
guiderCanScanQrcode: true,//导购是否有扫一扫功能 guiderCanScanQrcode: true,//导购是否有扫一扫功能
isOpenSelfMention: false, // 是否开启门店自提 isOpenSelfMention: false, // 是否开启门店自提
isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息) isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息)
...@@ -166,6 +171,7 @@ const prod_brand_config = { ...@@ -166,6 +171,7 @@ const prod_brand_config = {
isMall: isMall,// 商城或门户 true 商城 false 门户 isMall: isMall,// 商城或门户 true 商城 false 门户
orderingMustOpenCard: false,//下单是否必须卡开 orderingMustOpenCard: false,//下单是否必须卡开
isOpenSelfMention: false, // 是否开启门店自提 isOpenSelfMention: false, // 是否开启门店自提
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
guiderCanScanQrcode: true,//导购是否有扫一扫功能 guiderCanScanQrcode: true,//导购是否有扫一扫功能
isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息) isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息)
shareTitle: '【LA RUTA DE VIA】',//分享海报上显示的小程序title shareTitle: '【LA RUTA DE VIA】',//分享海报上显示的小程序title
...@@ -185,6 +191,7 @@ const prod_brand_config = { ...@@ -185,6 +191,7 @@ const prod_brand_config = {
canUseWechatAddress: false,//是否使用获取微信地址 canUseWechatAddress: false,//是否使用获取微信地址
orderingMustOpenCard: false, orderingMustOpenCard: false,
guiderCanScanQrcode: false,//导购是否有扫一扫功能 guiderCanScanQrcode: false,//导购是否有扫一扫功能
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
isOpenSelfMention: false, // 是否开启门店自提 isOpenSelfMention: false, // 是否开启门店自提
isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息) isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息)
shareTitle: '【hotwind热风微商城】', shareTitle: '【hotwind热风微商城】',
...@@ -203,6 +210,7 @@ const prod_brand_config = { ...@@ -203,6 +210,7 @@ const prod_brand_config = {
hasLiveVideo: true,//是否有直播功能 hasLiveVideo: true,//是否有直播功能
isMall: isMall, isMall: isMall,
orderingMustOpenCard: true, orderingMustOpenCard: true,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
guiderCanScanQrcode: true,//导购是否有扫一扫功能 guiderCanScanQrcode: true,//导购是否有扫一扫功能
isOpenSelfMention: true, // 是否开启门店自提 isOpenSelfMention: true, // 是否开启门店自提
isNeedGetLocation: true,//是否开启小程序获取位置(提交订单时获取门店信息) isNeedGetLocation: true,//是否开启小程序获取位置(提交订单时获取门店信息)
...@@ -222,6 +230,7 @@ const prod_brand_config = { ...@@ -222,6 +230,7 @@ const prod_brand_config = {
isMall: isMall, isMall: isMall,
canUseWechatAddress: true,//是否使用获取微信地址 canUseWechatAddress: true,//是否使用获取微信地址
orderingMustOpenCard: false, orderingMustOpenCard: false,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
isOpenSelfMention: false, // 是否开启门店自提 isOpenSelfMention: false, // 是否开启门店自提
guiderCanScanQrcode: true,//导购是否有扫一扫功能 guiderCanScanQrcode: true,//导购是否有扫一扫功能
isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息) isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息)
...@@ -238,6 +247,7 @@ const prod_brand_config = { ...@@ -238,6 +247,7 @@ const prod_brand_config = {
contactUsPluginId: '', contactUsPluginId: '',
hasLiveVideo: false,//是否有直播功能 hasLiveVideo: false,//是否有直播功能
hasTrial: false, hasTrial: false,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
canUseWechatAddress: true,//是否使用获取微信地址 canUseWechatAddress: true,//是否使用获取微信地址
isMall: isMall, isMall: isMall,
orderingMustOpenCard: false, orderingMustOpenCard: false,
...@@ -260,6 +270,7 @@ const prod_brand_config = { ...@@ -260,6 +270,7 @@ const prod_brand_config = {
hasLiveVideo: false,//是否有直播功能 hasLiveVideo: false,//是否有直播功能
canUseWechatAddress: true,//是否使用获取微信地址 canUseWechatAddress: true,//是否使用获取微信地址
orderingMustOpenCard: false, orderingMustOpenCard: false,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
isOpenSelfMention: false, // 是否开启门店自提 isOpenSelfMention: false, // 是否开启门店自提
guiderCanScanQrcode: true,//导购是否有扫一扫功能 guiderCanScanQrcode: true,//导购是否有扫一扫功能
isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息) isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息)
...@@ -279,6 +290,7 @@ const prod_brand_config = { ...@@ -279,6 +290,7 @@ const prod_brand_config = {
hasLiveVideo: false,//是否有直播功能 hasLiveVideo: false,//是否有直播功能
canUseWechatAddress: true,//是否使用获取微信地址 canUseWechatAddress: true,//是否使用获取微信地址
orderingMustOpenCard: false, orderingMustOpenCard: false,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
isOpenSelfMention: false, // 是否开启门店自提 isOpenSelfMention: false, // 是否开启门店自提
guiderCanScanQrcode: true,//导购是否有扫一扫功能 guiderCanScanQrcode: true,//导购是否有扫一扫功能
isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息) isNeedGetLocation: false,//是否开启小程序获取位置(提交订单时获取门店信息)
...@@ -297,6 +309,7 @@ const prod_brand_config = { ...@@ -297,6 +309,7 @@ const prod_brand_config = {
hasTrial: false, hasTrial: false,
canUseWechatAddress: true,//是否使用获取微信地址 canUseWechatAddress: true,//是否使用获取微信地址
isMall: isMall, isMall: isMall,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
orderingMustOpenCard: true, orderingMustOpenCard: true,
guiderCanScanQrcode: true,//导购是否有扫一扫功能 guiderCanScanQrcode: true,//导购是否有扫一扫功能
isOpenSelfMention: false, // 是否开启门店自提 isOpenSelfMention: false, // 是否开启门店自提
...@@ -316,6 +329,7 @@ const prod_brand_config = { ...@@ -316,6 +329,7 @@ const prod_brand_config = {
isMall: isMall, isMall: isMall,
canUseWechatAddress: true,//是否使用获取微信地址 canUseWechatAddress: true,//是否使用获取微信地址
orderingMustOpenCard: true, orderingMustOpenCard: true,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
isOpenSelfMention: true, // 是否开启门店自提 isOpenSelfMention: true, // 是否开启门店自提
hasLiveVideo: false,//是否有直播功能 hasLiveVideo: false,//是否有直播功能
guiderCanScanQrcode: true,//导购是否有扫一扫功能 guiderCanScanQrcode: true,//导购是否有扫一扫功能
...@@ -335,6 +349,7 @@ const prod_brand_config = { ...@@ -335,6 +349,7 @@ const prod_brand_config = {
isMall: isMall, isMall: isMall,
canUseWechatAddress: true,//是否使用获取微信地址 canUseWechatAddress: true,//是否使用获取微信地址
orderingMustOpenCard: false, orderingMustOpenCard: false,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
isOpenSelfMention: true, // 是否开启门店自提 isOpenSelfMention: true, // 是否开启门店自提
hasLiveVideo : false,//是否有直播功能 hasLiveVideo : false,//是否有直播功能
guiderCanScanQrcode: true,//导购是否有扫一扫功能 guiderCanScanQrcode: true,//导购是否有扫一扫功能
...@@ -436,6 +451,7 @@ let isNeedGetLocation = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].isN ...@@ -436,6 +451,7 @@ let isNeedGetLocation = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].isN
let canUseWechatAddress = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].canUseWechatAddress : true; let canUseWechatAddress = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].canUseWechatAddress : true;
let hasLiveVideo = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].hasLiveVideo : false; let hasLiveVideo = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].hasLiveVideo : false;
let guiderCanScanQrcode = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].guiderCanScanQrcode : true; let guiderCanScanQrcode = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].guiderCanScanQrcode : true;
let canRefundDaysAfterDelivery = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].canRefundDaysAfterDelivery : 15;
//配置信息导出 //配置信息导出
const envInfo = (() => { const envInfo = (() => {
return { return {
...@@ -459,6 +475,7 @@ const envInfo = (() => { ...@@ -459,6 +475,7 @@ const envInfo = (() => {
canUseWechatAddress: canUseWechatAddress, canUseWechatAddress: canUseWechatAddress,
hasLiveVideo: hasLiveVideo, hasLiveVideo: hasLiveVideo,
guiderCanScanQrcode: guiderCanScanQrcode, guiderCanScanQrcode: guiderCanScanQrcode,
canRefundDaysAfterDelivery: canRefundDaysAfterDelivery,
} }
})() })()
......
...@@ -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
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 81, "current": 13,
"list": [ "list": [
{ {
"id": -1, "id": -1,
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
"id": 13, "id": 13,
"name": "subPage", "name": "subPage",
"pathName": "subPackage/page/pages/subPage/subPage", "pathName": "subPackage/page/pages/subPage/subPage",
"query": "pageId=26", "query": "pageId=106&t=cKG2AoWZ00",
"scene": null "scene": null
}, },
{ {
...@@ -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);
......
...@@ -37,7 +37,7 @@ wxService.page({ ...@@ -37,7 +37,7 @@ wxService.page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad() { onLoad(options) {
this.setData( this.setData(
{ {
pages: [], pages: [],
...@@ -56,18 +56,31 @@ wxService.page({ ...@@ -56,18 +56,31 @@ wxService.page({
handlerDataOnPage = new utils.HandlerDataOnPage() handlerDataOnPage = new utils.HandlerDataOnPage()
renderPage = require('../../../../utils/renderPage').getRenderPage() renderPage = require('../../../../utils/renderPage').getRenderPage()
handlerDataOnPage.init(this, 'pages') handlerDataOnPage.init(this, 'pages')
if (this.options['scene']) { // 判断
let idParam = decodeURIComponent(this.options['scene']).split('&')[0]; if(options.pageId){
this.data.pageId = options.pageId;
this.setData({
pageId: this.data.pageId
});
this.initPage(this.data.pageId)
}
else{
let pageId = shareId;
if (options['scene']) {
let idParam = decodeURIComponent(options['scene']).split('&')[0];
// let hasPageId = idParam ? (idParam.indexOf('pageId') > -1 ? true : false) : false; // let hasPageId = idParam ? (idParam.indexOf('pageId') > -1 ? true : false) : false;
let shareId = idParam && idParam.split('=')[1] || 0; let shareId = idParam && idParam.split('=')[1] || 0;
this.options.pageId = shareId; pageId = shareId;
} }
this.data.pageId = pageId;
this.setData({ this.setData({
pageId: this.options.pageId pageId: this.data.pageId
},()=>{ });
this.initPage(this.data.pageId)
}) this.initPage(this.data.pageId);
}
}, },
/** /**
......
...@@ -161,6 +161,38 @@ function parseUrl(query) { ...@@ -161,6 +161,38 @@ function parseUrl(query) {
return result; return result;
} }
/**
* 计算传入时间和当前时间差
* @param d 时间 格式:2010 - 04 - 10 10: 22: 36
* @return
*/
function getDateDiff(d){
var now = new Date().getTime();
var diffValue = now - Date.parse(d.replace(/-/g, '/').replace(/:/g, ":"));
if (diffValue < 0) {
return null;
}
var minute = 1000 * 60;
var hour = minute * 60;
var day = hour * 24;
var halfamonth = day * 15;
var month = day * 30;
var monthC = diffValue / month;
var weekC = diffValue / (7 * day);
var dayC = diffValue / day;
var hourC = diffValue / hour;
var minC = diffValue / minute;
let result = {};
result.month = parseInt(monthC);
result.week = parseInt(weekC);
result.days = parseInt(dayC);
result.hours = parseInt(hourC);
result.minutes = parseInt(minC);
return result;
}
function getCurrentRouter() { function getCurrentRouter() {
var pages = getCurrentPages() // 获取加载的页面 var pages = getCurrentPages() // 获取加载的页面
...@@ -401,6 +433,7 @@ module.exports = { ...@@ -401,6 +433,7 @@ module.exports = {
getUserInfoByBtn, getUserInfoByBtn,
moment, moment,
parseUrl, parseUrl,
getDateDiff,
_, _,
// _: underscore, // _: underscore,
HandlerDataOnPage, HandlerDataOnPage,
......
...@@ -656,6 +656,8 @@ class WXService extends Http { ...@@ -656,6 +656,8 @@ class WXService extends Http {
config.data.speadProductsBanner = envInfo.speadProductsBanner; config.data.speadProductsBanner = envInfo.speadProductsBanner;
config.data.canUseWechatAddress = envInfo.canUseWechatAddress; config.data.canUseWechatAddress = envInfo.canUseWechatAddress;
config.data.guiderCanScanQrcode = envInfo.guiderCanScanQrcode; config.data.guiderCanScanQrcode = envInfo.guiderCanScanQrcode;
config.data.canRefundDaysAfterDelivery = envInfo.canRefundDaysAfterDelivery;
//默认 //默认
config.data.loading = true; config.data.loading = true;
......
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