Commit 6303967c by 柳士祥

小程序日志添加

parent 0db371a5
...@@ -569,8 +569,11 @@ export default { ...@@ -569,8 +569,11 @@ export default {
.tabStyle1 { .tabStyle1 {
.van-tabs__line { .van-tabs__line {
height: 30px; height: auto;
bottom: 6px; bottom: 4px;
top:4px;
left: 8px;
right: 8px;
border-radius: 38px; border-radius: 38px;
} }
} }
...@@ -611,8 +614,8 @@ export default { ...@@ -611,8 +614,8 @@ export default {
content: ""; content: "";
position:absolute; position:absolute;
bottom: 4px; bottom: 4px;
left: 0; left: 8px;
right: 0; right: 8px;
top: 4px; top: 4px;
border-radius: 34px; border-radius: 34px;
background: var(--default-tab-background-bolor); background: var(--default-tab-background-bolor);
...@@ -632,8 +635,8 @@ export default { ...@@ -632,8 +635,8 @@ export default {
content: ""; content: "";
position:absolute; position:absolute;
bottom: 4px; bottom: 4px;
left: 0; left: 8px;
right: 0; right: 8px;
height: 4px; height: 4px;
background: var(--default-tab-underline-color); background: var(--default-tab-underline-color);
z-index: -1; z-index: -1;
......
...@@ -11,6 +11,7 @@ import cartApi from './api/cart' ...@@ -11,6 +11,7 @@ import cartApi from './api/cart'
import classificationApi from "./api/classification"; import classificationApi from "./api/classification";
import spokesmanApi from './api/spokesman' import spokesmanApi from './api/spokesman'
import { DFSImg, concatUrl } from "@/utils/index"; import { DFSImg, concatUrl } from "@/utils/index";
var log = require('./utils/log')
import fenxiaoModel from "@/utils/fenxiaoModel"; import fenxiaoModel from "@/utils/fenxiaoModel";
import { import {
$themeAddToCard, $themeAddToCard,
...@@ -133,7 +134,7 @@ mpApp.spokesmanApi = spokesmanApi ...@@ -133,7 +134,7 @@ mpApp.spokesmanApi = spokesmanApi
mpApp.getThemePage = getThemePage mpApp.getThemePage = getThemePage
mpApp.themeColor = {} mpApp.themeColor = {}
mpApp.log = log
function getThemePage({mixid,shopid}) { function getThemePage({mixid,shopid}) {
shop shop
......
...@@ -11,6 +11,8 @@ import shop from "@/api/shop.js"; ...@@ -11,6 +11,8 @@ import shop from "@/api/shop.js";
import indexApi from "@/api/index.js"; import indexApi from "@/api/index.js";
import { serialize, getQueryVariable, DFSImg } from "@/utils/index"; import { serialize, getQueryVariable, DFSImg } from "@/utils/index";
import login from "@/api/login"; import login from "@/api/login";
const app = getApp();
const { log } = app;
export default { export default {
data() { data() {
return { return {
...@@ -69,14 +71,14 @@ export default { ...@@ -69,14 +71,14 @@ export default {
pageUrl(n,o) { pageUrl(n,o) {
//埋点未登录时进入文章 //埋点未登录时进入文章
// this.params+='&articleId=111' // this.params+='&articleId=111'
console.log(wx.getStorageSync("sessionid"),3333333,this.pageUrl) log.info(wx.getStorageSync("sessionid"),3333333,this.pageUrl)
if(!wx.getStorageSync("sessionid")&&this.pageUrl.indexOf('articleId')!=-1) { if(!wx.getStorageSync("sessionid")&&this.pageUrl.indexOf('articleId')!=-1) {
// wx.setStorageSync('articleId',true) // wx.setStorageSync('articleId',true)
var vars = this.pageUrl.split("&"); var vars = this.pageUrl.split("&");
console.log(vars,2222) log.info(vars,2222)
for (var i = 0; i < vars.length; i++) { for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("="); var pair = vars[i].split("=");
console.log(pair,1111) log.info(pair,1111)
if (pair[0] == 'articleId') { if (pair[0] == 'articleId') {
wx.setStorageSync(this.$store.state.mixid+'articleId',pair[1]) wx.setStorageSync(this.$store.state.mixid+'articleId',pair[1])
} }
...@@ -84,7 +86,7 @@ export default { ...@@ -84,7 +86,7 @@ export default {
} }
// 小程序登录绑定手机号后回调页面记录客流渠道记录数据。 // 小程序登录绑定手机号后回调页面记录客流渠道记录数据。
if (wx.getStorageSync('sessionid') && wx.getStorageSync('attractingCustomerChannelId') && this.pageUrl.indexOf('open_id') != -1) { if (wx.getStorageSync('sessionid') && wx.getStorageSync('attractingCustomerChannelId') && this.pageUrl.indexOf('open_id') != -1) {
console.log('绑定手机号后登陆回调页') log.info('绑定手机号后登陆回调页')
let openId = this.pageUrl.split('open_id=')[1].split('&')[0] let openId = this.pageUrl.split('open_id=')[1].split('&')[0]
let unionId = null let unionId = null
if (this.pageUrl.split('unionId=')[1]) { if (this.pageUrl.split('unionId=')[1]) {
...@@ -115,7 +117,7 @@ export default { ...@@ -115,7 +117,7 @@ export default {
wx.setStorageSync(this.$store.state.mixid+'sellerId','') wx.setStorageSync(this.$store.state.mixid+'sellerId','')
} }
this.options = options; this.options = options;
console.log(this.options,'----------------index-----options') log.info(this.options,'----------------index-----options')
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
if(wx.getStorageSync("workBox")){ if(wx.getStorageSync("workBox")){
...@@ -130,7 +132,7 @@ export default { ...@@ -130,7 +132,7 @@ export default {
wx.login({ wx.login({
success: res => { success: res => {
this.code = res.code; this.code = res.code;
console.log(this.code,'-----------------------------110---code') log.info(this.code,'-----------------------------110---code')
login.get_open_id_by_code({ code: this.code}).then(res1 => { login.get_open_id_by_code({ code: this.code}).then(res1 => {
if (res1.data.code == 200) { if (res1.data.code == 200) {
wx.setStorage({ wx.setStorage({
...@@ -174,14 +176,14 @@ export default { ...@@ -174,14 +176,14 @@ export default {
this.params = ""; this.params = "";
} else if (options.from && options.from == "h5login") { } else if (options.from && options.from == "h5login") {
let params = JSON.parse(options.params); let params = JSON.parse(options.params);
console.log(params.sessionid,'--------------h5login--params') log.info(params.sessionid,'--------------h5login--params')
//来自h5登录 //来自h5登录
wx.setStorage({ wx.setStorage({
key: "sessionid", key: "sessionid",
data: params.sessionid data: params.sessionid
}); });
this.page = decodeURIComponent(options.backpath); this.page = decodeURIComponent(options.backpath);
console.log(this.page,'----------------------h5login--page') log.info(this.page,'----------------------h5login--page')
options.params && (this.params += "&" + serialize(params)); options.params && (this.params += "&" + serialize(params));
} else if (options.from && (options.from == "home" || options.from == "livedToIndex")) { } else if (options.from && (options.from == "home" || options.from == "livedToIndex")) {
//来自直播详情 //来自直播详情
...@@ -213,7 +215,7 @@ export default { ...@@ -213,7 +215,7 @@ export default {
} else if (options.from && options.from == "address") { } else if (options.from && options.from == "address") {
// 来自小程序地址页面 // 来自小程序地址页面
this.link = decodeURIComponent(options.backpath); this.link = decodeURIComponent(options.backpath);
console.log("adress", options.backpath, this.link); log.info("adress", options.backpath, this.link);
this.page = ""; this.page = "";
this.params = ""; this.params = "";
} else if (options.from == "wxPay") { } else if (options.from == "wxPay") {
...@@ -221,8 +223,8 @@ export default { ...@@ -221,8 +223,8 @@ export default {
this.page = options.backpath; this.page = options.backpath;
this.params += "&" + serialize(options.params); this.params += "&" + serialize(options.params);
} else if (options.scene) { } else if (options.scene) {
console.log(options) log.info(options)
console.log(222222) log.info(222222)
if(options.scene.indexOf('_') == -1){ if(options.scene.indexOf('_') == -1){
this.withoutScene = false; this.withoutScene = false;
//新二维码扫码进入 //新二维码扫码进入
...@@ -235,7 +237,7 @@ export default { ...@@ -235,7 +237,7 @@ export default {
wx.setStorageSync('attractingCustomerChannelId',paramsObj.attractingCustomerChannelId); wx.setStorageSync('attractingCustomerChannelId',paramsObj.attractingCustomerChannelId);
wx.setStorageSync(this.$store.state.mixid+'storeId',paramsObj.storeId); wx.setStorageSync(this.$store.state.mixid+'storeId',paramsObj.storeId);
wx.setStorageSync(this.$store.state.mixid+'sellerId',paramsObj.sellerId); wx.setStorageSync(this.$store.state.mixid+'sellerId',paramsObj.sellerId);
console.log(res.data.data) log.info(res.data.data)
wx.login({ wx.login({
success: res => { success: res => {
login.get_open_id_by_code({ code: res.code}).then(res1 => { login.get_open_id_by_code({ code: res.code}).then(res1 => {
...@@ -244,9 +246,9 @@ export default { ...@@ -244,9 +246,9 @@ export default {
key: "openid", key: "openid",
data: res1.data.data data: res1.data.data
}); });
console.log('判断是否登录过=登陆过直接调用..未登录过需要授权头像昵称信息。') log.info('判断是否登录过=登陆过直接调用..未登录过需要授权头像昵称信息。')
if (wx.getStorageSync('sessionid')) { if (wx.getStorageSync('sessionid')) {
console.log('已登陆了') log.info('已登陆了')
indexApi.addRecord( indexApi.addRecord(
{ {
attractingCustomersChannelId: paramsObj.attractingCustomerChannelId, attractingCustomersChannelId: paramsObj.attractingCustomerChannelId,
...@@ -261,13 +263,13 @@ export default { ...@@ -261,13 +263,13 @@ export default {
} }
}) })
} else { } else {
console.log('未登录过需要授权头像昵称信息。') log.info('未登录过需要授权头像昵称信息。')
const url = `/pages/login/main?back=${encodeURIComponent(this.page)}&param=${ const url = `/pages/login/main?back=${encodeURIComponent(this.page)}&param=${
encodeURIComponent(JSON.stringify(paramsObj)) encodeURIComponent(JSON.stringify(paramsObj))
}`; }`;
console.log(url) log.info(url)
wx.navigateTo({url}); wx.navigateTo({url});
} }
} }
...@@ -370,9 +372,9 @@ export default { ...@@ -370,9 +372,9 @@ export default {
this.params += this.paramsHander(querys,3) this.params += this.paramsHander(querys,3)
} }
} }
console.log(querys, "scene"); log.info(querys, "scene");
console.log(this.page) log.info(this.page)
console.log(this.params) log.info(this.params)
} }
...@@ -388,7 +390,7 @@ export default { ...@@ -388,7 +390,7 @@ export default {
shop.getWxMiniSubscribeMessageConfig().then(res => { shop.getWxMiniSubscribeMessageConfig().then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
const data = res.data.data; const data = res.data.data;
console.log("wx mini subscribe message data: ", data); log.info("wx mini subscribe message data: ", data);
if (data != null) { if (data != null) {
const subscribeMessageObj = {}; const subscribeMessageObj = {};
for (var key in data) { for (var key in data) {
...@@ -406,7 +408,7 @@ export default { ...@@ -406,7 +408,7 @@ export default {
let getOpenid = wx.getStorageSync("openid"); let getOpenid = wx.getStorageSync("openid");
let getSessionid = wx.getStorageSync("sessionid"); let getSessionid = wx.getStorageSync("sessionid");
console.log('244',getOpenid,getSessionid); log.info('244',getOpenid,getSessionid);
if (getOpenid == "" || getSessionid == "") { if (getOpenid == "" || getSessionid == "") {
// this.params += "&logOut=true"; // this.params += "&logOut=true";
} }
...@@ -419,10 +421,10 @@ export default { ...@@ -419,10 +421,10 @@ export default {
var longitude = res.longitude; var longitude = res.longitude;
var speed = res.speed; var speed = res.speed;
var accuracy = res.accuracy; var accuracy = res.accuracy;
console.log("~~~~~~~~~1~~~~~~~", res); log.info("~~~~~~~~~1~~~~~~~", res);
}, },
fail: res => { fail: res => {
console.log("++++++++++2++++++", res); log.info("++++++++++2++++++", res);
} }
}); });
}, },
...@@ -443,7 +445,7 @@ export default { ...@@ -443,7 +445,7 @@ export default {
}else{ }else{
this.newHref=""; this.newHref="";
} }
console.log(this.newHref, "this.newHrefthis.newHrefthis.newHref"); log.info(this.newHref, "this.newHrefthis.newHrefthis.newHref");
} }
}); });
}, },
...@@ -458,7 +460,7 @@ export default { ...@@ -458,7 +460,7 @@ export default {
//右上角分享时触发 //右上角分享时触发
getMessage(res) { getMessage(res) {
let len = res.target.data.length - 1; let len = res.target.data.length - 1;
console.log(res, "h5消息", res.target.data[len]); log.info(res, "h5消息", res.target.data[len]);
this.shareShopName = res.target.data[len].shareShopName || ""; this.shareShopName = res.target.data[len].shareShopName || "";
this.shareLogoUrl = DFSImg(res.target.data[len].shareLogoUrl, 500, 400); this.shareLogoUrl = DFSImg(res.target.data[len].shareLogoUrl, 500, 400);
...@@ -466,14 +468,14 @@ export default { ...@@ -466,14 +468,14 @@ export default {
this.shareOrderSn = res.target.data[len].orderSn; this.shareOrderSn = res.target.data[len].orderSn;
this.shareTid = res.target.data[len].shareTid; this.shareTid = res.target.data[len].shareTid;
this.newWindowHref = res.target.data[len].shareImgUrl + '&verifyShare=1';// + '&fromVisitorOpenId=' + wx.getStorageSync("openid") this.newWindowHref = res.target.data[len].shareImgUrl + '&verifyShare=1';// + '&fromVisitorOpenId=' + wx.getStorageSync("openid")
console.log("分享信息:", this.shareLogoUrl, this.shareShopName,1111111,this.newWindowHref); log.info("分享信息:", this.shareLogoUrl, this.shareShopName,1111111,this.newWindowHref);
//文章详情分享埋点 //文章详情分享埋点
if(this.newWindowHref.indexOf('articleId')!=-1) { if(this.newWindowHref.indexOf('articleId')!=-1) {
var articleId = '' var articleId = ''
var vars = this.newWindowHref.split("&"); var vars = this.newWindowHref.split("&");
for (var i = 0; i < vars.length; i++) { for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("="); var pair = vars[i].split("=");
console.log(pair,2222) log.info(pair,2222)
if (pair[0] == 'articleId') { if (pair[0] == 'articleId') {
articleId = pair[1]; articleId = pair[1];
} }
...@@ -485,7 +487,7 @@ export default { ...@@ -485,7 +487,7 @@ export default {
}, },
//加载成功 //加载成功
handleLoad(){ handleLoad(){
console.log('网页加载成功'); log.info('网页加载成功');
}, },
handleError(data){ handleError(data){
wx.showLoading({ wx.showLoading({
...@@ -548,12 +550,12 @@ export default { ...@@ -548,12 +550,12 @@ export default {
}, },
}, },
onUnload() { onUnload() {
console.log("卸载----------------", this.options); log.info("卸载----------------", this.options);
}, },
async onShareAppMessage(res) { async onShareAppMessage(res) {
await this.getSpokesman(); await this.getSpokesman();
let url = '' let url = ''
console.log(this.newWindowHref + 'this.newWindowHref') log.info(this.newWindowHref + 'this.newWindowHref')
//分享路径 //分享路径
if(this.newWindowHref){ if(this.newWindowHref){
url = this.newWindowHref; url = this.newWindowHref;
...@@ -573,7 +575,7 @@ export default { ...@@ -573,7 +575,7 @@ export default {
}`; }`;
} }
console.log('shareUrl---------------' + url) log.info('shareUrl---------------' + url)
//增加分销员信息 //增加分销员信息
if(this.hasInvitationStatus == 1 && url.indexOf('spokesmanGroupId')==-1){ if(this.hasInvitationStatus == 1 && url.indexOf('spokesmanGroupId')==-1){
this.shareUrl = url+ this.newHref this.shareUrl = url+ this.newHref
...@@ -582,8 +584,8 @@ export default { ...@@ -582,8 +584,8 @@ export default {
} }
console.log(this.shareUrl, "index12"); log.info(this.shareUrl, "index12");
console.log(`/pages/index/main?share=${encodeURIComponent(this.shareUrl)}`, '测试直播分享相关') log.info(`/pages/index/main?share=${encodeURIComponent(this.shareUrl)}`, '测试直播分享相关')
return { return {
title: this.shareShopName, // 默认是小程序的名称 title: this.shareShopName, // 默认是小程序的名称
path: `/pages/index/main?share=${encodeURIComponent(this.shareUrl)}`, // 默认是当前页面 path: `/pages/index/main?share=${encodeURIComponent(this.shareUrl)}`, // 默认是当前页面
...@@ -591,14 +593,14 @@ export default { ...@@ -591,14 +593,14 @@ export default {
success: function(res) { success: function(res) {
// 转发成功之后的回调 // 转发成功之后的回调
if (res.errMsg == "shareAppMessage:ok") { if (res.errMsg == "shareAppMessage:ok") {
console.log(res, "分享成功"); log.info(res, "分享成功");
} }
}, },
fail: function() { fail: function() {
// 转发失败之后的回调 // 转发失败之后的回调
if (res.errMsg == "shareAppMessage:fail cancel") { if (res.errMsg == "shareAppMessage:fail cancel") {
// 用户取消转发 // 用户取消转发
console.log(res, "分享失败"); log.info(res, "分享失败");
} else if (res.errMsg == "shareAppMessage:fail") { } else if (res.errMsg == "shareAppMessage:fail") {
// 转发失败,其中 detail message 为详细失败信息 // 转发失败,其中 detail message 为详细失败信息
} }
......
...@@ -46,6 +46,7 @@ import shop from "@/api/shop"; ...@@ -46,6 +46,7 @@ import shop from "@/api/shop";
import indexApi from "@/api/index.js"; import indexApi from "@/api/index.js";
import { createdUserJWTApi } from "@/api/daoke"; import { createdUserJWTApi } from "@/api/daoke";
const app = getApp(); const app = getApp();
const { log } = app;
export default { export default {
data() { data() {
return { return {
...@@ -116,7 +117,7 @@ export default { ...@@ -116,7 +117,7 @@ export default {
}) })
}, },
onLoad(options) { onLoad(options) {
console.log(options,'----------------------login-options') log.info(options,'----------------------login-options')
login.getShopUserProtocol().then(res => { login.getShopUserProtocol().then(res => {
if(res.data.code == '200') { if(res.data.code == '200') {
this.content = res.data.data; this.content = res.data.data;
...@@ -196,9 +197,9 @@ export default { ...@@ -196,9 +197,9 @@ export default {
}); });
}, },
addRecord(flag) { addRecord(flag) {
console.log(wx.getStorageSync('attractingCustomerChannelId')) log.info(wx.getStorageSync('attractingCustomerChannelId'))
console.log(this.openid) log.info(this.openid)
console.log(99999) log.info(99999)
//埋点引客渠道 //埋点引客渠道
if(wx.getStorageSync('attractingCustomerChannelId')) { if(wx.getStorageSync('attractingCustomerChannelId')) {
indexApi.addRecord( indexApi.addRecord(
...@@ -241,9 +242,9 @@ export default { ...@@ -241,9 +242,9 @@ export default {
try { try {
wx.setStorageSync('openid', res.data.data.openid) wx.setStorageSync('openid', res.data.data.openid)
} catch (e) { } catch (e) {
console.log('存入openid失败',e) log.info('存入openid失败',e)
} }
console.log(this.$store.state.mixid,'mixid------230') log.info(this.$store.state.mixid,'mixid------230')
//冬奥会测试赛(mixid=CL)定制一键登录直接返回不用手机号 //冬奥会测试赛(mixid=CL)定制一键登录直接返回不用手机号
let isCertified = false; let isCertified = false;
// this.mpApp.globalData.shopInfo.outCode正式环境提审测试赛项目 这个值后台改为1 审核通过改为空 // this.mpApp.globalData.shopInfo.outCode正式环境提审测试赛项目 这个值后台改为1 审核通过改为空
...@@ -295,7 +296,7 @@ export default { ...@@ -295,7 +296,7 @@ export default {
this.checkLogin(e); this.checkLogin(e);
}) })
.catch(err => { .catch(err => {
console.log("err", err); log.info("err", err);
wx.hideLoading(); wx.hideLoading();
wx.showToast({ title: err, icon: "none" }); wx.showToast({ title: err, icon: "none" });
}); });
...@@ -361,7 +362,7 @@ export default { ...@@ -361,7 +362,7 @@ export default {
// 是否跳转h5或小程序 // 是否跳转h5或小程序
pushPageType(){ pushPageType(){
//绑定上下级关系 //绑定上下级关系
console.log(this.scene,'this.scene====',this.backPath) log.info(this.scene,'this.scene====',this.backPath)
app.fenxiaoModel.becomeRelation(wx.getStorageSync("becomeInfo")?JSON.parse(wx.getStorageSync("becomeInfo")):'').then(res=>{ app.fenxiaoModel.becomeRelation(wx.getStorageSync("becomeInfo")?JSON.parse(wx.getStorageSync("becomeInfo")):'').then(res=>{
if(res) { if(res) {
wx.removeStorage({ wx.removeStorage({
...@@ -371,7 +372,7 @@ export default { ...@@ -371,7 +372,7 @@ export default {
}) })
let parseLink=decodeURIComponent(this.backPath); let parseLink=decodeURIComponent(this.backPath);
console.log(this.backPath,parseLink,'---------------------------325') log.info(this.backPath,parseLink,'---------------------------325')
if(parseLink.includes('/pages/')){ if(parseLink.includes('/pages/')){
wx.reLaunch({ wx.reLaunch({
url: parseLink url: parseLink
...@@ -384,14 +385,14 @@ export default { ...@@ -384,14 +385,14 @@ export default {
// 动态表单 // 动态表单
createdUserJWTApi().then(res => { createdUserJWTApi().then(res => {
this.backParams += `&token=${res}`; this.backParams += `&token=${res}`;
console.log(this.backParams,`${this.backPath}${this.backParams}`,"-------------------------355") log.info(this.backParams,`${this.backPath}${this.backParams}`,"-------------------------355")
wx.reLaunch({ wx.reLaunch({
url: `../wxArticle/main?link=${this.backPath+this.backParams}` url: `../wxArticle/main?link=${this.backPath+this.backParams}`
}); });
}) })
}else if (this.scene=='sso' || this.backPath.includes('scene=sso') || this.ossLink.indexOf('scene=sso')>-1) { }else if (this.scene=='sso' || this.backPath.includes('scene=sso') || this.ossLink.indexOf('scene=sso')>-1) {
let backPath = this.backPath; let backPath = this.backPath;
console.log(decodeURIComponent(backPath),600000) log.info(decodeURIComponent(backPath),600000)
if(this.ossLink) { if(this.ossLink) {
backPath += '?'+this.ossLink backPath += '?'+this.ossLink
} }
...@@ -434,7 +435,7 @@ export default { ...@@ -434,7 +435,7 @@ export default {
e.mp.detail.encryptedData, e.mp.detail.encryptedData,
e.mp.detail.iv + "" e.mp.detail.iv + ""
).phoneNumber; ).phoneNumber;
console.log("生命周期一直", this.phoneNumber); log.info("生命周期一直", this.phoneNumber);
this.bindUser(); this.bindUser();
} }
}, },
...@@ -468,7 +469,7 @@ export default { ...@@ -468,7 +469,7 @@ export default {
query.spokesmanShopId = this.$store.state.spokesmanShopId; query.spokesmanShopId = this.$store.state.spokesmanShopId;
} }
console.log(query, "query"); log.info(query, "query");
login login
.bindUser(query) .bindUser(query)
.then(res => { .then(res => {
...@@ -493,7 +494,7 @@ export default { ...@@ -493,7 +494,7 @@ export default {
} }
}) })
.catch(err => { .catch(err => {
console.log(err, "bindusererr"); log.info(err, "bindusererr");
}); });
}, },
backMainHandle() { backMainHandle() {
...@@ -512,7 +513,7 @@ export default { ...@@ -512,7 +513,7 @@ export default {
}); });
}, },
handbindHandle() { handbindHandle() {
console.log(this.queryOptions,'---------------options') log.info(this.queryOptions,'---------------options')
const query = { const query = {
openId: this.openid, openId: this.openid,
unionId: this.unionId, unionId: this.unionId,
...@@ -525,8 +526,8 @@ export default { ...@@ -525,8 +526,8 @@ export default {
param: this.queryOptions.param, param: this.queryOptions.param,
back: this.queryOptions.back, back: this.queryOptions.back,
}; };
console.log(query,'-------------------519') log.info(query,'-------------------519')
console.log( serialize(query),'------------------- serialize(query)') log.info( serialize(query),'------------------- serialize(query)')
if(wx.getStorageSync(this.$store.state.mixid+'storeId')) { if(wx.getStorageSync(this.$store.state.mixid+'storeId')) {
query.storeId = wx.getStorageSync(this.$store.state.mixid+'storeId') query.storeId = wx.getStorageSync(this.$store.state.mixid+'storeId')
} }
......
var log = wx.getRealtimeLogManager ? wx.getRealtimeLogManager() : null
module.exports = {
debug() {
if (!log) return
log.debug.apply(log, arguments)
},
info() {
console.log('日志log级别');
if (!log) return
log.info.apply(log, arguments)
},
warn() {
if (!log) return
log.warn.apply(log, arguments)
},
error() {
if (!log) return
log.error.apply(log, arguments)
},
setFilterMsg(msg) { // 从基础库2.7.3开始支持
if (!log || !log.setFilterMsg) return
if (typeof msg !== 'string') return
log.setFilterMsg(msg)
},
addFilterMsg(msg) { // 从基础库2.8.1开始支持
if (!log || !log.addFilterMsg) return
if (typeof msg !== 'string') return
log.addFilterMsg(msg)
}
}
\ No newline at end of file
const app = getApp(); const app = getApp();
const { goodsApi, DFSImg, $themeToLink, $themeAddToCard } = app; const { goodsApi, DFSImg, $themeToLink, $themeAddToCard,log } = app;
const componentOptions = { const componentOptions = {
// 组件选项 // 组件选项
options: { options: {
...@@ -26,7 +27,17 @@ const componentOptions = { ...@@ -26,7 +27,17 @@ const componentOptions = {
observers: {}, observers: {},
// 组件方法 // 组件方法
methods: { methods: {
init() {}, init() {
let datas = this.data.datas
if(datas.componentData.angleSignImg && datas.componentData.angleSignImg.lenght != 0){
datas.componentData.angleSignImg = DFSImg(datas.componentData.angleSignImg,150,150,1)
}
this.setData({
datas
})
log.info('datas');
},
getSaleTime(val) { getSaleTime(val) {
return new Date(val.replace(/-/g, "/")).getTime() - new Date().getTime(); return new Date(val.replace(/-/g, "/")).getTime() - new Date().getTime();
}, },
......
...@@ -68,7 +68,7 @@ const componentOptions = { ...@@ -68,7 +68,7 @@ const componentOptions = {
angleSignImg, angleSignImg,
titleIcon titleIcon
} = this.data.datas.componentData; } = this.data.datas.componentData;
angleSignImg = DFSImg(angleSignImg); angleSignImg = DFSImg(angleSignImg,150,150,1);
if (titleIcon) { if (titleIcon) {
titleIcon = DFSImg(titleIcon); titleIcon = DFSImg(titleIcon);
} }
......
...@@ -59,7 +59,7 @@ function trackStyle(data) { ...@@ -59,7 +59,7 @@ function trackStyle(data) {
function lineStyle(data) { function lineStyle(data) {
return style({ return style({
width: utils.addUnit(data.lineWidth), width: utils.addUnit(data.lineWidth - 16),
transform: 'translateX(' + data.lineOffsetLeft + 'px)', transform: 'translateX(' + data.lineOffsetLeft + 'px)',
'-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)', '-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',
'background-color': data.color, 'background-color': data.color,
...@@ -80,3 +80,5 @@ module.exports = { ...@@ -80,3 +80,5 @@ module.exports = {
lineStyle: lineStyle, lineStyle: lineStyle,
navStyle: navStyle, navStyle: navStyle,
}; };
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