Compare commits

...

56 Commits

Author SHA1 Message Date
张征 5cadaab959 Merge branch 'feature/browser-0520-zz' into feature/task1.0.0
2 years ago
张征 356e4e329f feat:完成浏览器切换
2 years ago
张征 3a25abb676 feat:完成浏览器跳转
2 years ago
张征 6a1826c311 fix:压缩图片
2 years ago
肖广 8336805b1f Merge branch 'feature/task1.0.0' into 'msb_prod'
2 years ago
ch bc378dc73d Merge branch 'feature/task1.0.0-0505-ch' into msb_prod
2 years ago
ch 8aa28e0346 APP二维码
2 years ago
ch 112f3ac1fc Merge branch 'feature/task1.0.0-0505-ch' into msb_prod
2 years ago
ch 5b4e495bc5 sku处理回退
2 years ago
肖广 e0458dd21e Merge branch 'feature/task1.0.0' into 'msb_prod'
2 years ago
肖广 2d213cf6c6 Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
张征 a4c147c2ad Merge branch 'feature/task1.0.0' into msb_test
2 years ago
肖广 1b84783101 Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
张征 ae326e6f6b Merge branch 'feature/task1.0.0-0507-zz' into msb_test
2 years ago
肖广 ca20e3a37a Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
张征 688fd6ea8c Merge branch 'msb_test' of http://internel-git.mashibing.cn/yanxuan-frontend/shop-pc into msb_test
2 years ago
张征 f8d393661f fix:修改sku价格
2 years ago
ch cf8ea99afb Merge branch 'feature/task1.0.0' into msb_test
2 years ago
张征 fd33b79f7e Merge branch 'feature/task1.0.0' into msb_test
2 years ago
肖广 a9b35a9672 Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
张征 1bc1a46999 fix:修改看了又看
2 years ago
张征 8f7e940158 Merge branch 'feature/task1.0.0-0507-zz' into msb_test
2 years ago
张征 d52997cc07 Merge branch 'feature/task1.0.0' into msb_test
2 years ago
肖广 2f1c3d9ba1 Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
张征 442614a67a Merge branch 'feature/task1.0.0' into msb_test
2 years ago
肖广 80a73d11d8 Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
张征 8e1fac846f Merge branch 'msb_test' of http://internel-git.mashibing.cn/yanxuan-frontend/shop-pc into msb_test
2 years ago
肖广 24201b110e Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
张征 e1cfc41ebb Merge branch 'feature/task1.0.0' into msb_test
2 years ago
肖广 21c967e12a Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
张征 597a3c8aae Merge branch 'feature/task1.0.0' into msb_test
2 years ago
肖广 0ed9fc9885 Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
肖广 de75b1bbaa Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
ch 73ce946530 Merge branch 'feature/task1.0.0' into msb_test
2 years ago
肖广 17b1346ff1 Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
肖广 4c47b8d78b Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
张征 a8c54f76d2 Merge branch 'feature/task1.0.0' into msb_test
2 years ago
张征 e636883bd6 Merge branch 'feature/task1.0.0' into msb_test
2 years ago
ch 262d51d993 Merge branch 'feature/task1.0.0' into msb_test
2 years ago
肖广 c45d530980 Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
ch 468179c860 Merge branch 'feature/task1.0.0' into msb_test
2 years ago
张征 01d6e31ae0 Merge branch 'feature/task1.0.0' into msb_test
2 years ago
肖广 750d1ea0f4 Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
肖广 d230fab63a Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
ch 55ead5e145 Merge branch 'feature/task1.0.0-0505-ch' into msb_test
2 years ago
ch 7d0f236488 Merge branch 'feature/task1.0.0-0505-ch' into msb_test
2 years ago
肖广 f4d5383420 Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
ch f3ce1e00dc Merge branch 'msb_test' of http://internel-git.mashibing.cn/yanxuan-frontend/shop-pc into msb_test
2 years ago
ch 1567936184 Merge branch 'feature/task1.0.0' into msb_test
2 years ago
肖广 10f2033592 Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
肖广 f71938ace0 Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
肖广 62e1b9ac6a Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
肖广 d16c9e002d Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
肖广 30d31c925d Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
肖广 16a70bd821 Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago
肖广 d261e30fb8 Merge branch 'feature/task1.0.0' into 'msb_test'
2 years ago

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

