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({
cardUrl: {
type: String,
value: ''
}
},
pagePath: {
type: String,
value: ''
},
},
/**
......
......@@ -18,6 +18,6 @@
<view class="quick-share" bindtap="gotoPoster" hidden='{{!showCardModal}}'>
生成朋友圈海报
</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({
userAvatar: { // 头像
type: String,
value: ''
},
pagePath:{
type: String,
value: ''
}
},
/**
......@@ -95,11 +99,12 @@ Component({
let data = {
"autoColor": true,
"page": 'pages/index/index',
"scene": 'qwe',
"page": this.data.pagePath,
"scene": '123',
"width": 100
}
console.log('---', this.data.pagePath)
wxService.post(`/merchant/contentMobileTerminal/getAppletQrCode`, data).then(res => {
const { result, data } = res.data
if(result == 0){
......
......@@ -91,7 +91,7 @@ Component({
// 'params.sspList': this.data.params.sspList
// })
wxService.nextTick(() => {
that.triggerEvent('_uploadImg', img)
that.triggerEvent('_uploadImg', img.url)
})
}
},
......
// pages/category/category.js
const wxService = require('../../utils/wxService')
import { Integer } from '../../utils/integerDigitalConvertion'
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({
showCardModal:false,
cardTitle:'',
cardUrl:'',
pagePath:'',
contentList:[],
currentShareContent: null
},
......@@ -55,10 +56,10 @@ wxService.page({
wxService.post(`/merchant/contentMobileTerminal/gatClassify`).then(res => {
if (!res) return false
const { result, data } = res.data
if (result == 0 ) {
if (result == 0) {
this.setData({
categoryList:data,
currentTab:data[0].id
currentTab: data[0].id
})
this.getContentList(data[0].id)
......@@ -149,10 +150,14 @@ wxService.page({
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/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
this.setData({
showCardModal: true,
cardTitle: e.detail.title,
cardUrl: e.detail.url
cardUrl: e.detail.url,
pagePath: path
});
}
})
......
{
"navigationBarTitleText": "发现",
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"usingComponents": {
"water-flow-layout": "/component/waterFlowLayout/waterFlowLayout",
......
......@@ -15,7 +15,7 @@
</view>
</scroll-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({
swiperCurrent: 0,
selectSkuName:'',
openPlusStatus:false,
memberLevel:false
memberLevel:false,
showCardModal: false,
currentShareContent: null
},
/**
......@@ -49,12 +51,46 @@ wxService.page({
// 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 () {
this.getProInfo()
this.getOpenStatus()
this.data.currentShareContent = null
},
//获取商品详情
......@@ -194,6 +230,20 @@ wxService.page({
this.setData({
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 @@
"navigationBarTitleText": "商品详情页",
"usingComponents": {
"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 @@
<text class="price">¥618</text>
<text class="cost-price">¥888</text>
</view>
<view class="share-wrap">
<view class="share-wrap" bindtap="onTapShare">
<image class="share-img" src="/assets/imgs/share.png" />
<text class="share-text">分享</text>
</view>
......@@ -152,6 +152,9 @@
product-stock="{{productInfo.stock}}"
/>
<card-modal show-card-modal="{{showCardModal}}" card-title="{{cardTitle}}" card-url="{{cardUrl}}" page-path="{{pagePath}}"/>
<!-- <sku-popup
product-sku="{{productInfo.productSku}}"
......
......@@ -14,9 +14,9 @@ wxService.page({
refundCreateDto: {
reason: "", // 原因
skuList: [],
tradeId: 0
tradeId: 0,
proofImgUrls:[] //凭证
},
tempFilePaths: [], // 照片
refundMark: '',
cartList: [],
curType: { // 当前选择原因
......@@ -113,7 +113,12 @@ wxService.page({
// 上传图片
_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) {
......
......@@ -6,6 +6,7 @@ const envInfo = require('../../config/index').envInfo
let renderPage = null // 渲染页面数据对象(安全渲染)
let handlerDataOnPage = null
let config = require('../../configScreen/configScreen');
import { Integer } from '../../utils/integerDigitalConvertion'
const logger = utils.logger
......@@ -190,5 +191,27 @@ wxService.page({
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({
pageSize:100,
proList:[],
showCardModal: false,
currentShareContent: null
currentShareContent: null,
pagePath:''
},
/**
......@@ -41,12 +42,6 @@ wxService.page({
// 分享
onTapShare() {
this.setData({
showCardModal: true,
cardTitle: this.data.contentInfo.headline,
cardUrl: this.data.contentInfo.url,
})
let content = {
headline: this.data.contentInfo.headline,
id: this.data.contentInfo.id,
......@@ -66,10 +61,14 @@ wxService.page({
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/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
this.setData({
showCardModal: true,
cardTitle: this.data.contentInfo.headline,
cardUrl: this.data.contentInfo.url
cardUrl: this.data.contentInfo.url,
pagePath: path
});
}
})
......
{
"navigationBarTitleText": "种草详情",
"navigationBarTitleText": "详情",
"usingComponents": {
"buy-image-swiper": "/component/buyImageSwiper/buyImageSwiper",
"card-modal": "/component/cardModal/cardModal"
......
......@@ -38,6 +38,6 @@
</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
const wxService = require('../../../../utils/wxService')
import { Integer } from '../../../../utils/integerDigitalConvertion'
wxService.page({
......@@ -110,7 +112,22 @@ 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
const wxService = require('../../../../utils/wxService')
import { Integer } from '../../../../utils/integerDigitalConvertion'
wxService.page({
......@@ -102,7 +103,22 @@ 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({
showCardModal: false,
cardTitle: '',
cardUrl: '',
pagePath:'',
contentList: [],
contentPermission: false,
currentShareContent: null
......@@ -162,10 +163,14 @@ wxService.page({
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 = 'subPackage/page/pages/myReleaseDetail/myReleaseDetail?i=' + id + '&t=' + tentacleId;
this.setData({
showCardModal: true,
cardTitle: e.detail.title,
cardUrl: e.detail.url
cardUrl: e.detail.url,
pagePath: path
});
}
})
......
......@@ -18,7 +18,7 @@
</navigator>
</block>
<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()
const wxService = require('../../../../utils/wxService')
const utils = require('../../../../utils/util')
const { memberId } = wx.getStorageSync('_baseUserInfo')
import { Integer } from '../../../../utils/integerDigitalConvertion'
wxService.page({
......@@ -14,7 +15,8 @@ wxService.page({
id: '',
showDialig: false,
showCardModal: false,
currentShareContent: null
currentShareContent: null,
pagePath:''
},
/**
......@@ -38,12 +40,6 @@ wxService.page({
// 分享
onTapShare(){
this.setData({
showCardModal: true,
cardTitle: this.data.contentInfo.headline,
cardUrl: this.data.contentInfo.url,
})
let content = {
headline: this.data.contentInfo.headline,
id: this.data.contentInfo.id,
......@@ -63,10 +59,14 @@ wxService.page({
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 = 'subPackage/page/pages/myReleaseDetail/myReleaseDetail?i=' + id + '&t=' + tentacleId;
this.setData({
showCardModal: true,
cardTitle: e.detail.title,
cardUrl: e.detail.url
cardTitle: this.data.contentInfo.headline,
cardUrl: this.data.contentInfo.url,
pagePath:path
});
}
})
......
......@@ -40,4 +40,4 @@
<image class="img-top" mode="widthFix" src="/assets/imgs/7_1_0/go-top.png" bindtap="goTop"></image>
</view>
<x-dialog show="{{showDialig}}" bind:_closeDialog="closeDialog" />
<card-modal show-card-modal="{{showCardModal}}" card-title="{{cardTitle}}" card-url="{{cardUrl}}"/>
\ No newline at end of file
<card-modal show-card-modal="{{showCardModal}}" card-title="{{cardTitle}}" card-url="{{cardUrl}}" page-path="{{pagePath}}"/>
\ 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