添加注释

master
mabo 2021-07-31 09:49:17 +08:00
parent ff92fd8d76
commit 2792d24e98
20 changed files with 39 additions and 139 deletions

View File

@ -1,5 +1,3 @@
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App';
import router from './router';

View File

@ -219,8 +219,8 @@ export default {
}
});
},
//
clearCart () {
//
this.$Modal.confirm({
title: '提示',
content: '<p>确定要清空购物车吗?清空后不可恢复</p>',
@ -248,8 +248,8 @@ export default {
showCoupon (storeId, index) {
this.couponAvailable = index;
},
//
changeNum (val, id) {
//
console.log(val, id);
APICart.setCartGoodsNum({ skuId: id, num: val }).then((res) => {
console.log(res);
@ -258,8 +258,8 @@ export default {
}
});
},
//
async changeChecked (status, type, id) {
//
const check = status ? 1 : 0;
if (type === 'all') {
//
@ -274,9 +274,8 @@ export default {
this.getCartList();
},
//
async receiveShopCoupon (item) {
//
let res = await APIMember.receiveCoupon(item.id);
if (res.success) {
this.$set(item, 'disabled', true);
@ -285,8 +284,8 @@ export default {
this.$Message.error(res.message);
}
},
//
async getCartList () {
//
this.loading = true;
try {
let res = await APICart.cartGoodsAll();

View File

@ -54,6 +54,7 @@ export default {
};
},
methods: {
//
getGoodsDetail () {
this.isLoading = true;
const params = this.$route.query
@ -142,12 +143,6 @@ export default {
color: #2c2c2c;
}
.like {
width: 100%;
padding: 20px 0;
@include white_background_color();
}
.shop-nav-container {
width: 1200px;
margin: 0 auto;

View File

@ -77,6 +77,7 @@
</div>
<div class="goods-page">
<Page
show-total
show-sizer
@on-change="changePageNum"
@on-page-size-change="changePageSize"
@ -126,6 +127,7 @@ export default {
}
},
methods: {
//
handleSearch (key) {
this.params.keyword = key
this.params.pageNumber = 0
@ -156,15 +158,18 @@ export default {
});
window.open(routeUrl.href, '_blank');
},
//
changePageNum (val) {
this.params.pageNumber = val;
this.getGoodsList();
},
//
changePageSize (val) {
this.params.pageNumber = 1;
this.params.pageSize = val;
this.getGoodsList();
},
//
getGoodsList () {
this.loading = true;
apiGoods.goodsList(this.params)
@ -194,7 +199,6 @@ export default {
}
this.getGoodsList()
},
mounted () {},
components: {
GoodsClassNav
}

View File

@ -73,42 +73,6 @@ export default {
.container {
@include sub_background_color($light_background_color);
}
/** 商品分类 */
.nav-con {
width: 1200px;
height: 40px;
background: #eee;
margin: 0 auto;
display: flex;
.all-categories {
width: 200px;
line-height: 40px;
color: #fff;
background-color: $theme_color;
text-align: center;
font-size: 16px;
}
.nav-item {
width: 1000px;
height: 40px;
line-height: 40px;
overflow: hidden;
list-style: none;
background-color: #eee;
display: flex;
li {
width: 50px;
font-size: 16px;
font-weight: bold;
margin-left: 15px;
color: rgb(89, 88, 88);
font-size: 15px;
&:hover {
color: $theme_color;
}
}
}
}
</style>
<style>
.hover-search {

View File

@ -133,7 +133,7 @@
<router-link to="/article?id=1371992704333905920" class="item" target="_blank">条款</router-link>
</Row>
<Row type="flex" justify="center" class="copyright">
Copyright © 2021 - Present
Copyright © {{year}} - Present
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">lili-shop</a>
版权所有
</Row>
@ -186,7 +186,8 @@ export default {
},
codeMsg: '发送验证码', //
interval: null, //
time: 60 //
time: 60, //
year: new Date().getFullYear()
};
},
methods: {
@ -220,8 +221,6 @@ export default {
}
});
}
} else {
// this.$Message.error('');
}
});
},

View File

@ -102,8 +102,6 @@ export default {
this.getCateList()
this.getGoodsList()
},
mounted () {
},
methods: {
getStoreMsg () { //
getDetailById(this.$route.query.id).then(res => {
@ -154,10 +152,12 @@ export default {
this.cateName = cate.labelName
this.getGoodsList()
},
//
changePageNum (val) {
this.params.pageNumber = val;
this.getGoodsList();
},
//
changePageSize (val) {
this.params.pageNumber = 1;
this.params.pageSize = val;

View File

@ -43,6 +43,7 @@
<Page :total="total" @on-change="changePageNum"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-total
show-sizer>
</Page>
</div>

View File

@ -53,9 +53,6 @@ export default {
mounted () {
let detail = this.$route.query.detail;
if (detail) this.detail = detail;
},
methods: {
}
};
</script>

View File

@ -88,7 +88,7 @@
<router-link to="/article?id=1371992704333905920" class="item" target="_blank">条款</router-link>
</Row>
<Row type="flex" justify="center" class="copyright">
Copyright © 2021 - Present
Copyright © {{year}} - Present
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">lili-shop</a>
版权所有
</Row>
@ -107,6 +107,7 @@ export default {
components: { Verify },
data () {
return {
year: new Date().getFullYear(),
formRegist: {
//
mobilePhone: '',
@ -156,6 +157,7 @@ export default {
} else {}
});
},
//
sendCode () {
if (this.time === 60) {
if (this.formRegist.mobilePhone === '') {
@ -191,14 +193,13 @@ export default {
});
}
},
handleCancel () {
this.$refs.formRegist.resetFields();
},
//
verifyChange (con) {
if (!con.status) return;
this.$refs.verify.show = false;
this.verifyStatus = true;
},
//
verifyBtnClick () {
if (!this.verifyStatus) {
this.$refs.verify.init();

View File

@ -241,6 +241,7 @@ export default {
}
},
mounted () {
document.querySelector('.forget-password').style.height = window.innerHeight + 'px'
this.$refs.formFirst.resetFields();
},
watch: {
@ -250,7 +251,7 @@ export default {
<style scoped lang="scss">
.forget-password{
height: 100%;
min-height: 700px;
}
.logo-box {
width: 600px;

View File

@ -66,6 +66,7 @@ export default {
};
},
methods: {
//
getTradeDetail () {
const params = this.$route.query;
params.clientType = 'PC'

View File

@ -46,9 +46,9 @@ export default {
};
},
methods: {
//
handlePay () {
const params = this.$route.query;
pay(params).then(res => {
if (res.success) {
this.qrcode = res.result;

View File

@ -65,7 +65,7 @@ export default {
};
},
computed: {
userInfo () {
userInfo () { //
return JSON.parse(Storage.getItem('userInfo'));
}
},

View File

@ -53,51 +53,6 @@ export function unitAddress (val) {
return val.replace(/,/g, ' ');
}
export function pointStatus (status) {
switch (status) {
case 'COMPLETE':
return '已成交';
case 'WITHDRAW':
return '已撤回';
case 'DEALING':
return '交易中';
case 'AUDITING':
return '待审核';
case 'NODEAL':
return '未成交';
case 'CANCEL':
return '已取消';
}
};
/**
* 根据订单状态码返回订单状态
* @param status_code
* @returns {string}
*/
export function unixOrderStatus (statusCode) {
switch (statusCode) {
case 'NEW':
return '新订单';
case 'INTODB_ERROR':
return '入库失败';
case 'CONFIRM':
return '已确认';
case 'PAID_OFF':
return '已付款';
case 'SHIPPED':
return '已发货';
case 'ROG':
return '已收货';
case 'COMPLETE':
return '已完成';
case 'CANCELLED':
return '已取消';
case 'AFTER_SERVICE':
return '售后中';
}
}
/**
* 13888888888 -> 138****8888
* @param mobile
@ -110,13 +65,3 @@ export function secrecyMobile (mobile) {
}
return mobile.replace(/(\d{3})(\d{4})(\d{4})/, '$1****$3');
}
/**
* 格式化货品的规格
* @param sku
* @returns {*}
*/
export function formatterSkuSpec (sku) {
if (!sku.spec_list || !sku.spec_list.length) return '';
return sku.spec_list.map(spec => spec.spec_value).join(' - ');
}

View File

@ -10,7 +10,7 @@
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safe_add(x, y) {
function safe_add (x, y) {
var lsw = (x & 0xFFFF) + (y & 0xFFFF)
var msw = (x >> 16) + (y >> 16) + (lsw >> 16)
return (msw << 16) | (lsw & 0xFFFF)
@ -19,7 +19,7 @@ function safe_add(x, y) {
/*
* Bitwise rotate a 32-bit number to the left.
*/
function rol(num, cnt) {
function rol (num, cnt) {
return (num << cnt) | (num >>> (32 - cnt))
}
@ -42,7 +42,7 @@ function hh(a, b, c, d, x, s, t) {
return cmn(b ^ c ^ d, a, b, x, s, t)
}
function ii(a, b, c, d, x, s, t) {
function ii (a, b, c, d, x, s, t) {
return cmn(c ^ (b | (~d)), a, b, x, s, t)
}
@ -50,7 +50,7 @@ function ii(a, b, c, d, x, s, t) {
* Calculate the MD5 of an array of little-endian words, producing an array
* of little-endian words.
*/
function coreMD5(x) {
function coreMD5 (x) {
var a = 1732584193
var b = -271733879
var c = -1732584194

View File

@ -1,4 +1,3 @@
// import Vue from 'vue';
import axios from 'axios';
import https from 'https';
import { Message, Spin, Modal } from 'view-design';
@ -8,6 +7,7 @@ import router from '../router/index.js';
import store from '../vuex/store';
import { handleRefreshToken } from '@/api/index';
const qs = require('qs');
// api地址
export const buyerUrl =
process.env.NODE_ENV === 'development'
? config.api_dev.buyer
@ -180,13 +180,8 @@ export const Method = {
};
export default function request (options) {
// 如果是服务端或者是请求的刷新token不需要检查token直接请求。
// if (process.server || options.url.indexOf('passport/token') !== -1) {
return service(options);
// }
// service(options).then(resolve).catch(reject)
}
// 防抖闭包来一波
function getTokenDebounce () {
let lock = false;

View File

@ -8,9 +8,9 @@ const psl = require('psl');
export default {
setItem: (key, value, options = {}) => {
if (process.client) {
const p_psl = psl.parse(document.domain);
let domain = p_psl.domain;
if (/\d+\.\d+\.\d+\.\d+/.test(p_psl.input)) domain = p_psl.input;
const pPsl = psl.parse(document.domain);
let domain = pPsl.domain;
if (/\d+\.\d+\.\d+\.\d+/.test(pPsl.input)) domain = pPsl.input;
options = { domain, ...options };
}
Cookies.set(key, value, options);
@ -20,9 +20,9 @@ export default {
},
removeItem: (key, options = {}) => {
if (process.client) {
const p_psl = psl.parse(document.domain);
let domain = p_psl.domain;
if (/\d+\.\d+\.\d+\.\d+/.test(p_psl.input)) domain = p_psl.input;
const pPsl = psl.parse(document.domain);
let domain = pPsl.domain;
if (/\d+\.\d+\.\d+\.\d+/.test(pPsl.input)) domain = pPsl.input;
options = { domain, ...options };
}
Cookies.remove(key, options);

View File

@ -61,7 +61,7 @@ const Merchant = resolve => require(['@/pages/Merchant'], resolve);
const UserMain = resolve => require(['@/pages/home/Main'], resolve);
/**
* 店铺入驻
* 店铺入驻
*/
const ShopEntry = resolve => require(['@/pages/shopEntry/shop-entry'], resolve);