Commit 2d7699b1 by 赵雅纹

Merge branch 'feature-zyw-sc' into 'dev_7.1.0'

Feature zyw sc

See merge request !91
parents 3d188f77 8da4a77b
...@@ -19,7 +19,11 @@ Component({ ...@@ -19,7 +19,11 @@ Component({
cardUrl: { cardUrl: {
type: String, type: String,
value: '' value: ''
} },
pagePath: {
type: String,
value: ''
},
}, },
/** /**
......
...@@ -18,6 +18,6 @@ ...@@ -18,6 +18,6 @@
<view class="quick-share" bindtap="gotoPoster" hidden='{{!showCardModal}}'> <view class="quick-share" bindtap="gotoPoster" hidden='{{!showCardModal}}'>
生成朋友圈海报 生成朋友圈海报
</view> </view>
<share-poster id="getPoster" bindmyevent="myEventListener" avater="{{cardUrl}}" productDesc="{{cardTitle}}" userAvatar="http://t2.hddhhn.com/uploads/tu/201806/9999/91480c0c87.jpg" bind:showMiniCard="_showMiniCard"></share-poster> <share-poster id="getPoster" bindmyevent="myEventListener" avater="{{cardUrl}}" productDesc="{{cardTitle}}" userAvatar="http://t2.hddhhn.com/uploads/tu/201806/9999/91480c0c87.jpg" bind:showMiniCard="_showMiniCard" pagePath="{{pagePath}}"></share-poster>
...@@ -18,6 +18,10 @@ Component({ ...@@ -18,6 +18,10 @@ Component({
userAvatar: { // 头像 userAvatar: { // 头像
type: String, type: String,
value: '' value: ''
},
pagePath:{
type: String,
value: ''
} }
}, },
/** /**
...@@ -95,11 +99,12 @@ Component({ ...@@ -95,11 +99,12 @@ Component({
let data = { let data = {
"autoColor": true, "autoColor": true,
"page": 'pages/index/index', "page": this.data.pagePath,
"scene": 'qwe', "scene": '123',
"width": 100 "width": 100
} }
console.log('---', this.data.pagePath)
wxService.post(`/merchant/contentMobileTerminal/getAppletQrCode`, data).then(res => { wxService.post(`/merchant/contentMobileTerminal/getAppletQrCode`, data).then(res => {
const { result, data } = res.data const { result, data } = res.data
if(result == 0){ if(result == 0){
......
...@@ -91,7 +91,7 @@ Component({ ...@@ -91,7 +91,7 @@ Component({
// 'params.sspList': this.data.params.sspList // 'params.sspList': this.data.params.sspList
// }) // })
wxService.nextTick(() => { wxService.nextTick(() => {
that.triggerEvent('_uploadImg', img) that.triggerEvent('_uploadImg', img.url)
}) })
} }
}, },
......
// pages/category/category.js // pages/category/category.js
const wxService = require('../../utils/wxService') const wxService = require('../../utils/wxService')
import { Integer } from '../../utils/integerDigitalConvertion'
wxService.page({ wxService.page({
...@@ -113,7 +114,21 @@ wxService.page({ ...@@ -113,7 +114,21 @@ wxService.page({
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { onShareAppMessage: function (res) {
let tentacleInfo = {
content: this.route,
title: this.route,
contentType: 3,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = `pages/category/category?t=${tentacleId}`;
return {
path: path
}
}
});
} }
}) })
\ No newline at end of file
...@@ -20,6 +20,7 @@ wxService.page({ ...@@ -20,6 +20,7 @@ wxService.page({
showCardModal:false, showCardModal:false,
cardTitle:'', cardTitle:'',
cardUrl:'', cardUrl:'',
pagePath:'',
contentList:[], contentList:[],
currentShareContent: null currentShareContent: null
}, },
...@@ -55,10 +56,10 @@ wxService.page({ ...@@ -55,10 +56,10 @@ wxService.page({
wxService.post(`/merchant/contentMobileTerminal/gatClassify`).then(res => { wxService.post(`/merchant/contentMobileTerminal/gatClassify`).then(res => {
if (!res) return false if (!res) return false
const { result, data } = res.data const { result, data } = res.data
if (result == 0 ) { if (result == 0) {
this.setData({ this.setData({
categoryList:data, categoryList:data,
currentTab:data[0].id currentTab: data[0].id
}) })
this.getContentList(data[0].id) this.getContentList(data[0].id)
...@@ -149,10 +150,14 @@ wxService.page({ ...@@ -149,10 +150,14 @@ wxService.page({
wxService.getTentacleContent(tentacleInfo).then(res =>{ wxService.getTentacleContent(tentacleInfo).then(res =>{
if (res && res.tentacleId){ if (res && res.tentacleId){
this.data.currentShareContent.tentacleId = res.tentacleId; this.data.currentShareContent.tentacleId = res.tentacleId;
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
this.setData({ this.setData({
showCardModal: true, showCardModal: true,
cardTitle: e.detail.title, cardTitle: e.detail.title,
cardUrl: e.detail.url cardUrl: e.detail.url,
pagePath: path
}); });
} }
}) })
......
{ {
"navigationBarTitleText": "发现", "navigationBarTitleText": "",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"usingComponents": { "usingComponents": {
"water-flow-layout": "/component/waterFlowLayout/waterFlowLayout", "water-flow-layout": "/component/waterFlowLayout/waterFlowLayout",
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<card-modal show-card-modal="{{showCardModal}}" card-title="{{cardTitle}}" card-url="{{cardUrl}}"/> <card-modal show-card-modal="{{showCardModal}}" card-title="{{cardTitle}}" card-url="{{cardUrl}}" page-path="{{pagePath}}"/>
......
...@@ -19,7 +19,9 @@ wxService.page({ ...@@ -19,7 +19,9 @@ wxService.page({
swiperCurrent: 0, swiperCurrent: 0,
selectSkuName:'', selectSkuName:'',
openPlusStatus:false, openPlusStatus:false,
memberLevel:false memberLevel:false,
showCardModal: false,
currentShareContent: null
}, },
/** /**
...@@ -48,13 +50,47 @@ wxService.page({ ...@@ -48,13 +50,47 @@ wxService.page({
// 商品加入购物车 // 商品加入购物车
// xm_bi.Event.stat("skuAddToCart", { "amount":"666","skuId":'abcd1234'}); // xm_bi.Event.stat("skuAddToCart", { "amount":"666","skuId":'abcd1234'});
}, },
// 分享
onTapShare() {
let content = {
headline: this.data.productInfo.headline,
id: this.data.productInfo.id,
article: this.data.productInfo.article,
url: this.data.productInfo.url
}
let tentacleInfo = {
content: JSON.stringify(content),
contentId: this.data.productInfo.id,
contentType: 2, //内容类型 1.文章 2.商品 3.页面
title: this.data.productInfo.headline, //标题
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
this.data.currentShareContent = this.data.productInfo;
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
this.data.currentShareContent.tentacleId = res.tentacleId;
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'pages/productDetail/productDetail?i=' + id + '&t=' + tentacleId;
this.setData({
showCardModal: true,
cardTitle: this.data.productInfo.headline,
cardUrl: this.data.productInfo.url,
pagePath: path
});
}
})
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
this.getProInfo() this.getProInfo()
this.getOpenStatus() this.getOpenStatus()
this.data.currentShareContent = null
}, },
//获取商品详情 //获取商品详情
...@@ -194,6 +230,20 @@ wxService.page({ ...@@ -194,6 +230,20 @@ wxService.page({
this.setData({ this.setData({
selectSkuName: selectSkuStr selectSkuName: selectSkuStr
}) })
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function (res) {
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'pages/productDetail/productDetail?i=' + id + '&t=' + tentacleId;
console.log(path)
return {
path: path
}
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"navigationBarTitleText": "商品详情页", "navigationBarTitleText": "商品详情页",
"usingComponents": { "usingComponents": {
"buy-image-swiper": "/component/buyImageSwiper/buyImageSwiper", "buy-image-swiper": "/component/buyImageSwiper/buyImageSwiper",
"sku-popup": "/component/skuPopup/skuPopup" "sku-popup": "/component/skuPopup/skuPopup",
"card-modal": "/component/cardModal/cardModal"
} }
} }
\ No newline at end of file
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<text class="price">¥618</text> <text class="price">¥618</text>
<text class="cost-price">¥888</text> <text class="cost-price">¥888</text>
</view> </view>
<view class="share-wrap"> <view class="share-wrap" bindtap="onTapShare">
<image class="share-img" src="/assets/imgs/share.png" /> <image class="share-img" src="/assets/imgs/share.png" />
<text class="share-text">分享</text> <text class="share-text">分享</text>
</view> </view>
...@@ -152,6 +152,9 @@ ...@@ -152,6 +152,9 @@
product-stock="{{productInfo.stock}}" product-stock="{{productInfo.stock}}"
/> />
<card-modal show-card-modal="{{showCardModal}}" card-title="{{cardTitle}}" card-url="{{cardUrl}}" page-path="{{pagePath}}"/>
<!-- <sku-popup <!-- <sku-popup
product-sku="{{productInfo.productSku}}" product-sku="{{productInfo.productSku}}"
......
...@@ -14,9 +14,9 @@ wxService.page({ ...@@ -14,9 +14,9 @@ wxService.page({
refundCreateDto: { refundCreateDto: {
reason: "", // 原因 reason: "", // 原因
skuList: [], skuList: [],
tradeId: 0 tradeId: 0,
proofImgUrls:[] //凭证
}, },
tempFilePaths: [], // 照片
refundMark: '', refundMark: '',
cartList: [], cartList: [],
curType: { // 当前选择原因 curType: { // 当前选择原因
...@@ -113,7 +113,12 @@ wxService.page({ ...@@ -113,7 +113,12 @@ wxService.page({
// 上传图片 // 上传图片
_uploadImg(e){ _uploadImg(e){
console.log(e) if (e.detail){
this.data.refundCreateDto.proofImgUrls.push(e.detail)
this.setData({
'refundCreateDto.proofImgUrls': this.data.refundCreateDto.proofImgUrls
})
}
}, },
checkPro(e) { checkPro(e) {
......
...@@ -6,6 +6,7 @@ const envInfo = require('../../config/index').envInfo ...@@ -6,6 +6,7 @@ const envInfo = require('../../config/index').envInfo
let renderPage = null // 渲染页面数据对象(安全渲染) let renderPage = null // 渲染页面数据对象(安全渲染)
let handlerDataOnPage = null let handlerDataOnPage = null
let config = require('../../configScreen/configScreen'); let config = require('../../configScreen/configScreen');
import { Integer } from '../../utils/integerDigitalConvertion'
const logger = utils.logger const logger = utils.logger
...@@ -190,5 +191,27 @@ wxService.page({ ...@@ -190,5 +191,27 @@ wxService.page({
wx.hideLoading() wx.hideLoading()
}) })
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function (res) {
let tentacleInfo = {
content: this.route,
title: this.route,
contentType: 3,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = `pages/userCenter/userCenter?t=${tentacleId}`;
console.log(path)
return {
path: path
}
}
});
} }
}) })
\ No newline at end of file
...@@ -16,7 +16,8 @@ wxService.page({ ...@@ -16,7 +16,8 @@ wxService.page({
pageSize:100, pageSize:100,
proList:[], proList:[],
showCardModal: false, showCardModal: false,
currentShareContent: null currentShareContent: null,
pagePath:''
}, },
/** /**
...@@ -41,12 +42,6 @@ wxService.page({ ...@@ -41,12 +42,6 @@ wxService.page({
// 分享 // 分享
onTapShare() { onTapShare() {
this.setData({
showCardModal: true,
cardTitle: this.data.contentInfo.headline,
cardUrl: this.data.contentInfo.url,
})
let content = { let content = {
headline: this.data.contentInfo.headline, headline: this.data.contentInfo.headline,
id: this.data.contentInfo.id, id: this.data.contentInfo.id,
...@@ -66,10 +61,14 @@ wxService.page({ ...@@ -66,10 +61,14 @@ wxService.page({
wxService.getTentacleContent(tentacleInfo).then(res => { wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) { if (res && res.tentacleId) {
this.data.currentShareContent.tentacleId = res.tentacleId; this.data.currentShareContent.tentacleId = res.tentacleId;
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
this.setData({ this.setData({
showCardModal: true, showCardModal: true,
cardTitle: this.data.contentInfo.headline, cardTitle: this.data.contentInfo.headline,
cardUrl: this.data.contentInfo.url cardUrl: this.data.contentInfo.url,
pagePath: path
}); });
} }
}) })
......
{ {
"navigationBarTitleText": "种草详情", "navigationBarTitleText": "详情",
"usingComponents": { "usingComponents": {
"buy-image-swiper": "/component/buyImageSwiper/buyImageSwiper", "buy-image-swiper": "/component/buyImageSwiper/buyImageSwiper",
"card-modal": "/component/cardModal/cardModal" "card-modal": "/component/cardModal/cardModal"
......
...@@ -38,6 +38,6 @@ ...@@ -38,6 +38,6 @@
</view> </view>
</view> </view>
</view> </view>
<card-modal show-card-modal="{{showCardModal}}" card-title="{{cardTitle}}" card-url="{{cardUrl}}"/> <card-modal show-card-modal="{{showCardModal}}" card-title="{{cardTitle}}" card-url="{{cardUrl}}" page-path="{{pagePath}}"/>
// subPackage/page/pages/fun/fun.js // subPackage/page/pages/fun/fun.js
const wxService = require('../../../../utils/wxService') const wxService = require('../../../../utils/wxService')
import { Integer } from '../../../../utils/integerDigitalConvertion'
wxService.page({ wxService.page({
...@@ -108,9 +110,24 @@ wxService.page({ ...@@ -108,9 +110,24 @@ wxService.page({
}, },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { onShareAppMessage: function (res) {
let tentacleInfo = {
content: this.route,
title: this.route,
contentType: 3,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = `subPackage/page/pages/categoryPro/categoryPro?t=${tentacleId}`;
console.log(path)
return {
path: path
}
}
});
} }
}) })
\ No newline at end of file
// subPackage/page/pages/fun/fun.js // subPackage/page/pages/fun/fun.js
const wxService = require('../../../../utils/wxService') const wxService = require('../../../../utils/wxService')
import { Integer } from '../../../../utils/integerDigitalConvertion'
wxService.page({ wxService.page({
...@@ -100,9 +101,24 @@ wxService.page({ ...@@ -100,9 +101,24 @@ wxService.page({
}, },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { onShareAppMessage: function (res) {
let tentacleInfo = {
content: this.route,
title: this.route,
contentType: 3,
type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) {
let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = `subPackage/page/pages/fun/fun?t=${tentacleId}`;
console.log(path)
return {
path: path
}
}
});
} }
}) })
\ No newline at end of file
...@@ -21,6 +21,7 @@ wxService.page({ ...@@ -21,6 +21,7 @@ wxService.page({
showCardModal: false, showCardModal: false,
cardTitle: '', cardTitle: '',
cardUrl: '', cardUrl: '',
pagePath:'',
contentList: [], contentList: [],
contentPermission: false, contentPermission: false,
currentShareContent: null currentShareContent: null
...@@ -162,10 +163,14 @@ wxService.page({ ...@@ -162,10 +163,14 @@ wxService.page({
wxService.getTentacleContent(tentacleInfo).then(res => { wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) { if (res && res.tentacleId) {
this.data.currentShareContent.tentacleId = res.tentacleId; this.data.currentShareContent.tentacleId = res.tentacleId;
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'subPackage/page/pages/myReleaseDetail/myReleaseDetail?i=' + id + '&t=' + tentacleId;
this.setData({ this.setData({
showCardModal: true, showCardModal: true,
cardTitle: e.detail.title, cardTitle: e.detail.title,
cardUrl: e.detail.url cardUrl: e.detail.url,
pagePath: path
}); });
} }
}) })
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</navigator> </navigator>
</block> </block>
<water-flow-layout type="2" image-data="{{contentList}}" bind:updataLike="gotoLike" bind:_onTapShare="_onTapShare"/> <water-flow-layout type="2" image-data="{{contentList}}" bind:updataLike="gotoLike" bind:_onTapShare="_onTapShare"/>
<card-modal show-card-modal="{{showCardModal}}" card-title="{{cardTitle}}" card-url="{{cardUrl}}"/> <card-modal show-card-modal="{{showCardModal}}" card-title="{{cardTitle}}" card-url="{{cardUrl}}" page-path="{{pagePath}}"/>
......
...@@ -3,6 +3,7 @@ const app = getApp() ...@@ -3,6 +3,7 @@ const app = getApp()
const wxService = require('../../../../utils/wxService') const wxService = require('../../../../utils/wxService')
const utils = require('../../../../utils/util') const utils = require('../../../../utils/util')
const { memberId } = wx.getStorageSync('_baseUserInfo') const { memberId } = wx.getStorageSync('_baseUserInfo')
import { Integer } from '../../../../utils/integerDigitalConvertion'
wxService.page({ wxService.page({
...@@ -14,7 +15,8 @@ wxService.page({ ...@@ -14,7 +15,8 @@ wxService.page({
id: '', id: '',
showDialig: false, showDialig: false,
showCardModal: false, showCardModal: false,
currentShareContent: null currentShareContent: null,
pagePath:''
}, },
/** /**
...@@ -38,12 +40,6 @@ wxService.page({ ...@@ -38,12 +40,6 @@ wxService.page({
// 分享 // 分享
onTapShare(){ onTapShare(){
this.setData({
showCardModal: true,
cardTitle: this.data.contentInfo.headline,
cardUrl: this.data.contentInfo.url,
})
let content = { let content = {
headline: this.data.contentInfo.headline, headline: this.data.contentInfo.headline,
id: this.data.contentInfo.id, id: this.data.contentInfo.id,
...@@ -63,10 +59,14 @@ wxService.page({ ...@@ -63,10 +59,14 @@ wxService.page({
wxService.getTentacleContent(tentacleInfo).then(res => { wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) { if (res && res.tentacleId) {
this.data.currentShareContent.tentacleId = res.tentacleId; this.data.currentShareContent.tentacleId = res.tentacleId;
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'subPackage/page/pages/myReleaseDetail/myReleaseDetail?i=' + id + '&t=' + tentacleId;
this.setData({ this.setData({
showCardModal: true, showCardModal: true,
cardTitle: e.detail.title, cardTitle: this.data.contentInfo.headline,
cardUrl: e.detail.url cardUrl: this.data.contentInfo.url,
pagePath:path
}); });
} }
}) })
......
...@@ -40,4 +40,4 @@ ...@@ -40,4 +40,4 @@
<image class="img-top" mode="widthFix" src="/assets/imgs/7_1_0/go-top.png" bindtap="goTop"></image> <image class="img-top" mode="widthFix" src="/assets/imgs/7_1_0/go-top.png" bindtap="goTop"></image>
</view> </view>
<x-dialog show="{{showDialig}}" bind:_closeDialog="closeDialog" /> <x-dialog show="{{showDialig}}" bind:_closeDialog="closeDialog" />
<card-modal show-card-modal="{{showCardModal}}" card-title="{{cardTitle}}" card-url="{{cardUrl}}"/> <card-modal show-card-modal="{{showCardModal}}" card-title="{{cardTitle}}" card-url="{{cardUrl}}" page-path="{{pagePath}}"/>
\ No newline at end of file \ No newline at end of file
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