Commit 1dffd518 by 赵雅纹

bug修复

parent e7105ba3
......@@ -56,6 +56,26 @@
color: #cb3c3c;
}
.clear-btn{
appearance: none;
border: none;
background: transparent;
margin: 0;
}
.positionRe{
position: relative;
}
.positionAbs{
position: absolute;
z-index: 2;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
/* 按钮大小 */
.btn-xs {
height: 39rpx;
......
......@@ -3,12 +3,12 @@
<view class="commodity_screen2" bindtap='closeCardModal' style='opacity: 0.5;' hidden="{{!show}}" catchtouchmove='true'></view>
<view class="card-modal" hidden="{{!show}}" catchtouchmove='true'>
<view class="card-modal-content">
<image mode="widthFix" class="benefit-image" src="{{benefitData.inviteePage}}"></image>
<view wx:if="{{!benefitData.receiveAwardJumpType}}">
<button class="btn btn-primary" bindgetuserinfo="_getUserInfo" data-jflag="false" open-type='getUserInfo'>立即领取</button>
<button class="positionAbs" bindgetuserinfo="_getUserInfo" data-jflag="false" open-type='getUserInfo'><image mode="widthFix" class="benefit-image" src="{{benefitData.inviteePage}}"></image></button>
</view>
<view wx:else>
<button class="btn btn-primary" bindtap="closeCardModal">立即领取</button>
<image mode="widthFix" class="benefit-image" src="{{benefitData.inviteePage}}" bindtap="closeCardModal"></image>
<!-- <button class="btn btn-primary" bindtap="closeCardModal">立即领取</button> -->
</view>
</view>
</view>
......
......@@ -15,14 +15,16 @@
}
.card-modal{
position: fixed;
top:100rpx;
left: 100rpx;
top:50%;
left: 50%;
z-index: 9999;
/* width: 640rpx; */
transform:translate(-50%,-50%);
}
.card-modal-content{
/* width: 640rpx; */
height: 1000rpx;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 4rpx 17rpx 0px rgba(0, 0, 0, 0.12);
}
.benefit-image{
width: 600rpx;
display: block;
}
\ No newline at end of file
......@@ -9,7 +9,9 @@ Component({
properties: {
currentHasUserInfo: {
type: Boolean,
type: false
value: false,
observer(val){
}
},
imageData: {
type: Array,
......@@ -19,7 +21,6 @@ Component({
type: Number,
value: [],
}
},
/**
......@@ -27,6 +28,17 @@ Component({
*/
data: {
// imageheight: 0
userIsLogin : false
},
observers: {
currentHasUserInfo(val) {
console.log(val)
this.setData({
userIsLogin: val
})
}
},
/**
......@@ -70,6 +82,12 @@ Component({
}
},
//授權
_getUserInfo(res){
wxService.nextTick(() => {
this.triggerEvent('getAuth',res);
})
}
//获取图片高度
// imageLoad(e) {
// console.log('height', utils.imageUtil(e))
......
<!--component/waterFlowLayout/waterFlowLayout.wxml-->
<!-- {{userIsLogin}} -->
<view class="water-wrap {{type == 2 ? 'release-water' : ''}}">
<view class="left">
<block wx:for="{{imageData}}" wx:key="">
......@@ -13,23 +13,56 @@
</view>
</view>
<template name="water-list">
<view class="item" bindtap="gotoDetail" data-id="{{id}}" data-current-type="{{currentType}}">
<view class="item" data-current-type="{{currentType}}">
<view class="no-audited" wx:if="{{currentType != 2}}">
{{currentType == 1 ? '待审核' : (currentType == 3 ? '已驳回' : '已通过')}}
</view>
<image class="item-img" src="{{url}}" mode="widthFix" bindload="imageLoad"></image>
<view class="item-title-box">
<image class="item-img" src="{{url}}" data-id="{{id}}" mode="widthFix" bindload="imageLoad" bindtap="gotoDetail"></image>
<view class="item-title-box" data-id="{{id}}" bindtap="gotoDetail">
<view class="item-title">{{headline}}</view>
</view>
<view class="share-wrap">
<view>
</view>
<!-- 未登錄時 -->
<!-- <view class="share-wrap" wx:if="{{!userIsLogin}}">
<button wx:if="{{!userIsLogin}}"
bindgetuserinfo="_getUserInfo"
open-type='getUserInfo' class="clear-btn">
<view class="share-oprate" catchtap="onTapLike">
<image class="share-img" src="{{contentInfo.type ? '/assets/imgs/heart-primary.png' : '/assets/imgs/heart-default.png'}}" />
<text class="share-number">{{enjoySum || 0}}</text>
</view>
</button>
<button wx:if="{{!userIsLogin}}"
bindgetuserinfo="_getUserInfo"
open-type='getUserInfo' class="clear-btn">
<view class="share-oprate" catchtap="onTapShare">
<image class="share-img" src="/assets/imgs/share.png" />
<text class="share-number">{{transmitSum || 0}}</text>
</view>
</button>
</view> -->
<view class="share-wrap" >
<view class="share-oprate" catchtap="onTapLike" data-id="{{id}}" data-type="{{type}}" data-current-type="{{currentType}}">
<image class="share-img" src="{{type ? '/assets/imgs/heart-primary.png' : '/assets/imgs/heart-default.png'}}"></image>
<text class="share-number">{{enjoySum || 0}}</text>
</view> <view class="share-oprate" catchtap="onTapShare" data-title="{{headline}}" data-url="{{url}}" data-headline="{{headline}}" data-describe="{{describe}}" data-id="{{id}}" data-current-type="{{currentType}}">
</view>
<view class="share-oprate"
catchtap="onTapShare"
data-title="{{headline}}"
data-url="{{url}}"
data-headline="{{headline}}"
data-describe="{{describe}}"
data-id="{{id}}"
data-current-type="{{currentType}}">
<image class="share-img" src="/assets/imgs/share.png"></image>
<text class="share-number">{{transmitSum || 0}}</text>
</view>
</view>
</view>
</view>
</template>
......@@ -138,6 +138,7 @@ wxService.page({
path = `pages/category/category?m=${m}`;
}
return {
title: '分类',
path: path
}
}
......
......@@ -399,6 +399,7 @@ wxService.page({
console.log('用户点击右上角分享', this.data.currentShareContent.id)
console.log(path)
return {
title: this.data.proData[0].productName,
path: path,
imageUrl: this.data.proData[0].productImgUrl, // 可以更换分享的图片
}
......@@ -412,6 +413,7 @@ wxService.page({
path = `pages/extendProduct/extendProduct?m=${m}`;
}
return {
title: this.data.proData[0].productName,
path: path,
imageUrl: this.data.extendProList && this.data.extendProList.length > 0 ? this.data.extendProList[0].productImgUrl : '',
}
......
......@@ -6,7 +6,16 @@
推广商品
<view class="line" wx-if="{{currentTab==0}}" />
</view>
<view class="swiper-tab-item {{currentTab==1 ? 'active' : ''}}" data-current="1" bindtap="clickTab">我的分享
<!-- 未登錄時 -->
<view class="swiper-tab-item {{currentTab==1 ? 'active' : ''}} positionRe" wx:if="{{!currentHasUserInfo}}" data-current="1" >
<button bindgetuserinfo="_getUserInfo" open-type='getUserInfo' class="clear-btn positionAbs"> </button>
我的分享
<view class="line" wx-if="{{currentTab==1}}" />
</view>
<view class="swiper-tab-item {{currentTab==1 ? 'active' : ''}}" wx:if="{{currentHasUserInfo}}" data-current="1" bindtap="clickTab">我的分享
<view class="line" wx-if="{{currentTab==1}}" />
</view>
</view>
......@@ -86,7 +95,21 @@
暂无推广商品
</view> -->
</scroll-view>
<view class="share-wrap" wx:if="{{currentTab==0}}">
<!-- 未登录 -->
<view class="share-wrap" wx:if="{{currentTab==0 && !currentHasUserInfo}}" >
<view class="share-button positionRe" >
<button bindgetuserinfo="_getUserInfo" open-type='getUserInfo' class="clear-btn positionAbs"> </button>
<image mode="widthFix" src="/assets/imgs/7_1_0/quick-share-black.jpg" />
<text>快速分享</text>
</view>
<view class="share-button positionRe">
<button bindgetuserinfo="_getUserInfo" open-type='getUserInfo' class="clear-btn positionAbs"> </button>
<image mode="widthFix" src="/assets/imgs/7_1_0/poster-black.jpg"/>
<text>生成海报</text>
</view>
</view>
<!-- 一登陆 -->
<view class="share-wrap" wx:if="{{currentTab==0 && currentHasUserInfo}}">
<view class="share-button" bindtap="onTapShare">
<image mode="widthFix" src="/assets/imgs/7_1_0/quick-share-black.jpg" />
<text>快速分享</text>
......
......@@ -47,6 +47,7 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let memberId = options.memberId;
if (memberId) {
let tentacleInfo = {
......@@ -293,6 +294,7 @@ wxService.page({
path = `pages/myShare/myShare?m=${m}`;
}
return {
title:'内容列表',
path: path
}
}
......
......@@ -63,7 +63,7 @@ scroll-view{
font-size: 60rpx;
color: #ffffff;
position: fixed;
right: 22rpx;
right: 25rpx;
bottom: 357rpx;
/* bottom: 35rpx; */
z-index: 99;
......
......@@ -379,6 +379,7 @@ wxService.page({
path = `pages/pointDetail/pointDetail?i=${id}&m=${m}`;
}
return {
title: '集点详情',
path: path
}
}
......
......@@ -187,6 +187,7 @@ wxService.page({
path = `pages/pointList/pointList?m=${m}`;
}
return {
title:'集点列表',
path: path
}
}
......
......@@ -335,6 +335,7 @@ wxService.page({
path = `pages/userCenter/userCenter?m=${m}`;
}
return {
title:'舞象星品荟-社交商城',
path: path
}
}
......
......@@ -93,15 +93,23 @@ wxService.page({
},
_getUserInfo(res = {}) {
wxService.nextTick(() => {
this.triggerEvent('getAuth', res);
})
},
// 统计阅读和转发量
getReadyOrForwardNumber(params){
wxService.post(`/merchant/contentMobileTerminal/operationSave`, params).then(res => {
if (!res) return false
const { result, data } = res.data
if (result == 0) {
}
}).finally(() => {
})
if (this.data.currentHasUserInfo){
wxService.post(`/merchant/contentMobileTerminal/operationSave`, params).then(res => {
if (!res) return false
const { result, data } = res.data
if (result == 0) {
}
}).finally(() => {
})
}
},
//跳转商品详情
......
......@@ -34,16 +34,44 @@
<!-- 点赞分享悬浮 -->
<view class="fixed-bottom">
<view class="share-wrap">
<view class="share-oprate" bindtap="gotoLike">
<image class="share-img" src="{{contentInfo.type ? '/assets/imgs/heart-primary.png' : '/assets/imgs/heart-default.png'}}" />
<text class="share-number">{{contentInfo.enjoySum || 0}}</text>
</view>
<view class="share-oprate" bindtap="onTapShare">
<image class="share-img" src="/assets/imgs/share.png" />
<text class="share-number">{{contentInfo.transmitSum || 0}}</text>
</view>
</view>
<!-- wx:if="{{!currentHasUserInfo}}" -->
<!-- 未登陆时 -->
<view class="share-wrap" wx:if="{{!currentHasUserInfo}}">
<button
bindgetuserinfo="_getUserInfo"
open-type='getUserInfo' class="clear-btn">
<view class="share-oprate" bindtap="gotoLike">
<image class="share-img" src="{{contentInfo.type ? '/assets/imgs/heart-primary.png' : '/assets/imgs/heart-default.png'}}" />
<text class="share-number">{{contentInfo.enjoySum || 0}}</text>
</view>
</button>
<button
bindgetuserinfo="_getUserInfo"
open-type='getUserInfo' class="clear-btn">
<view class="share-oprate" bindtap="onTapShare">
<image class="share-img" src="/assets/imgs/share.png" />
<text class="share-number">{{contentInfo.transmitSum || 0}}</text>
</view>
</button>
</view>
<!-- 一登陸 -->
<view class="share-wrap" wx:if="{{currentHasUserInfo}}">
<view class="share-oprate" bindtap="gotoLike">
<image class="share-img" src="{{contentInfo.type ? '/assets/imgs/heart-primary.png' : '/assets/imgs/heart-default.png'}}" />
<text class="share-number">{{contentInfo.enjoySum || 0}}</text>
</view>
<view class="share-oprate" bindtap="onTapShare">
<image class="share-img" src="/assets/imgs/share.png" />
<text class="share-number">{{contentInfo.transmitSum || 0}}</text>
</view>
</view>
</view>
<card-modal
......
......@@ -4,21 +4,19 @@ export default class InviteFriends {
palette(posterImg, qrcodeImg, userName, avatarUrl,options) {
//获取图片的长宽
let posterImgWidth = 0, posterImgHeight = 280;
let windowWidth = options.windowWidth;
let windowHeight = options.windowHeight;
if(options){
posterImgWidth = options.posterImgWidth ? options.posterImgWidth : 0;
posterImgHeight = options.posterImgHeight ? options.posterImgHeight : 0;
if (posterImgHeight > 280){
posterImgHeight = 280;
if (posterImgHeight > windowHeight){
posterImgHeight = windowHeight - 90;
}
}
console.log(avatarUrl)
let windowWidth = options.windowWidth;
return ({
width: '750rpx',
height: '705rpx',
height: windowHeight + 'px',
background: '#fff',
views: [
{
......
......@@ -178,6 +178,7 @@ wxService.page({
path = `subPackage/page/pages/categoryPro/categoryPro?m=${m}`;
}
return {
title: '商品列表',
path: path
}
}
......
......@@ -97,6 +97,7 @@ wxService.page({
path = `subPackage/page/pages/friendShareList/friendShareList?m=${m}&i=${id}`;
}
return {
title: '分享列表',
path: path
}
}
......
......@@ -281,7 +281,6 @@ wxService.page({
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
console.log(path)
return {
title: this.data.cardTitle,
path: path,
......
......@@ -95,7 +95,6 @@ wxService.page({
}
this.data.currentShareContent = this.data.contentInfo;
console.log(this.data.contentInfo)
wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.id) {
......@@ -188,13 +187,16 @@ wxService.page({
// 统计阅读和转发量
getReadyOrForwardNumber(params) {
wxService.post(`/merchant/contentMobileTerminal/operationSave`, params).then(res => {
if (!res) return false
const { result, data } = res.data
if (result == 0) {
}
}).finally(() => {
})
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
if (member){
wxService.post(`/merchant/contentMobileTerminal/operationSave`, params).then(res => {
if (!res) return false
const { result, data } = res.data
if (result == 0) {
}
}).finally(() => {
})
}
},
// 点赞
......@@ -321,7 +323,6 @@ wxService.page({
let id = Integer.digit(this.data.currentShareContent.id, 10, 64);
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
console.log(path)
return {
title: this.data.cardTitle,
path: path,
......
......@@ -6,8 +6,6 @@ import { Integer } from '../../../../utils/integerDigitalConvertion'
const { member } = wx.getStorageSync('_baseUserInfo')
const { avatarUrl } = wx.getStorageSync('_userInfo')
// src/pages/xml2can/xml2can.js
wxService.page({
data: {
......
......@@ -346,9 +346,9 @@ function setUserInfo() {
// 跳转
const urls = getCurrentPages()
setTimeout(() => {
const item = urls[0].options
const route = urls[0].route
console.log('----------item', route, item)
// return ;
const item = urls[urls.length - 1].options
const route = urls[urls.length-1].route
if (route) {
try {
const options = item
......
......@@ -552,7 +552,6 @@ class WXService extends Http {
watch.setWatcher(page);
//修改参数
let pageIsFromShare = false, id = null;
console.log('args',args)
args.forEach(item => {
if (item['t']) {
pageIsFromShare = true;
......@@ -602,7 +601,6 @@ class WXService extends Http {
let currentEndTime = (new Date(premiumExpireStorage.replace(/-/g, '/'))).getTime(); // 到期时间
let currentTime = (new Date()).getTime();
let vipFlag = currentTime <= currentEndTime ? true : false // 当前时间 < 到期时间为vip
console.log('premiumExpireStorage', premiumExpireStorage)
console.log('当前时间 < 到期时间为vip',vipFlag)
......@@ -671,6 +669,9 @@ class WXService extends Http {
},
//统一处理用户授权获取用户信息回调
_getUserInfo(res) {
this.setData({
currentHasUserInfo: true
});
_self.getAuthUserInfo(res.detail)
},
//处理分享页面打开时参数为memberId时生成触点对象信息
......
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