添加注释

This commit is contained in:
mabo
2021-06-03 17:32:38 +08:00
parent 7f5d2b41d5
commit f97282ad44
20 changed files with 60 additions and 166 deletions

View File

@@ -63,17 +63,17 @@ export default {
};
},
methods: {
selectTags (item) {
selectTags (item) { // 选择热门标签
this.searchData = item;
this.search();
},
search () {
search () { // 全平台搜索商品
this.$router.push({
path: '/goodsList',
query: { keyword: this.searchData }
});
},
searchStore () {
searchStore () { // 店铺搜索商品
this.$emit('search', this.searchData)
}
},

View File

@@ -139,7 +139,7 @@ export default {
}, 1000);
}
},
goPromotion () {
goPromotion () { // 跳转秒杀页面
let routeUrl = this.$router.resolve({
path: '/seckill'
});

View File

@@ -1,3 +1 @@
## 此组件为结算页面修改发票信息使用 后续可以复用到个人信息添加发票页面
### 目前没有参数,之后会设置一个参数接收历史的单位发票数据

View File

@@ -69,7 +69,7 @@ export default {
receiptContent: '不开发票', // 发票内容
type: 1 // 1 个人 2 单位
},
ruleInline: {
ruleInline: { // 验证规则
receiptTitle: [{ required: true, message: '请填写公司名称' }],
taxpayerId: [
{ required: true, message: '请填写纳税人识别号' },
@@ -79,7 +79,7 @@ export default {
};
},
methods: {
save () {
save () { // 保存发票
if (this.invoiceForm.type === 1) {
// 个人
let flag = true;

View File

@@ -85,7 +85,7 @@ export default {
this.$emit('getAddress', this.addrContent);
}
},
init () {
init () { // 初始化地图
AMapLoader.load({
key: 'b440952723253aa9fe483e698057bf7d', // 申请好的Web端开发者Key首次调用 load 时必填
version: '', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15

View File

@@ -21,7 +21,7 @@ export default {
props: ['addressId'],
mounted () {},
methods: {
change (val, selectedData) {
change (val, selectedData) { // 选择地区
/**
* @returns [regionId,region]
*/
@@ -30,7 +30,7 @@ export default {
selectedData[selectedData.length - 1].__label.split('/')
]);
},
loadData (item, callback) {
loadData (item, callback) { // 加载数据
item.loading = true;
getRegion(item.value).then((res) => {
if (res.result.length <= 0) {
@@ -59,7 +59,7 @@ export default {
}
});
},
async init () {
async init () { // 初始化地图数据
let data = await getRegion(0);
let arr = [];
data.result.forEach((item) => {

View File

@@ -209,7 +209,7 @@ export default {
},
deep: true
},
'$route': {
'$route': { // 监听路由
handler (val, oVal) {
if (this.$route.query.categoryId) {
let cateId = this.$route.query.categoryId.split(',')
@@ -373,6 +373,7 @@ export default {
}
},
mounted () {
// 有分类id就根据id搜索
if (this.$route.query.categoryId) {
let cateId = this.$route.query.categoryId.split(',')
Object.assign(this.params, this.$route.query)

View File

@@ -43,11 +43,11 @@ export default {
};
},
methods: {
mouseDown (e) {
mouseDown (e) { // 鼠标按下操作,
this.downX = e.clientX;
this.flag = true;
},
mouseMove (e) {
mouseMove (e) { // 鼠标移动
if (this.flag) {
let offset = e.clientX - this.downX;
@@ -60,7 +60,7 @@ export default {
}
}
},
mouseUp () {
mouseUp () { // 鼠标抬起
if (!this.flag) return false;
this.flag = false;
let params = {
@@ -83,7 +83,7 @@ export default {
}
});
},
refresh () {
refresh () { // 刷新验证图片
this.flag = false;
this.downX = 0;
this.distance = 0;
@@ -91,7 +91,7 @@ export default {
this.verifyText = '拖动滑块解锁';
this.getImg();
},
getImg () {
getImg () { // 获取验证图片
getVerifyImg(this.type).then(res => {
this.data = res.result;
});