ソースを参照

Merge branch 'dev' of http://git.izouma.com/xiongzhu/raex_front into dev

panhui 3 年 前
コミット
b55f1d67e1

+ 31 - 3
src/mixins/order.js

@@ -39,12 +39,40 @@ export default {
             ],
             payMethodOptions: [
                 {
-                    label: '微信',
-                    value: 'WEIXIN'
+                    label: '首信易快捷支付',
+                    value: 'SYXPAY'
                 },
                 {
                     label: '支付宝',
-                    value: 'ALIPAY'
+                    value: 'ALI'
+                },
+                {
+                    label: '余额',
+                    value: 'BALANCE'
+                },
+                {
+                    label: '银联',
+                    value: 'UNION'
+                },
+                {
+                    label: '衫德快捷绑卡',
+                    value: 'QUICK_BIND'
+                },
+                {
+                    label: '数字人民币',
+                    value: 'DECP'
+                },
+                {
+                    label: '绿洲灵气',
+                    value: 'LINGQI'
+                },
+                {
+                    label: '积分',
+                    value: 'POINT'
+                },
+                {
+                    label: '绿洲石',
+                    value: 'STONE'
                 }
             ]
         };

+ 3 - 1
src/router/index.js

@@ -268,7 +268,9 @@ const routes = [
         path: '/changeText',
         name: 'userChangeText',
         component: () => import('../views/account/ChangeText.vue'),
-        meta: {}
+        meta: {
+            menuPage: true
+        }
     },
     {
         path: '/waiting',

+ 8 - 8
src/views/Mine.vue

@@ -428,18 +428,18 @@ export default {
             this.$http.get('/userDetail/light/' + this.userInfo.id).then(res => {
                 this.light = res;
             });
+            this.$http
+                .post('/cart/myStatus')
+                .then(res => {
+                    this.cartNum = res.count;
+                })
+                .catch(e => {
+                    this.$toast(e.error);
+                });
         }
         this.$http.get('/sysConfig/get/chatGPT_show').then(res => {
             this.showGPT = res.value === true || res.value === '1';
         });
-        this.$http
-            .post('/cart/myStatus')
-            .then(res => {
-                this.cartNum = res.count;
-            })
-            .catch(e => {
-                this.$toast(e.error);
-            });
     },
     methods: {
         goAi() {

+ 5 - 5
src/views/asset/Consignment.vue

@@ -166,11 +166,11 @@ export default {
             this.$http.post('/asset/getServicecharge?id=' + this.$route.query.id).then(res => {
                 this.serviceCharge = res;
             });
-            if (res.category === '元域名') {
-                this.$http.get('/sysConfig/get/domain_service_charge,domain_price').then(res => {
-                    this.minPrice = Number(res.domain_price.value);
-                });
-            }
+            // if (res.category === '元域名') {
+            //     this.$http.get('/sysConfig/get/domain_service_charge,domain_price').then(res => {
+            //         this.minPrice = Number(res.domain_price.value);
+            //     });
+            // }
         });
     },
     methods: {

+ 26 - 21
src/views/product/Detail.vue

@@ -1061,6 +1061,9 @@ export default {
                 });
         },
         getCartNum() {
+            if (!this.isLogin) {
+                return;
+            }
             let id = this.info.id;
             let data = {
                 collectionId: id
@@ -1075,27 +1078,29 @@ export default {
                 });
         },
         addCart() {
-            if (this.info.source == 'OFFICIAL') {
-                this.$toast('官方藏品不能加入购物车');
-                return;
-            }
-            if (this.userInfo.id == this.info.ownerId) {
-                this.$toast('不能把自己的藏品加入购物车');
-                return;
-            }
-            let id = this.info.id;
-            let data = {
-                collectionId: id
-            };
-            this.$http
-                .post('/cart/create', data)
-                .then(res => {
-                    this.$toast.success('恭喜加入购物车');
-                    this.getCartNum();
-                })
-                .catch(e => {
-                    this.$toast(e.error);
-                });
+            this.checkLogin().then(() => {
+                if (this.info.source == 'OFFICIAL') {
+                    this.$toast('官方藏品不能加入购物车');
+                    return;
+                }
+                if (this.userInfo.id == this.info.ownerId) {
+                    this.$toast('不能把自己的藏品加入购物车');
+                    return;
+                }
+                let id = this.info.id;
+                let data = {
+                    collectionId: id
+                };
+                this.$http
+                    .post('/cart/create', data)
+                    .then(res => {
+                        this.$toast.success('恭喜加入购物车');
+                        this.getCartNum();
+                    })
+                    .catch(e => {
+                        this.$toast(e.error);
+                    });
+            });
         },
         checkBuy() {
             this.checkLogin()

+ 2 - 3
src/views/user/ShoppingCartSubmit.vue

@@ -187,7 +187,6 @@ export default {
                 vip: this.$store.state.userInfo.vipPurchase > 0 ? true : false
             };
             params.sign = encryptUtil.encrypt(qs.stringify({ ...params, ts: new Date().getTime() }));
-            console.log('ahagadg', typeof this.collectionIds);
             return this.$http.post('/order/mqCreate', params).then(res => {
                 return new Promise((resolve, reject) => {
                     let checkOrder = () => {
@@ -265,13 +264,13 @@ export default {
                         this.$toast(e.error || '购买失败');
                         this.payName = '1';
                     });
-            } else if (this.payType == 'ALIPAY') {
+            } else if (this.payType == 'ALI') {
                 this.$toast.loading({
                     message: '支付中',
                     forbidClick: true
                 });
                 this.$http
-                    .get('/payOrder/v2/alipay', { id: this.id })
+                    .get('/payOrder/v2/ali', { id: this.id })
                     .then(res => {
                         this.$toast.clear();
                         document.location.href = res;