diff --git a/pages/commission/components/account-info.vue b/pages/commission/components/account-info.vue index d0463e61..686fa7e2 100644 --- a/pages/commission/components/account-info.vue +++ b/pages/commission/components/account-info.vue @@ -1,108 +1,117 @@ + .account-card { + width: 694rpx; + margin: 0 auto; + padding: 2rpx; + background: linear-gradient(180deg, #ffffff 0.88%, #fff9ec 100%); + border-radius: 12rpx; + z-index: 3; + position: relative; + + .account-card-box { + background: #ffefd6; + + .card-box-header { + padding: 0 30rpx; + height: 72rpx; + box-shadow: 0px 2px 6px #f2debe; + + .header-title { + font-size: 24rpx; + font-weight: 500; + color: #a17545; + line-height: 30rpx; + } + + .cicon-play-arrow { + color: #a17545; + font-size: 24rpx; + line-height: 30rpx; + } + } + + .card-content { + height: 190rpx; + background: #fdfae9; + + .item-title { + font-size: 24rpx; + font-weight: 500; + color: #cba67e; + line-height: 30rpx; + margin-bottom: 24rpx; + } + + .item-detail { + font-size: 36rpx; + font-family: OPPOSANS; + font-weight: bold; + color: #692e04; + line-height: 30rpx; + } + } + } + } + \ No newline at end of file diff --git a/pages/commission/components/commission-info.vue b/pages/commission/components/commission-info.vue index fea225fd..e2ad24eb 100644 --- a/pages/commission/components/commission-info.vue +++ b/pages/commission/components/commission-info.vue @@ -1,126 +1,126 @@ + .tag-img { + width: 36rpx; + height: 36rpx; + border-radius: 50%; + margin-left: -2rpx; + } + + .tag-title { + font-size: 24rpx; + padding: 0 10rpx; + font-weight: 500; + line-height: 36rpx; + color: #fff; + } + } + } + } + \ No newline at end of file diff --git a/pages/commission/goods.vue b/pages/commission/goods.vue index 7b186f02..1d4ce36d 100644 --- a/pages/commission/goods.vue +++ b/pages/commission/goods.vue @@ -1,137 +1,123 @@ + .share-btn { + width: 120rpx; + height: 50rpx; + border-radius: 25rpx; + } + } + \ No newline at end of file diff --git a/pages/commission/order.vue b/pages/commission/order.vue index 4e92e778..56ceb786 100644 --- a/pages/commission/order.vue +++ b/pages/commission/order.vue @@ -1,417 +1,411 @@ + &::before { + content: '¥'; + font-size: 22rpx; + } + } + + .order-status { + line-height: 30rpx; + padding: 0 10rpx; + border-radius: 30rpx; + margin-left: 20rpx; + font-size: 24rpx; + color: var(--ui-BG-Main); + } + } + } + \ No newline at end of file diff --git a/project.config.json b/project.config.json new file mode 100644 index 00000000..d554d96e --- /dev/null +++ b/project.config.json @@ -0,0 +1,28 @@ +{ + "appid": "wxd4da84f87dcafd80", + "compileType": "miniprogram", + "libVersion": "3.2.4", + "packOptions": { + "ignore": [], + "include": [] + }, + "setting": { + "coverView": true, + "es6": true, + "postcss": true, + "minified": true, + "enhance": true, + "showShadowRootInWxmlPanel": true, + "packNpmRelationList": [], + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + } + }, + "condition": {}, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + } +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json new file mode 100644 index 00000000..31ea5724 --- /dev/null +++ b/project.private.config.json @@ -0,0 +1,7 @@ +{ + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "uni3", + "setting": { + "compileHotReLoad": true + } +} \ No newline at end of file diff --git a/sheep/api/commission.js b/sheep/api/commission.js index e3b44c75..35c18d3b 100644 --- a/sheep/api/commission.js +++ b/sheep/api/commission.js @@ -1,65 +1,71 @@ import request from '@/sheep/request'; export default { - // 分销商详情 - agent: () => - request({ - url: 'commission/agent', - method: 'GET', - custom: { - showLoading: false, - showError: false, - }, - }), - // 分销表单 - form: () => - request({ - url: 'commission/agent/form', - method: 'GET', - }), - // 申请分销商 - apply: (data) => - request({ - url: 'commission/agent/apply', - method: 'POST', - data, - custom: { - showSuccess: true, - }, - }), - // 分销动态 - log: (params) => - request({ - url: 'commission/log', - method: 'GET', - params, - }), - // 分销订单 - order: (params) => - request({ - url: 'commission/order', - method: 'GET', - params, - }), - // 分销商品 - goods: (params) => - request({ - url: 'commission/goods', - method: 'GET', - params, - }), - // 我的团队 - team: (params) => - request({ - url: 'commission/agent/team', - method: 'GET', - params, - }), - // 佣金转余额 - transfer: (data) => - request({ - url: 'commission/agent/transfer', - method: 'POST', - data, - }), -}; + // 分销商详情 + agent: () => + request({ + url: 'commission/agent', + method: 'GET', + custom: { + showLoading: false, + showError: false, + }, + }), + // 分销表单 + form: () => + request({ + url: 'commission/agent/form', + method: 'GET', + }), + // 申请分销商 + apply: (data) => + request({ + url: 'commission/agent/apply', + method: 'POST', + data, + custom: { + showSuccess: true, + }, + }), + // 分销动态 + log: (params) => + request({ + url: 'commission/log', + method: 'GET', + params, + }), + // 分销订单 + order: (params) => + request({ + url: 'commission/order', + method: 'GET', + params, + }), + + // 分销商品 + goods: (params) => + request({ + url: '/app-api/product/spu/page', + method: 'GET', + params, + }), + // 我的团队 + team: (params) => + request({ + url: 'commission/agent/team', + method: 'GET', + params, + }), + // 佣金转余额 + transfer: (data) => + request({ + url: 'commission/agent/transfer', + method: 'POST', + data, + }), + getSummary: (data) => + request({ + url: '/app-api/trade/brokerage-user/get-summary', + method: 'GET', + }), +}; \ No newline at end of file diff --git a/sheep/request/index.js b/sheep/request/index.js index 7ec6d3cd..a0f41207 100644 --- a/sheep/request/index.js +++ b/sheep/request/index.js @@ -94,7 +94,7 @@ http.interceptors.request.use( if (config.url.indexOf('/app-api/') !== -1) { config.header['Accept'] = '*/*' config.header['tenant-id'] = '1'; - config.header['terminal'] = '20'; + config.header['terminal'] = '20'; config.header['Authorization'] = 'Bearer test247'; } return config; @@ -113,7 +113,7 @@ http.interceptors.response.use( if (response.header.authorization || response.header.Authorization) { $store('user').setToken(response.header.authorization || response.header.Authorization); } - // TODO 芋艿:如果是登录的 API,则自动设置 token + // TODO 芋艿:如果是登录的 API,则自动设置 token response.config.custom.showLoading && closeLoading(); if (response.data.error !== 0 && response.data.code !== 0) { @@ -125,10 +125,10 @@ http.interceptors.response.use( }); return Promise.resolve(response.data); } - // 成功时的提示 + // 成功时的提示 if ( (response.data.error === 0 || response.data.code === 0) && - ( response.data.msg !== '' || response.config.custom.successMsg !== '' ) && + (response.data.msg !== '' || response.config.custom.successMsg !== '') && response.config.custom.showSuccess ) { uni.showToast({ @@ -215,8 +215,8 @@ const request = (config) => { } // TODO 芋艿:额外拼接 if (config.url.indexOf('/app-api/') >= 0) { - // config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】 - config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】 + config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】 + // config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】 } return http.middleware(config); }; diff --git a/sheep/request2/index.js b/sheep/request2/index.js index 545cc012..56b19a33 100644 --- a/sheep/request2/index.js +++ b/sheep/request2/index.js @@ -95,8 +95,8 @@ http.interceptors.request.use( if (config.url.indexOf('/app-api/') !== -1) { config.header['Accept'] = '*/*' config.header['tenant-id'] = '1'; - config.header['terminal'] = '20'; - config.header['Authorization'] = 'Bearer test247'; + config.header['terminal'] = '20'; + config.header['Authorization'] = 'Bearer test247'; } return config; },