Commit 8af70cf2 by 谢中龙

提交修改

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