Commit 8af70cf2 by 谢中龙

提交修改

parent bb2349d8
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
"pages/logistics/logistics", "pages/logistics/logistics",
"pages/extendProduct/extendProduct", "pages/extendProduct/extendProduct",
"pages/pointList/pointList", "pages/pointList/pointList",
"pages/pointDetail/pointDetail" "pages/pointDetail/pointDetail",
"pages/remark/remark"
], ],
"subPackages": [ "subPackages": [
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
const app = getApp(); const app = getApp();
const wxService = require('../../utils/wxService') const wxService = require('../../utils/wxService')
const utils = require('../../utils/util') const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo
Component({ Component({
/** /**
...@@ -44,7 +44,9 @@ Component({ ...@@ -44,7 +44,9 @@ Component({
*/ */
data: { data: {
codeImg:'', codeImg:'',
explainList: [] explainList: [],
shareLogo: envInfo.shareLogo,
shareTitle: envInfo.shareTitle,
}, },
/** /**
......
...@@ -4,11 +4,14 @@ ...@@ -4,11 +4,14 @@
<view class="card-modal" hidden="{{!showCardModal}}" catchtouchmove='true'> <view class="card-modal" hidden="{{!showCardModal}}" catchtouchmove='true'>
<view class="card-modal-content"> <view class="card-modal-content">
<view class="modal-header"> <view class="modal-header">
<image class="brand-img" src="https://xiedemo.oss-cn-shanghai.aliyuncs.com/logo_head.jpg"></image> <view style="display:flex;align-items:center;">
<image class="brand-img" src="{{shareLogo}}"></image>
<text style="font-size:28rpx;color:#333333;margin-left:8rpx;">【{{shareTitle}}】</text>
</view>
<view class="brand-title">{{cardTitle}}</view> <view class="brand-title">{{cardTitle}}</view>
</view> </view>
<view class="card-img-wrap"> <view class="card-img-wrap">
<image class="card-img" src="{{cardUrl}}"></image> <image class="card-img" src="{{cardUrl}}" mode="aspectFit"></image>
</view> </view>
<view wx:if="{{explainList.length}}"> <view wx:if="{{explainList.length}}">
<block wx:for="{{explainList}}" wx:for-item="item" wx:key="{{index}}"> <block wx:for="{{explainList}}" wx:for-item="item" wx:key="{{index}}">
...@@ -26,6 +29,14 @@ ...@@ -26,6 +29,14 @@
<text class="share-text">生成朋友圈海报</text> <text class="share-text">生成朋友圈海报</text>
</view> </view>
</view> </view>
<share-poster id="getPoster" bindmyevent="myEventListener" avater="{{cardUrl}}" productDesc="{{cardTitle}}" userAvatar="https://xiedemo.oss-cn-shanghai.aliyuncs.com/logo_head.jpg" bind:showMiniCard="_showMiniCard" pagePath="{{pagePath}}" code-img="{{codeImg}}"></share-poster> <share-poster id="getPoster"
bindmyevent="myEventListener"
avater="{{cardUrl}}"
productDesc="{{cardTitle}}"
shareTitle="{{shareTitle}}"
userAvatar="{{shareLogo}}"
bind:showMiniCard="_showMiniCard"
pagePath="{{pagePath}}"
code-img="{{codeImg}}"></share-poster>
...@@ -29,8 +29,9 @@ ...@@ -29,8 +29,9 @@
} }
.card-modal{ .card-modal{
position: fixed; position: fixed;
top: 240rpx; top: 200rpx;
left: 170rpx; left: 50%;
margin-left: -250rpx;
z-index: 9999; z-index: 9999;
} }
.explain-text { .explain-text {
...@@ -38,11 +39,12 @@ ...@@ -38,11 +39,12 @@
padding-bottom: 10rpx; padding-bottom: 10rpx;
} }
.card-modal-content{ .card-modal-content{
width: 410rpx; width: 500rpx;
/* height: 618rpx; */ /* height: 618rpx; */
min-height: 618rpx; min-height: 618rpx;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 4rpx 17rpx 0px rgba(0, 0, 0, 0.12); box-shadow: 0px 4rpx 17rpx 0px rgba(0, 0, 0, 0.12);
border-radius: 8rpx;
} }
.modal-header{ .modal-header{
...@@ -55,17 +57,19 @@ ...@@ -55,17 +57,19 @@
border-radius: 50%; border-radius: 50%;
} }
.brand-title{ .brand-title{
width: 342rpx; width: 440rpx;
color: #333333; color: #333333;
font-size: 18rpx; font-size: 24rpx;
margin-top: 10rpx; margin-top: 10rpx;
} }
.card-img-wrap{ .card-img-wrap{
margin-top: 23rpx; margin-top: 23rpx;
padding-bottom: 20rpx;
} }
.card-img{ .card-img{
width: 410rpx; width: 100%;
height: 410rpx; /* height: 410rpx; */
max-height: 530rpx;
} }
/* 海报 */ /* 海报 */
......
...@@ -26,6 +26,10 @@ Component({ ...@@ -26,6 +26,10 @@ Component({
codeImg:{ codeImg:{
type: String, type: String,
value: '' value: ''
},
shareTitle : {
type : String,
value : ''
} }
}, },
/** /**
...@@ -45,7 +49,6 @@ Component({ ...@@ -45,7 +49,6 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
// 关闭modal // 关闭modal
closePoste(){ closePoste(){
this.setData({ this.setData({
...@@ -147,7 +150,6 @@ Component({ ...@@ -147,7 +150,6 @@ Component({
//canvas绘制分享海报 //canvas绘制分享海报
sharePosteCanvas: function (avaterSrc, codeSrc, imgInfo) { sharePosteCanvas: function (avaterSrc, codeSrc, imgInfo) {
wx.showLoading({ wx.showLoading({
title: '生成中...', title: '生成中...',
mask: true, mask: true,
...@@ -175,41 +177,48 @@ Component({ ...@@ -175,41 +177,48 @@ Component({
ctx.setTextAlign('left'); ctx.setTextAlign('left');
} }
console.log(that.data)
// 品牌头像 // 品牌头像
if (that.data.userAvatar) { if (that.data.userAvatar) {
ctx.drawImage(that.data.userAvatar, 12, 290, 40, 40); // ctx.drawImage(that.data.userAvatar, 12, 290, 30, 30);
}
//画一下分享商户名称
if (that.data.shareTitle){
ctx.setFontSize(14);
ctx.setFillStyle('#333333');
ctx.setTextAlign('left');
let shareTitle = `[${that.data.shareTitle}]`;
ctx.fillText(shareTitle, 12, 310);
} }
// title // title
if (that.data.productDesc){ if (that.data.productDesc){
ctx.setFontSize(12); ctx.setFontSize(14);
ctx.setFillStyle('#333333'); ctx.setFillStyle('#666666');
ctx.setTextAlign('left'); ctx.setTextAlign('left');
let arr = that.data.productDesc.split(''); //只显示15个字
let row = []; let newStrArr = [];
let tempStr = ''; if (that.data.productDesc){
for(let i = 0 ; i < arr.length ; i ++){ let subTimes = Math.ceil(that.data.productDesc.length / 15);
if (ctx.measureText(tempStr).width < 100){ console.log(subTimes)
tempStr += arr[i]; for (let i = 0; i < subTimes ; i ++){
} let tempSubStr = that.data.productDesc.substr(i * 15, 15);
else{ newStrArr.push(tempSubStr)
i --;
row.push(tempStr);
tempStr = '';
} }
} }
console.log(row) if (newStrArr.length > 2) {
if(row.length > 2){ var rowCut = newStrArr.slice(0, 2);
var rowCut = row.slice(0, 2);
var rowPart = rowCut[1]; var rowPart = rowCut[1];
var test = ""; var test = "";
var empty = []; var empty = [];
for (var a = 0; a < rowPart.length; a++) { for (var a = 0; a < rowPart.length; a++) {
if (ctx.measureText(test).width < 220) { if (ctx.measureText(test).width < 220) {
// if (context.measureText(test).width < 220) { // if (context.measureText(test).width < 220) {
test += rowPart[a]; test += rowPart[a];
} }
else { else {
break; break;
} }
...@@ -218,14 +227,12 @@ Component({ ...@@ -218,14 +227,12 @@ Component({
empty.push(test); empty.push(test);
var group = empty[0] + "..."// var group = empty[0] + "..."//
rowCut.splice(1, 1, group); rowCut.splice(1, 1, group);
row = rowCut; newStrArr = rowCut;
} }
for (var b = 0; b < row.length; b++) { for (var b = 0; b < newStrArr.length; b++) {
ctx.fillText(row[b], 61, 300 + b * 20); ctx.fillText(newStrArr[b], 12, 332 + b * 16);
} }
// ctx.fillText(that.data.productDesc, 61, 300);
}else{ }else{
let explain = JSON.parse(JSON.stringify(that.data.cardExplain)) let explain = JSON.parse(JSON.stringify(that.data.cardExplain))
if (explain[0]){ if (explain[0]){
...@@ -263,7 +270,7 @@ Component({ ...@@ -263,7 +270,7 @@ Component({
// 绘制二维码 // 绘制二维码
if (codeSrc) { if (codeSrc) {
ctx.drawImage(codeSrc, 190, 281, 61.5, 61.5) ctx.drawImage(codeSrc, 210, 290, 65, 65)
ctx.setFontSize(10); ctx.setFontSize(10);
ctx.setFillStyle('#000'); ctx.setFillStyle('#000');
...@@ -359,11 +366,11 @@ Component({ ...@@ -359,11 +366,11 @@ Component({
wx.getSystemInfo({ wx.getSystemInfo({
success(res2) { success(res2) {
var ratio = res.width / res.height; var ratio = res.width / res.height;
var imgHeight = 352.5; var imgHeight = 370;
that.setData({ that.setData({
imgHeight: imgHeight imgHeight: imgHeight
}) })
cb(imgHeight - 130); cb(imgHeight - 150);
} }
}) })
} }
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
// 修改 BRANCH_ID 为对应的商户id // 修改 BRANCH_ID 为对应的商户id
// app.js 中brandId 修改为对应 // app.js 中brandId 修改为对应
const PROJECT_ENV = 'test' // 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre const PROJECT_ENV = 'test' // 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre
//仅生产环境时 配置 : //仅生产环境时 配置 :
//3001 3001 , //3001 3001 ,
...@@ -113,6 +112,8 @@ const prod_brand_config = { ...@@ -113,6 +112,8 @@ const prod_brand_config = {
isMall: isMall,// 商城或门户 true 商城 false 门户 isMall: isMall,// 商城或门户 true 商城 false 门户
orderingMustOpenCard : false, //下单是否必须卡开 orderingMustOpenCard : false, //下单是否必须卡开
isOpenSelfMention : true, // 是否开启门店自提 isOpenSelfMention : true, // 是否开启门店自提
shareTitle: '舞象星品荟-社交商城',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/logo_head.png',
}, },
//泰华配置 //泰华配置
2006: { 2006: {
...@@ -127,6 +128,8 @@ const prod_brand_config = { ...@@ -127,6 +128,8 @@ const prod_brand_config = {
isMall: isMall, isMall: isMall,
orderingMustOpenCard: true, orderingMustOpenCard: true,
isOpenSelfMention: true, // 是否开启门店自提 isOpenSelfMention: true, // 是否开启门店自提
shareTitle: '泰华微商城',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/logo_head.png',
}, },
//多多一上 //多多一上
2007 : { 2007 : {
...@@ -140,6 +143,8 @@ const prod_brand_config = { ...@@ -140,6 +143,8 @@ const prod_brand_config = {
isMall: isMall, isMall: isMall,
orderingMustOpenCard: false, orderingMustOpenCard: false,
isOpenSelfMention: false, // 是否开启门店自提 isOpenSelfMention: false, // 是否开启门店自提
shareTitle: '多多一上',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/logo_head.png',
}, },
//雪岛书屋 //雪岛书屋
2008 : { 2008 : {
...@@ -153,6 +158,8 @@ const prod_brand_config = { ...@@ -153,6 +158,8 @@ const prod_brand_config = {
isMall: isMall, isMall: isMall,
orderingMustOpenCard: false, orderingMustOpenCard: false,
isOpenSelfMention: false, // 是否开启门店自提 isOpenSelfMention: false, // 是否开启门店自提
shareTitle: '雪岛书屋',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/logo_head.png',
}, },
//苏州邻里 //苏州邻里
2003 : { 2003 : {
...@@ -166,9 +173,31 @@ const prod_brand_config = { ...@@ -166,9 +173,31 @@ const prod_brand_config = {
isMall: isMall, isMall: isMall,
orderingMustOpenCard: false, orderingMustOpenCard: false,
isOpenSelfMention: false, // 是否开启门店自提 isOpenSelfMention: false, // 是否开启门店自提
shareTitle: '苏州邻里',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/logo_head.png',
},
//热风
2009 : {
appId: 'wxe6d270a3e399ade9',
tunnelToken: '',
brandId: 2009,
plusIsOpen: false,
contactUsIsOpen: false,
contactUsPluginId: '',
hasTrial: false,
isMall: isMall,
orderingMustOpenCard: false,
isOpenSelfMention: false, // 是否开启门店自提
shareTitle: '热风微商城',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/logo_head.png',
} }
} }
//默认分享logo
const defaultShareLogo = 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/logo_head.png';
//推广商品页面banner
const speadProductsBanner = 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/tuiguangshangpin.jpg';
// 开启联系我时 app.json plugin中添加此代码 // 开启联系我时 app.json plugin中添加此代码
// "contactPlugin": { // "contactPlugin": {
...@@ -245,6 +274,8 @@ let hasTrial = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].hasTrial : t ...@@ -245,6 +274,8 @@ let hasTrial = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].hasTrial : t
let fixed_IsMall = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].isMall : isMall; let fixed_IsMall = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].isMall : isMall;
let orderingMustOpenCard = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].orderingMustOpenCard : false; let orderingMustOpenCard = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].orderingMustOpenCard : false;
let isOpenSelfMention = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].isOpenSelfMention : true; let isOpenSelfMention = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].isOpenSelfMention : true;
let shareTitle = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].shareTitle : '舞象商城';
let shareLogo = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].logo : defaultShareLogo;
//配置信息导出 //配置信息导出
const envInfo = (() => { const envInfo = (() => {
...@@ -262,6 +293,9 @@ const envInfo = (() => { ...@@ -262,6 +293,9 @@ const envInfo = (() => {
isMall: fixed_IsMall,//商城和门户区分 门户时 false; 商城 true isMall: fixed_IsMall,//商城和门户区分 门户时 false; 商城 true
orderingMustOpenCard: orderingMustOpenCard,//下单时是否强校验必须开卡 true 必须开卡才可下单 false 不开卡可以下单 orderingMustOpenCard: orderingMustOpenCard,//下单时是否强校验必须开卡 true 必须开卡才可下单 false 不开卡可以下单
isOpenSelfMention: isOpenSelfMention,//门店是否开启门店自提功能 isOpenSelfMention: isOpenSelfMention,//门店是否开启门店自提功能
shareTitle: shareTitle,
shareLogo: shareLogo,
speadProductsBanner: speadProductsBanner
} }
})() })()
......
...@@ -78,9 +78,28 @@ wxService.page({ ...@@ -78,9 +78,28 @@ wxService.page({
this.getLocalStoreInfo(); this.getLocalStoreInfo();
} }
}); });
//获取备注信息
this.getLocalRemarkInfo();
},
//获取备注信息
getLocalRemarkInfo(){
this.data.buyerRemark = wx.getStorageSync('orderRemark');
this.setData({
buyerRemark: this.data.buyerRemark
})
},
//输入备注
onTapInputRemark(){
wx.navigateTo({
url: '/pages/remark/remark',
});
}, },
onUnload(){ onUnload(){
wx.removeStorageSync('orderRemark');
wx.removeStorageSync('choosedStoreInfo'); wx.removeStorageSync('choosedStoreInfo');
}, },
...@@ -608,6 +627,7 @@ wxService.page({ ...@@ -608,6 +627,7 @@ wxService.page({
if (res) { if (res) {
const { result, data } = res.data const { result, data } = res.data
wx.removeStorageSync('choosedStoreInfo'); wx.removeStorageSync('choosedStoreInfo');
wx.removeStorageSync('orderRemark');
if (result == 0) { if (result == 0) {
delete data.appId delete data.appId
let amount = data.amount || 0 let amount = data.amount || 0
......
...@@ -208,12 +208,23 @@ ...@@ -208,12 +208,23 @@
</view> --> </view> -->
<!-- 备注信息 --> <!-- 备注信息 -->
<view class='buyer-remark'> <!-- <view class='buyer-remark'>
<view class='remark-title'>备注信息</view> <view class='remark-title'>备注信息</view>
<textarea placeholder='请输入您的备注信息,快递信息,订单备注。。。' <textarea placeholder='请输入您的备注信息,快递信息,订单备注。。。'
show-confirm-bar="{{true}}" show-confirm-bar="{{true}}"
value='{{buyerRemark}}' bindinput='onBuyerRemarkInput'></textarea> value='{{buyerRemark}}' bindinput='onBuyerRemarkInput'></textarea>
</view> -->
<!-- 备注信息 -->
<view class="remark-container" bindtap="onTapInputRemark">
<view class="remark-title">备注信息</view>
<view class="remark-desc">
{{ buyerRemark ? buyerRemark : '请输入备注信息' }}
</view>
<view class="remark-icon">
<image class="arrow-right" src="/assets/imgs/7_1_0/arrow-right.png" />
</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -326,7 +326,7 @@ ...@@ -326,7 +326,7 @@
.buyer-remark textarea{ .buyer-remark textarea{
border: solid 2rpx #eeeeee; border: solid 2rpx #eeeeee;
min-height: 100rpx; min-height: 60rpx;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
...@@ -420,4 +420,45 @@ ...@@ -420,4 +420,45 @@
.store-address:active{ .store-address:active{
opacity: 0.7; opacity: 0.7;
}
.remark-container{
display: flex;
align-items: center;
padding: 24rpx 20rpx;
border-bottom: 1px solid rgba(151, 151, 151, 0.3);
}
.remark-container .remark-title{
flex: 0;
min-width: 110rpx;
max-width: 110rpx;
font-size: 28rpx;
color: #333333;
}
.remark-container .remark-icon{
flex: 0;
min-width: 20rpx;
max-width: 20rpx;
display: flex;
align-items: center;
}
.remark-container .remark-desc{
font-size: 28rpx;
color: #666666;
flex: 1;
padding: 0 10rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: right;
}
.remark-container .remark-icon image{
width: 13rpx;
height: 21rpx;
vertical-align: middle;
margin-left: 14rpx;
} }
\ No newline at end of file
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
<swiper-item > --> <swiper-item > -->
<scroll-view scroll-y wx:if="{{currentTab==0}}"> <scroll-view scroll-y wx:if="{{currentTab==0}}">
<view class="extend-img"> <view class="extend-img">
<image mode="widthFix" src="{{extendProBanner ? extendProBanner : '/assets/imgs/7_1_0/coming-soon.jpg'}}" /> <image mode="widthFix"
src="{{extendProBanner ? extendProBanner : speadProductsBanner}}" />
</view> </view>
<view class="pro-nav-wrap"> <view class="pro-nav-wrap">
<view class="nav-list"> <view class="nav-list">
......
// pages/order/order.js
const wxService = require('../../utils/wxService')
wxService.page({
/**
* 页面的初始数据
*/
data: {
remark: '',
inputNum: 0,
limitNum: 200
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
wx.hideShareMenu();
let orderRemark = wx.getStorageSync('orderRemark');
this.setData({
remark: orderRemark,
});
},
//输入时
onInput(e) {
let value = e.detail.value;
if (!value) {
this.data.inputNum = 0;
}
else {
this.data.inputNum = value.length;
}
if (this.data.inputNum > this.data.limitNum) {
wx.showToast({
title: '最多输入' + this.data.limitNum + '个字',
icon: 'none'
});
value = value.substring(0, this.data.limitNum);
this.data.inputNum = this.data.limitNum;
}
this.setData({
remark: value,
inputNum: this.data.inputNum
});
},
//输入完成按钮点击事件
onTapInputOk() {
wx.setStorageSync('orderRemark', this.data.remark);
wx.navigateBack({
delta: 1
});
},
})
\ No newline at end of file
{
"navigationBarTitleText": "备注信息",
"usingComponents": {}
}
\ No newline at end of file
<!--pages/inputRemark/inputRemark.wxml-->
<view class='input-container'>
<view class='input-remark'>
<textarea placeholder="请输入备注信息,以便商家为你准备" value="{{remark}}" bindinput="onInput"></textarea>
<view class='input-num'>{{inputNum}}/{{limitNum}}</view>
</view>
<!-- 按钮 -->
<view class='ok-btn' bindtap='onTapInputOk'>完成</view>
</view>
\ No newline at end of file
/* pages/inputRemark/inputRemark.wxss */
page{
background: #ffffff;
font-size: 24rpx;
color: #666666;
}
.input-container{
padding: 30rpx;
}
.input-container .input-remark{
height: auto;
border: solid 2rpx #dddd;
background: #f1f1f1;
padding: 20rpx;
box-sizing: border-box;
-webkit-box-sizing: border-box;
width: 100%;
}
.input-container .input-remark textarea{
width: 100%;
height: 300rpx;
}
.input-container .input-remark .input-num{
display: flex;
justify-content: flex-end;
align-items: center;
margin-top: 20rpx;
font-size: 24rpx;
color: #333333;
}
.input-container .offen-tips{
width: 100%;
height: auto;
margin-top: 30rpx;
}
.input-container .offen-tips .title{
padding: 20rpx 0;
color: #999999;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20rpx;
}
.input-container .offen-tips .title view{
display: flex;
align-items: center;
justify-content: flex-end;
color: #ff3333;
font-size: 24rpx;
}
.input-container .offen-tips .title view image{
width: 30rpx;
height: 30rpx;
margin-right: 5rpx;
}
.input-container .offen-tips .title view image:active{
opacity: 0.7;
}
.input-container .offen-tips .title .cancel{
color: #666666;
margin-left: 20rpx;
}
.input-container .offen-tips .title .cancel:active{
opacity: 0.7;
}
.input-container .offen-tips .tips{
width: 100%;
height: auto;
display: flex;
flex-wrap: wrap;
margin-bottom: 30rpx;
}
.input-container .offen-tips .tips .tips-item{
width: auto;
height: auto;
padding: 10rpx 20rpx;
font-size: 22rpx;
color: #333333;
border: solid 2rpx #dddddd;
margin-right: 20rpx;
margin-bottom: 20rpx;
border-radius: 4rpx;
position: relative;
}
.input-container .offen-tips .tips .tips-item image{
position: absolute;
width: 30rpx;
height: 30rpx;
top: -10rpx;
right: -10rpx;
}
.input-container .offen-tips .tips .tips-item:active{
opacity: 0.7;
}
.input-container .ok-btn{
width: 100%;
height: 80rpx;
background: #ff3333;
color: #ffffff;
font-size: 28rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 8rpx;
margin-top: 50rpx;
}
.input-container .ok-btn:active{
opacity: 0.7;
}
\ No newline at end of file
...@@ -368,7 +368,7 @@ wxService.page({ ...@@ -368,7 +368,7 @@ wxService.page({
path = `pages/userCenter/userCenter?m=${m}`; path = `pages/userCenter/userCenter?m=${m}`;
} }
return { return {
title:'舞象星品荟-社交商城', title: envInfo.shareTitle,
path: path path: path
} }
} }
......
...@@ -70,8 +70,8 @@ export default class InviteFriends { ...@@ -70,8 +70,8 @@ export default class InviteFriends {
css: { css: {
width: '140rpx', width: '140rpx',
height: '140rpx', height: '140rpx',
right: '28rpx', right: '20rpx',
bottom: '33rpx', bottom: '18rpx',
} }
}, },
{ {
......
...@@ -563,6 +563,13 @@ ...@@ -563,6 +563,13 @@
"pathName": "subPackage/page/pages/selfPickUpOrderInfo/selfPickUpOrderInfo", "pathName": "subPackage/page/pages/selfPickUpOrderInfo/selfPickUpOrderInfo",
"query": "id=676422376522780672", "query": "id=676422376522780672",
"scene": null "scene": null
},
{
"id": -1,
"name": "输入备注信息",
"pathName": "pages/remark/remark",
"query": "",
"scene": null
} }
] ]
} }
......
...@@ -137,9 +137,9 @@ wxService.page({ ...@@ -137,9 +137,9 @@ wxService.page({
imgUrl: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png',//小程序消息的封面图 imgUrl: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_get_coupon.png',//小程序消息的封面图
page: path, //小程序消息打开后的路径 page: path, //小程序消息打开后的路径
success: function (r) { success: function (r) {
wx.showToast({ // wx.showToast({
title: '发送成功!' // title: '发送成功!'
}); // });
}, },
fail: function (err) { fail: function (err) {
} }
......
...@@ -20,7 +20,7 @@ wxService.page({ ...@@ -20,7 +20,7 @@ wxService.page({
], ],
current: 1, current: 1,
onlineOrderStatus: [{ name: '线上订单', type: 1, isActive: true }, { name: '线下订单', type: 2, isActive: false }], onlineOrderStatus: [{ name: '线上订单', type: 1, isActive: true }, { name: '线下订单', type: 2, isActive: false }],
returnOrderStatus: [{ name: '线上订单', type: 1, isActive: true },{ name: '线下订单', type: 2, isActive: false }], returnOrderStatus: [{ name: '线上退单', type: 1, isActive: true },{ name: '线下退单', type: 2, isActive: false }],
memberInfo: {}, memberInfo: {},
guider : {}, guider : {},
memberTags : [], memberTags : [],
...@@ -94,7 +94,7 @@ wxService.page({ ...@@ -94,7 +94,7 @@ wxService.page({
}, },
//获取优惠券信息 //获取优惠券信息
getMemberCoupon(memberId){ getMemberCoupon(memberId){
wxService.post(`/coupon/coupon/listWithMember?number=10000&size=1`, { wxService.post(`/coupon/coupon/listWithMember?number=1&size=10000`, {
memberId: memberId, memberId: memberId,
}).then(res => { }).then(res => {
if (!res) return false; if (!res) return false;
...@@ -114,7 +114,12 @@ wxService.page({ ...@@ -114,7 +114,12 @@ wxService.page({
}, },
//获取积分 //获取积分
getMemberPointHistory(memberId){ getMemberPointHistory(memberId){
wxService.post(`/member/memberPointLog/findPage?pageSize=10000&pageNo=1`,{ wxService.post(`/member/memberPointLog/findPage?pageSize=10&pageNo=1`,{
changeTypes: [],
endTime: "",
operation: "",
startTime: "",
storeIds: [],
memberId: memberId memberId: memberId
}).then(res => { }).then(res => {
if(!res) return ; if(!res) return ;
...@@ -171,7 +176,7 @@ wxService.page({ ...@@ -171,7 +176,7 @@ wxService.page({
const { result, data } = res && res.data || res && res.result const { result, data } = res && res.data || res && res.result
if (result == 0) { if (result == 0) {
wx.hideLoading() wx.hideLoading()
data.member.age = utils.getAge(data.member.birthday) data.member.age = data.member.birthday ? utils.getAge(data.member.birthday) : 0;
data.member.sex = data.member.sex ? data.member.sex : '保密'; data.member.sex = data.member.sex ? data.member.sex : '保密';
this.setData({ this.setData({
memberInfo: data.member memberInfo: data.member
...@@ -199,7 +204,7 @@ wxService.page({ ...@@ -199,7 +204,7 @@ wxService.page({
//获取订单信息 //获取订单信息
getUserOrderList(memberId){ getUserOrderList(memberId){
//获取线上订单 //获取线上订单
wxService.post(`/sale/trade/buyer/history?pageSize=10000&pageNum=1`,{ wxService.post(`/sale/trade/seller/history?pageSize=10000&pageNum=1`,{
memberId : memberId, memberId : memberId,
}).then(res => { }).then(res => {
if(!res) return ; if(!res) return ;
...@@ -277,7 +282,7 @@ wxService.page({ ...@@ -277,7 +282,7 @@ wxService.page({
}, },
// 获取线上退单 // 获取线上退单
getOnlineReturnOrderList(memberId){ getOnlineReturnOrderList(memberId){
wxService.post(`/sale/refund/buyer/history?pageSize=10000&pageNum=1`, { wxService.post(`/sale/refund/seller/history?pageSize=10000&pageNum=1`, {
memberId: memberId, memberId: memberId,
}).then(res => { }).then(res => {
if (!res) return; if (!res) return;
......
{ {
"navigationBarTitleText": "会员详情", "navigationBarTitleText": "会员详情",
"usingComponents": {} "usingComponents": {
"empty": "../../../../component/empty/empty"
}
} }
\ No newline at end of file
...@@ -75,47 +75,16 @@ ...@@ -75,47 +75,16 @@
<view class='auto-tips' wx:if="{{current == 1}}"> <view class='auto-tips' wx:if="{{current == 1}}">
<view class='tips-groups'> <view class='tips-groups'>
<!-- <view class='tip-group-name'>标签分组名称</view> --> <!-- <view class='tip-group-name'>标签分组名称</view> -->
<view class='tips'> <view class='tips' wx:if="{{memberTags.length > 0}}">
<view class='tips-item' <view class='tips-item'
wx:for="{{memberTags}}" wx:for="{{memberTags}}"
wx:key="memberTag" wx:key="memberTag"
wx:for-item="item">{{item.tag.name}}</view> wx:for-item="item">{{item.tag.name}}</view>
</view> </view>
<empty text="暂无标签信息~" wx:else />
</view> </view>
</view> </view>
<!-- 手动标签 -->
<!-- <view class='auto-tips' wx:if="{{current == 2}}">
<view class='tips-groups'>
<view class='tip-group-name'>标签分组名称</view>
<view class='tips'>
<view class='tips-item'>标签名称</view>
<view class='tips-item'>标签名称</view>
<view class='tips-item'>标签名称</view>
<view class='tips-item'>标签名称</view>
<view class='tips-item'>标签名称</view>
</view>
</view>
<view class='tips-groups'>
<view class='tip-group-name'>标签分组名称</view>
<view class='tips'>
<view class='tips-item'>标签名称</view>
<view class='tips-item'>标签名称</view>
<view class='tips-item'>标签名称</view>
<view class='tips-item'>标签名称</view>
<view class='tips-item'>标签名称</view>
</view>
</view>
<view class='tips-groups'>
<view class='tip-group-name'>标签分组名称</view>
<view class='tips'>
<view class='tips-item'>标签名称</view>
<view class='tips-item'>标签名称</view>
<view class='tips-item'>标签名称</view>
<view class='tips-item'>标签名称</view>
<view class='tips-item'>标签名称</view>
</view>
</view>
</view> -->
<!-- 订单信息 --> <!-- 订单信息 -->
<view wx:if="{{current == 3}}"> <view wx:if="{{current == 3}}">
<view class='order-filter'> <view class='order-filter'>
...@@ -210,6 +179,7 @@ ...@@ -210,6 +179,7 @@
¥ <text>5</text> ¥ <text>5</text>
</view> </view>
<view>抵用券</view> --> <view>抵用券</view> -->
<image mode="aspectFit" src="{{item.takeCouponBgimg}}"></image>
</view> </view>
<view class='coupon-item-rg'> <view class='coupon-item-rg'>
<!-- cant-use --> <!-- cant-use -->
......
...@@ -339,6 +339,11 @@ view{ ...@@ -339,6 +339,11 @@ view{
justify-content: center; justify-content: center;
} }
.coupons .coupon-item .coupon-item-lf image{
width: 140rpx;
height: 140rpx;
}
.coupon-price{ .coupon-price{
margin-bottom: 6rpx; margin-bottom: 6rpx;
} }
......
...@@ -91,7 +91,7 @@ wxService.page({ ...@@ -91,7 +91,7 @@ wxService.page({
header: { header: {
'tunnel-token': envInfo.tunnelToken, // 开发 'tunnel-token': envInfo.tunnelToken, // 开发
}, },
data: param, data: {},
channel: null, channel: null,
success(r){ success(r){
_this.setData({ _this.setData({
...@@ -150,15 +150,23 @@ wxService.page({ ...@@ -150,15 +150,23 @@ wxService.page({
data: param, data: param,
channel: null, channel: null,
success(r){ success(r){
wx.setStorageSync('guidInfo', userInfo); try{
wx.setStorageSync('token', r.data.data.token); wx.setStorageSync('guidInfo', userInfo);
let qiyeLoginUserInfo = r.data.data; wx.setStorageSync('token', r.data.data.token);
wx.setStorageSync('guidBaseInfo', qiyeLoginUserInfo); let qiyeLoginUserInfo = r.data.data;
wx.setStorageSync('_baseUserInfo', qiyeLoginUserInfo); wx.setStorageSync('guidBaseInfo', qiyeLoginUserInfo);
wx.hideLoading(); wx.setStorageSync('_baseUserInfo', qiyeLoginUserInfo);
wx.redirectTo({ wx.hideLoading();
url: '/shoppingGuid/page/pages/home/home', wx.redirectTo({
}); url: '/shoppingGuid/page/pages/home/home',
});
}
catch(e){
wx.showToast({
title: '登录失败,请联系管理员',
icon : 'none'
});
}
}, },
fail(error){ fail(error){
console.log(res) console.log(res)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</view> </view>
<!-- <navigator url="/subPackage/page/pages/share/share" hover-class="none"> --> <!-- <navigator url="/subPackage/page/pages/share/share" hover-class="none"> -->
<view class="invite-banner" bindtap="gotoInviteShare"> <view class="invite-banner" bindtap="gotoInviteShare">
<image src="{{isGoToInvite ? inviteBanner : '/assets/imgs/7_1_0/coming-soon.jpg'}}" mode="widthFix"></image> <image src="{{isGoToInvite ? inviteBanner : speadProductsBanner}}" mode="widthFix"></image>
</view> </view>
<go-home/> <go-home/>
</view> </view>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</view> </view>
</view> </view>
<view class="diy-banner"> <view class="diy-banner">
<image src="{{bannerUrl ? bannerUrl : '/assets/imgs/7_1_0/coming-soon.jpg'}}" mode="widthFix" /> <image src="{{bannerUrl ? bannerUrl : speadProductsBanner}}" mode="widthFix" />
</view> </view>
<button <button
wx:if="{{!currentHasUserInfo}}" wx:if="{{!currentHasUserInfo}}"
...@@ -27,7 +27,10 @@ ...@@ -27,7 +27,10 @@
<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"> <navigator open-type="navigate" url="/subPackage/page/pages/grassCommunity/grassCommunity">
<view class="add"><text>+</text></view> <view class="add">
<image src="/assets/imgs/icon_plus.png" mode="aspectFit"></image>
<!-- <text>+</text> -->
</view>
</navigator> </navigator>
</block> </block>
</view> </view>
......
...@@ -54,4 +54,7 @@ ...@@ -54,4 +54,7 @@
align-items: center; align-items: center;
} }
.add image{
width: 45rpx;
height: 45rpx;
}
...@@ -8,9 +8,9 @@ wxService.page({ ...@@ -8,9 +8,9 @@ wxService.page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
supValCardId : null, supValCardId: null,
no: '', no: '',
valueCardInfo : {} valueCardInfo: {}
}, },
/** /**
...@@ -29,54 +29,55 @@ wxService.page({ ...@@ -29,54 +29,55 @@ wxService.page({
}, },
//获取我的超值卡详情 //获取我的超值卡详情
getMyValueCardInfo(){ getMyValueCardInfo() {
let supValCardId = this.data.supValCardId; let supValCardId = this.data.supValCardId;
let url = `/merchant/superValueCard/miniProgram/getDetail?supValCardId=${supValCardId}`; let url = `/merchant/superValueCard/miniProgram/getDetail?supValCardId=${supValCardId}`;
wxService.post(url).then(res => { wxService.post(url).then(res => {
if(res){ if (res) {
let obj = res.data.data; let obj = res.data.data;
obj.leftTimes = obj.totalTimes - obj.usedTimes; obj.leftTimes = obj.totalTimes - obj.usedTimes;
// obj. // obj.
//处理图标显示问题 //处理图标显示问题
let arr = []; let arr = [];
for (let i = 0; i < obj.totalTimes; i ++){ for (let i = 0; i < obj.totalTimes; i++) {
let tempObj = { let tempObj = {
icon: obj.checkFlagUrl, icon: obj.checkFlagUrl,
}; };
arr.push(tempObj); arr.push(tempObj);
} }
for (let j = 0; j < obj.leftTimes ; j ++){ for (let j = 0; j < obj.leftTimes; j++) {
arr[j].icon = obj.noCheckFlagUrl; arr[j].icon = obj.noCheckFlagUrl;
} }
obj.icons = arr; obj.icons = arr;
obj.startTime = obj.startTime.substring(0, 10); obj.startTime = obj.startTime.substring(0, 10);
obj.endTime = obj.endTime.substring(0,10); obj.endTime = obj.endTime.substring(0, 10);
if (obj.buyAwayType == 1){ if (obj.buyAwayType == 1) {
obj.buyPriceText = parseFloat(obj.buyPrice/10/10).toFixed(2); obj.buyPriceText = parseFloat(obj.buyPrice / 10 / 10).toFixed(2);
} }
obj.activityDesc = obj.activityDesc ? JSON.parse(obj.activityDesc) : []; obj.activityDesc = obj.activityDesc ? JSON.parse(obj.activityDesc) : [];
obj.hasDate = obj.activityDesc.filter(item => item.type == 1).length > 0;
let descArr = JSON.parse(JSON.stringify(obj.activityDesc)); let descArr = JSON.parse(JSON.stringify(obj.activityDesc));
descArr = descArr.filter(item => item.type != 1); descArr = descArr.filter(item => item.type != 1);
let tempArr = descArr.map(item => { // let tempArr = descArr.map(item => {
return item.value; // return item.value;
}); // });
obj.descArr = tempArr; obj.descArr = descArr;
this.data.valueCardInfo = obj; this.data.valueCardInfo = obj;
this.setData({ this.setData({
valueCardInfo: this.data.valueCardInfo, valueCardInfo: this.data.valueCardInfo,
no: obj.supValCardCode no: obj.supValCardCode
},() => { }, () => {
this.generatorBarCode(); this.generatorBarCode();
}); });
} }
}); });
}, },
//刷新 //刷新
onTapRefreshNo(){ onTapRefreshNo() {
let supValCardId = this.data.supValCardId; let supValCardId = this.data.supValCardId;
let url = `/merchant/superValueCard/miniProgram/getChangeCode?supValCardId=${supValCardId}`; let url = `/merchant/superValueCard/miniProgram/getChangeCode?supValCardId=${supValCardId}`;
wxService.post(url).then(res => { wxService.post(url).then(res => {
...@@ -86,7 +87,7 @@ wxService.page({ ...@@ -86,7 +87,7 @@ wxService.page({
this.data.no = no; this.data.no = no;
this.setData({ this.setData({
no: this.data.no, no: this.data.no,
},() => { }, () => {
this.generatorBarCode(); this.generatorBarCode();
wx.showToast({ wx.showToast({
title: '刷新成功!', title: '刷新成功!',
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<view class='card-info-body'> <view class='card-info-body'>
<view class='card-desc-item'> <view class='card-desc-item' wx:if="{{valueCardInfo.hasDate}}">
<view class='lf'>活动时间</view> <view class='lf'>活动时间</view>
<view class='rg'>{{valueCardInfo.startTime}} 至 {{valueCardInfo.endTime}}</view> <view class='rg'>{{valueCardInfo.startTime}} 至 {{valueCardInfo.endTime}}</view>
</view> </view>
...@@ -52,14 +52,15 @@ ...@@ -52,14 +52,15 @@
<view class='lf'>积分兑换</view> <view class='lf'>积分兑换</view>
<view class='rg'>{{valueCardInfo.buyIntegration}}积分</view> <view class='rg'>{{valueCardInfo.buyIntegration}}积分</view>
</view> </view>
<view class='card-desc-item'> <view class='card-desc-item'
<view class='lf'>使用说明</view> wx:for="{{valueCardInfo.descArr}}"
wx:for-item="item"
wx:for-index="idx"
wx:key="*this">
<view class='lf'>{{item.label}}</view>
<view class='rg'> <view class='rg'>
<view class='list-item' <view class='list-item'
wx:for="{{valueCardInfo.descArr}}" >{{item.value}}</view>
wx:for-item="item"
wx:for-index="idx"
wx:key="*this"> {{idx + 1}}、{{item}}</view>
</view> </view>
</view> </view>
</view> </view>
/* subPackage/page/pages/myValueCardInfo/myValueCardInfo.wxss */ /* subPackage/page/pages/myValueCardInfo/myValueCardInfo.wxss */
page{ page{
background: #ffffff; background: #f2f2f2;
box-sizing: border-box; box-sizing: border-box;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
} }
...@@ -42,7 +42,7 @@ view{ ...@@ -42,7 +42,7 @@ view{
width: 100%; width: 100%;
height: auto; height: auto;
padding: 30rpx 90rpx; padding: 30rpx 90rpx;
background: #f2f2f2; background: #ffffff;
} }
.left-num-container .left-icons{ .left-num-container .left-icons{
......
...@@ -2,5 +2,7 @@ ...@@ -2,5 +2,7 @@
"navigationBarTitleText": "超值卡", "navigationBarTitleText": "超值卡",
"backgroundTextStyle": "dark", "backgroundTextStyle": "dark",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"usingComponents": {} "usingComponents": {
"empty": "../../../../component/empty/empty"
}
} }
\ No newline at end of file
<!--subPackage/page/pages/valueCard/valueCard.wxml--> <!--subPackage/page/pages/valueCard/valueCard.wxml-->
<view class='cards-list'> <view class='cards-list' wx:if="{{cardList.length > 0}}">
<view class='card-item' <view class='card-item'
wx:for="{{cardList}}" wx:for="{{cardList}}"
wx:for-item="item" wx:for-item="item"
...@@ -12,4 +12,6 @@ ...@@ -12,4 +12,6 @@
</view> </view>
</view> </view>
<view class='no-more'>-- 我也是有底线滴 --</view> <empty text="暂无超值卡活动~" wx:else/>
\ No newline at end of file
<view class='no-more' wx:if="{{cardList.length > 5}}">-- 我也是有底线滴 --</view>
\ No newline at end of file
...@@ -7,11 +7,11 @@ wxService.page({ ...@@ -7,11 +7,11 @@ wxService.page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
id : null, id: null,
checked : false, checked: false,
showModal : false, showModal: false,
valueCardInfo : {}, valueCardInfo: {},
buyType : '2',//现金支付 2 积分兑换 buyType: '2',//现金支付 2 积分兑换
}, },
/** /**
...@@ -32,7 +32,7 @@ wxService.page({ ...@@ -32,7 +32,7 @@ wxService.page({
}, },
//获取活动详情 //获取活动详情
getValueCardActivityInfo(){ getValueCardActivityInfo() {
wx.showLoading({ wx.showLoading({
title: '加载中..', title: '加载中..',
}); });
...@@ -40,20 +40,20 @@ wxService.page({ ...@@ -40,20 +40,20 @@ wxService.page({
wxService.post(`/merchant/superValueCardActivity/miniProgram/getDetail?id=${this.data.id}`).then(res => { wxService.post(`/merchant/superValueCardActivity/miniProgram/getDetail?id=${this.data.id}`).then(res => {
if (res) { if (res) {
let obj = res.data.data ? res.data.data : null; let obj = res.data.data ? res.data.data : null;
if(obj){ if (obj) {
obj.activityDesc = obj.activityDesc ? JSON.parse(obj.activityDesc) : []; obj.activityDesc = obj.activityDesc ? JSON.parse(obj.activityDesc) : [];
this.data.buyType = obj.payWayType; this.data.buyType = obj.payWayType;
obj.acPayMoney = parseFloat(obj.moneyAmount / 10 / 10).toFixed(2); obj.acPayMoney = parseFloat(obj.moneyAmount / 10 / 10).toFixed(2);
obj.startTime = obj.startTime.substring(0, 10); obj.startTime = obj.startTime.substring(0, 10);
obj.endTime = obj.endTime.substring(0,10); obj.endTime = obj.endTime.substring(0, 10);
obj.hasDate = obj.activityDesc.filter(item => item.type == 1).length > 0;
//处理说明文本 //处理说明文本
let descArr = JSON.parse(JSON.stringify(obj.activityDesc)); let descArr = JSON.parse(JSON.stringify(obj.activityDesc));
descArr = descArr.filter(item => item.type != 1); descArr = descArr.filter(item => item.type != 1);
let tempArr = descArr.map(item => { // let tempArr = descArr.map(item => {
return item.value; // return item.value;
}); // });
obj.descArr = tempArr; obj.descArr = descArr;
this.data.valueCardInfo = obj; this.data.valueCardInfo = obj;
this.setData({ this.setData({
buyType: this.data.buyType, buyType: this.data.buyType,
...@@ -66,72 +66,72 @@ wxService.page({ ...@@ -66,72 +66,72 @@ wxService.page({
}, },
//修改选中状态 //修改选中状态
onTapSwitchChecked(){ onTapSwitchChecked() {
this.data.checked = !this.data.checked; this.data.checked = !this.data.checked;
this.setData({ this.setData({
checked: this.data.checked checked: this.data.checked
}); });
}, },
//关闭modal //关闭modal
onTapCloseModal(){ onTapCloseModal() {
this.setData({ this.setData({
showModal : false, showModal: false,
}); });
}, },
//查看rule //查看rule
onTapViewRule(){ onTapViewRule() {
this.setData({ this.setData({
showModal : true showModal: true
}) })
}, },
//同意并阅读 //同意并阅读
onTapModalAgree(){ onTapModalAgree() {
this.setData({ this.setData({
showModal: false, showModal: false,
checked : true, checked: true,
}); });
}, },
//立即购买 //立即购买
onTapBuy(){ onTapBuy() {
if(!this.data.checked){ if (!this.data.checked) {
return ; return;
} }
const { member } = wx.getStorageSync('_baseUserInfo'); const { member } = wx.getStorageSync('_baseUserInfo');
if(!member){ if (!member) {
wx.showToast({ wx.showToast({
title: '请先去登录', title: '请先去登录',
icon : 'none' icon: 'none'
}) })
return ; return;
} }
let memeberId = member.id, let memeberId = member.id,
// storeId = member.storeId; // storeId = member.storeId;
storeId = ''; storeId = '';
let activityId = this.data.id; let activityId = this.data.id;
let url = ''; let url = '';
if (this.data.buyType == 1){ if (this.data.buyType == 1) {
url = `/merchant/superValueCard/miniProgram/buy?activityId=${activityId}&memberId=${memeberId}&payType=1&storeId=${storeId}`; url = `/merchant/superValueCard/miniProgram/buy?activityId=${activityId}&memberId=${memeberId}&payType=1&storeId=${storeId}`;
} }
else{ else {
url = `/merchant/superValueCard/miniProgram/buy?activityId=${activityId}&memberId=${memeberId}&storeId=${storeId}`; url = `/merchant/superValueCard/miniProgram/buy?activityId=${activityId}&memberId=${memeberId}&storeId=${storeId}`;
} }
wx.showLoading({ wx.showLoading({
title: '支付中..', title: '支付中..',
}); });
wxService.post(url).then(res => { wxService.post(url).then(res => {
wx.hideLoading(); wx.hideLoading();
if(res.data.result == 0){ if (res.data.result == 0) {
this.setData({ this.setData({
checked: false, checked: false,
}); });
//现金支付 //现金支付
if (this.data.buyType == 1){ if (this.data.buyType == 1) {
let data = res.data.data ? res.data.data : null; let data = res.data.data ? res.data.data : null;
if(data){ if (data) {
let wxParams = data.wxParams; let wxParams = data.wxParams;
wx.requestPayment({ wx.requestPayment({
timeStamp: wxParams.timeStamp, timeStamp: wxParams.timeStamp,
...@@ -139,7 +139,7 @@ wxService.page({ ...@@ -139,7 +139,7 @@ wxService.page({
package: wxParams.package, package: wxParams.package,
signType: wxParams.signType, signType: wxParams.signType,
paySign: wxParams.paySign, paySign: wxParams.paySign,
success : res => { success: res => {
wx.showToast({ wx.showToast({
title: '支付成功!', title: '支付成功!',
}); });
...@@ -151,36 +151,38 @@ wxService.page({ ...@@ -151,36 +151,38 @@ wxService.page({
wx.navigateTo({ wx.navigateTo({
url: '/subPackage/page/pages/myValueCard/myValueCard', url: '/subPackage/page/pages/myValueCard/myValueCard',
}); });
},500); }, 500);
}, },
fail : error => { fail: error => {
wx.showToast({ wx.showToast({
title: '已取消支付', title: '已取消支付',
icon : 'none' icon: 'none'
}); });
} }
}) })
} }
} }
else{ else {
wx.showToast({ wx.showModal({
title: '支付成功!', title: '购买成功',
}); content: '是否跳转到我的超值卡列表查看?',
wx.showLoading({ confirmColor: '#ff2222',
title: '跳转中...', success(res) {
if (res.confirm) {
wx.navigateTo({
url: '/subPackage/page/pages/myValueCard/myValueCard',
});
} else if (res.cancel) {
}
},
}); });
setTimeout(() => {
wx.hideLoading();
wx.navigateTo({
url: '/subPackage/page/pages/myValueCard/myValueCard',
});
}, 500);
} }
} }
else{ else {
wx.showToast({ wx.showToast({
title: '购买失败,请稍后再试!', title: '购买失败,请稍后再试!',
icon : 'none' icon: 'none'
}); });
} }
}); });
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<image src='{{valueCardInfo.listUrl}}' class='card-info' mode='widthFix'></image> <image src='{{valueCardInfo.listUrl}}' class='card-info' mode='widthFix'></image>
<view class='card-info-body'> <view class='card-info-body'>
<view class='card-title'>{{valueCardInfo.activityName}}</view> <view class='card-title'>{{valueCardInfo.activityName}}</view>
<view class='card-desc-item'> <view class='card-desc-item' wx:if="{{valueCardInfo.hasDate}}">
<view class='lf'>活动时间</view> <view class='lf'>活动时间</view>
<view class='rg'>{{valueCardInfo.startTime}} 至 {{valueCardInfo.endTime}}</view> <view class='rg'>{{valueCardInfo.startTime}} 至 {{valueCardInfo.endTime}}</view>
</view> </view>
...@@ -14,15 +14,14 @@ ...@@ -14,15 +14,14 @@
<view class='lf'>积分兑换</view> <view class='lf'>积分兑换</view>
<view class='rg'>{{valueCardInfo.integrationAmount}}积分</view> <view class='rg'>{{valueCardInfo.integrationAmount}}积分</view>
</view> </view>
<view class='card-desc-item'> <view class='card-desc-item'
<view class='lf'>使用说明</view> wx:for="{{valueCardInfo.descArr}}"
wx:for-item="item"
wx:for-index="idx"
wx:key="*this">
<view class='lf'>{{item.label}}</view>
<view class='rg'> <view class='rg'>
<view class='list-item' <view class='list-item'> {{item.value}}</view>
wx:for="{{valueCardInfo.descArr}}"
wx:for-item="item"
wx:for-index="idx"
wx:key="*this"
> {{idx+1}}、{{item}}</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -63,6 +63,7 @@ view{ ...@@ -63,6 +63,7 @@ view{
height: 100rpx; height: 100rpx;
display: flex; display: flex;
align-items: center; align-items: center;
background: #ffffff;
} }
.bottom-buy .rg-button{ .bottom-buy .rg-button{
......
...@@ -595,7 +595,10 @@ class WXService extends Http { ...@@ -595,7 +595,10 @@ class WXService extends Http {
config.data.contactUsIsOpen = envInfo.contactUsIsOpen; config.data.contactUsIsOpen = envInfo.contactUsIsOpen;
config.data.orderingMustOpenCard = envInfo.orderingMustOpenCard; config.data.orderingMustOpenCard = envInfo.orderingMustOpenCard;
config.data.isOpenSelfMention = envInfo.isOpenSelfMention; config.data.isOpenSelfMention = envInfo.isOpenSelfMention;
config.data.shareLogo = envInfo.shareLogo;
config.data.shareTitle = envInfo.shareTitle;
config.data.speadProductsBanner = envInfo.speadProductsBanner;
const CONFIG_PAPGE = { const CONFIG_PAPGE = {
onLoad: function (...args) { onLoad: function (...args) {
const page = this const page = this
......
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