diff --git a/components/index-coupon/index-coupon.less b/components/index-coupon/index-coupon.less
deleted file mode 100644
index 2155308..0000000
--- a/components/index-coupon/index-coupon.less
+++ /dev/null
@@ -1,49 +0,0 @@
-@import '../../common/css/global';
-
-.coupon-warp-box {
- background: #FFFFFF;
- overflow:auto;
- white-space:nowrap;
- width:100%;
- padding: 10px 15px;
- .coupon-item-box {
- width: 160px;
- height: 65px;
- display: inline-block;
- background: @mainColor;
- margin-right: 5px;
- border-radius: 4px;
- .coupon-item {
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 100%;
- padding: 5px;
- color: #FFFFFF;
- .left {
- .money {
- font-size: 10px;
- }
- .num {
- font-size: 30px;
- }
- }
- .right {
- font-size: 10px;
- text-align: center;
- .label {
-
- }
- .btn{
- padding: 2px 10px;
- border-radius: 3px;
- background: #FFFFFF;
- color: @mainColor;
- margin-top: 5px;
- box-shadow:0px 2px 4px 0px rgba(0,0,0,0.1);
- }
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/components/index-coupon/index-coupon.vue b/components/index-coupon/index-coupon.vue
deleted file mode 100644
index 57a8e60..0000000
--- a/components/index-coupon/index-coupon.vue
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
-
-
-
- ¥
-
-
- {{ item.associate.action_type.value }}
-
-
-
-
-
- {{ item.associate.action_type.value }}
-
-
- 折
-
-
-
-
-
- {{item.associate.title}}
-
-
- 点击领取
-
-
- 去使用
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/components/index-nav/index-nav.vue b/components/index-nav/index-nav.vue
index a913f3e..8a46e01 100644
--- a/components/index-nav/index-nav.vue
+++ b/components/index-nav/index-nav.vue
@@ -3,7 +3,7 @@
-
+
diff --git a/components/lf-indexFind/lf-indexFind.vue b/components/lf-indexFind/lf-indexFind.vue
index dbe0f3f..d0bf638 100644
--- a/components/lf-indexFind/lf-indexFind.vue
+++ b/components/lf-indexFind/lf-indexFind.vue
@@ -6,9 +6,9 @@
-
- 南边开,风儿吹,北边放,花儿开,西边来,春归去,东边来,北边跑
+ v-for="(item, index) in list" :key="index">
+
+ {{ item.associate.title }}
@@ -18,6 +18,12 @@
diff --git a/components/lf-seckill/lf-seckill.vue b/components/lf-seckill/lf-seckill.vue
index e2ad621..def0997 100644
--- a/components/lf-seckill/lf-seckill.vue
+++ b/components/lf-seckill/lf-seckill.vue
@@ -2,7 +2,7 @@
剁手不心疼
- 秒杀购
+ {{ title || '秒杀购' }}
低价不等人,快来秒杀啦~
@@ -22,6 +22,16 @@
-
diff --git a/pages/address/list/list.vue b/pages/address/list/list.vue
index 970ba18..7a41e54 100644
--- a/pages/address/list/list.vue
+++ b/pages/address/list/list.vue
@@ -31,21 +31,22 @@
-
+
编辑
-
-
+
+
删除
+
-
+
新增收货地址
@@ -61,7 +62,8 @@ export default {
list: [],
order_no: '',
url: '',
- id:''
+ id:'',
+ is_load: true
};
},
@@ -89,29 +91,62 @@ export default {
props: {},
methods: {
// 删除收货地址
- deleteAddress(item){
+ deleteAddress(item, index){
console.log("item", item)
- var token = this.$cookieStorage.get('user_token');
- this.$http.ajax({
- api: '/api/address/'+ item.id,
- method: 'DELETE',
- header: {
- Authorization: token
- }
- }).then(res => {
- console.log("删除地址", res);
+
+ uni.showModal({
+ title: '温馨提示',
+ content: '您确定删除该收货地址吗?',
+ success: result => {
+ if(result.confirm){
+ var token = this.$cookieStorage.get('user_token');
+ this.$http.ajax({
+ api: '/api/address/'+ item.id,
+ method: 'DELETE',
+ header: {
+ Authorization: token
+ }
+ }).then(res => {
+ console.log("删除地址", res);
+ this.$msg('删除成功', {icon: 'success'});
+ this.list.splice(index, 1);
+ }).catch(err => {
+ this.$msg('删除失败', {icon: 'error'});
+ })
+ }
+ }
})
},
// 切换默认地址
radioChange(e){
let current = e.target.value;
+ let id = null;
this.list.forEach((item, index) => {
if(current == index){
item.is_default = 1;
+ id = item.id;
}else{
item.is_default = 0;
}
})
+ this.switchDefaultAddress(id);
+ },
+ switchDefaultAddress(id){
+ var token = this.$cookieStorage.get('user_token');
+ this.$http.ajax({
+ api: 'api/address/'+ id,
+ method: 'PUT',
+ header: {
+ Authorization: token
+ },
+ data: {
+ is_default: 1
+ }
+ }).then(res => {
+ this.$msg('操作成功', {icon: 'success'});
+ }).catch(err => {
+ this.$msg('切换默认地址失败');
+ })
},
setInfo(e) {
// var from = e.currentTarget.dataset.info;
@@ -150,6 +185,7 @@ export default {
// 查询收货地址列表
queryAddressList() {
+ this.is_load = true;
var token = this.$cookieStorage.get('user_token');
this.$http.get({
api: 'api/address',
@@ -159,7 +195,7 @@ export default {
}).then(res => {
if (res.statusCode == 200) {
res = res.data;
-
+
if (res.status) {
this.setData({
list: res.data
@@ -176,7 +212,10 @@ export default {
image: '../../../static/error.png'
});
}
- });
+ this.is_load = false;
+ }).catch(err => {
+ this.is_load = false;
+ })
},
setData: function (obj) {
@@ -213,7 +252,9 @@ export default {