Commit 5c717289 by 柳士祥

日志添加,文章详情原生化,分享到朋友圈和好友功能添加

parent a09e1405
import { requestPOST } from "@/utils/request.js";
export default {
// 获取文章详情
getArticleInfo(params) {
return requestPOST(`${process.env.OLSHOP_URL}/article/getArticleInfo/${params}`, {});
},
//POST /article/saveReview 文章评论
saveReview(data) {
return requestPOST(`${process.env.OLSHOP_URL}/article/saveReview`, { data });
},
//POST 文章点赞/取消点赞
addLike(data) {
return requestPOST(`${process.env.OLSHOP_URL}/article/fabulous`, { data });
},
//POST 查询评论列表分页
getReviews(data) {
return requestPOST(`${process.env.OLSHOP_URL}/article/getReviews`, { data });
},
}
\ No newline at end of file
......@@ -14,17 +14,6 @@
"pages/tabBar4/main",
"pages/changeAdr/main",
"pages/downFile/main",
"pages/wo/writeInformation/main",
"pages/wo/improveInformation/main",
"pages/wo/editPicture/main",
"pages/wo/showPassCheck/main",
"pages/wo/workRegion/main",
"pages/wo/checkHistory/main",
"pages/wo/diningPlace/main",
"pages/wo/reportTheLoss/main",
"pages/wo/verification/main",
"pages/wo/vehicleApplication/main",
"pages/wo/fillInformation/main",
"pages/wxArticle/main"
],
"usingComponents": {},
......
......@@ -31,6 +31,8 @@
<script>
import { getUserLocation } from "../../utils/wxIndex.js";
import { getWxContact } from "@/api/wxContact.js";
const app = getApp();
const { log } = app;
export default {
data() {
......@@ -45,7 +47,7 @@ export default {
options.longitude = res.longitude;
options.latitude = res.latitude;
this.sessionFrom = JSON.stringify(options);
console.log('sessionFrom', this.sessionFrom)
log.info('sessionFrom', this.sessionFrom)
});
},
onShow() {
......@@ -63,7 +65,7 @@ export default {
},
methods: {
myOpeChat() {
console.log('okokok', this.result.whetherOpenCustomerUrl, this.result.whetherOpenCustomerSuiteId);
log.info('okokok', this.result.whetherOpenCustomerUrl, this.result.whetherOpenCustomerSuiteId);
if (this.result.whetherOpenCustomerService == 0) {
wx.showModal({
title: '提示',
......@@ -73,18 +75,27 @@ export default {
if (wx.openCustomerServiceChat) {
wx.openCustomerServiceChat({
extInfo: {
// url: this.result.whetherOpenCustomerUrl.replace(/\s*/g,"").toString()
url: this.result.whetherOpenCustomerUrl
},
// corpId: this.result.whetherOpenCustomerSuiteId.replace(/\s*/g,"").toString(),
corpId: this.result.whetherOpenCustomerSuiteId,
success(res) {
console.log(res);
log.info(res);
},
fail(res) {
console.log(res);
wx.showModal({
title: '提示',
content: '系统繁忙,请稍后重试'
})
log.info(res);
if (res.errCode == 6 && res.errMsg == 'openCustomerServiceChat:fail not bind') {
wx.showModal({
title: '提示',
content: '您未在小程序管理后台的「功能-客服-微信客服」处,绑定对应的企业ID'
})
} else {
wx.showModal({
title: '提示',
content: '系统繁忙,请稍后重试'
})
}
}
})
} else {
......
......@@ -158,7 +158,7 @@ import indexApi from "@/api/index.js";
import { throttle, concatUrl } from "../../utils/index.js"
import mpvueCropper from '@/components/mpvue-cropper'
const app = getApp();
const { log } = app;
export default {
data() {
return {
......@@ -226,7 +226,7 @@ export default {
path: "/pages/home/main",
imageUrl:logoUrl,
success: function(res) {
console.log("成功", res);
log.info("成功", res);
}
});
}
......@@ -242,7 +242,7 @@ export default {
// path: "page/home/main",
// imageUrl:shareVal.imageUrl,
// success: function(res) {
// console.log("成功", res);
// log.info("成功", res);
// }
// };
},
......@@ -267,18 +267,18 @@ export default {
wx.getStorage({
key: 'sessionid',
success: res => {
console.log('tz登录', res);
log.info('tz登录', res);
this.getBirthGift(this)
},
fail: err => {
this.isShowBirth = false
console.log('tz未登录', err, this.isShowBirth);
console.log('未登录状态=====================', err)
log.info('tz未登录', err, this.isShowBirth);
log.info('未登录状态=====================', err)
}
})
},
onLoad(options) {
console.log('--------on--------------load')
log.info('--------on--------------load')
//进页面存储需要绑定的信息
if(options.userId||options.spokesmanRelId) {
wx.setStorage({
......@@ -334,7 +334,7 @@ export default {
this.changeLocation = options.changeLocation || ''
if(this.changeLocation == 1){
console.log('this.$store.state.extConfig',this.$store.state.extConfig)
log.info('this.$store.state.extConfig',this.$store.state.extConfig)
app.getShopInfo(this.$store.state.extConfig);
app.getThemePage(this.$store.state.extConfig);
}
......@@ -379,7 +379,7 @@ export default {
},
onShow() {
// 设置显示条件
console.log('--------on--------------show')
log.info('--------on--------------show')
//分销隔流
if(this.toHomePage) {
let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?from=_goodsInfo'
......@@ -414,7 +414,7 @@ export default {
// }
// 设置visible
pageInfo.pageData = this.updateCondition(pageData, ids);
console.log(showConditionIds, "--------------5454", ids, pageInfo);
log.info(showConditionIds, "--------------5454", ids, pageInfo);
cb(pageInfo)
},
checkCondition({ allCondition }) {
......@@ -424,13 +424,13 @@ export default {
shop
.checkShowCondition(params)
.then((res) => {
console.log(params, "check显示条件", res.data);
log.info(params, "check显示条件", res.data);
if (res.data.code == 200) {
resolve(res.data);
}
})
.catch((err) => {
console.log("check显示条件失败", err);
log.info("check显示条件失败", err);
});
});
},
......@@ -446,11 +446,11 @@ export default {
// 如果等于3(仅登录隐藏)且登录时不展示 visible重新赋值1
// 如果等于3且未登录展示
if(data.visible>1){
console.log(data,wx.getStorageSync('sessionid'),'------491')
log.info(data,wx.getStorageSync('sessionid'),'------491')
}
if (data.visible && data.visible > 1 && data.visibleCopy == undefined) {
data.visibleCopy = data.visible;
console.log(data.visibleCopy,'--data.visibleCopy')
log.info(data.visibleCopy,'--data.visibleCopy')
}
if ((data.visibleCopy == 2 && wx.getStorageSync('sessionid')) ||
(data.visibleCopy == 3 && !wx.getStorageSync('sessionid'))
......@@ -488,7 +488,7 @@ export default {
element.visible = 0;
} else {
if (element.condition != "" && element.condition != undefined) {
console.log("979797", element.condition);
log.info("979797", element.condition);
element.visible = ids.some((item) => {
return item == element.condition;
})
......@@ -519,18 +519,18 @@ export default {
this.pageInfo = res;
this.pageData = JSON.parse(this.pageInfo.pageData);
});
console.log("36----------------------559", this.pageData,this.pageInfo.pageSettingData);
log.info("36----------------------559", this.pageData,this.pageInfo.pageSettingData);
console.log(app.globalData.shopInfo,'app')
log.info(app.globalData.shopInfo,'app')
wx.setNavigationBarTitle({title : app.globalData.shopInfo.shopName})
if(wx.getStorageSync("sessionid")) {
//清空门店id
wx.setStorageSync(this.$store.state.mixid+'storeId','')
wx.setStorageSync(this.$store.state.mixid+'sellerId','')
console.log(111222,app.fenxiaoModel)
log.info(111222,app.fenxiaoModel)
app.fenxiaoModel.query_isEntry().then((data)=>{
//分销弹框信息
console.log(data,3333444)
log.info(data,3333444)
if (
data.applyRemind == "true" &&
data.displayEntry == "true"
......@@ -561,7 +561,7 @@ export default {
})
}else {
let footerVal = {...app.globalData.footerVal};
console.log('"分销员中心"',footerVal)
log.info('"分销员中心"',footerVal)
if (footerVal.componentData) {
footerVal.componentData.list.forEach(res=>{
if(res.link.name=="分销员中心"||res.link.name=="分销商中心") {
......@@ -621,7 +621,7 @@ export default {
}else {
this.showSpokesManHome = false;
}
console.log(res,555666)
log.info(res,555666)
if(res&&res.distributionModel == '1') {
this.showHomepage = true;
}else{
......@@ -673,10 +673,10 @@ export default {
return;
}
this.$mp.page.selectComponent(".custom-tab-bar").setData({'showFlag':delta>0?'down':'up'})
console.log('---------383')
log.info('---------383')
},
scrolltolower(){
console.log("scrolltolower")
log.info("scrolltolower")
},
getCartNum() {
app.cartApi.my_cart_count().then(res => {
......@@ -688,7 +688,7 @@ export default {
newUserFun(){
promote.query_org_new_customer_gift().then(res=>{
if (res.data.code == 200 && res.data.data) {
console.log(res.data.data,'----------------------------res.data')
log.info(res.data.data,'----------------------------res.data')
this.newGiftList = [];
res.data.data.coupons.forEach((item) => {
if (item.couponQty >= 1) {
......@@ -714,7 +714,7 @@ export default {
// 判断是否是新客
let isNewUser = false;
res.data.data.tagNames.forEach(function (item) {
console.log(item.tagName + "999999");
log.info(item.tagName + "999999");
if (item.tagName == "新客") {
isNewUser = true;
}
......@@ -729,27 +729,27 @@ export default {
isNewUser == true
) {
this.showgiftBag = true; //弹框展示
console.log(this.showgiftBag,'showgiftBag-----------1')
log.info(this.showgiftBag,'showgiftBag-----------1')
this.showNewUser = false; //入口隐藏
this.getUserreceiveGift(); //定时查我领取的新客礼包
} else {
// 不是新用户,
this.showNewUser = false; //入口关闭
this.showgiftBag = false; //弹框不显示
console.log(this.showgiftBag,'showgiftBag-----------2')
log.info(this.showgiftBag,'showgiftBag-----------2')
}
} else {
// 未领取过的,判断是不是新用户
if (isNewUser == true) {
// 是新用户的,弹弹框提示,
this.showgiftBag = true;
console.log(this.showgiftBag,'showgiftBag-----------3')
log.info(this.showgiftBag,'showgiftBag-----------3')
this.getUserreceiveGift();
} else {
// 不是新用户,
this.showNewUser = false; //入口关闭
this.showgiftBag = false; //弹框不显示
console.log(this.showgiftBag,'showgiftBag-----------4')
log.info(this.showgiftBag,'showgiftBag-----------4')
}
}
}
......@@ -772,7 +772,7 @@ export default {
if (res.data.code == 200) {
// data为null就是没有查询到我领取的优惠券,就再调一次领取优惠券接口手动领取下
if (res.data.data == null) {
console.log("没领到");
log.info("没领到");
} else {
clearInterval(this.timer);
}
......@@ -796,7 +796,7 @@ export default {
// 关闭弹框之后调取消接口就隐藏,不展示
if (wx.getStorageSync("sessionid")) {
index.cancelNewCustome(this.newCustomerGiftActivityId).then((res) => {
// console.log(res,'ooooooooo123');
// log.info(res,'ooooooooo123');
if (res.data.code == 200) {
// 接口调成功之后,就关闭弹框
this.showgiftBag = false;
......@@ -820,7 +820,7 @@ export default {
key: "openid"
});
}
console.log(JSON.stringify(result), that, 'tztztz初始化')
log.info(JSON.stringify(result), that, 'tztztz初始化')
if (result.data.gifts !== null && result.data.gifts.length > 0) {
// 判断礼物是否领取完成
let showPopup = false;
......@@ -842,12 +842,12 @@ export default {
},
toggleData(res) {
this.isShowBirth = true;
console.log(this.isShowBirth, JSON.stringify(res) + 'tzToggleData')
log.info(this.isShowBirth, JSON.stringify(res) + 'tzToggleData')
this.birthGifts = res;
}
},
async onShareAppMessage(res){
console.log(res)
log.info(res)
let newHref = '/pages/home/main';
let title = app.globalData.shopInfo.shopName;
let hasInvitationStatus = 0;
......@@ -882,7 +882,7 @@ export default {
if(this.pageInfo.pageSettingData&&JSON.parse(this.pageInfo.pageSettingData).shareImg) {
imageUrl = JSON.parse(this.pageInfo.pageSettingData).shareImg
}
console.log(newHref,3333555666,title,res)
log.info(newHref,3333555666,title,res)
return {
title: title, // 默认是小程序的名称
path: newHref, // 默认是当前页面
......@@ -890,14 +890,14 @@ export default {
success: function(res) {
// 转发成功之后的回调
if (res.errMsg == "shareAppMessage:ok") {
console.log(res, "分享成功");
log.info(res, "分享成功");
}
},
fail: function() {
// 转发失败之后的回调
if (res.errMsg == "shareAppMessage:fail cancel") {
// 用户取消转发
console.log(res, "分享失败");
log.info(res, "分享失败");
} else if (res.errMsg == "shareAppMessage:fail") {
// 转发失败,其中 detail message 为详细失败信息
}
......@@ -908,13 +908,13 @@ export default {
};
},
onShareTimeline(res) {
console.log(res,'-----onShareTimeline')
log.info(res,'-----onShareTimeline')
},
onPullDownRefresh(){
setTimeout(() => {
wx.stopPullDownRefresh();
}, 1500);
console.log('onPullDownRefresh',this.$store.state.extConfig)
log.info('onPullDownRefresh',this.$store.state.extConfig)
app.getShopInfo(this.$store.state.extConfig);
app.getThemePage(this.$store.state.extConfig);
......
<template>
<div class="article_container">
<div class="richText">
<div class="title" v-if="article.title">{{article.title}}</div>
<div class="title_info">
<div class="title_user">{{article.author}}</div>
<div class="title_time">{{article.createDatetime}}</div>
</div>
<div v-html="article.content" v-if="!article.msg"></div>
<div class="title" style="min-height: 50vh;color: #999;align-items: center;display: flex;justify-content: center;" v-else>{{article.msg}}</div>
</div>
<div style="width:100%;height:10px;background-color:#EEF2F5;"></div>
<ul>
<div class="all">全部评论</div>
<div v-if="list.length == 0" style="text-align: center;color: #969799;font-size:12px">暂无评论</div>
<li id="pingLun" style="opacity:0;height: 0px;position:absolute;top:-130px;left:0;"></li>
<li class="van-hairline--bottom" v-for="(item,index) in list" :key="index">
<div class="left">
<img :src="(item.userImageUrl || item.handImage) | DFSImg(400,400)" alt="">
</div>
<div class="middle">
<div style="color:#666666;">{{item.reviewName}}</div>
<div class="time">{{getTime(item.updateDatetime)}}</div>
<div class="show_info">{{item.content}}</div>
</div>
</li>
</ul>
<div class="bottom van-hairline--top">
<input confirm-type="search" placeholder="说两句吧" v-model="commentContent" @confirm="commentsSubmit">
<div class="icon_box">
<div class="share" @click="toBottom">
<div class="num">
{{total}}
</div>
<img src="https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/product/2EWPQRMQwm.png?x-oss-process=image/resize,m_pad,limit_0,w_400,h_400" alt="">
</div>
<div class="share" @click="thumbsUp">
<img src="https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/product/i3HttTMh6f.png?x-oss-process=image/resize,m_pad,limit_0,w_400,h_400" alt="" v-if="!isThumbsUp">
<img src="https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/product/MkRsXX3QsM.png?x-oss-process=image/resize,m_pad,limit_0,w_400,h_400" alt="" v-else>
</div>
<div class="share" @click="poupShow">
<img src="https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/product/wBYDz3CZkM.png?x-oss-process=image/resize,m_pad,limit_0,w_400,h_400" alt="">
</div>
</div>
</div>
<shade-guide ref="shadeGuide" />
</div>
</template>
<script>
import article from '@/api/article'
import shadeGuide from "./shadeGuide.vue";
const app = getApp();
const { log } = app;
export default {
data() {
return {
article: null,
commentContent: '',
articleId: null,
isThumbsUp: false,
loading: false,
finished: false,
list: [],
total: 0,
query: {
pageNum: 0,
pageSize: 20,
}
}
},
components: {
"shade-guide": shadeGuide,
},
created() {
},
onReady() {
},
onLoad(option) {
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
})
this.articleId = option.article_id
this.query['articleId'] = this.articleId
this.init()
},
onShareAppMessage() {
return {
title: '',
path: `/pages/article/main?article_id=${this.articleId}`
}
},
onShareTimeline() {
return {
title: '',
query: {
article_id: this.articleId
},
imageUrl: '',
createDatetime: ''
}
},
methods: {
init() {
log.info('qq');
article.getArticleInfo(this.articleId).then(res => {
if (res.data.data) {
let article = res.data.data
let content = res.data.data.content.replace("<body>", "").replace("</body>", "")
article.content = content
this.article = article
// this.createDatetime = article.createDatetime != '' ? article.createDatetime.slice(0,-3):''
// log.info(this.createDatetime,'article.createDatetime');
if (article.fabulousFlag == 'true') {
this.isThumbsUp = true;
}
if (article.title && article.title.length) {
wx.setNavigationBarTitle({
title: article.title
})
}
}
});
},
poupShow() {
this.$refs.shadeGuide.open();
},
// 文章评论
commentsSubmit(e) {
log.info('submit');
if (this.articleId == null) return
if (this.commentContent.trim().length == 0) {
wx.showToast({
title: '请输入要评论的内容',
icon: 'none',
duration: 1000,
});
return
}
let query = {
articleId: this.articleId,
content: this.commentContent
}
log.info(query);
article.saveReview(query).then(res => {
if (res.data.code == '200') {
this.commentContent = '';
wx.showToast({
title: '评论成功,正在审核',
icon: 'none',
duration: 1000,
});
} else {
wx.showToast({
title: res.data.msg,
icon: 'none',
duration: 1000,
});
}
})
},
//点赞
thumbsUp() {
// this.$refs.shadeGuide.open();
let query = {
articleId: this.articleId,
fabulousType: !this.isThumbsUp ? 1 : 2
}
// if(!this.isThumbsUp){
article.addLike(query).then(res => {
if (res.data.code == "200") {
this.isThumbsUp = !this.isThumbsUp;
} else {
wx.showToast({
title: res.data.msg,
icon: 'none',
duration: 1000,
});
}
})
// }else {
// article.cancelLike(query).then(res=>{
// if(res.code=="200"){
// this.isThumbsUp = !this.isThumbsUp;
// }else {
// Toast(res.msg)
// }
// })
// }
},
// 获取评论
getComments() {
this.query.pageNum += 1;
article.getReviews(this.query).then(res => {
this.loading = false;
if (res.data.code == '200') {
res.data.data.forEach(ele => {
this.list.push(ele)
})
this.total = res.data.total;
if (res.data.data.length < 20) {
this.finished = true
}
} else {
this.finished = true;
}
log.info(res, 777777777)
})
},
getTime(time) {
time = time.replace(/-/g, "/");
log.info(time, 888888888)
let timestamp = (Date.parse(new Date()) - Date.parse(new Date(time))) / 1000;
if (timestamp < 60) {
return '刚刚'
} else if (timestamp < 3600) {
return parseInt(timestamp / 60) + '分钟前'
} else if (timestamp < 3600 * 12) {
return parseInt(parseInt(timestamp / 60) / 60) + '小时前'
} else if (new Date().getFullYear() == new Date(time).getFullYear()) {
return time.slice(5).replace(/\//g, "-")
} else if (new Date().getFullYear() > new Date(time).getFullYear()) {
return time.replace(/\//g, "-")
}
},
// 划到最底部
toBottom() {
wx.createSelectorQuery().select('.article_container').boundingClientRect(function (rect) {
// 使页面滚动到底部
log.info(rect.height, 'rect.height');
wx.pageScrollTo({
scrollTop: rect.height
})
}).exec()
},
}
}
</script>
<style lang="scss" scoped>
.article_container {
position: relative;
}
.richText {
width: 100%;
height: auto;
padding: 0 10px;
padding-bottom: 100px;
box-sizing: border-box;
}
.title {
font-size: 24px;
color: #333;
width: 100%;
padding: 12px 0;
text-align: left;
}
.title_info {
display: flex;
justify-content: center;
padding: 0 12px;
font-size: 13px;
}
.title_user {
width: 100%;
color: #999;
}
.title_time {
width: 100%;
padding-right: 13px;
text-align: right;
color: #999;
}
.bottom {
width: 100%;
height: 49px;
position: fixed;
background-color: #fff;
bottom: 0;
left: 0;
z-index: 10;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 12px;
padding-right: 22px;
box-sizing: border-box;
}
input {
border: none;
width: 150px;
height: 20px;
line-height: 20px;
background-color: #eeeeed;
border-radius: 16px;
padding: 5px 13px;
font-size: 16px;
}
.icon_box {
flex-grow: 1;
display: flex;
padding-left: 9px;
align-items: center;
justify-content: space-between;
}
.share,
.zan {
width: 26px;
height: 26px;
display: flex;
align-items: center;
position: relative;
}
.num {
position: absolute;
top: -9px;
left: calc(100% - 9px);
border-radius: 10px;
min-width: 18px;
height: 18px;
background-color: #ff4848;
color: #fff;
text-align: center;
line-height: 18px;
padding: 0 6px;
/* transform: translateX(100%); */
}
img {
max-width: 100%;
height: 100%;
/* margin-right: 30px; */
}
ul {
width: 100%;
// padding-bottom: 22px;
position: relative;
padding: 0 10px;
margin-bottom: 100px;
box-sizing: border-box;
li {
width: 100%;
padding-right: 7px;
display: flex;
padding: 0 12px;
margin-bottom: 10px;
padding-bottom: 12px;
.left {
width: 36px;
height: 36px;
height: 100%;
margin-right: 14px;
border-radius: 20px;
overflow: hidden;
img {
width: 100%;
// height: 36px;
}
}
.middle {
width: 100%;
font-size: 13px;
.show_info {
font-size: 14px;
color: #333333;
}
.time {
padding: 5px 0 8px;
color: #666666;
}
}
}
.all {
width: 100%;
font-size: 14px;
color: #333;
padding: 10px 12px 12px;
}
}
</style>
\ No newline at end of file
import Vue from 'vue'
import App from './index'
const app = new Vue(App)
app.$mount()
\ No newline at end of file
{
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "文章详情",
"navigationBarTextStyle": "black",
"usingComponents": {
}
}
\ No newline at end of file
// 遮罩层提示
// 用于微信右上角分享提示
<template>
<div>
<div class="showGuide" v-show="showGuide" @click="showGuide=false">
<div class="info">{{message}}</div>
</div>
<div class="newShowGuide" v-show="newShowGuide" @click="newShowGuide=false">
<div class="showImg">
<img src="https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/product/Eijyd34FmA.png?x-oss-process=image/resize,m_pad,limit_0,w_400,h_400" alt="">
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
showGuide: false,
message: "请点击右上角【···】分享给好友",
newShowGuide:false,
};
},
methods: {
open(message) {
if(message){
this.message = message;
this.showGuide = true;
}else{
this.newShowGuide = true
}
}
}
};
</script>
<style lang="scss" scoped>
.showGuide,.newShowGuide {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.8);
z-index: 9999;
.info {
font-size: 20px;
color: #fff;
font-weight: bold;
width: 50%;
text-align: center;
line-height: 30px;
margin: 0 auto;
margin-top: 30px;
}
.showImg{
margin: 11px 0 0 26px;
img{
width: 281px;
height: 188px;
}
}
}
</style>
\ No newline at end of file
!function i(o, a, r) { function l(t, e) { if (!a[t]) { if (!o[t]) { var n = "function" == typeof require && require; if (!e && n) return n(t, !0); if (s) return s(t, !0); throw (n = new Error("Cannot find module '" + t + "'")).code = "MODULE_NOT_FOUND", n } n = a[t] = { exports: {} }, o[t][0].call(n.exports, function (e) { return l(o[t][1][e] || e) }, n, n.exports, i, o, a, r) } return a[t].exports } for (var s = "function" == typeof require && require, e = 0; e < r.length; e++)l(r[e]); return l }({ 1: [function (e, t, n) { var i, o, t = t.exports = {}; function a() { throw new Error("setTimeout has not been defined") } function r() { throw new Error("clearTimeout has not been defined") } function l(t) { if (i === setTimeout) return setTimeout(t, 0); if ((i === a || !i) && setTimeout) return i = setTimeout, setTimeout(t, 0); try { return i(t, 0) } catch (e) { try { return i.call(null, t, 0) } catch (e) { return i.call(this, t, 0) } } } !function () { try { i = "function" == typeof setTimeout ? setTimeout : a } catch (e) { i = a } try { o = "function" == typeof clearTimeout ? clearTimeout : r } catch (e) { o = r } }(); var s, u = [], c = !1, p = -1; function g() { c && s && (c = !1, s.length ? u = s.concat(u) : p = -1, u.length && d()) } function d() { if (!c) { var e = l(g); c = !0; for (var t = u.length; t;) { for (s = u, u = []; ++p < t;)s && s[p].run(); p = -1, t = u.length } s = null, c = !1, function (t) { if (o === clearTimeout) return clearTimeout(t); if ((o === r || !o) && clearTimeout) return o = clearTimeout, clearTimeout(t); try { o(t) } catch (e) { try { return o.call(null, t) } catch (e) { return o.call(this, t) } } }(e) } } function m(e, t) { this.fun = e, this.array = t } function h() { } t.nextTick = function (e) { var t = new Array(arguments.length - 1); if (1 < arguments.length) for (var n = 1; n < arguments.length; n++)t[n - 1] = arguments[n]; u.push(new m(e, t)), 1 !== u.length || c || l(d) }, m.prototype.run = function () { this.fun.apply(null, this.array) }, t.title = "browser", t.browser = !0, t.env = {}, t.argv = [], t.version = "", t.versions = {}, t.on = h, t.addListener = h, t.once = h, t.off = h, t.removeListener = h, t.removeAllListeners = h, t.emit = h, t.prependListener = h, t.prependOnceListener = h, t.listeners = function (e) { return [] }, t.binding = function (e) { throw new Error("process.binding is not supported") }, t.cwd = function () { return "/" }, t.chdir = function (e) { throw new Error("process.chdir is not supported") }, t.umask = function () { return 0 } }, {}], 2: [function (e, t, a) { !function (o, t) { !function () { "use strict"; Object.defineProperty(a, "__esModule", { value: !0 }), a.hylBannerLink = i, a.hylToLink = s; var r = void 0, m = void 0, h = void 0, f = void 0, v = void 0, l = void 0, k = "", n = null; function i(e) { var t, n, i, o, a, r, l, s, u, c, p, g, d; k = $nuxt.$store, console.log("hylBannerLink", e), 3 != e.type ? 1.1 == e.type && (1 == k.state.miniProgram || 2 == k.state.miniProgram ? -1 < e.link.indexOf("pages/hiberDrawEntity/hiberDrawEntity") ? (t = e.link.split("?"))[1] && t[1].split("=")[1] && (l = JSON.parse(decodeURIComponent(t[1].split("=")[1])), u = (s = l).id, c = l.type, p = l.isOpenDraw, g = v.formatDate.format(new Date), d = (d = l.validTimeEnd).split(".").join("-"), 2 == l.validTimeEnd.split(" ").length || (g = g.split(" ")[0]), g = (g = new Date(d.replace(/-/g, "/")).getTime() - new Date(g.replace(/-/g, "/")).getTime()) / 1e3, 2 == p ? 0 <= g ? (1 == c && $mp.miniProgram.navigateTo({ url: "/pages/draw/drawDetails/drawDetails?id=" + u }), 2 == c && $mp.miniProgram.navigateTo({ url: "/pages/draw/drawDetails/drawDetails?id=" + u }), 3 == c && $mp.miniProgram.navigateTo({ url: "/pages/draw/turntable/turntable?id=" + u })) : 2 == c && null != s.drawRecordEntity ? $mp.miniProgram.navigateTo({ url: "/pages/draw/drawDetails/drawDetails?perdraw=33&id=" + u }) : 2 == c && null == s.drawRecordEntity ? $mp.miniProgram.navigateTo({ url: "/pages/draw/drawDetails/drawDetails?id=" + u }) : m.alert({ title: "标题", message: "抽奖已结束" }).then(function () { }) : 1 == c ? null == s.drawRecordEntity ? $mp.miniProgram.navigateTo({ url: "/pages/draw/drawDetails/drawDetails?id=" + u }) : $mp.miniProgram.navigateTo({ url: "/pages/draw/openDraw/openDraw?id=" + u }) : 2 == c ? null != s.drawRecordEntity ? $mp.miniProgram.navigateTo({ url: "/pages/draw/openDraw/openDraw?id=" + u }) : $mp.miniProgram.navigateTo({ url: "/pages/draw/drawDetails/drawDetails?id=" + u }) : null == s.drawRecordEntity ? m.alert({ title: "标题", message: "抽奖已结束" }).then(function () { }) : $mp.miniProgram.navigateTo({ url: "/pages/draw/openDraw/openDraw?id=" + u })) : -1 < e.link.indexOf("type") ? (t = e.link.split("?"), "[object Array]" == Object.prototype.toString.call(t) && t.length && (r = t[1].split("&"), n = {}, r.forEach(function (e) { e.split("="), n[e.split("=")[0]] = e.split("=")[1] }), console.log(n), i = n.id, o = n.jumpScore, a = n.type, k.state.sessionId ? f.getConsumerScoreFlag({ outId: k.state.userInfo.mixId, advertisementId: i }).then(function (e) { 0 == e.code && (1 == e.object ? (o && 0 < o && f.changeScore({ outId: k.state.userInfo.mixId, advertisementId: i }).then(function (e) { e.object && $mp.miniProgram.navigateTo({ url: "/pages/advertisement/advertisement?type=" + a + "&id=" + i }) }), o && o < 0 && y.showModal({ title: "提示", content: "跳转扣除" + Math.abs(o) + "积分", success: function (e) { e.confirm ? f.changeScore({ outId: k.state.userInfo.mixId, advertisementId: i }).then(function (e) { e.object && $mp.miniProgram.navigateTo({ url: "/pages/advertisement/advertisement?type=" + a + "&id=" + i }) }) : e.cancel && console.log("用户点击取消") } }), o || $mp.miniProgram.navigateTo({ url: "/pages/advertisement/advertisement?type=" + a + "&id=" + i })) : $mp.miniProgram.navigateTo({ url: "/pages/advertisement/advertisement?type=" + a + "&id=" + i })) }) : $mp.miniProgram.navigateTo({ url: "/pages/login/login" }))) : ((e.link.includes("pages/draw/draw/draw") || e.link.includes("pages/question/question") || e.link.includes("pages/live/live")) && (r = w($nuxt.$route.query.mixid + "_location") && JSON.parse(w($nuxt.$route.query.mixid + "_location")).outId, console.log(r, "跳转id"), r && (e.link.includes("?") ? e.link = e.link + "&addressId=" + r : e.link = e.link + "?addressId=" + r)), $mp.miniProgram.navigateTo({ url: e.link })) : h("暂不支持")) : 1 == k.state.miniProgram || 2 == k.state.miniProgram ? $mp.miniProgram.navigateTo({ url: "/pages/toMini/toMini?weappPage=" + encodeURIComponent(e.link) + "&weappAppId=" + e.name }) : h("暂不支持") } function s(e) { if (e = e.data, console.log("----工具中hyl"), n = e.type, (k = $nuxt.$store).getters["sceneModule/flushbonadingVisible"]) if (null != n && "undefined" != n) { if (0 != n) if (1 == n) "/" == e.link.substring(0, 1) ? $nuxt.$router.push(e.link) : !e.link.startsWith("http") && !e.link.startsWith("https") || 1 != k.state.miniProgram && 2 != k.state.miniProgram ? window.location.href = e.link : $mp.miniProgram.navigateTo({ url: "/pages/wxArticle/main?link=" + encodeURIComponent(e.link) }); else if (2 == n) { var t = e.feature.type; "themeCouponClick" == t || 0 == t ? this.$themeCouponClick(e.feature.value.couponCode, e.feature.value) : 1 == t ? (console.log("是分享了。。。。"), 2 == e.type && 1 == e.feature.type && $nuxt.$SHARE({ itemList: e.feature.value })) : "themeMemberCardClick" != t && 2 != t || this.$themeMemberCardClick(e.feature.value) } else if (1.1 == n || 3 == n) i(e); else if (1.2 == n) { if ("outerChain:businessCenter" == e.link) return console.log(l.GUIDE_URL, "-----shopConfig.GUIDE_URL"), t = l.GUIDE_URL + "/login?mixid=" + $nuxt.$route.query.mixid + "&back=" + encodeURIComponent(window.location.href), void (window.location.href = t); "/" == e.link.substring(0, 1) ? $nuxt.$router.push(e.link) : 1 == k.state.miniProgram || 2 == k.state.miniProgram ? $mp.miniProgram.navigateTo({ url: "/pages/wxArticle/main?link=" + encodeURIComponent(e.link) }) : window.location.href = e.link } else 0 < e.length && $nuxt.$router.push(e.link) } else 0 < e.length && $nuxt.$router.push(e) } function w(e) { if (o.browser && "undefined" != typeof document) for (var t = document.cookie.split(";"), n = 0; n < t.length; n++) { var i = t[n].split("="); if (i[0].trim() == e) return decodeURIComponent(i[1]) } } Object.defineProperty(a, "__esModule", { value: !0 }), a.themeToLinkInit = e, a.$themeToLink = R; var u = null, c = null, p = null, r = void 0, g = void 0, l = void 0, h = void 0, s = void 0, d = void 0, y = void 0, C = void 0; function T(e, t) { t = 1 < arguments.length && void 0 !== t ? t : ""; return "../index/main?from=themeLink&backpath=" + encodeURIComponent(e) + "&params=" + encodeURIComponent(t) } function P() { return 1 == u ? this.$store && this.$store.state.sessionId && this.$store.state.sessionId : 2 == u ? y && y.getStorageSync("sessionid") : void 0 } function $() { return 1 == u && this.$store && this.$store.state.miniProgram } function b() { return 1 == u ? l.GUIDE_URL : 2 == u ? config.GUIDE_URL : void 0 } function I(e) { return e.link.split("?")[0] } function x(e) { var e = e.link.split("?"), n = []; return e.forEach(function (e, t) { 1 <= t && n.push(e) }), n.join("?") || "" } function D(t) { var e = getApp(); return e.globalData.footerVal ? e.globalData.footerVal.componentData.list.findIndex(function (e) { return I(e.link) == t.split("?")[0] }) : -1 } var L = ["index", "media-video", "goods-goodsInfo", "goods-commodityMenu", "goodsSearch-goodsSearch", "chooseStores", "activty-receivingGift", "activty", "login-register", "login-phoneLogin", "login-authInformation", "login-forgetPassWord", "login-accountLogin", "login-wxRegister", "pay-payList", "comment-evaluateList", "goods-commonProblemList", "article-articlePage", "article-articleList", "goods-posters", "liveBroadcast", "liveBroadcast-list", "personalCenter-coupon-getCoupon", "buyerShow-showDetail", "goods-addGoodsList", "personalCenter-CDkey-exchange", "giftCards-linkReceive", "giftCoupon-preview", "smartForm", "shopCart-shareShopCart", "groupBuying-beInvite", "brandTopics", "personalCenter-spokesmanCenter", "personalCenter-spokesmanCenter-mine-spokesmanHomePage", "liveBroadcast-lived", "personalCenter-spokesmanCenter-mine-getBusinessCard", "changeAdr"].map(function (e) { return "/index" == (e = "/" + e.replace(/-/g, "/")) ? "/" : e }); function e(e) { var t = e.homeNative, n = e.wx, i = e.getCoupon, o = e.themeMemberCardClick, a = e.requireFun, e = e.extend; if (C = e, u = t, d = a, console.log(d, "-------------------------115"), g = d.createdUserJWT, d.getBcakUrl, y = n, console.log(u, "-------------themeToLinkInit"), console.log("toPage-------------"), p = 1 == u ? function (e) { var t = e.pagePath; 1 == (e = void 0 === (e = e.pageType) ? 1 : e) ? this.$router.push(t) : 2 == e ? window.location.href = t : 3 == e && y.navigateTo({ url: t }) } : 2 == u ? function (e) { var t = e.pagePath; 1 == (e = void 0 === (e = e.pageType) ? 1 : e) ? y.navigateTo({ url: t }) : 2 == e && y.reLaunch({ url: t }) } : void 0, 1 == u) try { r = d.Vue, l = d.shopConfig, r.prototype.$themeToLink = R, h = d.Toast, s = d.hylToLink } catch (e) { } else 2 == u && ((c = getApp()).$themeToLink = R, c.getCoupon = i, c.themeMemberCardClick = o) } function U(e) { if (!(e = e.split("?")[1])) return {}; for (var t, n, i = e.split("&"), o = {}, a = 0; a < i.length; a++)t = (n = i[a].split("="))[0], n = n[1], console.log(81, this), o[t] = n; return o } async function R(t) { if (console.log(t, "$themeToLink"), console.log(C, "extend======="), C.loginIntercept && !P.call(this)) { console.log("走进来了"); var e = "/pages/login/main?back=" + I(t) + "&params=" + JSON.stringify(U(t.link)); return p({ pagePath: e }), !1 } if (t.type && t.link && t.link.includes("dynamicForm")) { if (!P.call(this)) { console.log("走进来了--dynamicForm"); var n = "/pages/login/main?back=" + I(t) + "&params=" + JSON.stringify(U(t.link)); return p({ pagePath: n }), !1 } await g().then(function (e) { t.link += "&token=" + e }).catch(function (e) { }) } var i, o, a, r; 1 == u && this.$store.getters["sceneModule/flushbonadingVisible"] ? s.call(this, { data: t, Vue: d.Vue, Dialog: d.Dialog, Toast: d.Toast, hyl: d.hyl, dateFilter: d.dateFilter, shopConfig: d.shopConfig }) : (n = t.type, console.log(t.key, "----------------------key"), (2 == n || 2 != u || t.key && t.key.startsWith("1.9") || function (e) { var t = I(e), n = x(e); if (L.includes(t) || "/goods/" == t.substr(0, 7) || t.includes("/brandTopics") || P.call(this)) return !(0 <= (i = D(t))) || (i = 0 == i ? D("/") : i, t = "/" == t ? "/pages/home/main" : "/pages/tabBar" + i + "/main", (i = getCurrentPages())[i.length - 1].route != t && (p({ pagePath: t + (n ? "?" + n : ""), pageType: 2 }), 0)); var i = "", i = -1 < n.indexOf("scene=sso") ? "/pages/login/main?back=" + t + "&ossLink=" + encodeURIComponent(n) : "/pages/login/main?back=" + t + "&params=" + JSON.stringify(U(e.link)); return console.log(i, "------------------------190"), p({ pagePath: i }), 0 }(t)) && (null != n && "undefined" != n ? 0 == n || (1 == n ? "/" == t.link.substring(0, 1) ? 1 == u ? p.call(this, { pagePath: t.link }) : 2 == u && (i = T(I(t), x(t)), p({ pagePath: i })) : t.link.startsWith("http") || t.link.startsWith("https") ? 1 == u ? p.call(this, { pagePath: t.link, pageType: 2 }) : (i = "/pages/wxArticle/main?link=" + encodeURIComponent(t.link), p({ pagePath: i })) : p({ pagePath: t.link, pageType: 2 }) : 1.1 == n ? 2 == u ? p({ pagePath: t.link }) : 1 == u && (1 == $.call(this) || 2 == $.call(this) ? p.call(this, { pagePath: t.link, pageType: 3 }) : h("暂不支持")) : 1.2 == n ? "outerChain:businessCenter" != t.link ? "/" == t.link.substring(0, 1) ? p.call(this, { pagePath: t.link }) : 1 == u ? 1 == this.$store.state.miniProgram || 2 == this.$store.state.miniProgram ? (o = "/pages/wxArticle/main?link=" + encodeURIComponent(t.link), p.call(this, { pagePath: o, pageType: 3 })) : p.call(this, { pagePath: t.link, pageType: 2 }) : 2 == u && (o = "/pages/wxArticle/main?link=" + encodeURIComponent(t.link), p.call(this, { pagePath: o, pageType: 1 })) : (console.log(b(), "-----getGUIDE_URL()"), a = b() + "/login?mixid=" + this.$nuxt.$route.query.mixid + "&back=" + encodeURIComponent(window.location.href), p.call(this, { pagePath: a, pageType: 2 })) : 2 == n ? "themeCouponClick" == (a = t.feature.type) || 0 == a ? 1 == u ? this.$themeCouponClick(t.feature.value.couponCode, t.feature.value) : 2 == u && c.getCoupon(t.feature.value.couponCode, t.feature.value) : 1 == a ? 2 == t.type && 1 == t.feature.type && function (e) { 1 == u ? this.$nuxt.$SHARE({ itemList: e.feature.value }) : 2 == u && c.shareInit({ itemList: e.feature.value }) }.call(this, t) : "themeMemberCardClick" != a && 2 != a || (1 == u ? this.$themeMemberCardClick(t.feature.value) : 2 == u && c.themeMemberCardClick(t.feature.value)) : 3 == n ? (console.log(u, "-----------------homeNative"), 1 == u ? 1 == $.call(this) || 2 == $.call(this) ? (n = this.$store.getters["sceneModule/flushbonadingVisible"] ? "/pages/toMini/toMini?weappPage=" + encodeURIComponent(t.link) + "&weappAppId=" + t.name : "/pages/toMini/main?weappPage=" + encodeURIComponent(t.link) + "&weappAppId=" + t.name, p.call(this, { pagePath: n, pageType: 3 })) : h("暂不支持") : t.key && t.key.startsWith("1.9") ? function (e) { if (console.log("sss", e), 2 == u) switch (e.key) { case "1.9.1": console.log("begin"), y.openChannelsActivity ? y.openChannelsActivity({ finderUserName: e.name, feedId: e.link, success: function () { console.log("success") }, fail: function () { console.log("fail"), E.call(this, "提示", "打开视频号失败") } }) : E.call(this), console.log("end"); break; case "1.9.2": console.log("begin"), y.openChannelsEvent ? y.openChannelsEvent({ finderUserName: e.name, eventId: e.link, fail: function () { E.call(this, "提示", "打开视频号活动失败") } }) : E.call(this), console.log("end") } }.call(this, t) : (r = "/pages/toMini/main?weappPage=" + encodeURIComponent(t.link) + "&weappAppId=" + t.name, p({ pagePath: r }))) : 0 < t.length && p.call(this, { pagePath: t.link })) : 0 < t.length && (1 == u ? p.call(this, { pagePath: t }) : 2 == u && (r = T(I(t), x(t)), p({ pagePath: r }))))) } function E() { y.showModal({ title: 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "提示", content: 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : "当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。" }), console.log("不支持") } t.themeToLinkInit = e }.call(this) }.call(this, e("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) }, { _process: 1 }] }, {}, [2]);
\ No newline at end of file
!function i(o,a,r){function l(t,e){if(!a[t]){if(!o[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(s)return s(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=a[t]={exports:{}},o[t][0].call(n.exports,function(e){return l(o[t][1][e]||e)},n,n.exports,i,o,a,r)}return a[t].exports}for(var s="function"==typeof require&&require,e=0;e<r.length;e++)l(r[e]);return l}({1:[function(e,t,n){var i,o,t=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function l(t){if(i===setTimeout)return setTimeout(t,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:a}catch(e){i=a}try{o="function"==typeof clearTimeout?clearTimeout:r}catch(e){o=r}}();var s,c=[],u=!1,p=-1;function g(){u&&s&&(u=!1,s.length?c=s.concat(c):p=-1,c.length&&d())}function d(){if(!u){var e=l(g);u=!0;for(var t=c.length;t;){for(s=c,c=[];++p<t;)s&&s[p].run();p=-1,t=c.length}s=null,u=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===r||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}t.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new m(e,t)),1!==c.length||u||l(d)},m.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=h,t.addListener=h,t.once=h,t.off=h,t.removeListener=h,t.removeAllListeners=h,t.emit=h,t.prependListener=h,t.prependOnceListener=h,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],2:[function(e,t,a){!function(o,t){!function(){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.hylBannerLink=i,a.hylToLink=s;var r=void 0,m=void 0,h=void 0,f=void 0,v=void 0,l=void 0,k="",n=null;function i(e){var t,n,i,o,a,r,l,s,c,u,p,g,d;k=$nuxt.$store,console.log("hylBannerLink",e),3!=e.type?1.1==e.type&&(1==k.state.miniProgram||2==k.state.miniProgram?-1<e.link.indexOf("pages/hiberDrawEntity/hiberDrawEntity")?(t=e.link.split("?"))[1]&&t[1].split("=")[1]&&(l=JSON.parse(decodeURIComponent(t[1].split("=")[1])),c=(s=l).id,u=l.type,p=l.isOpenDraw,g=v.formatDate.format(new Date),d=(d=l.validTimeEnd).split(".").join("-"),2==l.validTimeEnd.split(" ").length||(g=g.split(" ")[0]),g=(g=new Date(d.replace(/-/g,"/")).getTime()-new Date(g.replace(/-/g,"/")).getTime())/1e3,2==p?0<=g?(1==u&&$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+c}),2==u&&$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+c}),3==u&&$mp.miniProgram.navigateTo({url:"/pages/draw/turntable/turntable?id="+c})):2==u&&null!=s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?perdraw=33&id="+c}):2==u&&null==s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+c}):m.alert({title:"标题",message:"抽奖已结束"}).then(function(){}):1==u?null==s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+c}):$mp.miniProgram.navigateTo({url:"/pages/draw/openDraw/openDraw?id="+c}):2==u?null!=s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/openDraw/openDraw?id="+c}):$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+c}):null==s.drawRecordEntity?m.alert({title:"标题",message:"抽奖已结束"}).then(function(){}):$mp.miniProgram.navigateTo({url:"/pages/draw/openDraw/openDraw?id="+c})):-1<e.link.indexOf("type")?(t=e.link.split("?"),"[object Array]"==Object.prototype.toString.call(t)&&t.length&&(r=t[1].split("&"),n={},r.forEach(function(e){e.split("="),n[e.split("=")[0]]=e.split("=")[1]}),console.log(n),i=n.id,o=n.jumpScore,a=n.type,k.state.sessionId?f.getConsumerScoreFlag({outId:k.state.userInfo.mixId,advertisementId:i}).then(function(e){0==e.code&&(1==e.object?(o&&0<o&&f.changeScore({outId:k.state.userInfo.mixId,advertisementId:i}).then(function(e){e.object&&$mp.miniProgram.navigateTo({url:"/pages/advertisement/advertisement?type="+a+"&id="+i})}),o&&o<0&&w.showModal({title:"提示",content:"跳转扣除"+Math.abs(o)+"积分",success:function(e){e.confirm?f.changeScore({outId:k.state.userInfo.mixId,advertisementId:i}).then(function(e){e.object&&$mp.miniProgram.navigateTo({url:"/pages/advertisement/advertisement?type="+a+"&id="+i})}):e.cancel&&console.log("用户点击取消")}}),o||$mp.miniProgram.navigateTo({url:"/pages/advertisement/advertisement?type="+a+"&id="+i})):$mp.miniProgram.navigateTo({url:"/pages/advertisement/advertisement?type="+a+"&id="+i}))}):$mp.miniProgram.navigateTo({url:"/pages/login/login"}))):((e.link.includes("pages/draw/draw/draw")||e.link.includes("pages/question/question")||e.link.includes("pages/live/live"))&&(r=y($nuxt.$route.query.mixid+"_location")&&JSON.parse(y($nuxt.$route.query.mixid+"_location")).outId,console.log(r,"跳转id"),r&&(e.link.includes("?")?e.link=e.link+"&addressId="+r:e.link=e.link+"?addressId="+r)),$mp.miniProgram.navigateTo({url:e.link})):h("暂不支持")):1==k.state.miniProgram||2==k.state.miniProgram?$mp.miniProgram.navigateTo({url:"/pages/toMini/toMini?weappPage="+encodeURIComponent(e.link)+"&weappAppId="+e.name}):h("暂不支持")}function s(e){if(e=e.data,console.log("----工具中hyl"),n=e.type,(k=$nuxt.$store).getters["sceneModule/flushbonadingVisible"])if(null!=n&&"undefined"!=n){if(0!=n)if(1==n)"/"==e.link.substring(0,1)?$nuxt.$router.push(e.link):!e.link.startsWith("http")&&!e.link.startsWith("https")||1!=k.state.miniProgram&&2!=k.state.miniProgram?window.location.href=e.link:$mp.miniProgram.navigateTo({url:"/pages/wxArticle/main?link="+encodeURIComponent(e.link)});else if(2==n){var t=e.feature.type;"themeCouponClick"==t||0==t?this.$themeCouponClick(e.feature.value.couponCode,e.feature.value):1==t?(console.log("是分享了。。。。"),2==e.type&&1==e.feature.type&&$nuxt.$SHARE({itemList:e.feature.value})):"themeMemberCardClick"!=t&&2!=t||this.$themeMemberCardClick(e.feature.value)}else if(1.1==n||3==n)i(e);else if(1.2==n){if("outerChain:businessCenter"==e.link)return console.log(l.GUIDE_URL,"-----shopConfig.GUIDE_URL"),t=l.GUIDE_URL+"/login?mixid="+$nuxt.$route.query.mixid+"&back="+encodeURIComponent(window.location.href),void(window.location.href=t);"/"==e.link.substring(0,1)?$nuxt.$router.push(e.link):1==k.state.miniProgram||2==k.state.miniProgram?$mp.miniProgram.navigateTo({url:"/pages/wxArticle/main?link="+encodeURIComponent(e.link)}):window.location.href=e.link}else 0<e.length&&$nuxt.$router.push(e.link)}else 0<e.length&&$nuxt.$router.push(e)}function y(e){if(o.browser&&"undefined"!=typeof document)for(var t=document.cookie.split(";"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0].trim()==e)return decodeURIComponent(i[1])}}Object.defineProperty(a,"__esModule",{value:!0}),a.themeToLinkInit=e,a.$themeToLink=R;var c=null,u=null,p=null,r=void 0,g=void 0,l=void 0,h=void 0,s=void 0,d=void 0,w=void 0,C=void 0;function T(e,t){t=1<arguments.length&&void 0!==t?t:"";return"../index/main?from=themeLink&backpath="+encodeURIComponent(e)+"&params="+encodeURIComponent(t)}function P(){return 1==c?this.$store&&this.$store.state.sessionId&&this.$store.state.sessionId:2==c?w&&w.getStorageSync("sessionid"):void 0}function $(){return 1==c&&this.$store&&this.$store.state.miniProgram}function b(){return 1==c?l.GUIDE_URL:2==c?config.GUIDE_URL:void 0}function I(e){return e.link.split("?")[0]}function x(e){var e=e.link.split("?"),n=[];return e.forEach(function(e,t){1<=t&&n.push(e)}),n.join("?")||""}function D(t){var e=getApp();return e.globalData.footerVal?e.globalData.footerVal.componentData.list.findIndex(function(e){return I(e.link)==t.split("?")[0]}):-1}var L=["index","media-video","goods-goodsInfo","goods-commodityMenu","goodsSearch-goodsSearch","chooseStores","activty-receivingGift","activty","login-register","login-phoneLogin","login-authInformation","login-forgetPassWord","login-accountLogin","login-wxRegister","pay-payList","comment-evaluateList","goods-commonProblemList","article-articlePage","article-articleList","goods-posters","liveBroadcast","liveBroadcast-list","personalCenter-coupon-getCoupon","buyerShow-showDetail","goods-addGoodsList","personalCenter-CDkey-exchange","giftCards-linkReceive","giftCoupon-preview","smartForm","shopCart-shareShopCart","groupBuying-beInvite","brandTopics","personalCenter-spokesmanCenter","personalCenter-spokesmanCenter-mine-spokesmanHomePage","liveBroadcast-lived","personalCenter-spokesmanCenter-mine-getBusinessCard","changeAdr"].map(function(e){return"/index"==(e="/"+e.replace(/-/g,"/"))?"/":e});function e(e){var t=e.homeNative,n=e.wx,i=e.getCoupon,o=e.themeMemberCardClick,a=e.requireFun,e=e.extend;if(C=e,c=t,d=a,console.log(d,"-------------------------115"),g=d.createdUserJWT,d.getBcakUrl,w=n,console.log(c,"-------------themeToLinkInit"),console.log("toPage-------------"),p=1==c?function(e){var t=e.pagePath;1==(e=void 0===(e=e.pageType)?1:e)?this.$router.push(t):2==e?window.location.href=t:3==e&&w.navigateTo({url:t})}:2==c?function(e){var t=e.pagePath;1==(e=void 0===(e=e.pageType)?1:e)?(console.log("pagePath",t),w.navigateTo({url:t})):2==e&&w.reLaunch({url:t})}:void 0,1==c)try{r=d.Vue,l=d.shopConfig,r.prototype.$themeToLink=R,h=d.Toast,s=d.hylToLink}catch(e){}else 2==c&&((u=getApp()).$themeToLink=R,u.getCoupon=i,u.themeMemberCardClick=o)}function U(e){if(!(e=e.split("?")[1]))return{};for(var t,n,i=e.split("&"),o={},a=0;a<i.length;a++)t=(n=i[a].split("="))[0],n=n[1],console.log(81,this),o[t]=n;return o}async function R(t){if(console.log(t,"$themeToLink"),console.log(C,"extend======="),console.log("data",t),C.loginIntercept&&!P.call(this)){console.log("走进来了");var e="/pages/login/main?back="+I(t)+"&params="+JSON.stringify(U(t.link));return p({pagePath:e}),!1}if(t.type&&t.link&&t.link.includes("dynamicForm")){if(!P.call(this)){console.log("走进来了--dynamicForm");var n="/pages/login/main?back="+I(t)+"&params="+JSON.stringify(U(t.link));return p({pagePath:n}),!1}await g().then(function(e){t.link+="&token="+e}).catch(function(e){})}var i,o,a,r;1==c&&this.$store.getters["sceneModule/flushbonadingVisible"]?s.call(this,{data:t,Vue:d.Vue,Dialog:d.Dialog,Toast:d.Toast,hyl:d.hyl,dateFilter:d.dateFilter,shopConfig:d.shopConfig}):(e=t.type,console.log(t.key,"----------------------key"),(2==e||2!=c||t.key&&t.key.startsWith("1.9")||t.link&&t.link.startsWith("/activty/")||t.link.startsWith("/article/")||function(e){var t=I(e),n=x(e);if(console.log("parseLink",t),console.log("parseQuery",n),console.log("noLoginListPath",L),L.includes(t)||"/goods/"==t.substr(0,7)||t.includes("/brandTopics")||P.call(this))return!(0<=(i=D(t)))||(i=0==i?D("/"):i,t="/"==t?"/pages/home/main":"/pages/tabBar"+i+"/main",(i=getCurrentPages())[i.length-1].route!=t&&(p({pagePath:t+(n?"?"+n:""),pageType:2}),0));var i="",i=-1<n.indexOf("scene=sso")?"/pages/login/main?back="+t+"&ossLink="+encodeURIComponent(n):"/pages/login/main?back="+t+"&params="+JSON.stringify(U(e.link));return console.log(i,"------------------------190"),p({pagePath:i}),0}(t))&&(null!=e&&"undefined"!=e?0==e||(1==e?"/"==t.link.substring(0,1)?1==c?p.call(this,{pagePath:t.link}):2==c&&(i="",i=t.link&&t.link.startsWith("/article/")?"/pages/pages_subpack/article/main?article_id="+(n=t.link.split("/"))[n.length-1]:T(I(t),x(t)),console.log("url",i),p({pagePath:i})):t.link.startsWith("http")||t.link.startsWith("https")?1==c?p.call(this,{pagePath:t.link,pageType:2}):(i="/pages/wxArticle/main?link="+encodeURIComponent(t.link),p({pagePath:i})):p({pagePath:t.link,pageType:2}):1.1==e?2==c?p({pagePath:t.link}):1==c&&(1==$.call(this)||2==$.call(this)?p.call(this,{pagePath:t.link,pageType:3}):h("暂不支持")):1.2==e?"outerChain:businessCenter"!=t.link?"/"==t.link.substring(0,1)?p.call(this,{pagePath:t.link}):1==c?1==this.$store.state.miniProgram||2==this.$store.state.miniProgram?(o="/pages/wxArticle/main?link="+encodeURIComponent(t.link),p.call(this,{pagePath:o,pageType:3})):p.call(this,{pagePath:t.link,pageType:2}):2==c&&(o="/pages/wxArticle/main?link="+encodeURIComponent(t.link),p.call(this,{pagePath:o,pageType:1})):(console.log(b(),"-----getGUIDE_URL()"),a=b()+"/login?mixid="+this.$nuxt.$route.query.mixid+"&back="+encodeURIComponent(window.location.href),p.call(this,{pagePath:a,pageType:2})):2==e?"themeCouponClick"==(a=t.feature.type)||0==a?1==c?this.$themeCouponClick(t.feature.value.couponCode,t.feature.value):2==c&&u.getCoupon(t.feature.value.couponCode,t.feature.value):1==a?2==t.type&&1==t.feature.type&&function(e){1==c?this.$nuxt.$SHARE({itemList:e.feature.value}):2==c&&u.shareInit({itemList:e.feature.value})}.call(this,t):"themeMemberCardClick"!=a&&2!=a||(1==c?this.$themeMemberCardClick(t.feature.value):2==c&&u.themeMemberCardClick(t.feature.value)):3==e?(console.log(c,"-----------------homeNative"),1==c?1==$.call(this)||2==$.call(this)?(e=this.$store.getters["sceneModule/flushbonadingVisible"]?"/pages/toMini/toMini?weappPage="+encodeURIComponent(t.link)+"&weappAppId="+t.name:"/pages/toMini/main?weappPage="+encodeURIComponent(t.link)+"&weappAppId="+t.name,p.call(this,{pagePath:e,pageType:3})):h("暂不支持"):t.key&&t.key.startsWith("1.9")?function(e){if(console.log("sss",e),2==c)switch(e.key){case"1.9.1":console.log("begin"),w.openChannelsActivity?w.openChannelsActivity({finderUserName:e.name,feedId:e.link,success:function(){console.log("success")},fail:function(){console.log("fail"),E.call(this,"提示","打开视频号失败")}}):E.call(this),console.log("end");break;case"1.9.2":console.log("begin"),w.openChannelsEvent?w.openChannelsEvent({finderUserName:e.name,eventId:e.link,fail:function(){E.call(this,"提示","打开视频号活动失败")}}):E.call(this),console.log("end")}}.call(this,t):(r="/pages/toMini/main?weappPage="+encodeURIComponent(t.link)+"&weappAppId="+t.name,p({pagePath:r}))):0<t.length&&p.call(this,{pagePath:t.link})):0<t.length&&(1==c?p.call(this,{pagePath:t}):2==c&&(r=T(I(t),x(t)),p({pagePath:r})))))}function E(){w.showModal({title:0<arguments.length&&void 0!==arguments[0]?arguments[0]:"提示",content:1<arguments.length&&void 0!==arguments[1]?arguments[1]:"当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。"}),console.log("不支持")}t.themeToLinkInit=e}.call(this)}.call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:1}]},{},[2]);
\ No newline at end of file
......@@ -33,13 +33,35 @@ Component({
getListFinish : false
},
ready(){
this.queryBuyingShowList(0);
// this.queryBuyingShowList(0);
console.log(this.data.datas,'dtdt');
this.onceTabHandle()
},
/**
* 组件的方法列表
*/
methods: {
onceTabHandle(){
let active = 0
let obj = {}
let list = this.data.datas.componentData.list
for (let index = 0; index < list.length; index++) {
if(list[index].show == true){
active = index
obj = list[index]
break
}
}
if (Object.prototype.toString.call(obj) === '[object Object]' && JSON.stringify(obj) !== '{}') {
this.setData({
tabIndex: active,
tabId: obj.id,
getListFinish :false
})
}
this.queryBuyingShowList(0)
},
tabHandle(e){
let index = e.currentTarget.dataset.index
let item = e.currentTarget.dataset.item
......
<!--static/nativeComponents/SharePicture/index.wxml-->
<wxs src="./index.wxs" module="computed" />
<view class="waterfall-content" style="background-color:{{datas.componentData['backgroundColor']}};padding-top:{{datas.componentData.paddingList[0]['value'] * 2}}rpx;padding-bottom:{{datas.componentData.paddingList[1]['value'] * 2}}rpx;padding-left:{{datas.componentData.paddingList[2]['value'] * 2}}rpx;padding-right:{{datas.componentData.paddingList[3]['value'] * 2}}rpx">
<view class="tab-wrap">
<view class="tab-wrap" wx:if="{{computed.showFlag(datas.componentData['list'])}}">
<view class="tab-item {{tabIndex == index && 'checked'}}" wx:for="{{datas.componentData['list']}}" :key="index" wx:if="{{item.show}}" bindtap="tabHandle" data-index="{{index}}" data-item="{{item}}" z>
<text>{{item.name}}</text>
</view>
......
function showFlag(data) {
if(data != undefined){
var flagcount = 0
for(var i = 0;i<data.length;i++){
if(data[i].show == true){
flagcount ++
}
}
if(flagcount <= 1){
return false
}else{
return true
}
}else{
return false
}
}
module.exports.showFlag = showFlag;
\ No newline at end of file
......@@ -60,8 +60,8 @@ function trackStyle(data) {
function lineStyle(data) {
return style({
width: utils.addUnit(data.lineWidth - 16),
transform: 'translateX(' + data.lineOffsetLeft + 'px)',
'-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',
transform: 'translateX(' + (data.lineOffsetLeft +16) + 'px)',
'-webkit-transform': 'translateX(' + (data.lineOffsetLeft + 8) + 'px)',
'background-color': data.color,
height: data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,
'border-radius':
......
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