功能:同步小程序流程
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: sendVerificationCode supports auth.js by holding or executing the send verification code page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
sendVerificationCode(data) {
|
||||
return request({
|
||||
url: '/user/send-verification-code',
|
||||
@@ -13,6 +17,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: login supports auth.js by holding or executing the login page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
login(data) {
|
||||
return request({
|
||||
url: '/user/login',
|
||||
@@ -21,6 +29,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: phoneLogin supports auth.js by holding or executing the phone login page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
phoneLogin(data) {
|
||||
return request({
|
||||
url: '/user/phone-login',
|
||||
@@ -29,6 +41,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: wechatMiniAutoLogin supports auth.js by holding or executing the wechat mini auto login page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
wechatMiniAutoLogin(data) {
|
||||
return request({
|
||||
url: '/user/wechat-mini/auto-login',
|
||||
@@ -37,6 +53,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: wechatMiniPhoneLogin supports auth.js by holding or executing the wechat mini phone login page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
wechatMiniPhoneLogin(data) {
|
||||
return request({
|
||||
url: '/user/wechat-mini/phone-login',
|
||||
@@ -45,6 +65,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: confirmWechatMiniLogin supports auth.js by holding or executing the confirm wechat mini login page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
confirmWechatMiniLogin(data) {
|
||||
return request({
|
||||
url: '/user/wechat-mini/confirm-login',
|
||||
@@ -53,6 +77,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: register supports auth.js by holding or executing the register page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
register(data) {
|
||||
return request({
|
||||
url: '/user/register',
|
||||
@@ -61,6 +89,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: logout supports auth.js by holding or executing the logout page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
logout() {
|
||||
return request({
|
||||
url: '/user/logout',
|
||||
@@ -68,6 +100,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: switchShop supports auth.js by holding or executing the switch shop page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
switchShop(data) {
|
||||
return request({
|
||||
url: '/user/switch-shop',
|
||||
@@ -76,6 +112,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: resetPasswordByPhone supports auth.js by holding or executing the reset password by phone page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
resetPasswordByPhone(data) {
|
||||
return request({
|
||||
url: '/user/reset-password-by-phone',
|
||||
@@ -84,6 +124,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getCurrentAgreements supports auth.js by holding or executing the get current agreements page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getCurrentAgreements() {
|
||||
return request({
|
||||
url: '/legal-agreement/current',
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: addToCart supports cart.js by holding or executing the add to cart page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
addToCart(data) {
|
||||
return request({
|
||||
url: '/cart/add',
|
||||
@@ -13,6 +17,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: removeFromCart supports cart.js by holding or executing the remove from cart page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
removeFromCart(productId) {
|
||||
return request({
|
||||
url: `/cart/remove/${productId}`,
|
||||
@@ -20,6 +28,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updateCartQuantity supports cart.js by holding or executing the update cart quantity page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
updateCartQuantity(data) {
|
||||
return request({
|
||||
url: '/cart/update',
|
||||
@@ -28,12 +40,20 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getCartList supports cart.js by holding or executing the get cart list page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getCartList() {
|
||||
return request({
|
||||
url: '/cart/list'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: clearCart supports cart.js by holding or executing the clear cart page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
clearCart() {
|
||||
return request({
|
||||
url: '/cart/clear',
|
||||
|
||||
@@ -5,12 +5,20 @@
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: listByProduct supports comment.js by holding or executing the list by product page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
listByProduct(productId) {
|
||||
return request({
|
||||
url: `/comment/list/product/${productId}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: create supports comment.js by holding or executing the create page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
create(data) {
|
||||
return request({
|
||||
url: '/comment/create',
|
||||
@@ -19,6 +27,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: delete supports comment.js by holding or executing the delete page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
delete(id) {
|
||||
return request({
|
||||
url: `/comment/delete/${id}`,
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: listUserCoupons supports coupon.js by holding or executing the list user coupons page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
listUserCoupons(status) {
|
||||
return request({
|
||||
url: '/coupon/user/list',
|
||||
@@ -14,6 +18,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getAvailableCoupons supports coupon.js by holding or executing the get available coupons page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getAvailableCoupons(productTags, productPrice, shopId) {
|
||||
return request({
|
||||
url: '/coupon/available',
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: getSignedUrl supports file.js by holding or executing the get signed url page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getSignedUrl(fileId, expiryTimeInMinutes) {
|
||||
return request({
|
||||
url: `/file/get-signed-url/${fileId}`,
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: createOrder supports order.js by holding or executing the create order page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
createOrder(data) {
|
||||
return request({
|
||||
url: '/order/create',
|
||||
@@ -13,24 +17,40 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getOrderList supports order.js by holding or executing the get order list page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getOrderList() {
|
||||
return request({
|
||||
url: '/order/list'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listMyPendingReviews supports order.js by holding or executing the list my pending reviews page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
listMyPendingReviews() {
|
||||
return request({
|
||||
url: '/order/review/my-pending'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listOrderReviews supports order.js by holding or executing the list order reviews page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
listOrderReviews(orderId) {
|
||||
return request({
|
||||
url: `/order/${orderId}/reviews`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: submitArtistReview supports order.js by holding or executing the submit artist review page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
submitArtistReview(reviewId, data) {
|
||||
return request({
|
||||
url: `/order/review/${reviewId}/submit`,
|
||||
@@ -39,6 +59,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getArtistChangeOptions supports order.js by holding or executing the get artist change options page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getArtistChangeOptions(orderId, orderItemId) {
|
||||
return request({
|
||||
url: `/order/${orderId}/artist-change/options`,
|
||||
@@ -48,6 +72,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: requestArtistChange supports order.js by holding or executing the request artist change page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
requestArtistChange(data) {
|
||||
return request({
|
||||
url: '/order/artist-change/request',
|
||||
@@ -56,12 +84,20 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listMyPendingArtistChangeRequests supports order.js by holding or executing the list my pending artist change requests page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
listMyPendingArtistChangeRequests() {
|
||||
return request({
|
||||
url: '/order/artist-change/my-pending'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: approveArtistChange supports order.js by holding or executing the approve artist change page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
approveArtistChange(requestId) {
|
||||
return request({
|
||||
url: `/order/artist-change/${requestId}/approve`,
|
||||
@@ -70,6 +106,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: rejectArtistChange supports order.js by holding or executing the reject artist change page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
rejectArtistChange(requestId, data) {
|
||||
return request({
|
||||
url: `/order/artist-change/${requestId}/reject`,
|
||||
@@ -78,6 +118,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: cancelOrder supports order.js by holding or executing the cancel order page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
cancelOrder(orderId) {
|
||||
return request({
|
||||
url: `/order/cancel/${orderId}`,
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: likeProduct supports product-like.js by holding or executing the like product page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
likeProduct(productId) {
|
||||
return request({
|
||||
url: `/product-like/like/${productId}`,
|
||||
@@ -12,6 +16,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: unlikeProduct supports product-like.js by holding or executing the unlike product page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
unlikeProduct(productId) {
|
||||
return request({
|
||||
url: `/product-like/unlike/${productId}`,
|
||||
@@ -19,6 +27,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: checkLikeStatus supports product-like.js by holding or executing the check like status page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
checkLikeStatus(productId) {
|
||||
return request({
|
||||
url: `/product-like/check/${productId}`
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: getProductPage supports product.js by holding or executing the get product page page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getProductPage(params) {
|
||||
return request({
|
||||
url: '/product/list/page',
|
||||
@@ -12,24 +16,40 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getAllProducts supports product.js by holding or executing the get all products page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getAllProducts() {
|
||||
return request({
|
||||
url: '/product/list/all'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getProductById supports product.js by holding or executing the get product by id page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getProductById(id) {
|
||||
return request({
|
||||
url: `/product/get/${id}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getProductsByTag supports product.js by holding or executing the get products by tag page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getProductsByTag(tag) {
|
||||
return request({
|
||||
url: `/product/list/tag/${encodeURIComponent(tag)}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: searchProducts supports product.js by holding or executing the search products page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
searchProducts(keyword) {
|
||||
return request({
|
||||
url: '/product/list/search',
|
||||
|
||||
@@ -5,18 +5,30 @@
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: getPublicShops supports shop.js by holding or executing the get public shops page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getPublicShops() {
|
||||
return request({
|
||||
url: '/shop/list/public'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getShopsSimple supports shop.js by holding or executing the get shops simple page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getShopsSimple() {
|
||||
return request({
|
||||
url: '/shop/list/simple'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getShopById supports shop.js by holding or executing the get shop by id page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getShopById(id) {
|
||||
return request({
|
||||
url: `/shop/get/${id}`
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: getAllTags supports tag.js by holding or executing the get all tags page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getAllTags() {
|
||||
return request({
|
||||
url: '/tag/list/all'
|
||||
|
||||
@@ -3,9 +3,17 @@
|
||||
* Call guide: require this module in a page, then invoke the matching method from page event handlers or lifecycle hooks.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
/**
|
||||
* Purpose: actionGuard supports user.js by holding or executing the action guard page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const actionGuard = require('../utils/action-guard')
|
||||
const { API_BASE_URL, REQUEST_TIMEOUT } = require('../utils/config')
|
||||
|
||||
/**
|
||||
* Purpose: normalizeUploadResponse supports user.js by holding or executing the normalize upload response page or API role.
|
||||
* Usage: import, call, read, or update this function from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
function normalizeUploadResponse(response) {
|
||||
if (!response) {
|
||||
throw new Error('头像上传失败')
|
||||
@@ -37,6 +45,10 @@ function normalizeUploadResponse(response) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: getUserInfo supports user.js by holding or executing the get user info page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getUserInfo() {
|
||||
return request({
|
||||
url: '/user/info'
|
||||
@@ -51,30 +63,50 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getMyBalanceHistory supports user.js by holding or executing the get my balance history page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getMyBalanceHistory() {
|
||||
return request({
|
||||
url: '/user/balance/history/me'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listMyMessages supports user.js by holding or executing the list my messages page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
listMyMessages() {
|
||||
return request({
|
||||
url: '/system-message/my/list'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listMyPopupMessages supports user.js by holding or executing the list my popup messages page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
listMyPopupMessages() {
|
||||
return request({
|
||||
url: '/system-message/my/popup'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getMyUnreadMessageCount supports user.js by holding or executing the get my unread message count page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getMyUnreadMessageCount() {
|
||||
return request({
|
||||
url: '/system-message/my/unread-count'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: markMessagePopupShown supports user.js by holding or executing the mark message popup shown page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
markMessagePopupShown(id) {
|
||||
return request({
|
||||
url: `/system-message/my/${id}/popup-shown`,
|
||||
@@ -83,6 +115,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: markMessageRead supports user.js by holding or executing the mark message read page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
markMessageRead(id) {
|
||||
return request({
|
||||
url: `/system-message/my/${id}/read`,
|
||||
@@ -91,6 +127,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listMyAnnouncements supports user.js by holding or executing the list my announcements page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
listMyAnnouncements() {
|
||||
return request({
|
||||
url: '/announcement/my/list'
|
||||
@@ -104,18 +144,30 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getShopManagerContact supports user.js by holding or executing the get shop manager contact page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getShopManagerContact(shopId) {
|
||||
return request({
|
||||
url: `/contact-info/shop/${shopId}/manager`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getProductArtistContact supports user.js by holding or executing the get product artist contact page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getProductArtistContact(productId, artistId) {
|
||||
return request({
|
||||
url: `/contact-info/product/${productId}/artist/${artistId}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getOrderArtistContact supports user.js by holding or executing the get order artist contact page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getOrderArtistContact(orderId, artistId) {
|
||||
return request({
|
||||
url: `/contact-info/order/${orderId}/artist`,
|
||||
@@ -123,6 +175,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updateUserInfo supports user.js by holding or executing the update user info page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
updateUserInfo(data) {
|
||||
return request({
|
||||
url: '/user/update',
|
||||
@@ -131,6 +187,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updatePassword supports user.js by holding or executing the update password page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
updatePassword(data) {
|
||||
return request({
|
||||
url: '/user/password',
|
||||
@@ -139,6 +199,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: bindPhone supports user.js by holding or executing the bind phone page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
bindPhone(data) {
|
||||
return request({
|
||||
url: '/user/bind-phone',
|
||||
@@ -147,6 +211,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updatePhone supports user.js by holding or executing the update phone page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
updatePhone(data) {
|
||||
return request({
|
||||
url: '/user/phone',
|
||||
@@ -155,6 +223,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: deactivateAccount supports user.js by holding or executing the deactivate account page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
deactivateAccount() {
|
||||
return request({
|
||||
url: '/user/deactivate',
|
||||
@@ -162,6 +234,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: uploadAvatar supports user.js by holding or executing the upload avatar page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
uploadAvatar(filePath) {
|
||||
const signedHeaders = request.buildSignatureHeaders({
|
||||
url: '/user/upload-avatar',
|
||||
@@ -192,36 +268,60 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: checkAccountAvailability supports user.js by holding or executing the check account availability page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
checkAccountAvailability(account) {
|
||||
return request({
|
||||
url: `/user/check/account/${encodeURIComponent(account)}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: checkLoginAccountAvailability supports user.js by holding or executing the check login account availability page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
checkLoginAccountAvailability(account) {
|
||||
return request({
|
||||
url: `/user/check/login-account/${encodeURIComponent(account)}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getLoginShopsByAccount supports user.js by holding or executing the get login shops by account page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getLoginShopsByAccount(account) {
|
||||
return request({
|
||||
url: `/user/check/login-shops/account/${encodeURIComponent(account)}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getLoginShopsByPhone supports user.js by holding or executing the get login shops by phone page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getLoginShopsByPhone(phone) {
|
||||
return request({
|
||||
url: `/user/check/login-shops/phone/${encodeURIComponent(phone)}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: checkPhoneAvailability supports user.js by holding or executing the check phone availability page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
checkPhoneAvailability(phone) {
|
||||
return request({
|
||||
url: `/user/check/phone/${encodeURIComponent(phone)}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: sendVerificationCode supports user.js by holding or executing the send verification code page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
sendVerificationCode(data) {
|
||||
return request({
|
||||
url: '/user/send-verification-code',
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: addToWishlist supports wishlist.js by holding or executing the add to wishlist page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
addToWishlist(productId) {
|
||||
return request({
|
||||
url: '/wishlist/add',
|
||||
@@ -15,6 +19,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: removeFromWishlist supports wishlist.js by holding or executing the remove from wishlist page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
removeFromWishlist(productId) {
|
||||
return request({
|
||||
url: '/wishlist/remove',
|
||||
@@ -25,6 +33,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: checkWishlist supports wishlist.js by holding or executing the check wishlist page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
checkWishlist(productId) {
|
||||
return request({
|
||||
url: '/wishlist/check',
|
||||
@@ -34,6 +46,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getWishlist supports wishlist.js by holding or executing the get wishlist page or API role.
|
||||
* Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
getWishlist() {
|
||||
return request({
|
||||
url: '/wishlist/list'
|
||||
|
||||
Reference in New Issue
Block a user