Commit c18c539a authored by 王能飞's avatar 王能飞

Merge branch 'c_client_taro-pack' into 'c_client_taro'

更新tbcc-sdk版本

See merge request !44
parents 5d50064b 5c7c3387
......@@ -5345,9 +5345,9 @@
}
},
"tbcc-sdk-ts": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/tbcc-sdk-ts/-/tbcc-sdk-ts-1.0.9.tgz",
"integrity": "sha512-g4Rr6thIurH+fWlgaF4y8/aXu0ViVYoAzrZG7Rji5CguzDuZ2L8lH/uXCAzYtNXBmnB7IvtkR2i11xxe1YI8Dw==",
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/tbcc-sdk-ts/-/tbcc-sdk-ts-1.0.10.tgz",
"integrity": "sha512-z+6/SVclywLnlbIqndPzUDFuVj1NEbojFm9vQAqx1hiXvpJbBcf5Ioo9J7k0rjymXgk0+at+QsnjhwuWEq3o/g==",
"requires": {
"@types/lodash": "^4.14.160",
"@types/node": "^14.6.0",
......
......@@ -51,7 +51,7 @@
"react": "^17.0.0",
"react-dom": "^17.0.0",
"taro-ui": "^3.0.0-alpha.3",
"tbcc-sdk-ts": "^1.0.9"
"tbcc-sdk-ts": "^1.0.10"
},
"devDependencies": {
"@babel/core": "^7.8.0",
......
import tbccTs from 'tbcc-sdk-ts'
import API from '@/api'
const { getUserAddress, commonToast } = tbccTs.tb
const { getUserAddress, showToast } = tbccTs.tb
export const noopFn = () => { }
// 领取实物
const getUerAddressParam = async () => {
const userAddress = await getUserAddress().catch(err => {
commonToast({ content: err.errorMessage});
showToast({ content: err.errorMessage});
});
if(!userAddress) return false
const { name, telNumber, provinceName, cityName, cityCode, countyName, detailInfo, streetName } = userAddress || {};
......@@ -58,10 +58,10 @@ export const receiveObjectPrize = async (data) => {
}
const { success, data, message } = await API.receiveObjectPrize({ ...params, ..._params })
if (success) {
commonToast({ content: successMsg})
showToast({ content: successMsg})
resolve(true)
}else {
commonToast({content: errorMsg || message})
showToast({content: errorMsg || message})
resolve(false)
}
})
......@@ -71,14 +71,14 @@ export const receiveEnamePrize = async (data) => {
const { params, successMsg, errorMsg } = data
return new Promise(async (resolve,reject) => {
const { success, data, message } = await API.receiveEnamePrize(params).catch(res => {
commonToast({ content: successMsg || res.message})
showToast({ content: successMsg || res.message})
resolve(false)
});
if (success) {
commonToast({ content: successMsg})
showToast({ content: successMsg})
resolve(true)
}else {
commonToast({ content: errorMsg || message})
showToast({ content: errorMsg || message})
resolve(false)
}
})
......@@ -113,14 +113,14 @@ export const receiveMemberEname = async(data) => {
if(result.businessSuccess) {
const { success, data, message } = await API.updateEnamePrizeReceived({ ...ext })
if(success) {
commonToast({ content: successMsg || '奖品发放成功,请前往我的奖品处进行使用'})
showToast({ content: successMsg || '奖品发放成功,请前往我的奖品处进行使用'})
resolve(true)
}else {
commonToast({ content: errorMsg || message})
showToast({ content: errorMsg || message})
resolve(false)
}
}else{
commonToast({ content: result.errorMsg})
showToast({ content: result.errorMsg})
resolve(false)
}
})
......@@ -129,7 +129,7 @@ export const receiveMemberEname = async(data) => {
export const addStat = async(activityId, type)=> {
return new Promise(async (resolve,reject) => {
const result = await API.addStat({ activityId, type }).catch(res => {
commonToast({ content: res && res.message});
showToast({ content: res && res.message});
});
if (result && result.success) {
resolve(true)
......
......@@ -13894,10 +13894,10 @@ taro-ui@^3.0.0-alpha.3:
lodash "^4.17.10"
prop-types "^15.7.2"
tbcc-sdk-ts@^1.0.9:
version "1.0.9"
resolved "https://registry.yarnpkg.com/tbcc-sdk-ts/-/tbcc-sdk-ts-1.0.9.tgz#36eedaa5f2d164c5e431cfe027dd8241d7622576"
integrity sha512-g4Rr6thIurH+fWlgaF4y8/aXu0ViVYoAzrZG7Rji5CguzDuZ2L8lH/uXCAzYtNXBmnB7IvtkR2i11xxe1YI8Dw==
tbcc-sdk-ts@^1.0.10:
version "1.0.10"
resolved "https://registry.yarnpkg.com/tbcc-sdk-ts/-/tbcc-sdk-ts-1.0.10.tgz#8e1489176c843a43f95931aae3e04a5b6c1f8305"
integrity sha512-z+6/SVclywLnlbIqndPzUDFuVj1NEbojFm9vQAqx1hiXvpJbBcf5Ioo9J7k0rjymXgk0+at+QsnjhwuWEq3o/g==
optionalDependencies:
"@types/lodash" "^4.14.160"
"@types/node" "^14.6.0"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment