diff --git a/yudao-ui-admin/src/views/deliverGoods/freightSet/creatTemplates.vue b/yudao-ui-admin/src/views/deliverGoods/freightSet/creatTemplates.vue index b035c95a7..6b7038c94 100644 --- a/yudao-ui-admin/src/views/deliverGoods/freightSet/creatTemplates.vue +++ b/yudao-ui-admin/src/views/deliverGoods/freightSet/creatTemplates.vue @@ -3,7 +3,7 @@ v-if="dialogVisible" title="运费模板" :visible.sync="dialogVisible" - width="1000px" + width="70%" :before-close="handleClose" > @@ -140,9 +140,9 @@ - + { - el.title = el.city_ids.length > 0 ? JSON.stringify(el.city_ids) : JSON.stringify([[0, 0]]) - for (var i = 0; i < el.city_ids.length; i++) { - el.city_ids[i].shift() + if(el.city_ids.length > 0){ + el.cityId = el.city_ids.map(item => { + return item[2] + }).join(',') + }else{ + el.cityId = 'all' } - el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all' }) param.shippingTemplatesRegionRespVOList = this.ruleForm.region - param.shippingTemplatesRegionRespVOList.forEach((el, index) => { - // delete el.city_ids - // delete el.city_id - }) + + // this.ruleForm.region.forEach((el, index) => { + // el.title = el.city_ids.length > 0 ? JSON.stringify(el.city_ids) : JSON.stringify([[0, 0]]) + // for (var i = 0; i < el.city_ids.length; i++) { + // el.city_ids[i].shift() + // } + // el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all' + // }) + // param.shippingTemplatesRegionRespVOList = this.ruleForm.region + // param.shippingTemplatesRegionRespVOList.forEach((el, index) => { + // // delete el.city_ids + // // delete el.city_id + // }) if (this.ruleForm.appoint) { this.ruleForm.free.forEach((el, index) => { - el.title = el.city_ids.length > 0 ? JSON.stringify(el.city_ids) : JSON.stringify([[0, 0]]) - for (var i = 0; i < el.city_ids.length; i++) { - el.city_ids[i].shift() + if(el.city_ids.length > 0){ + el.cityId = el.city_ids.map(item => { + return item[2] + }).join(',') + }else{ + el.cityId = 'all' } - el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all' }) param.shippingTemplatesFreeRespVOList = this.ruleForm.free - param.shippingTemplatesFreeRespVOList.forEach((el, index) => { - // delete el.city_ids - // delete el.city_id - }) + // this.ruleForm.free.forEach((el, index) => { + // el.title = el.city_ids.length > 0 ? JSON.stringify(el.city_ids) : JSON.stringify([[0, 0]]) + // for (var i = 0; i < el.city_ids.length; i++) { + // el.city_ids[i].shift() + // } + // el.cityId = el.city_ids.length > 0 ? el.city_ids.join(',') : 'all' + // }) + // param.shippingTemplatesFreeRespVOList = this.ruleForm.free + // param.shippingTemplatesFreeRespVOList.forEach((el, index) => { + // // delete el.city_ids + // // delete el.city_id + // }) } if (this.ruleForm.noDelivery) { - param.shippingTemplatesNoDeliveryRespVOS = this.ruleForm.shippingTemplatesNoDeliveryRespVOS.map(a => { - console.log(a) - return a.slice(1, 3).join(',') - }).join(',') + param.shippingTemplatesNoDeliveryRespVOS = [{ + cityId:[], + }] + this.ruleForm.noRegion.forEach((item,index) => { + param.shippingTemplatesNoDeliveryRespVOS[0].cityId.push(item[2]) + }) + param.shippingTemplatesNoDeliveryRespVOS[0].cityId = param.shippingTemplatesNoDeliveryRespVOS[0].cityId.join(",") } if (this.type === 0) { logistics.shippingSave(param).then(res => { diff --git a/yudao-ui-app/.gitignore b/yudao-ui-app/.gitignore index 95cfff78f..869628594 100644 --- a/yudao-ui-app/.gitignore +++ b/yudao-ui-app/.gitignore @@ -21,4 +21,5 @@ yarn-error.log* *.sw? build.sh .idea -unpackage \ No newline at end of file +unpackage +mainifest.json \ No newline at end of file diff --git a/yudao-ui-app/App.vue b/yudao-ui-app/App.vue index 1f7d257e5..72690a77d 100644 --- a/yudao-ui-app/App.vue +++ b/yudao-ui-app/App.vue @@ -31,15 +31,6 @@ id: 0 }, onLaunch: function(option) { - // const res = memberGradeInfo().then((res) =>{ - // if(res.data.some((item) => !!parseInt(item.isExist))){ - // uni.setTabBarItem({ - // index: 2, - // pagePath: '/pages/member_equity/index' - // }) - // } - // }) - let that = this; // #ifdef H5 uni.getSystemInfo({ @@ -258,7 +249,17 @@ }); } }, - onShow: function() { + onShow:async function() { + // const res = await memberGradeInfo() + // if(res.data.some((item) => !!parseInt(item.isExist))){ + // uni.setTabBarItem({ + // index: 0, + // pagePath: '/pages/member_equity/index' + // }) + // uni.switchTab({ + // url:'/pages/member_equity/index' + // }) + // } // #ifdef H5 uni.getSystemInfo({ success(e) { diff --git a/yudao-ui-app/api/order.js b/yudao-ui-app/api/order.js index 4efb6c719..ef7768b91 100644 --- a/yudao-ui-app/api/order.js +++ b/yudao-ui-app/api/order.js @@ -5,11 +5,11 @@ import request from "@/utils/request.js"; * @param numType boolean true 购物车数量,false=购物车产品数量 */ export function getCartCounts(numType,type) { - return request.get("cart/count?numType=" + numType + "&type=" + type); + return request.get("front/cart/count?numType=" + numType + "&type=" + type); } /** * 获取购物车列表 - * + * */ export function getCartList(data) { return request.get("cart/list", data); @@ -40,7 +40,7 @@ export function cartDel(ids) { /** * 购物车重选提交 - * + * */ export function getResetCart(data) { return request.post('cart/resetcart', data); @@ -56,7 +56,7 @@ export function getOrderList(data) { /** * 订单产品信息 - * @param string unique + * @param string unique */ export function orderProduct(data) { return request.post('order/product', data); @@ -65,7 +65,7 @@ export function orderProduct(data) { /** * 订单评价 * @param object data - * + * */ export function orderComment(data) { return request.post('order/comment', data); @@ -89,7 +89,7 @@ export function orderData() { /** * 订单取消 * @param string id - * + * */ export function orderCancel(id) { return request.post('order/cancel', { @@ -100,7 +100,7 @@ export function orderCancel(id) { /** * 删除已完成订单 * @param string uni - * + * */ export function orderDel(uni) { return request.post('order/del', { @@ -110,7 +110,7 @@ export function orderDel(uni) { /** * 订单详情 - * @param string uni + * @param string uni */ export function getOrderDetail(uni) { return request.get('order/detail/' + uni); @@ -119,7 +119,7 @@ export function getOrderDetail(uni) { /** * 再次下单 * @param string uni - * + * */ export function orderAgain(uni) { return request.post('order/again', { @@ -130,7 +130,7 @@ export function orderAgain(uni) { /** * 订单收货 * @param string uni - * + * */ export function orderTake(uni) { return request.post('order/take', { @@ -148,7 +148,7 @@ export function express(uni) { /** * 获取退款理由 - * + * */ export function ordeRefundReason() { return request.get('order/refund/reason'); @@ -180,7 +180,7 @@ export function orderConfirm(cartId, isNew, addAgain,secKill,combination,bargain /** * 获取当前金额能使用的优惠卷 * @param string price - * + * */ export function getCouponsOrderPrice(preOrderNo) { return request.get(`coupons/order/${preOrderNo}`) @@ -190,7 +190,7 @@ export function getCouponsOrderPrice(preOrderNo) { * 订单创建 * @param string key * @param object data - * + * */ export function orderCreate(data) { return request.post('order/create', data); @@ -243,7 +243,7 @@ export function applyRefund(orderId) { * @param object data */ export function preOrderApi(data) { - return request.post(`order/pre/order`, data); + return request.post(`front/order/pre/order`, data); } /** @@ -252,4 +252,4 @@ export function preOrderApi(data) { */ export function loadPreOrderApi(preOrderNo) { return request.get(`order/load/pre/${preOrderNo}`); -} \ No newline at end of file +} diff --git a/yudao-ui-app/api/store.js b/yudao-ui-app/api/store.js index 4de9c1475..b578564ec 100644 --- a/yudao-ui-app/api/store.js +++ b/yudao-ui-app/api/store.js @@ -6,7 +6,7 @@ import request from "@/utils/request.js"; * */ export function getProductDetail(id, type) { - return request.get('product/detail/' + id + '?type=' + type, {}, { + return request.get('front/product/detail/' + id + '?type=' + type, {}, { noAuth: true }); } @@ -17,12 +17,12 @@ export function getProductDetail(id, type) { */ // #ifndef MP export function getProductCode(id) { - return request.get('product/code/' + id, {}); + return request.get('front/product/code/' + id, {}); } // #endif // #ifdef MP export function getProductCode(id) { - return request.get('product/code/' + id, { + return request.get('front/product/code/' + id, { user_type: 'routine' }); } @@ -34,7 +34,7 @@ export function getProductCode(id) { * @param string category product=普通产品,product_seckill=秒杀产品 */ export function collectAdd(id, category) { - return request.post('collect/add', { + return request.post('front/collect/add', { id: id, 'category': category === undefined ? 'product' : category }); @@ -62,7 +62,7 @@ export function collectDelete(ids) { * */ export function postCartAdd(data) { - return request.post('cart/save', data, {}); + return request.post('front/cart/save', data, {}); } /** @@ -146,7 +146,7 @@ export function getReplyList(id, data) { * @param int id */ export function getReplyConfig(id) { - return request.get('reply/config/' + id,{},{ + return request.get('front/reply/config/' + id,{},{ noAuth: true }); } @@ -175,7 +175,7 @@ export function storeListApi(data) { * @param object data */ export function getProductGood() { - return request.get('product/good'); + return request.get('front/product/good'); } /** @@ -185,7 +185,7 @@ export function getProductGood() { * */ export function getReplyProduct(id) { - return request.get('reply/product/' + id, { + return request.get('front/reply/product/' + id, { noAuth: true }) } diff --git a/yudao-ui-app/package-lock.json b/yudao-ui-app/package-lock.json index 7cacd6942..b18489c50 100644 --- a/yudao-ui-app/package-lock.json +++ b/yudao-ui-app/package-lock.json @@ -1,51 +1,8 @@ { "name": "yudao-ui-app", "version": "1.0.0", - "lockfileVersion": 2, + "lockfileVersion": 1, "requires": true, - "packages": { - "": { - "name": "yudao-ui-app", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "clipboard": "^2.0.11" - } - }, - "node_modules/clipboard": { - "version": "2.0.11", - "resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz", - "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", - "dependencies": { - "good-listener": "^1.2.2", - "select": "^1.1.2", - "tiny-emitter": "^2.0.0" - } - }, - "node_modules/delegate": { - "version": "3.2.0", - "resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz", - "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" - }, - "node_modules/good-listener": { - "version": "1.2.2", - "resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz", - "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==", - "dependencies": { - "delegate": "^3.1.2" - } - }, - "node_modules/select": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz", - "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" - }, - "node_modules/tiny-emitter": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz", - "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" - } - }, "dependencies": { "clipboard": { "version": "2.0.11", diff --git a/yudao-ui-app/pages.json b/yudao-ui-app/pages.json index 2bf2157aa..115212c27 100644 --- a/yudao-ui-app/pages.json +++ b/yudao-ui-app/pages.json @@ -574,34 +574,41 @@ "borderStyle": "white", "backgroundColor": "#ffffff", "list": [ - { - "pagePath": "pages/index/index", - "iconPath": "static/images/tabbar/nav_icon_shop.png", - "selectedIconPath": "static/images/tabbar/nav_icon_shop_active.png", - "text": "商城" - }, - { - "pagePath": "pages/goods_cate/goods_cate", - "iconPath": "static/images/tabbar/nav_icon_sort.png", - "selectedIconPath": "static/images/tabbar/nav_icon_sort_active.png", - "text": "分类" - }, + // { + // "pagePath": "pages/index/index", + // "iconPath": "static/images/tabbar/nav_icon_shop.png", + // "selectedIconPath": "static/images/1-002.png", + // "text": "商城" + // }, + // { + // "pagePath": "pages/goods_cate/goods_cate", + // "iconPath": "static/images/tabbar/nav_icon_sort.png", + // "selectedIconPath": "static/images/2-002.png", + // "text": "分类" + // }, { "pagePath": "pages/member_application/index", - "iconPath": "static/images/tabbar/nav_icon_member.png", + "iconPath": "static/images/2-001.png", "selectedIconPath": "static/images/tabbar/nav_icon_member_active.png", "text": "会员申请" }, - { - "pagePath": "pages/order_addcart/order_addcart", - "iconPath": "static/images/tabbar/nav_icon_cart.png", - "selectedIconPath": "static/images/tabbar/nav_icon_cart_active.png", - "text": "购物车" - }, + { + "pagePath": "pages/member_equity/index", + "iconPath": "static/images/2-001.png", + "selectedIconPath": "static/images/tabbar/nav_icon_member_active.png", + "text": "会员申请", + "visible":false + }, + // { + // "pagePath": "pages/order_addcart/order_addcart", + // "iconPath": "static/images/tabbar/nav_icon_cart.png", + // "selectedIconPath": "static/images/3-002.png", + // "text": "购物车" + // }, { "pagePath": "pages/user/index", "iconPath": "static/images/tabbar/nav_icon_my.png", - "selectedIconPath": "static/images/tabbar/nav_icon_my_active.png", + "selectedIconPath": "static/images/4-002.png", "text": "我的" } ] diff --git a/yudao-ui-app/pages/goods_details/index.vue b/yudao-ui-app/pages/goods_details/index.vue index f4a88e32d..1cb2e3f67 100644 --- a/yudao-ui-app/pages/goods_details/index.vue +++ b/yudao-ui-app/pages/goods_details/index.vue @@ -90,7 +90,7 @@ - + @@ -463,7 +463,7 @@ setTimeout(()=>{ spread(mapeMpQrCodeValue.spread).then(res => {}).catch(res => {}) },2000) - + } else { this.id = options.id; } @@ -560,7 +560,7 @@ }, /** * 购物车手动填写 - * + * */ iptCartNum: function(e) { this.$set(this.attr.productSelect, 'cart_num', e ? e : 1); @@ -598,7 +598,7 @@ } }, /* - *去商品详情页 + *去商品详情页 */ goDetail(item) { if (!item.activityH5) { @@ -646,7 +646,7 @@ }, /** * 购物车数量加和数量减 - * + * */ ChangeCartNum: function(changeValue) { //changeValue:是否 加|减 @@ -679,7 +679,7 @@ }, /** * 属性变动赋值 - * + * */ ChangeAttr: function(res) { let productSelect = this.productValue[res]; @@ -723,7 +723,7 @@ }, /** * 优品推荐 - * + * */ getGoods() { getProductGood().then(res => { @@ -751,7 +751,7 @@ }, /** * 获取产品详情 - * + * */ getGoodsDetails: function() { let that = this; @@ -859,7 +859,7 @@ }, /** * 打开地图 - * + * */ showMaoLocation: function() { if (!this.systemStore.latitude || !this.systemStore.longitude) return this.$util.Tips({ @@ -876,7 +876,7 @@ }, /** * 默认选中属性 - * + * */ DefaultSelect: function() { let productAttr = this.attr.productAttr; @@ -939,7 +939,7 @@ }, /** * 获取优惠券 - * + * */ getCouponList(type) { let that = this, @@ -969,9 +969,9 @@ that.$set(that.coupon, 'list', that.coupon.list); that.$set(that.coupon, 'coupon', false); }, - /** - * - * + /** + * + * * 收藏商品 */ setCollect: function() { @@ -1015,7 +1015,7 @@ }, /** * 打开属性加入购物车 - * + * */ joinCart: function(e) { //是否登录 @@ -1125,7 +1125,7 @@ }, /** * 分享打开 - * + * */ listenerActionSheet: function() { if (this.isLogin === false) { diff --git a/yudao-ui-app/pages/member_application/index.vue b/yudao-ui-app/pages/member_application/index.vue index cfcbb10ab..dd37bbd7b 100644 --- a/yudao-ui-app/pages/member_application/index.vue +++ b/yudao-ui-app/pages/member_application/index.vue @@ -107,15 +107,23 @@ }); try{ const res = await memberGradeInfo() - if(res.data.some((item) => !!parseInt(item.isExist))){ - uni.setTabBarItem({ - index: 0, - pagePath: '/pages/member_equity/index' - }) - uni.switchTab({ - url:'/pages/member_equity/index' - }) - } + if(res.data.some((item) => !!parseInt(item.isExist))){ + uni.setTabBarItem({ + index: 0, + pagePath: '/pages/member_equity/index' + }) + uni.switchTab({ + url:'/pages/member_equity/index' + }) + }else{ + uni.setTabBarItem({ + index: 0, + pagePath: '/pages/member_application/index' + }) + uni.switchTab({ + url:'/pages/member_application/index' + }) + } this.memberData = res.data } finally{ uni.hideLoading(); diff --git a/yudao-ui-app/pages/member_equity/index.vue b/yudao-ui-app/pages/member_equity/index.vue index d60f4f373..ee6c7d1ac 100644 --- a/yudao-ui-app/pages/member_equity/index.vue +++ b/yudao-ui-app/pages/member_equity/index.vue @@ -62,7 +62,8 @@