Commit 6413a54e by 程智春

Merge branch 'nativehome_tst' of http://code.mayi888.com/chengmo/mayi-mp-shop into nativehome_tst

parents 4f93e67d d8546463
......@@ -14,7 +14,7 @@ export default {
process.env.NODE_ENV == "production" ||
JSON.stringify(extConfig) == "{}"
) {
extConfig = { mixid: "antgood", shopid: 67 };
// extConfig = { mixid: "antgood", shopid: 67 };
// extConfig = { "mixid":"xyyx",
// "shopid":133 };
}
......
import indexApi from "@/api/index";
export function getBcakUrlApi(data) {
return new Promise((resolve, reject) => {
data.fromAppid = 'VsEOuDJqBnGNyXZJWCQS'
indexApi.getSsoCallbackUrl(data).then(res => {
if (res.data.code == 200) {
resolve(res.data.data);
}
});
})
}
export function createdUserJWTApi(data) {
return new Promise((resolve, reject) => {
indexApi.createdUserJWT().then(res => {
if (res.data.code == 200) {
resolve(res.data.data);
}
});
})
}
......@@ -33,6 +33,22 @@ console.log(process.env,'-----------------config------')
},
get_multi_merchant_by_tags(data){
return requestPOST(`${process.env.OLSHOP_URL}/shop/get_multi_merchant_by_tags`,data)
},
getSsoCallbackUrl(data) {
return requestPOST(
`${process.env.OLSHOP_URL}/common/getSsoCallbackUrl`,
{ data }
);
},
// 动态表单获取token 信息
createdUserJWT(data) {
return requestPOST(
`${process.env.OLSHOP_URL}/user/createUserJWT`,
{
data
}
);
}
}
\ No newline at end of file
......@@ -12,9 +12,30 @@ export default {
},
// 页面数据
themePagesInfo(params) {
return requestPOST(`${process.env.OLSHOP_URL}/cms/get_shop_install_pages`, params )
return requestPOST(
`${process.env.OLSHOP_URL}/cms/get_shop_install_pages`,
params
);
},
checkShowCondition(params) {
return requestPOST(`${process.env.OLSHOP_URL}/cms/check_show_condition`, params)
return requestPOST(
`${process.env.OLSHOP_URL}/cms/check_show_condition`,
params
);
},
// 获取新版会员卡列表
getV3CardList(params) {
return requestPOST(
`${process.env.OLSHOP_URL}/user/membership_card_list`,
{
params
}
);
},
// 领取新版无门槛会员卡
drawV3Card(params) {
return requestPOST(
`${process.env.OLSHOP_URL}/user/draw_membership_card?cardId=${params}`
);
}
};
......@@ -6,12 +6,21 @@ import goodsApi from "./api/goods"
import orderApi from "./api/order"
import promoteApi from "./api/promote";
import indexApi from './api/index'
import { createdUserJWTApi, getBcakUrlApi } from "./api/daoke";
import cartApi from './api/cart'
import classificationApi from "./api/classification";
import spokesmanApi from './api/spokesman'
import { DFSImg, concatUrl } from "@/utils/index";
import fenxiaoModel from "@/utils/fenxiaoModel";
// import {
// $themeAddToCard,
// $themeArticleLike,
// getCoupon,
// themeMemberCardClick
// } from "@/utils/mayi";
import { $themeToLink, $themeAddToCard, $themeArticleLike } from "@/utils/mayi";
import "@/utils/themeModule";
// import { themeToLinkInit } from "@/utils/themeModule";
import shop from "./api/shop";
import spokesman from "@/api/spokesman";
......@@ -35,6 +44,7 @@ app.$mount()
// glob挂载到
let mpApp = getApp();
Vue.prototype.mpApp = mpApp
// 初始化
mpApp.fenxiaoModel = new fenxiaoModel({
query_login_spoken:spokesman.query_login_spoken,
becomepokesmanCustomer:spokesman.becomepokesmanCustomer,
......@@ -47,7 +57,17 @@ mpApp.fenxiaoModel = new fenxiaoModel({
oneClickShopQuickCopy: spokesman.oneClickShopQuickCopy,
apply_for_withdraw: spokesman.apply_for_withdraw
});
// 多主题方法初始化
global.themeToLinkInit({
homeNative: 2,
wx,
getCoupon,
themeMemberCardClick,
requireFun: {
createdUserJWT: createdUserJWTApi,
getBcakUrl: getBcakUrlApi
}
});
// 数据异步回调函数
// 商城
mpApp.shopCallBack = function () { }
......@@ -65,9 +85,9 @@ mpApp.indexBgCallBack = function(){ }
// 全局数据
mpApp.processEnv = process.env;
console.log('3555555', wx)
// 全局跳转 data为link对象
mpApp.$themeToLink = $themeToLink
console.log('3555555', wx)
// 全局加入购物车
mpApp.$themeAddToCard = $themeAddToCard
// 文章点赞
......
......@@ -4,14 +4,8 @@
<image class="img" mode="aspectFit" :src="logoUrl" />
<p class="shopName" v-if="shopName">{{shopName}}</p>
<div class="btn_info">
<button class="btn" lang="zh_CN" open-type="getUserInfo" @getuserinfo="getUserInfo">微信一键登录</button>
<button class="btn" lang="zh_CN" @click="getUserProfile">微信一键登录</button>
</div>
<!-- <div>{{testd}}</div>
<div>{{test_sessionId}}</div>--sessionId
<div>{{unionId}}</div>--unionId
<div>{{test_isHaveUnion}}</div>--isHaveUnion-->
<!-- <div class="enterpriseLogin" @click="eLogin">账号登录</div> -->
</div>
<div class="toCLogin1" v-if="isShowPhone">
<div class="btn_info1">
......@@ -32,13 +26,8 @@ import { wx_decode } from "@/utils/wxIndex.js";
import login from "@/api/login";
import shop from "@/api/shop";
import indexApi from "@/api/index.js";
var WXBizDataCrypt = require("@/utils/WXBizDataCrypt");
const app = getApp();
export default {
name:'login',
components: {
// card
},
data() {
return {
code: "",
......@@ -68,9 +57,9 @@ export default {
test_isHaveUnion: "",
test_unionId: "",
fromType:'',//来源类型 mini:小程序跳转到当前登录页
scene:''//场景
};
},
created() {},
onShow() {
wx.checkSession({
success : () => {
......@@ -99,6 +88,7 @@ export default {
},
onLoad(options) {
Object.assign(this.$data, this.$options.data()); //mpvue 的混合周期 使用小程序生命周期数据未初始化
options.scene && (this.scene=options.scene)
if (options.back) {
this.backPath = options.back;
}
......@@ -171,32 +161,20 @@ export default {
})
}
},
getUserInfo: function(e) {
this.backParams=this.defalutBackParams
wx.showLoading({
title: "加载中"
});
if (e.target.errMsg == "getUserInfo:ok") {
getUserProfile() {
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (e) => {
this.init()
.then(res => {
console.log("promise", res);
//存入openid
try {
wx.setStorageSync('openid', res.data.data.openid)
} catch (e) {
console.log('存入openid失败',e)
}
wx.getStorage({
key: "openid",
success (res) {
console.log("promise_openid1",res)
},
fail(err){
console.log("promise_openid2",err)
}
})
//
if (res.data.data.isHaveUnion == "true") {
//有账号
this.backParams += `&sessionid=${
......@@ -217,9 +195,10 @@ export default {
this.appid = res.data.data.appid;
this.session_key = res.data.data.session_key;
this.openid = res.data.data.openid;
this.unionId = res.data.data.unionId || '';
this.isShow = true;
//checkLogin
//checkLogind
this.checkLogin(e);
})
.catch(err => {
......@@ -227,46 +206,19 @@ export default {
wx.hideLoading();
wx.showToast({ title: err, icon: "none" });
});
} else {
wx.hideLoading();
wx.showToast({ title: "获取用户信息失败", icon: "none" });
}
})
},
checkLogin(e) {
console.log(this.isHaveUnion,e)
this.userInfo = e.userInfo;
this.$store.commit('setUserInfo',this.userInfo)
if (this.isHaveUnion) {
wx.hideLoading();
//是会员 直接登录
// 0318写直播改后面注释逻辑相同
// wx.reLaunch({
// url: `../index/main?from=login&backpath=${
// this.backPath
// }&params=${encodeURIComponent(this.backParams)}`
// });
// 跳转回小程序页面
var data = wx_decode(
this.appid,
this.session_key,
e.mp.detail.encryptedData,
e.mp.detail.iv
);
this.userInfo = JSON.parse(e.target.rawData);
this.$store.commit('setUserInfo',this.userInfo)
this.addRecord(false);
this.pushPageType();
} else {
var data = wx_decode(
this.appid,
this.session_key,
e.mp.detail.encryptedData,
e.mp.detail.iv
);
this.unionId = data.unionId || "";
this.userInfo = JSON.parse(e.target.rawData);
console.log(this.userInfo, "this.userInfo");
this.$store.commit('setUserInfo',this.userInfo)
if (this.unionId) {
login
.checkUnionid({ unionId: this.unionId, openId: this.openid })
......@@ -324,12 +276,13 @@ export default {
wx.navigateBack({
delta: 1
});
}else if (this.scene=='sso') {
wx.redirectTo({
url: `../wxArticle/main?link=${this.backPath}`,
});
}else{
let parseLink=decodeURIComponent(this.backPath);
let isTabbarIndex =checkTabbarPage(parseLink)
console.log('32111',isTabbarIndex,parseLink,this.backParams)
// wx.navigateBack()
// return
if(isTabbarIndex>-1){
wx.reLaunch({
url: parseLink == '/' ? '/pages/home/main' : `/pages/tabBar${isTabbarIndex}/main`,
......@@ -341,7 +294,6 @@ export default {
}&params=${encodeURIComponent(this.backParams)}`
});
}
}
},
getPhoneNumber(e) {
......@@ -378,6 +330,7 @@ export default {
province: this.userInfo.province,
city: this.userInfo.city,
otherPhone: 0,
articleId: wx.getStorageSync(this.$store.state.mixid+"articleId") || '',
customerSourceType: wx.getStorageSync(this.$store.state.mixid+"articleId")?8:'',
customerSourceId: wx.getStorageSync(this.$store.state.mixid+"articleId") || ''
};
......
import cart from "@/api/cart"
import shop from "@/api/shop"
import coupon from "@/api/coupon";
import classificationApi from "@/api/classification";
// 登录白名单 name
export const noLoginList = ["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'];
......@@ -154,6 +156,7 @@ export function $themeAddToCard(item, callback) {
}
function toPage(backPath, backParams = "") {
console.log(backPath, backParams,'--------------------------159');
wx.navigateTo({
url: `../index/main?from=themeLink&backpath=${encodeURIComponent(backPath)}&params=${encodeURIComponent(backParams)}`
});
......@@ -234,3 +237,96 @@ export function $themeArticleLike(item, callback) {
}
});
}
export function getCoupon(code, item) {
console.log("--------------------239");
let usingIntegrals = (item.consumeIntegral - 0).toFixed(0);
let couponCode = code;
console.log(item, "------------------------242");
if (item.receiveCostType == 1) {
wx.showModal({
confirmColor: "#CA173B",
content: `是否消耗${usingIntegrals}积分领取`
})
.then(() => {
useCoupon(2, couponCode, usingIntegrals);
})
.catch(() => {
// on cancel
});
return;
} else {
useCoupon(1, couponCode, usingIntegrals);
}
};
function useCoupon(val, couponCode, usingIntegrals) {
coupon.receive_coupon(couponCode).then(res => {
console.log(res, "cou137");
if (res.data.data == "true") {
if (val == 1) {
wx.showToast({ title: "领取成功", icon: "success" });
} else {
let tit = "积分-" + usingIntegrals;
wx.showToast({ title: tit, icon: "success" });
}
// item.receive=false;
} else {
wx.showToast({title:res.data.msg ,icon :"none"});
// item.receive=true;
}
});
};
export function themeMemberCardClick (item) {
let query = {
portalCardId: item.id
};
shop.getV3CardList(query).then(res => {
console.log(res,'--------------------282')
if (res.data.code == 200) {
let cardData = "";
res.data.data.forEach(innerItem => {
if (innerItem.id == item.id) {
cardData = innerItem;
}
});
if (cardData.receiveWay == 0) {
// 无门槛
let cardId = cardData.id;
let userInfo = wx.getStorageSync("userInfo") ? JSON.parse(wx.getStorageSync("userInfo")) : "";
shop.drawV3Card(cardId).then(res => {
if (res.data.code == 200) {
wx.showToast({
title: `开通【${cardData.title}】成功`,
icon: "none"
});
} else {
if (res.data.msg == "不能重复领卡") {
console.log("---------------------------to-----1")
let backParams = `&cardId=${cardData.id}&userTel=${userInfo.mobilephone}`;
toPage("/personalCenter/membershipCard",backParams);
} else {
wx.showToast({ title: res.data.msg, icon: "none" });
}
}
});
} else if (cardData.receiveWay == 1) {
// 自动领取
console.log("自动领取");
} else if (cardData.receiveWay == 2) {
// 付费购买
if (cardData.receiveStatus == 0) {
console.log("---------------------------to-----2")
let backParams = `&cardId=${cardData.id}`;
toPage("/pay/payCard", backParams);
} else {
console.log("---------------------------to-----3")
let backParams = `&cardId=${cardData.id}&userTel=${userInfo.mobilephone}`;
toPage("/personalCenter/membershipCard", backParams);
}
} else {
console.error("无效的领取方式");
}
} else {
wx.showToast({title:res.data.msg,icon:"none"});
}
});
};
\ 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=[],p=!1,c=-1;function d(){p&&s&&(p=!1,s.length?u=s.concat(u):c=-1,u.length&&g())}function g(){if(!p){var e=l(d);p=!0;for(var t=u.length;t;){for(s=u,u=[];++c<t;)s&&s[c].run();c=-1,t=u.length}s=null,p=!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||p||l(g)},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,R){!function(U,t){!function(){"use strict";Object.defineProperty(R,"__esModule",{value:!0}),R.hylBannerLink=i,R.hylToLink=s;var a=void 0,m=void 0,h=void 0,f=void 0,v=void 0,r=void 0,k="",n=null;function i(e){var t,n,i,o,a,r,l,s,u,p,c,d,g;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,p=l.type,c=l.isOpenDraw,d=v.formatDate.format(new Date),g=(g=l.validTimeEnd).split(".").join("-"),2==l.validTimeEnd.split(" ").length||(d=d.split(" ")[0]),d=(d=new Date(g.replace(/-/g,"/")).getTime()-new Date(d.replace(/-/g,"/")).getTime())/1e3,2==c?0<=d?(1==p&&$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+u}),2==p&&$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+u}),3==p&&$mp.miniProgram.navigateTo({url:"/pages/draw/turntable/turntable?id="+u})):2==p&&null!=s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?perdraw=33&id="+u}):2==p&&null==s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+u}):m.alert({title:"标题",message:"抽奖已结束"}).then(function(){}):1==p?null==s.drawRecordEntity?$mp.miniProgram.navigateTo({url:"/pages/draw/drawDetails/drawDetails?id="+u}):$mp.miniProgram.navigateTo({url:"/pages/draw/openDraw/openDraw?id="+u}):2==p?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&&C.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(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(r.GUIDE_URL,"-----shopConfig.GUIDE_URL"),t=r.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(U.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(R,"__esModule",{value:!0}),R.themeToLinkInit=e,R.$themeToLink=L;var u=null,p=null,c=null,a=void 0,d=void 0,g=void 0,r=void 0,h=void 0,s=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(e){return 1==e?this.$store&&this.$store.state.sessionId&&this.$store.state.sessionId&&null:2==e?C&&C.getStorageSync("sessionid"):void 0}function $(e){return 1==e&&this.$store&&this.$store.state.miniProgram}function b(e){return 1==e?r.GUIDE_URL:2==e?config.GUIDE_URL:void 0}function I(e){return e.link.split("?")[0]}function x(e){return e.link.split("?")[1]||""}function o(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,e=e.requireFun;if(u=t,y=e,console.log(y,"-------------------------115"),d=y.createdUserJWT,g=y.getBcakUrl,C=n,console.log(u,"-------------themeToLinkInit"),n=u,console.log("toPage-------------"),c=1==n?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&&C.navigateTo({url:t})}:2==n?function(e){var t=e.pagePath;1==(e=void 0===(e=e.pageType)?1:e)?C.navigateTo({url:t}):2==e&&C.reLaunch({url:t})}:void 0,1==u)try{a=y.Vue,r=y.shopConfig,a.prototype.$themeToLink=L,h=y.Toast,s=y.hylToLink}catch(e){}else 2==u&&((p=getApp()).$themeToLink=L,p.getCoupon=i,p.themeMemberCardClick=o)}function D(e){var t=I(e),n=x(e);return(e=l.includes(t)||"/goods/"==t.substr(0,7)||t.includes("/brandTopics"))||P(u)?!(0<=(e=o(t)))||(e=0==e?o("/"):e,t="/"==t?"/pages/home/main":"/pages/tabBar"+e+"/main",(e=getCurrentPages())[e.length-1].route!=t&&(c({pagePath:t+(n?"?"+n:""),pageType:2}),0)):(c({pagePath:"/pages/login/main?back="+t}),0)}async function L(t){if(console.log(t,"$themeToLink"),t.type){if(t.link&&t.link.includes("scene=sso")){if(h.loading({message:"加载中...",forbidClick:!0}),!P.call(this))return void h("请先登录");var e;1==u&&(e=(l=function(e){return 1==e?this.$store&&this.$store.state.userInfo&&null:2==e?C&&C.getStorageSync("userInfo")&&JSON.parse(C.getStorageSync("userInfo"))&&null:void 0}.call(this)).mobilephone,l=l.email,t.link=await g({toAppid:"hgFTLLhgnBmeOyCkcbyv",callbackUrl:t.link,phoneNumber:e,email:l}))}t.link&&t.link.includes("dynamicForm")&&await d().then(function(e){t.link+="&token="+e})}1==u&&s.call(this,{data:t,Vue:y.Vue,Dialog:y.Dialog,Toast:y.Toast,hyl:y.hyl,dateFilter:y.dateFilter,shopConfig:y.shopConfig});var n,i,o,a,r,l=t.type;2!=l&&2==u&&(D(t),!D(t))||(null!=l&&"undefined"!=l?0==l||(1==l?"/"==t.link.substring(0,1)?1==u?c.call(this,{pagePath:t.link}):2==u&&(n=T(I(t),x(t)),c({pagePath:n})):t.link.startsWith("http")||t.link.startsWith("https")?1==u?c.call(this,{pagePath:t.link,pageType:2}):(n="/pages/wxArticle/main?link="+encodeURIComponent(t.link),c({pagePath:n})):c({pagePath:t.link,pageType:2}):1.1==l?2==u?c({pagePath:t.link}):1==u&&(1==$.call(this,u)||2==$.call(this,u)?c.call(this,{pagePath:t.link,pageType:3}):h("暂不支持")):1.2==l?"outerChain:businessCenter"!=t.link?"/"==t.link.substring(0,1)?c.call(this,{pagePath:t.link}):1==u?1==this.$store.state.miniProgram||2==this.$store.state.miniProgram?(i="/pages/wxArticle/main?link="+encodeURIComponent(t.link),c.call(this,{pagePath:i,pageType:3})):c.call(this,{pagePath:t.link,pageType:2}):2==u&&(i="/pages/wxArticle/main?link="+encodeURIComponent(t.link),c.call(this,{pagePath:i,pageType:1})):(console.log(b(),"-----getGUIDE_URL()"),o=b()+"/login?mixid="+this.$nuxt.$route.query.mixid+"&back="+encodeURIComponent(window.location.href),c.call(this,{pagePath:o,pageType:2})):2==l?"themeCouponClick"==(o=t.feature.type)||0==o?1==u?this.$themeCouponClick(t.feature.value.couponCode,t.feature.value):2==u&&p.getCoupon(t.feature.value.couponCode,t.feature.value):1==o?2==t.type&&1==t.feature.type&&function(e,t){1==e?this.$nuxt.$SHARE({itemList:t.feature.value}):2==e&&p.shareInit({itemList:t.feature.value})}.call(this,u,t):"themeMemberCardClick"!=o&&2!=o||(1==u?this.$themeMemberCardClick(t.feature.value):2==u&&p.themeMemberCardClick(t.feature.value)):3==l?1==u?1==$.call(this,u)||2==$.call(this,u)?this.$store.getters["sceneModule/flushbonadingVisible"]?(a="/pages/toMini/toMini?weappPage="+encodeURIComponent(t.link)+"&weappAppId="+t.name,c.call(this,{pagePath:a,pageType:3})):(a="/pages/toMini/main?weappPage="+encodeURIComponent(t.link)+"&weappAppId="+t.name,c({pagePath:a})):h("暂不支持"):(r="/pages/toMini/main?weappPage="+encodeURIComponent(t.link)+"&weappAppId="+t.name,c({pagePath:r})):0<t.length&&c.call(this,{pagePath:t.link})):0<t.length&&(1==u?c.call(this,{pagePath:t}):2==u&&(r=T(I(t),x(t)),c({pagePath:r}))))}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
......@@ -29,7 +29,7 @@
</view>
</view>
<!-- 名称 -->
<view class="text" style="color: {{selected === index ? componentData.selectTextColor : componentData.defaultTextColor}};font-size:{{selected === index ? componentData.selectionTextNum*2 : componentData.defaultTextNum*2}}rpx">
<view class="text" style="color: {{selected === index ? componentData.selectTextColor : componentData.defaultTextColor}};font-size:{{selected === index ? (componentData.selectText==1?10:componentData.selectionTextNum)*2 : (componentData.defaultText==1?10:componentData.defaultTextNum)*2}}rpx">
{{item.title}}</view>
<!-- 购物车商品数量 -->
<view class="isCart" wx:if="{{item.link&&item.link.link&&item.link.link=='/shopCart/shoppingCart'&&cartNum>0}}">
......
......@@ -1237,10 +1237,9 @@
/* font-size: 10px; */
}
/* .img-view{
display: flex;
align-items: center;
} */
.img-view{
margin:auto;
}
.img-view image{
/* object-fit: contain; */
width: 100%;
......
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