After

Width:  |  Height:  |  Size: 57 KiB

@ -12,16 +12,20 @@ const getRepoInfo = require('git-repo-info');
const envConfig = {
dev : {
base_url: 'https://k8s-horse-gateway.mashibing.cn'
base_url: 'https://k8s-horse-gateway.mashibing.cn',
h5_url:'http://k8s-shop-app.mashibing.cn/'
},
test : {
base_url: 'https://k8s-horse-gateway.mashibing.cn'
base_url: 'https://k8s-horse-gateway.mashibing.cn',
h5_url:'http://k8s-shop-app.mashibing.cn/'
},
beta : {
base_url: 'https://you-gateway.mashibing.com'
base_url: 'https://you-gateway.mashibing.com',
h5_url:'https://you-app.mashibing.com/'
},
prod : {
base_url: 'https://you-gateway.mashibing.com'
base_url: 'https://you-gateway.mashibing.com',
h5_url:'https://you-app.mashibing.com/'
}
}
const branch = getRepoInfo().branch; // 调用获取git信息

@ -0,0 +1,126 @@
import ENV from '@/plugins/config/env.js';
export default function (context) {
context.userAgent = process.server ? context.req.headers['user-agent'] : navigator.userAgent;
// 各主流浏览器
function getBrowser() {
var u = context.userAgent;
var bws = [
{
name: 'sgssapp',
it: /sogousearch/i.test(u),
},
{
name: 'wechat',
it: /MicroMessenger/i.test(u),
},
{
name: 'weibo',
it: !!u.match(/Weibo/i),
},
{
name: 'uc',
it: !!u.match(/UCBrowser/i) || u.indexOf(' UBrowser') > -1,
},
{
name: 'sogou',
it: u.indexOf('MetaSr') > -1 || u.indexOf('Sogou') > -1,
},
{
name: 'xiaomi',
it: u.indexOf('MiuiBrowser') > -1,
},
{
name: 'baidu',
it: u.indexOf('Baidu') > -1 || u.indexOf('BIDUBrowser') > -1,
},
{
name: '360',
it: u.indexOf('360EE') > -1 || u.indexOf('360SE') > -1,
},
{
name: '2345',
it: u.indexOf('2345Explorer') > -1,
},
{
name: 'edge',
it: u.indexOf('Edge') > -1,
},
{
name: 'edg',
it: u.indexOf('Edg') > -1,
},
{
name: 'ie11',
it: u.indexOf('Trident') > -1 && u.indexOf('rv:11.0') > -1,
},
{
name: 'ie',
it: u.indexOf('compatible') > -1 && u.indexOf('MSIE') > -1,
},
{
name: 'firefox',
it: u.indexOf('Firefox') > -1,
},
{
name: 'safari',
it: u.indexOf('Safari') > -1 && u.indexOf('Chrome') === -1,
},
{
name: 'qqbrowser',
it: u.indexOf('MQQBrowser') > -1 && u.indexOf(' QQ') === -1,
},
{
name: 'qq',
it: u.indexOf('QQ') > -1,
},
{
name: 'chrome',
it: u.indexOf('Chrome') > -1 || u.indexOf('CriOS') > -1,
},
{
name: 'opera',
it: u.indexOf('Opera') > -1 || u.indexOf('OPR') > -1,
},
];
for (var i = 0; i < bws.length; i++) {
if (bws[i].it) {
return bws[i].name;
}
}
return 'other';
}
var os = (function () {
var ua = context.userAgent,
isWindowsPhone = /(?:Windows Phone)/.test(ua),
isSymbian = /(?:SymbianOS)/.test(ua) || isWindowsPhone,
isAndroid = /(?:Android)/.test(ua),
isFireFox = /(?:Firefox)/.test(ua),
isChrome = /(?:Chrome|CriOS)/.test(ua),
isTablet =
/(?:iPad|PlayBook)/.test(ua) ||
(isAndroid && !/(?:Mobile)/.test(ua)) ||
(isFireFox && /(?:Tablet)/.test(ua)),
isPhone = /(?:iPhone)/.test(ua) && !isTablet,
isPc = !isPhone && !isAndroid && !isSymbian;
return {
isTablet: isTablet,
isPhone: isPhone,
isAndroid: isAndroid,
isPc: isPc,
isChrome: isChrome,
};
})();
if (os.isAndroid || os.isPhone) {
console.log('手机');
let url = ENV.h5_url
context.redirect(url);
} else if (os.isTablet) {
console.log('平板');
} else if (os.isPc) {
console.log('电脑');
}
}

