Commit 456925f2 by 谢中龙

导购,海报

parent f62751c6
...@@ -66,7 +66,8 @@ ...@@ -66,7 +66,8 @@
"pages/valueCardRecords/valueCardRecords", "pages/valueCardRecords/valueCardRecords",
"pages/chooseStore/chooseStore", "pages/chooseStore/chooseStore",
"pages/selfPickUpOrderList/selfPickUpOrderList", "pages/selfPickUpOrderList/selfPickUpOrderList",
"pages/selfPickUpOrderInfo/selfPickUpOrderInfo" "pages/selfPickUpOrderInfo/selfPickUpOrderInfo",
"pages/shareConfig/shareConfig"
] ]
}, },
{ {
...@@ -96,7 +97,8 @@ ...@@ -96,7 +97,8 @@
} }
], ],
"usingComponents": { "usingComponents": {
"authorization-modal": "/component/authorization-modal/authorization-modal" "authorization-modal": "/component/authorization-modal/authorization-modal",
"go-guid": "/component/goGuid/goGuid"
}, },
"window": { "window": {
"backgroundTextStyle": "dark", "backgroundTextStyle": "dark",
......
...@@ -32,6 +32,10 @@ Component({ ...@@ -32,6 +32,10 @@ Component({
scene: { scene: {
type: String, type: String,
value: '' value: ''
},
product : {
type : Object,
value : null
} }
}, },
observers: { observers: {
...@@ -54,9 +58,12 @@ Component({ ...@@ -54,9 +58,12 @@ Component({
*/ */
methods: { methods: {
gotoPoster(){ gotoPoster(){
this.setData({ // this.setData({
showCardModal:false // showCardModal:false
}) // })
wx.showLoading({
title: '跳转中..',
});
this.getMiniCode(); this.getMiniCode();
}, },
...@@ -73,6 +80,7 @@ Component({ ...@@ -73,6 +80,7 @@ Component({
} }
console.log(this.data.pagePath) console.log(this.data.pagePath)
wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => { wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => {
wx.hideLoading();
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
this.setData({ this.setData({
...@@ -81,7 +89,18 @@ Component({ ...@@ -81,7 +89,18 @@ Component({
}) })
console.log(this.data.codeImg) console.log(this.data.codeImg)
if (this.data.codeImg) { if (this.data.codeImg) {
this.selectComponent('#getPoster').getAvaterInfo() // this.selectComponent('#getPoster').getAvaterInfo()
let obj = {
productName: this.data.cardTitle,
minSalePrice: this.data.product.minSalePrice,
productImg: this.data.cardUrl,
qrcodeImg: this.data.codeImg,
type: this.data.product.type
};
wx.navigateTo({
url: '/subPackage/page/pages/shareConfig/shareConfig?shareInfo=' + JSON.stringify(obj),
});
} }
} }
}) })
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class="modal-header"> <view class="modal-header">
<view style="display:flex;align-items:center;"> <view style="display:flex;align-items:center;">
<image class="brand-img" src="{{shareLogo}}"></image> <image class="brand-img" src="{{shareLogo}}"></image>
<text style="font-size:28rpx;color:#333333;margin-left:8rpx;">【{{shareTitle}}】</text> <text style="font-size:28rpx;color:#333333;margin-left:8rpx;">{{shareTitle}}</text>
</view> </view>
<view class="brand-title">{{cardTitle}}</view> <view class="brand-title">{{cardTitle}}</view>
</view> </view>
......
// component/goHome/goHome.js
var app = getApp()
const wxService = require('../../utils/wxService')
const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo
Component({
/**
* 组件的属性列表
*/
properties: {
},
attached() {
},
/**
* 组件的初始数据
*/
data: {
showGoGuid : false
},
lifetimes:{
ready(){
console.log('组件ready')
//获取当前环境是不是企业微信
const currentEnv = wx.getStorageSync('_qyWeChat') ? wx.getStorageSync('_qyWeChat') : null;
console.log('currentEnv---', currentEnv)
const loginUserInfo = wx.getStorageSync('_baseUserInfo') ? wx.getStorageSync('_baseUserInfo') : null;
console.log(loginUserInfo)
if (currentEnv && loginUserInfo){
console.log(loginUserInfo)
let qiyeInfo = loginUserInfo.member.qiyeInfo ? loginUserInfo.member.qiyeInfo : null;
if (!qiyeInfo){
this.setData({
showGoGuid: false
});
return
}
if (Object.keys(qiyeInfo).length == 0){
this.setData({
showGoGuid: false
});
return ;
}
this.setData({
showGoGuid: true
});
}
else{
this.setData({
showGoGuid : false
});
}
},
},
/**
* 组件的方法列表
*/
methods: {
handelGoGuid() {
//获取当前页面栈
let pages = getCurrentPages();
let currentPage = pages[pages.length - 1];
let guidpageIndex = undefined;
//找一下当前栈中是不是有导购首页
pages.forEach((item,index) => {
if (item.route == 'shoppingGuid/page/pages/home/home'){
guidpageIndex = index;
}
});
//说明没有从导购那边进到商城这边来,那就直接进到导购页面
if(guidpageIndex === undefined){
wx.reLaunch({
url: '/shoppingGuid/page/pages/home/home',
});
return ;
}
//说明是从导购那边过来的 关闭之间的页面
wx.navigateBack({
delta: pages.length - guidpageIndex,
});
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--component/goHome/goHome.wxml-->
<view class="bottom-img" wx:if="{{showGoGuid}}" bindtap="handelGoGuid">
<text>导购</text>
</view>
\ No newline at end of file
/* component/goGuid/goGuid.wxss */
/* component/goHome/goHome.wxss */
.bottom-img{
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 320rpx;
right: 25rpx;
width: 82rpx;
height: 82rpx;
border-radius: 50%;
color: #fff;
font-size: 24rpx;
background-color: rgba(0, 0, 0, 0.4);
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
z-index: 99;
}
.bottom-img .img-top {
width: 82rpx;
height: 82rpx;
}
\ No newline at end of file
...@@ -35,7 +35,8 @@ Component({ ...@@ -35,7 +35,8 @@ Component({
productCode: "", productCode: "",
showpost: false, showpost: false,
imgHeight: 0, imgHeight: 0,
productCode: "" //二维码 productCode: "" ,//二维码
shareLogo : '',
}, },
attached() { attached() {
...@@ -116,7 +117,9 @@ Component({ ...@@ -116,7 +117,9 @@ Component({
wx.hideLoading(); wx.hideLoading();
if (res.statusCode === 200) { if (res.statusCode === 200) {
var codeSrc = res.tempFilePath; var codeSrc = res.tempFilePath;
that.sharePosteCanvas(productSrc, codeSrc, imgInfo); that.downloadShareLogo(function(){
that.sharePosteCanvas(productSrc, codeSrc, imgInfo);
})
} else { } else {
wx.showToast({ wx.showToast({
title: '二维码下载失败!', title: '二维码下载失败!',
...@@ -124,7 +127,9 @@ Component({ ...@@ -124,7 +127,9 @@ Component({
duration: 2000, duration: 2000,
success: function () { success: function () {
var codeSrc = ""; var codeSrc = "";
that.sharePosteCanvas(productSrc, codeSrc, imgInfo); that.downloadShareLogo(function () {
that.sharePosteCanvas(productSrc, codeSrc, imgInfo);
})
} }
}) })
} }
...@@ -144,6 +149,34 @@ Component({ ...@@ -144,6 +149,34 @@ Component({
that.sharePosteCanvas(productSrc, codeSrc); that.sharePosteCanvas(productSrc, codeSrc);
} }
}, },
//下载商户logo
downloadShareLogo(cb){
let self = this;
let shareLogo = self.data.userAvatar;
wx.downloadFile({
url: shareLogo,
success: function (res) {
wx.hideLoading();
if (res.statusCode === 200) {
var codeSrc = res.tempFilePath;
self.data.shareLogo = codeSrc;
}
else{
self.data.shareLogo = '';
}
cb && cb();
},
fail: function (res) {
wx.hideLoading();
wx.showToast({
title: '二维码下载失败!',
icon: 'none',
duration: 2000,
})
}
})
},
//canvas绘制分享海报 //canvas绘制分享海报
sharePosteCanvas: function (avaterSrc, codeSrc, imgInfo) { sharePosteCanvas: function (avaterSrc, codeSrc, imgInfo) {
...@@ -174,7 +207,7 @@ Component({ ...@@ -174,7 +207,7 @@ Component({
ctx.setFillStyle('#d8d8d8'); ctx.setFillStyle('#d8d8d8');
ctx.setTextAlign('left'); ctx.setTextAlign('left');
} }
console.log(that.data.userAvatar)
// 品牌头像 // 品牌头像
if (that.data.userAvatar) { if (that.data.userAvatar) {
ctx.drawImage(that.data.userAvatar, 12, 290, 40, 40); ctx.drawImage(that.data.userAvatar, 12, 290, 40, 40);
......
...@@ -114,7 +114,7 @@ const prod_brand_config = { ...@@ -114,7 +114,7 @@ const prod_brand_config = {
isMall: isMall,// 商城或门户 true 商城 false 门户 isMall: isMall,// 商城或门户 true 商城 false 门户
orderingMustOpenCard : false, //下单是否必须卡开 orderingMustOpenCard : false, //下单是否必须卡开
isOpenSelfMention : true, // 是否开启门店自提 isOpenSelfMention : true, // 是否开启门店自提
shareTitle: '舞象星品荟-社交商城', shareTitle: '【舞象星品荟-社交商城】',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/logo_head.png', logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/logo_head.png',
}, },
//泰华配置 //泰华配置
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"navigationBarTitleText": "购物车", "navigationBarTitleText": "购物车",
"usingComponents": { "usingComponents": {
"scroll-del": "/component/scrollDel/scrollDel", "scroll-del": "/component/scrollDel/scrollDel",
"go-home": "/component/goHome/goHome" "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid"
} }
} }
\ No newline at end of file
...@@ -68,3 +68,4 @@ ...@@ -68,3 +68,4 @@
<go-home/> <go-home/>
</view> </view>
<go-guid/>
\ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"navigationBarTitleText": "分类", "navigationBarTitleText": "分类",
"usingComponents": { "usingComponents": {
"go-home": "/component/goHome/goHome", "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid",
"floatNav": "/component/floatNav/floatNav" "floatNav": "/component/floatNav/floatNav"
} }
} }
\ No newline at end of file
...@@ -67,3 +67,4 @@ ...@@ -67,3 +67,4 @@
<!-- 导航 --> <!-- 导航 -->
<!-- <floatNav /> --> <!-- <floatNav /> -->
<go-guid />
\ No newline at end of file
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"usingComponents": { "usingComponents": {
"table": "./../../component/table/table", "table": "./../../component/table/table",
"bottom-tabs": "./../../component/bottomTabs/bottomTabs", "bottom-tabs": "./../../component/bottomTabs/bottomTabs",
"go-home": "/component/goHome/goHome" "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid"
} }
} }
\ No newline at end of file
...@@ -53,4 +53,4 @@ ...@@ -53,4 +53,4 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<go-guid />
{ {
"navigationBarTitleText": "会员券详情页", "navigationBarTitleText": "会员券详情页",
"usingComponents": { "go-home": "/component/goHome/goHome"} "usingComponents": {
"go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid"
}
} }
\ No newline at end of file
...@@ -20,3 +20,5 @@ ...@@ -20,3 +20,5 @@
<go-home/> <go-home/>
</view> </view>
<go-guid />
{ {
"navigationBarTitleText": "我的卡券", "navigationBarTitleText": "我的卡券",
"usingComponents": { "go-home": "/component/goHome/goHome"} "usingComponents": {
"go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid"
}
} }
\ No newline at end of file
...@@ -32,3 +32,4 @@ ...@@ -32,3 +32,4 @@
<button type='primary' class="redeem-now" bindtap='handelPresentCouponCode'>出示券码</button> <button type='primary' class="redeem-now" bindtap='handelPresentCouponCode'>出示券码</button>
</view> </view>
<go-guid />
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"navigationBarTitleText": "我的卡券", "navigationBarTitleText": "我的卡券",
"usingComponents": { "usingComponents": {
"no-more": "/component/noMore/noMore", "no-more": "/component/noMore/noMore",
"go-home": "/component/goHome/goHome" "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid"
} }
} }
\ No newline at end of file
...@@ -88,4 +88,5 @@ ...@@ -88,4 +88,5 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<go-guid />
...@@ -34,6 +34,7 @@ wxService.page({ ...@@ -34,6 +34,7 @@ wxService.page({
proData : [], proData : [],
shareLogo: envInfo.shareLogo, shareLogo: envInfo.shareLogo,
shareTitle: envInfo.shareTitle, shareTitle: envInfo.shareTitle,
shareProduct : null
}, },
/** /**
...@@ -158,6 +159,17 @@ wxService.page({ ...@@ -158,6 +159,17 @@ wxService.page({
return false; return false;
} }
if(type == 1){
wx.showLoading({
title: '数据请求中..',
});
}
else{
wx.showLoading({
title: '跳转中..',
});
}
let spreadProducts = [] let spreadProducts = []
for (var i in this.data.proData){ for (var i in this.data.proData){
spreadProducts.push({ spreadProducts.push({
...@@ -192,28 +204,43 @@ wxService.page({ ...@@ -192,28 +204,43 @@ wxService.page({
let id = Integer.digit(this.data.currentShareContent.id, 10, 64); let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64); let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'subPackage/page/pages/friendShareList/friendShareList'; var path = 'subPackage/page/pages/friendShareList/friendShareList';
var scene = 'i=' + id + '&t=' + tentacleId var scene = 'i=' + id + '&t=' + tentacleId;
if(type == 1){ //获取第一个商品信息
this.setData({ this.getProductInfoById(this.data.proData[0].productId).then(pro => {
showCardModal: true, const { result, data } = pro.data
cardTitle: this.data.proData[0].productName, if (result == 0) {
cardUrl: this.data.proData[0].productImgUrl || defaultProImg, data.type = 'spread';
pagePath: path, this.data.shareProduct = data;
scene: scene if (type == 1) {
}); //调用接口获取商品信息
}else{ this.setData({
let parseExplain = this.data.explain ? JSON.parse(this.data.explain) : []; showCardModal: true,
let explain = parseExplain.length > 0 ? parseExplain : null; cardTitle: this.data.proData[0].productName,
this.setData({ cardUrl: this.data.proData[0].productImgUrl || defaultProImg,
productDesc: explain ? '' : this.data.proData[0].productName, pagePath: path,
cardTitle: explain, scene: scene,
cardUrl: this.data.proData[0].productImgUrl || defaultProImg, shareProduct: this.data.shareProduct
pagePath: path, });
scene: scene
},() => { wx.hideLoading();
this.getMiniCode() } else {
}); //这里暂时不处理后台设置的分享文案
} let parseExplain = this.data.explain ? JSON.parse(this.data.explain) : [];
let explain = parseExplain.length > 0 ? parseExplain : null;
this.setData({
// productDesc: explain ? '' : this.data.proData[0].productName,
productDesc: this.data.proData[0].productName,
cardTitle: explain,
cardUrl: this.data.proData[0].productImgUrl || defaultProImg,
pagePath: path,
scene: scene
}, () => {
this.getMiniCode()
});
}
}
});
} }
}) })
} }
...@@ -221,6 +248,11 @@ wxService.page({ ...@@ -221,6 +248,11 @@ wxService.page({
}) })
}, },
//获取商品详情
getProductInfoById(productId){
return wxService.get(`/sale/product/buyer/findByProductId?productId=${productId}`);
},
//获取二维码 //获取二维码
getMiniCode() { getMiniCode() {
const urls = utils.getCurrentPageUrlWithArgs() const urls = utils.getCurrentPageUrlWithArgs()
...@@ -238,14 +270,26 @@ wxService.page({ ...@@ -238,14 +270,26 @@ wxService.page({
if (result == 0) { if (result == 0) {
this.setData({ this.setData({
codeImg: app.globalData.imageUrl + data codeImg: app.globalData.imageUrl + data
// codeImg: "https://hwimagecdn.ihotwind.cn/usr/201908/miniQrCode-f00c5051fef7479395efb193431762c4.jpg"
},() => { },() => {
if (this.data.codeImg) { if (this.data.codeImg) {
this.selectComponent('#getPoster').getAvaterInfo() let obj = {
productName: this.data.productDesc,
minSalePrice: this.data.shareProduct.minSalePrice,
productImg: this.data.cardUrl,
qrcodeImg: this.data.codeImg,
type : 'spread',
};
wx.navigateTo({
url: '/subPackage/page/pages/shareConfig/shareConfig?shareInfo=' + JSON.stringify(obj),
});
// this.selectComponent('#getPoster').getAvaterInfo()
} }
}) })
} }
})
wx.hideLoading();
});
}, },
//快速分享 //快速分享
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
"share-modal": "/component/shareModal/shareModal", "share-modal": "/component/shareModal/shareModal",
"go-home": "/component/goHome/goHome", "go-home": "/component/goHome/goHome",
"share-poster": "/component/sharePoster/sharePoster", "share-poster": "/component/sharePoster/sharePoster",
"no-more": "/component/noMore/noMore" "no-more": "/component/noMore/noMore",
"go-guid": "/component/goGuid/goGuid"
} }
} }
\ No newline at end of file
...@@ -186,6 +186,7 @@ ...@@ -186,6 +186,7 @@
card-title="{{cardTitle}}" card-title="{{cardTitle}}"
card-url="{{cardUrl}}" card-url="{{cardUrl}}"
page-path="{{pagePath}}" page-path="{{pagePath}}"
product = "{{shareProduct}}"
scene="{{scene}}" scene="{{scene}}"
/> />
<share-poster id="getPoster" <share-poster id="getPoster"
...@@ -201,3 +202,4 @@ code-img="{{codeImg}}"></share-poster> ...@@ -201,3 +202,4 @@ code-img="{{codeImg}}"></share-poster>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<go-guid/>
\ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"navigationBarTitleText": "积分兑换详情页", "navigationBarTitleText": "积分兑换详情页",
"usingComponents": { "usingComponents": {
"exchange-coupon-modal": "/component/exchange-coupon-modal/exchange-coupon-modal", "exchange-coupon-modal": "/component/exchange-coupon-modal/exchange-coupon-modal",
"go-home": "/component/goHome/goHome" "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid"
} }
} }
\ No newline at end of file
...@@ -31,4 +31,4 @@ ...@@ -31,4 +31,4 @@
<exchange-coupon-modal exchangeId="{{integralMallDetail.id}}" exchangePoint="{{integralMallDetail.point}}" isExchange='{{isExchange}}' /> <exchange-coupon-modal exchangeId="{{integralMallDetail.id}}" exchangePoint="{{integralMallDetail.point}}" isExchange='{{isExchange}}' />
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<go-guid />
{ {
"navigationBarTitleText": "物流详情", "navigationBarTitleText": "物流详情",
"usingComponents": { "usingComponents": {
"go-home": "/component/goHome/goHome" "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid"
} }
} }
\ No newline at end of file
...@@ -67,3 +67,4 @@ ...@@ -67,3 +67,4 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<go-guid/>
\ No newline at end of file
{ {
"navigationBarTitleText": "会员规则", "navigationBarTitleText": "会员规则",
"usingComponents": { "usingComponents": {
"go-home": "/component/goHome/goHome" "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid"
} }
} }
\ No newline at end of file
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
</view> </view>
<go-guid />
{ {
"navigationBarTitleText": "我的地址", "navigationBarTitleText": "我的地址",
"usingComponents": { "usingComponents": {
"go-home": "/component/goHome/goHome" "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid"
} }
} }
\ No newline at end of file
...@@ -64,3 +64,4 @@ ...@@ -64,3 +64,4 @@
userAvatar="http://t2.hddhhn.com/uploads/tu/201806/9999/91480c0c87.jpg" userAvatar="http://t2.hddhhn.com/uploads/tu/201806/9999/91480c0c87.jpg"
/> />
<go-guid/>
\ No newline at end of file
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
"navigationBarTitleText": "我的消费", "navigationBarTitleText": "我的消费",
"usingComponents": { "usingComponents": {
"no-more": "/component/noMore/noMore", "no-more": "/component/noMore/noMore",
"go-home": "/component/goHome/goHome" "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid"
}, },
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
\ No newline at end of file
...@@ -23,4 +23,5 @@ ...@@ -23,4 +23,5 @@
</view> </view>
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<go-guid />
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"no-more": "/component/noMore/noMore", "no-more": "/component/noMore/noMore",
"go-home": "/component/goHome/goHome", "go-home": "/component/goHome/goHome",
"empty": "/component/empty/empty", "empty": "/component/empty/empty",
"apply-refund": "/component/applyRefund/applyRefund" "apply-refund": "/component/applyRefund/applyRefund",
"go-guid": "/component/goGuid/goGuid"
} }
} }
\ No newline at end of file
...@@ -186,3 +186,4 @@ ...@@ -186,3 +186,4 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<go-guid/>
\ No newline at end of file
{ {
"navigationBarTitleText": "订单详情", "navigationBarTitleText": "订单详情",
"usingComponents": { "usingComponents": {
"go-home": "/component/goHome/goHome" "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid"
} }
} }
\ No newline at end of file
...@@ -166,3 +166,4 @@ ...@@ -166,3 +166,4 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<go-guid/>
\ No newline at end of file
...@@ -167,6 +167,7 @@ wxService.page({ ...@@ -167,6 +167,7 @@ wxService.page({
if (result == 0) { if (result == 0) {
wx.hideLoading() wx.hideLoading()
// data.descHtml = '<p><span style="color: rgb(230, 0, 0);" class="ql-size-large">这个是商品详情图文介绍</span></p><p><br></p><p><img src="https://img3.bigaka.com/test/1001/201912/20191226/10013c605d74-1098-4adb-a6ad-5b2397f9dc9a.png"></p><p><img src="https://img3.bigaka.com/test/1001/201912/20191226/100119d81a35-a821-45dd-a09a-caa04fe79e01.png"></p><p><img src="https://img3.bigaka.com/test/1001/201912/20191226/1001e793d3f6-a7f4-4523-bc42-0df5e3fc822b.png"></p>'; // data.descHtml = '<p><span style="color: rgb(230, 0, 0);" class="ql-size-large">这个是商品详情图文介绍</span></p><p><br></p><p><img src="https://img3.bigaka.com/test/1001/201912/20191226/10013c605d74-1098-4adb-a6ad-5b2397f9dc9a.png"></p><p><img src="https://img3.bigaka.com/test/1001/201912/20191226/100119d81a35-a821-45dd-a09a-caa04fe79e01.png"></p><p><img src="https://img3.bigaka.com/test/1001/201912/20191226/1001e793d3f6-a7f4-4523-bc42-0df5e3fc822b.png"></p>';
data.type = 'share';
this.setData({ this.setData({
productInfo: data productInfo: data
}) })
......
...@@ -187,6 +187,7 @@ ...@@ -187,6 +187,7 @@
card-title="{{cardTitle}}" card-title="{{cardTitle}}"
card-url="{{cardUrl}}" card-url="{{cardUrl}}"
page-path="{{pagePath}}" page-path="{{pagePath}}"
product="{{productInfo}}"
scene="{{scene}}" scene="{{scene}}"
/> />
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"usingComponents": { "usingComponents": {
"upload-img": "/component/uploadImg/uploadImg", "upload-img": "/component/uploadImg/uploadImg",
"scroll-del": "/component/scrollDel/scrollDel", "scroll-del": "/component/scrollDel/scrollDel",
"go-home": "/component/goHome/goHome" "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid"
} }
} }
\ No newline at end of file
...@@ -88,4 +88,5 @@ ...@@ -88,4 +88,5 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<go-guid/>
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"navigationBarTitleText": "退单详情", "navigationBarTitleText": "退单详情",
"usingComponents": { "usingComponents": {
"apply-refund": "/component/applyRefund/applyRefund", "apply-refund": "/component/applyRefund/applyRefund",
"go-home": "/component/goHome/goHome" "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid"
} }
} }
\ No newline at end of file
...@@ -125,4 +125,4 @@ ...@@ -125,4 +125,4 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<go-guid/>
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
"bottom-tabs": "/component/bottomTabs/bottomTabs", "bottom-tabs": "/component/bottomTabs/bottomTabs",
"authorization-modal": "/component/authorization-modal/authorization-modal", "authorization-modal": "/component/authorization-modal/authorization-modal",
"plus": "/component/plus/plus", "plus": "/component/plus/plus",
"go-guid": "/component/goGuid/goGuid",
"share-benefit-modal": "/component/shareBenefitModal/shareBenefitModal", "share-benefit-modal": "/component/shareBenefitModal/shareBenefitModal",
"cell": "plugin://contactPlugin/cell" "cell": "plugin://contactPlugin/cell"
} }
......
...@@ -69,4 +69,7 @@ ...@@ -69,4 +69,7 @@
<!-- 泰华 a6ea55b56eb09ced8f9aeeaa14383b52 --> <!-- 泰华 a6ea55b56eb09ced8f9aeeaa14383b52 -->
</view> </view>
<!-- 联系我点击成功之后的回调 --> <!-- 联系我点击成功之后的回调 -->
<contact-us-modal contactShow="{{contactUsModal}}"/> <contact-us-modal contactShow="{{contactUsModal}}"/>
\ No newline at end of file
<!-- 回到导购 -->
<go-guid />
\ No newline at end of file
...@@ -5,25 +5,25 @@ page{ ...@@ -5,25 +5,25 @@ page{
} }
.cell-me { .cell-me {
position: fixed; position: fixed;
right: 10rpx; right: 25rpx;
top: 76%; top: 76%;
z-index: 2; z-index: 2;
} }
/* .cell--bubble{ .cell--bubble{
width:82rpx !important; width:82rpx !important;
height:82rpx !important; height:82rpx !important;
border-radius:50%; border-radius:50%;
text-align:center; text-align:center;
line-height:82rpx !important; line-height:82rpx !important;
display:inline-block; display:inline-block;
background-color: rgba(0, 0, 0, 0.5) !important; /* background-color: rgba(0, 0, 0, 0.5) !important; */
} }
.cell--light_without_border{ .cell--light_without_border{
width:16px !important; width:16px !important;
height:14px !important; height:14px !important;
} */ }
.bottom-fixed{ .bottom-fixed{
padding-bottom: 40rpx; padding-bottom: 40rpx;
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"navigationBarTitleText": "", "navigationBarTitleText": "",
"usingComponents": { "usingComponents": {
"go-home": "/component/goHome/goHome", "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid",
"card-modal": "/component/cardModal/cardModal", "card-modal": "/component/cardModal/cardModal",
"buy-image-swiper": "/component/buyImageSwiper/buyImageSwiper", "buy-image-swiper": "/component/buyImageSwiper/buyImageSwiper",
"x-html": "/component/html2wxml/wxHtml" "x-html": "/component/html2wxml/wxHtml"
......
...@@ -91,3 +91,4 @@ ...@@ -91,3 +91,4 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<go-guid/>
\ No newline at end of file
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 17, "current": -1,
"list": [ "list": [
{ {
"id": -1, "id": -1,
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
"id": 16, "id": 16,
"name": "商品详情页", "name": "商品详情页",
"pathName": "pages/productDetail/productDetail", "pathName": "pages/productDetail/productDetail",
"query": "id=619906008814456832", "query": "id=639868160153096192",
"scene": null "scene": null
}, },
{ {
...@@ -272,20 +272,6 @@ ...@@ -272,20 +272,6 @@
}, },
{ {
"id": -1, "id": -1,
"name": "聚FUN",
"pathName": "pages/userCenter/userCenter",
"query": "",
"scene": null
},
{
"id": -1,
"name": "聚FUN",
"pathName": "subPackage/page/pages/fun/fun",
"query": "",
"scene": null
},
{
"id": -1,
"name": "plus", "name": "plus",
"pathName": "subPackage/page/pages/plus/plus", "pathName": "subPackage/page/pages/plus/plus",
"query": "", "query": "",
...@@ -327,20 +313,6 @@ ...@@ -327,20 +313,6 @@
}, },
{ {
"id": -1, "id": -1,
"name": "plus页面",
"pathName": "pages/my_1/my",
"query": "",
"scene": null
},
{
"id": -1,
"name": "plus页面11",
"pathName": "pages/my_11/my",
"query": "",
"scene": null
},
{
"id": -1,
"name": "导购首页", "name": "导购首页",
"pathName": "shoppingGuid/page/pages/home/home", "pathName": "shoppingGuid/page/pages/home/home",
"query": "" "query": ""
...@@ -572,6 +544,13 @@ ...@@ -572,6 +544,13 @@
"pathName": "pages/remark/remark", "pathName": "pages/remark/remark",
"query": "", "query": "",
"scene": null "scene": null
},
{
"id": -1,
"name": "分享海报",
"pathName": "subPackage/page/pages/shareConfig/shareConfig",
"query": "",
"scene": null
} }
] ]
} }
......
...@@ -71,6 +71,8 @@ ...@@ -71,6 +71,8 @@
<text class="text-status" wx:if="{{item.status == 'P'}}">已支付</text> <text class="text-status" wx:if="{{item.status == 'P'}}">已支付</text>
<text class="text-status" wx:if="{{item.status == 'D'}}">已发货</text> <text class="text-status" wx:if="{{item.status == 'D'}}">已发货</text>
<text class="text-status" wx:if="{{item.status == 'R'}}">已收货</text> <text class="text-status" wx:if="{{item.status == 'R'}}">已收货</text>
<text class="text-status" wx:if="{{item.status == 'RE'}}">退货完成</text>
<text class="text-status" wx:if="{{item.status == 'PR'}}">退货中</text>
</view> </view>
<view class='products-list'> <view class='products-list'>
<block wx:for="{{item.skuVOList}}" wx:for-item="sku" wx:key="index"> <block wx:for="{{item.skuVOList}}" wx:for-item="sku" wx:key="index">
......
// shoppingGuid/page/pages/userInfo/userInfo.js // shoppingGuid/page/pages/userInfo/userInfo.js
const wxService = require('../../../../utils/wxService') const wxService = require('../../../../utils/wxService')
const utils = require('../../../../utils/util') const utils = require('../../../../utils/util')
const ORDER_STATUS_TEXT = {
N: "待付款",
P: "已支付待发货",
D: "已发货",
R: "已完成",
C: "已关闭",
PR: "退货中",
RE: "退货完成",
};
wxService.page({ wxService.page({
/** /**
...@@ -212,14 +220,7 @@ wxService.page({ ...@@ -212,14 +220,7 @@ wxService.page({
let list = res.data.data ? res.data.data : []; let list = res.data.data ? res.data.data : [];
let arr = list.map(item => { let arr = list.map(item => {
let statusText = item.status == 'N' ? '待支付' : ( let statusText = ORDER_STATUS_TEXT[item.status];
item.status == 'P' ? '待发货' : (
item.status == 'D' ? '待收货' : (
item.status == 'R' ? '已收货' : '已取消'
)
)
);
let products = item.skuVOList.map(p => { let products = item.skuVOList.map(p => {
return { return {
productName: p.productName, productName: p.productName,
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"exchange-coupon-modal": "/component/exchange-coupon-modal/exchange-coupon-modal", "exchange-coupon-modal": "/component/exchange-coupon-modal/exchange-coupon-modal",
"dialog-stock-empty": "/component/dialogStockEmpty/dialogStockEmpty", "dialog-stock-empty": "/component/dialogStockEmpty/dialogStockEmpty",
"dialog-user-limit" : "/component/dialogUserLimit/dialogUserLimit", "dialog-user-limit" : "/component/dialogUserLimit/dialogUserLimit",
"go-home": "/component/goHome/goHome" "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid"
} }
} }
\ No newline at end of file
...@@ -121,6 +121,7 @@ ...@@ -121,6 +121,7 @@
<!-- 库存没了 --> <!-- 库存没了 -->
<dialog-stock-empty show="{{dialogStockEmpty}}"/> <dialog-stock-empty show="{{dialogStockEmpty}}"/>
<dialog-user-limit show="{{dialogUserLimit}}"/> <dialog-user-limit show="{{dialogUserLimit}}"/>
<go-guid />
......
...@@ -23,3 +23,4 @@ ...@@ -23,3 +23,4 @@
<go-home/> <go-home/>
</view> </view>
<go-guid/>
\ No newline at end of file
...@@ -51,3 +51,4 @@ ...@@ -51,3 +51,4 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<go-guid/>
\ No newline at end of file
...@@ -56,3 +56,4 @@ ...@@ -56,3 +56,4 @@
<select-tab showSelectTabModal="{{showSelectTabModal}}" bind:_selectTab="_selectTab" /> <select-tab showSelectTabModal="{{showSelectTabModal}}" bind:_selectTab="_selectTab" />
<select-related-goods show="{{showSelectRelatedGoods}}" bind:_selectGoods="_selectGoods" pro-goods="{{proGoods}}"/> <select-related-goods show="{{showSelectRelatedGoods}}" bind:_selectGoods="_selectGoods" pro-goods="{{proGoods}}"/>
<go-guid/>
\ No newline at end of file
...@@ -18,3 +18,4 @@ ...@@ -18,3 +18,4 @@
<go-home/> <go-home/>
</view> </view>
<go-guid/>
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"x-dialog": "/component/dialogGrass/dialog", "x-dialog": "/component/dialogGrass/dialog",
"card-modal": "/component/cardModal/cardModal", "card-modal": "/component/cardModal/cardModal",
"go-home": "/component/goHome/goHome", "go-home": "/component/goHome/goHome",
"go-guid": "/component/goGuid/goGuid",
"x-html": "/component/html2wxml/wxHtml", "x-html": "/component/html2wxml/wxHtml",
"buy-image-swiper": "/component/buyImageSwiper/buyImageSwiper" "buy-image-swiper": "/component/buyImageSwiper/buyImageSwiper"
} }
......
...@@ -81,3 +81,4 @@ ...@@ -81,3 +81,4 @@
scene="{{scene}}" scene="{{scene}}"
/> />
<go-guid/>
\ No newline at end of file
...@@ -25,3 +25,4 @@ ...@@ -25,3 +25,4 @@
<!--goHome--> <!--goHome-->
<go-home /> <go-home />
</view> </view>
<go-guid/>
...@@ -3,3 +3,4 @@ ...@@ -3,3 +3,4 @@
<!--goHome--> <!--goHome-->
<go-home /> <go-home />
<go-guid/>
\ No newline at end of file
...@@ -66,4 +66,6 @@ ...@@ -66,4 +66,6 @@
<!--goHome--> <!--goHome-->
<go-home /> <go-home />
\ No newline at end of file
<go-guid/>
\ No newline at end of file
{
"navigationBarTitleText": "分享海报",
"usingComponents": {}
}
\ No newline at end of file
<!--share/share.wxml-->
<view hidden="{{isInput}}">
<canvas class='canvas' canvas-id="myCanvas" style="height:{{height}};"></canvas>
</view>
<view class="statistic-img" hidden="{{!isInput}}">
<image src="{{canvasTempFileUrl}}" mode="widthFix"></image>
</view>
<view class="btns-containers">
<view class="edit-btn" bindtap="onTapEditShareContent">编辑文案(限50字)</view>
<view class="save-btn {{btnIsDisabled ? 'disabled' : ''}}" bindtap="onTapSaveImg">保存海报至相册</view>
</view>
<!-- 输入文案 -->
<view class="input-text" hidden="{{!isInput}}">
<view class="input-body">
<textarea placeholder="请设置您的个性化分享海报文案(最多50个字)..."
value="{{inputText}}"
maxlength="50" bindinput="onShareTextInput"></textarea>
<view class="bot-btns">
<view class="mo-btns" bindtap="onTapCancal">取消</view>
<view class="mo-btns reset" bindtap="onTapReset">重置</view>
<view class="mo-btns sure" bindtap="onTapSure">确认</view>
</view>
</view>
</view>
\ No newline at end of file
/* subPackage/page/pages/shareConfig/shareConfig.wxss */
/* share/share.wxss */
page{
background: #ffffff;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.canvas{
width: 100%;
}
.btns-containers{
width: 100%;
height: auto;
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx 50rpx;
}
.btns-containers .save-btn{
background: #cb3c3c;
color: #ffffff;
flex: 1;
height: 80rpx;
border-radius: 35rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
border: solid 2rpx #cb3c3c;
}
.btns-containers .save-btn.disabled{
opacity:0.6;
}
.btns-containers .edit-btn{
background: #ffffff;
color: #cb3c3c;
flex: 0;
min-width: 40%;
max-width: 40%;
height: 80rpx;
border-radius: 35rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
border: solid 2rpx #cb3c3c;
margin-right: 30rpx;
}
.btns-containers .edit-btn:active{
opacity: 0.7;
}
.statistic-img{
width: 100%;
height: auto;
display: flex;
justify-content: center;
}
.statistic-img image{
display: block;
width: 100%;
}
.input-text{
position: fixed;
width: 100%;
height: 100%;
z-index: 22;
background: rgba(0,0,0,0.5);
left: 0;
top: 0;
}
.input-body{
position: absolute;
width: 80vw;
height: 28vh;
left: 50%;
margin-left: -40vw;
top: 50%;
margin-top: -20vh;
background: #ffffff;
border-radius: 8rpx;
padding: 30rpx;
display: flex;
flex-direction: column;
padding-bottom: 0;
}
.input-body textarea{
width: 100%;
flex: 1;
color: #333333;
}
.input-body .bot-btns{
flex: 0;
width: 100%;
height: auto;
/* padding-top: 30rpx; */
min-height: 90rpx;
max-height: 90rpx;
border-top: solid 1rpx #eeeeee;
display: flex;
align-items: center;
justify-content: center;
}
.input-body .bot-btns .mo-btns{
flex: 0;
min-width: 33.3%;
max-width: 33.3%;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
.input-body .bot-btns .mo-btns.reset{
border-left: solid 1rpx #eeeeee;
color: #999999;
}
.input-body .bot-btns .mo-btns.sure{
border-left: solid 1rpx #eeeeee;
color: #cb3c3c;
}
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"person-center": "/component/personCenter/personCenter", "person-center": "/component/personCenter/personCenter",
"pic-nav": "/component/picNav/picNav", "pic-nav": "/component/picNav/picNav",
"bottom": "/component/bottom/bottom", "bottom": "/component/bottom/bottom",
"go-guid": "/component/goGuid/goGuid",
"tab-sort": "/component/tabSort/tabSort", "tab-sort": "/component/tabSort/tabSort",
"announcement": "/component/announcement/announcement", "announcement": "/component/announcement/announcement",
"icon-swiper": "/component/iconSwiper/iconSwiper", "icon-swiper": "/component/iconSwiper/iconSwiper",
......
...@@ -35,3 +35,4 @@ ...@@ -35,3 +35,4 @@
<guide-page-modal show="{{guidePageModalShow}}" /> <guide-page-modal show="{{guidePageModalShow}}" />
<!-- 底部补充高度 防止被遮盖 --> <!-- 底部补充高度 防止被遮盖 -->
<view class="bottom-fixed" style="padding-bottom:{{paddingBottom}}"></view> <view class="bottom-fixed" style="padding-bottom:{{paddingBottom}}"></view>
<go-guid/>
\ 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