Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
group-buy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
group-buy-ui
Commits
bd729e84
Commit
bd729e84
authored
Oct 13, 2022
by
徐光星
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/fix' into 'master'
Feat/fix See merge request
!14
parents
d61a9ea1
67b6a49e
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
4016 additions
and
1811 deletions
+4016
-1811
.sentryclirc.js
.sentryclirc.js
+23
-16
package-lock.json
package-lock.json
+3870
-1700
package.json
package.json
+8
-8
address.api.js
src/api/address.api.js
+5
-5
groupBuy.js
src/api/groupBuy.js
+13
-11
home.api.js
src/api/home.api.js
+7
-7
order.api.js
src/api/order.api.js
+23
-23
pay.api.js
src/api/pay.api.js
+16
-16
qiniu.api.js
src/api/qiniu.api.js
+2
-2
user.api.js
src/api/user.api.js
+8
-8
index.vue
src/components/error/index.vue
+5
-0
env.config.js
src/config/env.config.js
+3
-1
pre-prod.config.js
src/config/pre-prod.config.js
+3
-1
prod.config.js
src/config/prod.config.js
+3
-1
main.js
src/main.js
+7
-8
vue.config.js
vue.config.js
+20
-4
No files found.
.sentryclirc.js
View file @
bd729e84
module
.
exports
=
{
// Sentry options are required
organization
:
'
sentry
'
,
project
:
'
group-buy-ui
'
,
apiKey
:
'
0d3fa45c10f047d7bfe03eb268a93c23a878d7585dc749418f728f88d65e1477
'
,
const
crypto
=
require
(
'
crypto
'
);
const
pkgInfo
=
require
(
'
./package.json
'
);
const
project
=
pkgInfo
.
name
;
const
hashName
=
crypto
.
createHash
(
'
md5
'
)
.
update
(
project
)
.
digest
(
'
hex
'
)
.
substr
(
0
,
8
);
// Release version name/hash is required
release
:
'
group-buy-ui@1.0.0
'
,
baseSentryURL
:
'
http://sentry.quantgroups.com/api/0
'
,
deleteAfterCompile
:
true
,
include
:
/static
\/
js
\/
/
,
// 只上传js和map文件
ignore
:
[
'
node_modules
'
],
suppressErrors
:
true
,
filenameTransform
:
function
(
filename
)
{
return
'
~/group-buy-ui/public/
'
+
filename
},
}
module
.
exports
=
{
org
:
'
sentry
'
,
project
,
authToken
:
'
3f1f6f3789594e3a81280c1cd8d4d1008037a7abad714698b60b6f358c3d7562
'
,
url
:
'
http://newsentry.quantgroups.com
'
,
release
:
`
${
project
}
@1.0.0`
,
ignore
:
[
'
node_modules
'
,
'
tests
'
],
silent
:
true
,
include
:
[
{
paths
:
[
'
./dist/js
'
],
urlPrefix
:
`https://misc.lkbang.net/
${
hashName
}
/`
}
]
};
package-lock.json
View file @
bd729e84
This diff is collapsed.
Click to expand it.
package.json
View file @
bd729e84
...
...
@@ -17,6 +17,7 @@
"
@qg/qg-scroll
"
:
"
^1.4.2
"
,
"
@qg/ui-request
"
:
"
^0.0.20
"
,
"
@qg/ui-track-web
"
:
"
0.0.3
"
,
"
@sentry/vue
"
:
"
^7.8.1
"
,
"
core-js
"
:
"
^3.6.5
"
,
"
crypto-js
"
:
"
^3.1.9-1
"
,
"
@commitlint/cli
"
:
"
^13.2.1
"
,
...
...
@@ -24,7 +25,6 @@
"
intersection-observer
"
:
"
^0.12.0
"
,
"
js-cookie
"
:
"
^2.2.1
"
,
"
qiniu-js
"
:
"
^3.3.1
"
,
"
raven-js
"
:
"
^3.27.2
"
,
"
sa-sdk-javascript
"
:
"
^1.15.16
"
,
"
swiper
"
:
"
^4.0.7
"
,
"
vue
"
:
"
2.6.11
"
,
...
...
@@ -37,11 +37,11 @@
"
@babel/plugin-proposal-nullish-coalescing-operator
"
:
"
^7.12.1
"
,
"
@babel/plugin-proposal-optional-chaining
"
:
"
^7.12.7
"
,
"
@qg/webpack-cos-cdn-upload-plugin
"
:
"
1.0.2
"
,
"
@vue/cli-plugin-babel
"
:
"
^4.4.0
"
,
"
@vue/cli-plugin-eslint
"
:
"
^4.4.0
"
,
"
@vue/cli-plugin-router
"
:
"
^4.4.0
"
,
"
@vue/cli-plugin-vuex
"
:
"
^4.4.0
"
,
"
@vue/cli-service
"
:
"
^4.4.0
"
,
"
@vue/cli-plugin-babel
"
:
"
4.4.6
"
,
"
@vue/cli-plugin-eslint
"
:
"
4.4.6
"
,
"
@vue/cli-plugin-router
"
:
"
4.4.6
"
,
"
@vue/cli-plugin-vuex
"
:
"
4.4.6
"
,
"
@vue/cli-service
"
:
"
4.4.6
"
,
"
@vue/eslint-config-prettier
"
:
"
^6.0.0
"
,
"
babel-eslint
"
:
"
^10.1.0
"
,
"
babel-plugin-import
"
:
"
^1.13.0
"
,
...
...
@@ -56,7 +56,7 @@
"
prettier
"
:
"
^1.19.1
"
,
"
svg-sprite-loader
"
:
"
^5.2.1
"
,
"
vue-template-compiler
"
:
"
2.6.11
"
,
"
webpack-sentry-plugin
"
:
"
^2.0.3
"
"
@qg/sentry-webpack-plugin
"
:
"
1.19.0
"
},
"lint-staged"
:
{
"src/**/*.{js,vue}"
:
[
...
...
@@ -70,4 +70,4 @@
"commit-msg"
:
"commitlint -e $HUSKY_GIT_PARAMS"
}
}
}
}
\ No newline at end of file
src/api/address.api.js
View file @
bd729e84
import
config
from
'
@/config
'
;
import
http
from
'
@/service/httpDecorator
'
;
const
{
talosHost
}
=
config
;
const
{
yxmGateway
}
=
config
;
export
default
{
saveAddress
(
data
)
{
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/addr/receiver/add_edit`
,
data
);
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/addr/receiver/add_edit`
,
data
);
},
getAddressList
()
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/addr/receiver/list`
);
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/addr/receiver/list`
);
},
deleteAddress
(
addrReceiverId
)
{
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/addr/receiver/delete`
,
{
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/addr/receiver/delete`
,
{
addrReceiverId
});
},
// 地址级联查询
zoneList
:
params
=>
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/addr/query?addrId=
${
params
}
`
);
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/addr/query?addrId=
${
params
}
`
);
}
};
src/api/groupBuy.js
View file @
bd729e84
import
config
from
'
@/config
'
;
import
http
from
'
@/service/httpDecorator
'
;
import
qs
from
'
qs
'
;
const
{
talosHost
}
=
config
;
const
{
yxmGateway
}
=
config
;
const
MINI_APP_ID
=
'
wxb3e6270e1b1e0bc7
'
;
// 羊小咩
// const MINI_APP_ID = 'wxe16bf9293671506c'; // 狼大呜
export
default
{
// 查询商品sku详情
detailInfo
:
params
=>
{
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/activity/activity-goods-special/detail`
,
{
...
params
});
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/activity/activity-goods-special/detail`
,
{
...
params
});
},
checkGroupBuyCreateOrder
:
params
=>
{
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/checkCanOpenJoinGroup?
${
qs
.
stringify
(
params
)}
`
);
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/checkCanOpenJoinGroup?
${
qs
.
stringify
(
params
)}
`
);
},
// 详情图片
getDetailPic
:
url
=>
{
...
...
@@ -19,32 +21,32 @@ export default {
},
// 商品详情地址列表
addrList
(
data
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/addr/receiver/list`
,
data
,
{
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/addr/receiver/list`
,
data
,
{
hideLoading
:
true
});
},
// 查询活动模板列表-根据活动id
getTemplateList
(
activityId
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/activity/activity-goods-special/template-list`
,
{
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/activity/activity-goods-special/template-list`
,
{
params
:
{
activityId
}
});
},
// 入口活动列表
getGoodsList
(
params
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/activity/activity-goods-special/goods-list/v2`
,
{
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/activity/activity-goods-special/goods-list/v2`
,
{
params
});
},
getWxConfig
(
url
=
window
.
location
.
href
.
split
(
'
#
'
)[
0
])
{
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/wx/mp/getJsapiSign`
,
{
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/wx/mp/getJsapiSign`
,
{
url
:
url
,
appId
:
'
wx2f44c7fe7b08458d
'
});
},
getScheme
(
params
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/ka/info/getShareMiniUrl`
,
`
${
yxmGateway
}
/api/kdsp/ka/info/getShareMiniUrl`
,
{
params
,
headers
:
{
...
...
@@ -57,12 +59,12 @@ export default {
},
// 获取百人团订单
getGroupOrderList
(
params
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/group-order/list`
,
{
params
});
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/group-order/list`
,
{
params
});
},
// 获取小程序码
getQrcodeUrl
(
params
)
{
const
qsString
=
qs
.
stringify
(
params
);
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/playBill/getMakePicData?
${
qsString
}
`
,
{
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/playBill/getMakePicData?
${
qsString
}
`
,
{
headers
:
{
'
qg-tenant-id
'
:
560761
,
// 羊小咩租户ID
'
mini-app-id
'
:
MINI_APP_ID
// 羊小咩小程序appid
...
...
@@ -70,7 +72,7 @@ export default {
});
},
getGroupShareInfo
(
orderNo
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/groupShareInfo?orderNo=
${
orderNo
}
`
);
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/groupShareInfo?orderNo=
${
orderNo
}
`
);
},
getPlayBillUrl
(
m
)
{
return
http
.
get
(
`http://192.168.25.122/api/kdsp/playBill/getPlayBillUrl?m=
${
m
}
`
);
...
...
src/api/home.api.js
View file @
bd729e84
import
config
from
'
@/config
'
;
import
http
from
'
@/service/httpDecorator
'
;
import
{
saDeviceId
}
from
'
@/service/sa.service
'
;
const
{
talosHost
}
=
config
;
const
{
yxmGateway
}
=
config
;
const
PAGE
=
'
home
'
;
export
const
getBanner
=
()
=>
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/appconfig/
${
PAGE
}
/topinfo`
);
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/appconfig/
${
PAGE
}
/topinfo`
);
};
//获取动态内容【金刚区、运营专区等】【金刚区、运营专区-横向,运营专区-竖向, 通栏】
export
const
getContent
=
()
=>
{
//页面:home-精选,discovery-发现,profile-我的
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/appconfig/
${
PAGE
}
/content`
);
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/appconfig/
${
PAGE
}
/content`
);
};
export
const
getGoodsList
=
async
data
=>
{
const
scDeviceId
=
await
saDeviceId
();
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/recommend/goods-list`
,
{
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/recommend/goods-list`
,
{
params
:
data
,
customHeader
:
{
scDeviceId
...
...
@@ -24,7 +24,7 @@ export const getGoodsList = async data => {
export
const
homeSearch
=
async
data
=>
{
const
scDeviceId
=
await
saDeviceId
();
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/search/result`
,
data
,
{
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/search/result`
,
data
,
{
customHeader
:
{
scDeviceId
}
...
...
@@ -33,9 +33,9 @@ export const homeSearch = async data => {
// 搜索--大家都在搜的关键词
export
const
getTerms
=
data
=>
{
return
http
.
get
(
`
${
talosHost
}
/vcc/app/mall/search/page`
,
data
);
return
http
.
get
(
`
${
yxmGateway
}
/vcc/app/mall/search/page`
,
data
);
};
// 查询用户优惠券选择查询接口
export
const
getCouponChooseList
=
data
=>
{
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/coupon/activity/choose-list`
,
data
);
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/coupon/activity/choose-list`
,
data
);
};
src/api/order.api.js
View file @
bd729e84
import
config
from
'
@/config
'
;
import
http
from
'
@/service/httpDecorator
'
;
import
{
encryption
}
from
'
@/service/encrypt
'
;
const
{
talosHost
}
=
config
;
const
{
yxmGateway
}
=
config
;
export
default
{
// 订单列表
orderList
(
data
)
{
// TODO 测试
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/order-info/list/query`
,
{
params
:
data
});
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/order-info/list/query`
,
{
params
:
data
});
},
// 用户订单确认收货接口
orderConfirm
(
data
)
{
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/order-info/receipt/confirm`
,
data
);
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/order-info/receipt/confirm`
,
data
);
},
// 用户订单取消接口【未付款】
orderCancel
(
data
)
{
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/order-info/cancel`
,
data
);
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/order-info/cancel`
,
data
);
},
// 用户订单取消接口【未发货】
orderUnfilledCancel
(
data
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/order-info/unfilled/cancel`
,
{
params
:
data
});
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/order-info/unfilled/cancel`
,
{
params
:
data
});
},
// 订单取消原因查询接口
orderCancelReason
(
params
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/order-info/cancel-reason/query`
,
{
params
});
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/order-info/cancel-reason/query`
,
{
params
});
},
// 订单详情查询接口
orderDetail
(
data
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/order-info/detail/query`
,
{
params
:
data
});
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/order-info/detail/query`
,
{
params
:
data
});
},
// 物流详情查询接口
expressDetail
(
data
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/logistics/list`
,
{
params
:
data
});
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/logistics/list`
,
{
params
:
data
});
},
// 我的 查询各状态订单数量
orderInfo
()
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/order-info/status-number`
);
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/order-info/status-number`
);
},
confirmOrder
(
data
)
{
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/shop-cart/order-confirm/page/activity`
,
data
);
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/shop-cart/order-confirm/page/activity`
,
data
);
},
orderSubmit
(
data
)
{
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/order-info/e/hundredGroupSubmit`
,
encryption
(
data
));
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/order-info/e/hundredGroupSubmit`
,
encryption
(
data
));
},
// 物流公司列表
companyList
()
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/logistics/kd100/company-list`
);
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/logistics/kd100/company-list`
);
},
// 售后原因查询
applyReason
(
data
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/after-service/apply-reason`
,
{
params
:
data
});
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/after-service/apply-reason`
,
{
params
:
data
});
},
// 售后退款金额试算
refundAmount
(
data
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/after-service/refund-amount`
,
{
params
:
data
});
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/after-service/refund-amount`
,
{
params
:
data
});
},
// 提交申请售后
applySubmit
(
data
)
{
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/after-service/apply`
,
data
);
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/after-service/apply`
,
data
);
},
// 订单申请退款
refundKepler
(
data
)
{
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/order-info/apply-refund`
,
data
);
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/order-info/apply-refund`
,
data
);
},
// 查看售后详情
afterDetail
(
data
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/after-service/detail`
,
{
params
:
data
});
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/after-service/detail`
,
{
params
:
data
});
},
// 售后取消
applyCancel
(
data
)
{
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/after-service/cancel`
,
data
);
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/after-service/cancel`
,
data
);
},
// 售后退货物流单信息填写 after-service/add-delivery-no
addDeliveryNo
(
data
)
{
return
http
.
post
(
`
${
talosHost
}
/api/kdsp/after-service/add-delivery-no`
,
data
);
return
http
.
post
(
`
${
yxmGateway
}
/api/kdsp/after-service/add-delivery-no`
,
data
);
},
// 售后列表 after-service/list
afterList
(
data
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/after-service/service/list`
,
{
params
:
data
});
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/after-service/service/list`
,
{
params
:
data
});
},
// 售后催办 after-service/reminder
afterReminder
(
data
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/after-service/reminder`
,
{
params
:
data
});
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/after-service/reminder`
,
{
params
:
data
});
},
//查询售后是否在有效期
applyExpired
(
data
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/after-service/expired`
,
{
params
:
data
});
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/after-service/expired`
,
{
params
:
data
});
},
// 获取七牛token
getQiniuToken
(
data
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/common/upload/token`
,
{
params
:
data
});
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/common/upload/token`
,
{
params
:
data
});
}
};
src/api/pay.api.js
View file @
bd729e84
import
request
from
'
@/service/httpDecorator
'
;
import
config
from
'
@/config
'
;
import
{
saDeviceId
}
from
'
@/service/sa.service
'
;
const
{
talosHost
}
=
config
;
const
{
yxmGateway
}
=
config
;
const
queryPayInfo
=
function
(
data
)
{
return
request
.
post
(
`
${
talosHost
}
/open/checkout`
,
data
);
return
request
.
post
(
`
${
yxmGateway
}
/open/checkout`
,
data
);
};
const
prepay
=
async
function
(
data
)
{
const
scDeviceId
=
await
saDeviceId
();
return
request
.
post
(
`
${
talosHost
}
/open/checkout/v2/prepay`
,
data
,
{
return
request
.
post
(
`
${
yxmGateway
}
/open/checkout/v2/prepay`
,
data
,
{
customHeader
:
{
scDeviceId
},
...
...
@@ -18,7 +18,7 @@ const prepay = async function(data) {
const
pay
=
async
function
(
data
)
{
const
scDeviceId
=
await
saDeviceId
();
return
request
.
post
(
`
${
talosHost
}
/open/checkout/v2/pay`
,
data
,
{
return
request
.
post
(
`
${
yxmGateway
}
/open/checkout/v2/pay`
,
data
,
{
customHeader
:
{
scDeviceId
},
...
...
@@ -27,24 +27,24 @@ const pay = async function(data) {
};
const
queryPayStatus
=
function
(
data
)
{
return
request
.
post
(
`
${
talosHost
}
/open/checkout/v2/pay_status/query`
,
data
);
return
request
.
post
(
`
${
yxmGateway
}
/open/checkout/v2/pay_status/query`
,
data
);
};
const
sendSms
=
function
(
data
)
{
return
request
.
post
(
`
${
talosHost
}
/open/checkout/send_sms`
,
data
);
return
request
.
post
(
`
${
yxmGateway
}
/open/checkout/send_sms`
,
data
);
};
const
desSalt
=
function
()
{
return
request
.
get
(
`
${
talosHost
}
/vcc/account/salt`
);
return
request
.
get
(
`
${
yxmGateway
}
/vcc/account/salt`
);
};
const
h5AppyUrl
=
function
()
{
return
request
.
get
(
`
${
talosHost
}
/vcc/xyqb_mall/app_url`
);
return
request
.
get
(
`
${
yxmGateway
}
/vcc/xyqb_mall/app_url`
);
};
const
getCoupon
=
async
function
(
params
)
{
const
scDeviceId
=
await
saDeviceId
();
return
request
.
post
(
`
${
talosHost
}
/open/checkout/pay_coupon_list`
,
params
,
{
return
request
.
post
(
`
${
yxmGateway
}
/open/checkout/pay_coupon_list`
,
params
,
{
customHeader
:
{
scDeviceId
}
...
...
@@ -52,12 +52,12 @@ const getCoupon = async function(params) {
};
const
ocrFaceId
=
function
(
params
)
{
return
request
.
post
(
`
${
talosHost
}
/open/checkout/ocr_faceId`
,
params
);
return
request
.
post
(
`
${
yxmGateway
}
/open/checkout/ocr_faceId`
,
params
);
};
const
getGoodsList
=
async
function
(
data
)
{
const
scDeviceId
=
await
saDeviceId
();
return
request
.
get
(
`
${
talosHost
}
/vcc/xyqb/recommend/goods-list`
,
{
return
request
.
get
(
`
${
yxmGateway
}
/vcc/xyqb/recommend/goods-list`
,
{
params
:
data
,
hideLoading
:
true
,
customHeader
:
{
...
...
@@ -68,25 +68,25 @@ const getGoodsList = async function(data) {
// KA流程节点
const
kaGetNextUrl
=
function
()
{
return
request
.
get
(
`
${
talosHost
}
/api/kdsp/ka/process/get-next-url`
);
return
request
.
get
(
`
${
yxmGateway
}
/api/kdsp/ka/process/get-next-url`
);
};
const
reissueContract
=
function
(
params
)
{
return
request
.
post
(
`
${
talosHost
}
/open/checkout/payReissueContract`
,
params
);
return
request
.
post
(
`
${
yxmGateway
}
/open/checkout/payReissueContract`
,
params
);
};
export
default
{
// 商品详情页面
desSalt
()
{
return
request
.
get
(
`
${
talosHost
}
/vcc/account/salt`
);
return
request
.
get
(
`
${
yxmGateway
}
/vcc/account/salt`
);
}
};
const
getCouponList
=
function
(
params
)
{
return
request
.
get
(
`
${
talosHost
}
/api/kdsp/appconfig/pay-succ-page/guide-stream`
,
{
params
});
return
request
.
get
(
`
${
yxmGateway
}
/api/kdsp/appconfig/pay-succ-page/guide-stream`
,
{
params
});
};
// 获取用户手机号
const
getPhoneNumber
=
function
()
{
return
request
.
get
(
`
${
talosHost
}
/api/kdsp/user/phone`
);
return
request
.
get
(
`
${
yxmGateway
}
/api/kdsp/user/phone`
);
};
export
{
pay
,
...
...
src/api/qiniu.api.js
View file @
bd729e84
import
config
from
'
@/config
'
;
import
http
from
'
@/service/httpDecorator
'
;
const
{
talosHost
}
=
config
;
const
{
yxmGateway
}
=
config
;
export
default
{
// 获取七牛token
getQiniuToken
:
data
=>
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/common/upload/token`
,
{
params
:
data
});
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/common/upload/token`
,
{
params
:
data
});
}
};
src/api/user.api.js
View file @
bd729e84
import
http
from
'
@/service/httpDecorator
'
;
import
config
from
'
@/config
'
;
const
{
talosHost
,
faceHost
}
=
config
;
const
{
yxmGateway
,
faceHost
}
=
config
;
export
default
{
// 获取信用钱包用户信息
getXhkInfo
()
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/profile/vcc/user-account`
);
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/profile/vcc/user-account`
);
},
getUserInfo
()
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/user/about`
);
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/user/about`
);
}
};
// 发送短信
export
const
smsCode
=
param
=>
{
const
data
=
{
...
param
,
smsMerchant
:
'
XIN_YONG_QIAN_BAO
'
};
return
http
.
post
(
`
${
talosHost
}
/vcc/usercenter/send_vcc_sms_code`
,
data
);
return
http
.
post
(
`
${
yxmGateway
}
/vcc/usercenter/send_vcc_sms_code`
,
data
);
};
// KA流程节点
export
const
kaGetNextUrl
=
params
=>
{
let
options
=
{
sonVccChannel
:
true
};
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/ka/process/get-next-url`
,
{
params
},
options
);
return
http
.
get
(
`
${
yxmGateway
}
/api/kdsp/ka/process/get-next-url`
,
{
params
},
options
);
};
// 验证短信并登录
export
const
friendLogin
=
data
=>
{
return
http
.
post
(
`
${
talosHost
}
/vcc/usercenter/fast_login_by_sms_code`
,
data
);
return
http
.
post
(
`
${
yxmGateway
}
/vcc/usercenter/fast_login_by_sms_code`
,
data
);
};
// 验证短信类型
export
const
captchaType
=
data
=>
{
return
http
.
post
(
`
${
talosHost
}
/vcc/usercenter/captcha_type`
,
data
);
return
http
.
post
(
`
${
yxmGateway
}
/vcc/usercenter/captcha_type`
,
data
);
};
// 获取图形验证
export
const
captcha
=
()
=>
{
return
http
.
get
(
`
${
talosHost
}
/vcc/usercenter/qg_captcha`
);
return
http
.
get
(
`
${
yxmGateway
}
/vcc/usercenter/qg_captcha`
);
};
export
const
getFaceUrl
=
params
=>
{
...
...
src/components/error/index.vue
View file @
bd729e84
...
...
@@ -2,6 +2,8 @@
<div
class=
"page error"
>
<cr-image
src=
"@/assets/images/error/error.png"
width=
"298px"
height=
"153px"
/>
<p>
oh,no…出错了
</p>
<button
@
click=
"throwError"
>
Throw error
</button>
<cr-button
type=
"primary"
block
shape=
"circle"
@
click=
"backurl"
>
返回
</cr-button>
</div>
</
template
>
...
...
@@ -13,6 +15,9 @@ export default {
},
mounted
()
{},
methods
:
{
throwError
()
{
throw
new
Error
(
'
Sentry Error
'
);
},
backurl
()
{
this
.
$router
.
go
(
-
1
);
}
...
...
src/config/env.config.js
View file @
bd729e84
...
...
@@ -18,6 +18,7 @@ const openLink = 'https://mall.q-gp.com';
// const talosHost = 'http://192.168.25.122:8098'; // 王永杰
// const talosHost = protocol + '//192.168.28.41'; // 超人
const
shenceUrl
=
protocol
+
'
//bn.xyqb.com/sa?project=default
'
;
const
yxmGateway
=
'
https://yxm-gateway-yxm.liangkebang.net
'
;
const
VCC_CHANNEL
=
''
;
const
TERMINAL
=
'
H5
'
;
const
VERSION
=
'
7.9.00
'
;
...
...
@@ -34,5 +35,6 @@ export default {
TERMINAL
,
VERSION
,
kdspHost
,
shenceUrl
shenceUrl
,
yxmGateway
};
src/config/pre-prod.config.js
View file @
bd729e84
...
...
@@ -11,6 +11,7 @@ const localHost = 'https://group-buy-pre.q-gp.com'; // 正式环境页面地址
// const localHost = 'https://group-buy-test1.liangkebang.net'; // 正式环境页面地址
const
shenceUrl
=
protocol
+
'
//bn.xyqb.com/sa?project=production
'
;
const
openLink
=
'
https://mall-pre.q-gp.com
'
;
const
yxmGateway
=
'
https://gw.yxmie.com
'
;
export
default
{
openLink
,
localHost
,
...
...
@@ -24,5 +25,6 @@ export default {
VERSION
,
qiniuHost
,
kdspHost
,
shenceUrl
shenceUrl
,
yxmGateway
};
src/config/prod.config.js
View file @
bd729e84
...
...
@@ -11,6 +11,7 @@ const localHost = 'https://group-buy.q-gp.com'; // 正式环境页面地址
// const localHost = 'https://group-buy-test1.liangkebang.net'; // 正式环境页面地址
const
shenceUrl
=
protocol
+
'
//bn.xyqb.com/sa?project=production
'
;
const
openLink
=
'
https://mall.q-gp.com
'
;
const
yxmGateway
=
'
https://gw.yxmie.com
'
;
export
default
{
openLink
,
localHost
,
...
...
@@ -24,5 +25,6 @@ export default {
VERSION
,
qiniuHost
,
kdspHost
,
shenceUrl
shenceUrl
,
yxmGateway
};
src/main.js
View file @
bd729e84
...
...
@@ -8,18 +8,17 @@ import '@/service/cherryUI.service';
import
'
./style/index.less
'
;
import
saService
from
'
@/service/sa.service
'
;
import
Bridge
from
'
@qg/js-bridge
'
;
import
Raven
from
'
raven-js
'
;
import
RavenVue
from
'
raven-js/plugins/vue
'
;
import
{
release
}
from
'
../.sentryclirc
'
;
import
{
init
as
sentryInit
}
from
'
@sentry/vue
'
;
import
lazyload
from
'
@qg/cherry-ui/src/lazyload/index
'
;
import
'
intersection-observer
'
;
if
(
process
.
env
.
SENTRY_ENV
!==
'
test
'
&&
process
.
env
.
NODE_ENV
===
'
production
'
)
{
Raven
.
config
(
'
//8d1b2a5f74bb42ad806e52a11b1173f2@sentry.q-gp.com/80
'
,
{
release
,
sentryInit
({
Vue
,
dsn
:
'
https://d36508238b7c4e5fa8306948b52948e1@sentry.q-gp.com/11
'
,
// 项目设置中的Client Keys
release
:
'
group-buy-ui@1.0.0
'
,
// 项目名加版本号
tracesSampleRate
:
0.5
,
// 上报频率, 1最大, 0最小, 建议验证设置为1, 项目运行根据情况降低频率
environment
:
process
.
env
.
NODE_ENV
})
.
addPlugin
(
RavenVue
,
Vue
)
.
install
();
});
}
Vue
.
prototype
.
util
=
new
Bridge
();
Vue
.
prototype
.
$track
=
saService
;
...
...
vue.config.js
View file @
bd729e84
const
path
=
require
(
'
path
'
);
const
resolve
=
dir
=>
path
.
join
(
__dirname
,
dir
);
const
IS_PROD
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
webpack
=
require
(
'
webpack
'
);
const
WebpackCosCdnUploadPlugin
=
require
(
'
@qg/webpack-cos-cdn-upload-plugin
'
);
const
SentryPlugin
=
require
(
'
webpack-sentry
-plugin
'
);
const
SentryPlugin
=
require
(
'
@qg/sentry-webpack
-plugin
'
);
const
SentryConfig
=
require
(
'
./.sentryclirc
'
);
// cdn预加载使用
const
externals
=
{
...
...
@@ -25,7 +26,12 @@ const cdn = {
};
module
.
exports
=
{
transpileDependencies
:
[
/
[/\\]
node_modules
[/\\]
@qg
[/\\]
cherry-ui
[/\\]
/
],
transpileDependencies
:
[
/
[/\\]
node_modules
[/\\]
@qg
[/\\]
cherry-ui
[/\\]
/
,
/
[/\\]
node_modules
[/\\]
@qg
[/\\]
js-bridge
[/\\]
/
,
/
[/\\]
node_modules
[/\\]
@qg
[/\\]
ui-track-web
[/\\]
/
,
/
[/\\]
node_modules
[/\\]
@qg
[/\\]
@sentry
[/\\]
/
],
chainWebpack
:
config
=>
{
config
.
plugin
(
'
html
'
).
tap
(
args
=>
{
args
[
0
].
title
=
''
;
...
...
@@ -88,6 +94,11 @@ module.exports = {
priority
:
10
,
chunks
:
'
initial
'
// only package third parties that are initially dependent
},
sentry
:
{
name
:
'
chunk-sentry
'
,
// sentry
priority
:
20
,
// the weigh1t needs to be larger than libs and app or it will be packaged into libs or app
test
:
/
[\\/]
node_modules
[\\/]
@sentry
[\\/]
/
// in order to adapt to cnpm
},
libs
:
{
name
:
'
chunk-libs
'
,
// 分离非在入口加载的,但是引用超过2次的依赖
test
:
/
[\\/]
node_modules
[\\/]
/
,
...
...
@@ -127,8 +138,13 @@ module.exports = {
if
(
IS_PROD
)
{
config
.
externals
=
externals
;
configObj
=
{
plugins
:
[
new
SentryPlugin
(
SentryConfig
),
new
WebpackCosCdnUploadPlugin
()]
// plugins: [new WebpackCosCdnUploadPlugin()]
plugins
:
[
new
SentryPlugin
(
SentryConfig
),
new
webpack
.
DefinePlugin
({
'
process.env.SENTRY_ENV
'
:
`"
${
process
.
env
.
SENTRY_ENV
||
''
}
"`
}),
new
WebpackCosCdnUploadPlugin
()
]
};
}
return
configObj
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment