Commit 69657c0e by 赵雅纹

Merge branch 'feature-zyw-sc' into 'dev_7.1.0'

Feature zyw sc

See merge request !120
parents 0c2bad3b b98b5dd9
...@@ -98,7 +98,7 @@ Component({ ...@@ -98,7 +98,7 @@ Component({
else if (rowObj.type == 7) { } else if (rowObj.type == 7) { }
else if (rowObj.type == 8) { else if (rowObj.type == 8) {
// 商品 // 商品
wxService.router(`/pages/productDetail/productDetail?productId=${currentClickRow}`) wxService.router(`/pages/productDetail/productDetail?id=${currentClickRow}`)
} }
else if (rowObj.type == 9) { else if (rowObj.type == 9) {
// 分类 // 分类
......
...@@ -138,7 +138,7 @@ Component({ ...@@ -138,7 +138,7 @@ Component({
else if (rowObj.type == 7) { } else if (rowObj.type == 7) { }
else if (rowObj.type == 8) { else if (rowObj.type == 8) {
// 商品 // 商品
wxService.router(`/pages/productDetail/productDetail?productId=${currentClickRow}`) wxService.router(`/pages/productDetail/productDetail?id=${currentClickRow}`)
} }
else if (rowObj.type == 9) { else if (rowObj.type == 9) {
// 分类 // 分类
......
...@@ -113,7 +113,7 @@ Component({ ...@@ -113,7 +113,7 @@ Component({
else if (rowObj.type == 7) { } else if (rowObj.type == 7) { }
else if (rowObj.type == 8) { else if (rowObj.type == 8) {
// 商品 // 商品
wxService.router(`/pages/productDetail/productDetail?productId=${currentClickRow}`) wxService.router(`/pages/productDetail/productDetail?id=${currentClickRow}`)
} }
else if (rowObj.type == 9) { else if (rowObj.type == 9) {
// 分类 // 分类
......
...@@ -132,7 +132,7 @@ Component({ ...@@ -132,7 +132,7 @@ Component({
else if (rowObj.type == 7) { } else if (rowObj.type == 7) { }
else if (rowObj.type == 8) { else if (rowObj.type == 8) {
// 商品 // 商品
wxService.router(`/pages/productDetail/productDetail?productId=${currentClickRow}`) wxService.router(`/pages/productDetail/productDetail?id=${currentClickRow}`)
} }
else if (rowObj.type == 9) { else if (rowObj.type == 9) {
// 分类 // 分类
......
...@@ -346,7 +346,8 @@ wxService.page({ ...@@ -346,7 +346,8 @@ wxService.page({
console.log('id', this.data.currentShareContent.id) console.log('id', this.data.currentShareContent.id)
console.log(path) console.log(path)
return { return {
path: path path: path,
imageUrl: this.data.proData[0].productImgUrl, // 可以更换分享的图片
} }
} }
......
...@@ -4,7 +4,7 @@ const wxService = require('../../utils/wxService') ...@@ -4,7 +4,7 @@ const wxService = require('../../utils/wxService')
const utils = require('../../utils/util') const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo const envInfo = require('../../config/index').envInfo
import { Integer } from '../../utils/integerDigitalConvertion' import { Integer } from '../../utils/integerDigitalConvertion'
const { memberId } = wx.getStorageSync('_baseUserInfo') const { memberId, member} = wx.getStorageSync('_baseUserInfo')
wxService.page({ wxService.page({
/** /**
...@@ -49,16 +49,28 @@ wxService.page({ ...@@ -49,16 +49,28 @@ wxService.page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
let time = Date.parse(new Date())
if (member.premiumExpireTime && member.premiumExpireTime > time) {
this.setData({
plus: 1
})
} else {
this.setData({
plus: 0
})
}
this.getCategoryList() this.getCategoryList()
this.getContentPermission()
this.data.currentShareContent = null; this.data.currentShareContent = null;
}, },
// 发布内容权限 // 发布内容权限
getContentPermission() { getContentPermission() {
console.log(member)
wxService.post(`/merchant/contentMobileTerminal/getReleasePermissions`, { wxService.post(`/merchant/contentMobileTerminal/getReleasePermissions`, {
userId: memberId, userId: memberId,
plus: 0, plus: this.data.plus,
level: 0 level: member.level || 0
}).then(res => { }).then(res => {
if (!res) return false if (!res) return false
const { result, data } = res.data const { result, data } = res.data
...@@ -215,7 +227,8 @@ wxService.page({ ...@@ -215,7 +227,8 @@ wxService.page({
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId; var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
console.log(path) console.log(path)
return { return {
path: path path: path,
imageUrl: this.data.cardUrl, // 可以更换分享的图片
} }
} }
......
...@@ -280,7 +280,8 @@ wxService.page({ ...@@ -280,7 +280,8 @@ wxService.page({
var path = 'pages/productDetail/productDetail?i=' + id + '&t=' + tentacleId; var path = 'pages/productDetail/productDetail?i=' + id + '&t=' + tentacleId;
console.log(path) console.log(path)
return { return {
path: path path: path,
imageUrl: this.data.productInfo.indexUrl, // 可以更换分享的图片
} }
} }
}) })
\ No newline at end of file
...@@ -35,7 +35,8 @@ wxService.page({ ...@@ -35,7 +35,8 @@ wxService.page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad() { onLoad(options) {
console.log('触点-----------',options)
this.setData( this.setData(
{ {
pages: [], pages: [],
...@@ -73,8 +74,11 @@ wxService.page({ ...@@ -73,8 +74,11 @@ wxService.page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
let tentacleInfo = wx.getStorageSync('TENTACLE_CONTENT');
// 取会员卡号 // 取会员卡号
const baseUserInfo = wx.getStorageSync('_baseUserInfo') const baseUserInfo = wx.getStorageSync('tentacleInfo')
console.log('会员信息------------', baseUserInfo)
const cardMember = wx.getStorageSync('_cardMember') const cardMember = wx.getStorageSync('_cardMember')
// 登录接口返回err // 登录接口返回err
const reLoginErrFlag = wx.getStorageSync('reLoginErr') const reLoginErrFlag = wx.getStorageSync('reLoginErr')
...@@ -269,7 +273,9 @@ wxService.page({ ...@@ -269,7 +273,9 @@ wxService.page({
wxService.getTentacleContent(tentacleInfo).then(res => { wxService.getTentacleContent(tentacleInfo).then(res => {
if (res && res.tentacleId) { if (res && res.tentacleId) {
let tentacleId = Integer.digit(res.tentacleId, 10, 64); let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = `pages/userCenter/userCenter?t=${tentacleId}`; // var path = `pages/userCenter/userCenter?t=${tentacleId}`;
var path = `pages/userCenter/userCenter?t=1`;
console.log(path) console.log(path)
return { return {
path: path path: path
......
...@@ -90,7 +90,7 @@ wxService.page({ ...@@ -90,7 +90,7 @@ wxService.page({
this.setData({ this.setData({
showCardModal: true, showCardModal: true,
cardTitle: this.data.contentInfo.headline, cardTitle: this.data.contentInfo.headline,
cardUrl: this.data.contentInfo.url, cardUrl: this.data.contentInfo.shareShowPictureRESDTOList[0].url,
pagePath: path pagePath: path
}); });
} }
...@@ -184,7 +184,8 @@ wxService.page({ ...@@ -184,7 +184,8 @@ wxService.page({
let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64); let tentacleId = Integer.digit(this.data.currentShareContent.tentacleId, 10, 64);
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId; var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
return { return {
path: path path: path,
imageUrl: this.data.cardUrl, // 可以更换分享的图片
} }
} }
...@@ -192,7 +193,7 @@ wxService.page({ ...@@ -192,7 +193,7 @@ wxService.page({
title: this.data.contentInfo.headline, title: this.data.contentInfo.headline,
id: this.data.contentInfo.id, id: this.data.contentInfo.id,
article: this.data.contentInfo.article, article: this.data.contentInfo.article,
url: this.data.contentInfo.url url: this.data.contentInfo.shareShowPictureRESDTOList[0].url
} }
let tentacleInfo = { let tentacleInfo = {
content: JSON.stringify(content), content: JSON.stringify(content),
...@@ -208,7 +209,8 @@ wxService.page({ ...@@ -208,7 +209,8 @@ wxService.page({
let tentacleId = Integer.digit(res.tentacleId, 10, 64); let tentacleId = Integer.digit(res.tentacleId, 10, 64);
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId; var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
return { return {
path: path path: path,
imageUrl: this.data.cardUrl, // 可以更换分享的图片
} }
} }
}); });
......
...@@ -3,7 +3,7 @@ const app = getApp() ...@@ -3,7 +3,7 @@ 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 const envInfo = require('../../../../config/index').envInfo
const { memberId } = wx.getStorageSync('_baseUserInfo') const { memberId, member } = wx.getStorageSync('_baseUserInfo')
import { Integer } from '../../../../utils/integerDigitalConvertion' import { Integer } from '../../../../utils/integerDigitalConvertion'
wxService.page({ wxService.page({
...@@ -37,18 +37,29 @@ wxService.page({ ...@@ -37,18 +37,29 @@ wxService.page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
let time = Date.parse(new Date())
if (member.premiumExpireTime && member.premiumExpireTime > time) {
this.setData({
plus: 1
})
} else {
this.setData({
plus: 0
})
}
this.getBannerInfo() this.getBannerInfo()
this.getContentList() this.getContentList()
this.getContentPermission() this.getContentPermission()
this.data.currentShareContent = null; this.data.currentShareContent = null;
}, },
// 发布内容权限 // 发布内容权限
getContentPermission(){ getContentPermission(){
wxService.post(`/merchant/contentMobileTerminal/getReleasePermissions`, { wxService.post(`/merchant/contentMobileTerminal/getReleasePermissions`, {
userId: memberId, userId: memberId,
plus: 0, plus:this.data.plus,
level: 0 level: member.level || 0
}).then(res => { }).then(res => {
if (!res) return false if (!res) return false
const { result, data } = res.data const { result, data } = res.data
...@@ -211,7 +222,8 @@ wxService.page({ ...@@ -211,7 +222,8 @@ wxService.page({
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId; var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
console.log(path) console.log(path)
return { return {
path: path path: path,
imageUrl: this.data.cardUrl // 可以更换分享的图片
} }
} }
......
...@@ -66,7 +66,7 @@ wxService.page({ ...@@ -66,7 +66,7 @@ wxService.page({
this.setData({ this.setData({
showCardModal: true, showCardModal: true,
cardTitle: this.data.contentInfo.headline, cardTitle: this.data.contentInfo.headline,
cardUrl: this.data.contentInfo.url, cardUrl: this.data.contentInfo.sspList[0].url,
pagePath:path pagePath:path
}); });
} }
...@@ -206,7 +206,8 @@ wxService.page({ ...@@ -206,7 +206,8 @@ wxService.page({
var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId; var path = 'pages/wantToBuyDetail/wantToBuyDetail?i=' + id + '&t=' + tentacleId;
console.log(path) console.log(path)
return { return {
path: path path: path,
imageUrl: this.data.contentInfo.sspList[0].url
} }
} }
...@@ -214,7 +215,7 @@ wxService.page({ ...@@ -214,7 +215,7 @@ wxService.page({
title: this.data.contentInfo.headline, title: this.data.contentInfo.headline,
id: this.data.contentInfo.id, id: this.data.contentInfo.id,
article: this.data.contentInfo.article, article: this.data.contentInfo.article,
url: this.data.contentInfo.url url: this.data.contentInfo.sspList[0].url
} }
let tentacleInfo = { let tentacleInfo = {
content: JSON.stringify(content), content: JSON.stringify(content),
......
...@@ -99,10 +99,11 @@ wxService.page({ ...@@ -99,10 +99,11 @@ wxService.page({
} }
wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => { wxService.post(`/marketing/quickMark/getAppQrCodePicture`, data).then(res => {
const { result, data } = res.data const { result, data } = res.data
console.log(app.globalData.imageUrl + data)
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" // codeImg: "https://hwimagecdn.ihotwind.cn/usr/201908/miniQrCode-f00c5051fef7479395efb193431762c4.jpg"
},()=>{ },()=>{
this.setData({ this.setData({
template: new Card().palette(this.data.posterImgData[0], this.data.codeImg, member.memberWeixin.nickname, avatarUrl), template: new Card().palette(this.data.posterImgData[0], this.data.codeImg, member.memberWeixin.nickname, avatarUrl),
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
bindtap="switchPoster" bindtap="switchPoster"
> >
<image class="poster-img" src="{{navItem}}" ></image> <image class="poster-img" src="{{navItem}}" mode="aspectFit"></image>
<view class="select-plus" wx:if="{{idx == currentTab}}"> <view class="select-plus" wx:if="{{idx == currentTab}}">
<view class="circle-radio theme-color"> <view class="circle-radio theme-color">
<image class="tick-success" src="/assets/imgs/7_1_0/tick-success.png" mode="widthFix"></image> <image class="tick-success" src="/assets/imgs/7_1_0/tick-success.png" mode="widthFix"></image>
......
...@@ -100,6 +100,7 @@ swiper-item{ ...@@ -100,6 +100,7 @@ swiper-item{
} }
.poster-img{ .poster-img{
width: 100%; width: 100%;
height: 215rpx;
} }
.select-plus{ .select-plus{
position: absolute; position: absolute;
......
...@@ -566,7 +566,9 @@ class WXService extends Http { ...@@ -566,7 +566,9 @@ class WXService extends Http {
_self.initAppGlobalDataSync() _self.initAppGlobalDataSync()
//修改参数 //修改参数
let pageIsFromShare = false, tentacleId = null; let pageIsFromShare = false, tentacleId = null;
console.log('args', args)
args.forEach(item => { args.forEach(item => {
console.log('item===',item)
if (item['t']) { if (item['t']) {
pageIsFromShare = true; pageIsFromShare = true;
tentacleId = Integer.digit(item['t'], 64, 10); tentacleId = Integer.digit(item['t'], 64, 10);
...@@ -584,6 +586,7 @@ class WXService extends Http { ...@@ -584,6 +586,7 @@ class WXService extends Http {
config.onLoad && config.onLoad.apply(page, args); config.onLoad && config.onLoad.apply(page, args);
}, },
onShow: function (...args) { onShow: function (...args) {
console.log('________',args)
const page = this const page = this
_self.currentPage = page _self.currentPage = page
config.onShow && config.onShow.apply(page, args) config.onShow && config.onShow.apply(page, args)
......
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