@ -30,7 +30,7 @@ export default {
component: resolve(__dirname, 'pages/index/index.vue')
})
},
middleware: ['redirect']
middleware: ['redirect','browser']
},
// Global CSS: https://go.nuxtjs.dev/config-css

@ -275,10 +275,8 @@ export default {
order: "",
});
vm.detailData = res1.result;
vm.skuData = res2.result.map(i => {
i.attributeSymbolList = i.attributeSymbolList.split(',')
return i;
});
vm.skuData = res2.result;
vm.recommendedData = res3.result.records;
vm.pageLoading = false;
if (
@ -310,7 +308,7 @@ export default {
curSku() {
return (
this.skuData.find(
(i) => i.attributeSymbolList.join(',') === this.selectedSymbol.join(",")
(i) => i.attributeSymbolList === this.selectedSymbol.join(",")
) || {}
);
},
@ -319,9 +317,9 @@ export default {
return this.detailData.attributeGroupList
.map((item) => {
const activeAttr = item.attributes.find((i) => i.active);
return activeAttr?.symbol;
return activeAttr ? activeAttr.symbol : ".";
})
.filter((i) => i).sort();
.filter((i) => i)//.sort();
},
/**
* 最大可购买数量
@ -461,43 +459,26 @@ export default {
setDisabledItem(item, groupIndex) {
let vm = this;
vm.detailData.attributeGroupList.forEach((group, idx) => {
// if(groupIndex === idx) return false;
//
group.attributes.forEach( item => {
let symbolCache = Object.assign([],vm.selectedSymbol);
symbolCache.push(item.symbol);
symbolCache.sort();
const res = vm.skuData.filter(item =>
symbolCache.map(i => item.attributeSymbolList.includes(i.toString())).every(i => i)
).find(i => i.stock > 0);
//
let symbolCache = Object.assign([], this.selectedSymbol);
//
if (groupIndex === idx) return false;
//
group.attributes.forEach((item) => {
//
symbolCache[idx] = item.symbol;
const reg = new RegExp(symbolCache.join(","));
// SKU
const res = vm.skuData
.filter((i) => reg.test(i.attributeSymbolList))
.find((i) => i.stock > 0);
if (res) {
item.disabled = false;
} else {
item.disabled = true;
}
});
})
// vm.detailData.attributeGroupList.forEach((group, idx) => {
// //
// let symbolCache = Object.assign([], this.selectedSymbol);
// //
// if (groupIndex === idx) return false;
// //
// group.attributes.forEach((item) => {
// //
// symbolCache[idx] = item.symbol;
// const reg = new RegExp(symbolCache.join(","));
// // SKU
// const res = vm.skuData
// .filter((i) => reg.test(i.attributeSymbolList))
// .find((i) => i.stock > 0);
// if (res) {
// item.disabled = false;
// } else {
// item.disabled = true;
// }
// });
// });
});
},
buyNow() {
if (!this.$isLoginValidate()) {

Loading…
Cancel
Save