Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
328eef6b
Commit
328eef6b
authored
Nov 30, 2021
by
王能飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'c_client_taro-pack' into 'c_client_taro'
C client taro pack See merge request
!56
parents
fa8b779c
bc130766
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
45 additions
and
44 deletions
+45
-44
index.js
c_client/config/index.js
+11
-0
package-lock.json
c_client/package-lock.json
+0
-15
package.json
c_client/package.json
+1
-1
app.config.js
c_client/src/app.config.js
+4
-10
app.js
c_client/src/app.js
+3
-3
config.js
c_client/src/config/config.js
+1
-1
useAuth.js
c_client/src/hooks/useAuth.js
+12
-9
comsTest.config.js
c_client/src/pages/packageComs/comsTest/comsTest.config.js
+7
-0
mdProxy.js
c_client/src/utils/mdProxy.js
+2
-1
yarn.lock
c_client/yarn.lock
+4
-4
No files found.
c_client/config/index.js
View file @
328eef6b
...
@@ -81,6 +81,17 @@ const config = {
...
@@ -81,6 +81,17 @@ const config = {
generateScopedName
:
'[name]__[local]___[hash:base64:5]'
generateScopedName
:
'[name]__[local]___[hash:base64:5]'
}
}
}
}
},
webpackChain
(
chain
,
webpack
)
{
chain
.
module
.
rule
(
'less'
)
.
pre
()
.
use
(
'style-resources'
)
.
loader
(
'style-resources-loader'
)
.
options
({
patterns
:
path
.
resolve
(
__dirname
,
'../src/styles/index.less'
),
injector
:
'append'
})
}
}
}
}
}
}
...
...
c_client/package-lock.json
View file @
328eef6b
...
@@ -5344,21 +5344,6 @@
...
@@ -5344,21 +5344,6 @@
"prop-types"
:
"^15.7.2"
"prop-types"
:
"^15.7.2"
}
}
},
},
"tbcc-sdk-ts"
:
{
"version"
:
"1.0.13"
,
"resolved"
:
"https://registry.npmjs.org/tbcc-sdk-ts/-/tbcc-sdk-ts-1.0.13.tgz"
,
"integrity"
:
"sha512-dupA8ug1zz1/tfVw2ifOoNBlI6te9EXbtSHlsxycNDQxrykCSMP8objFujLeWUajrqNXbUoJlmV2JqbwU626mQ=="
,
"requires"
:
{
"@types/lodash"
:
"^4.14.160"
,
"@types/node"
:
"^14.6.0"
,
"@typescript-eslint/eslint-plugin"
:
"^3.9.1"
,
"@typescript-eslint/parser"
:
"^3.9.1"
,
"eslint"
:
"^7.7.0"
,
"eslint-config-prettier"
:
"^6.11.0"
,
"eslint-plugin-prettier"
:
"^3.1.4"
,
"prettier"
:
"^2.0.5"
}
},
"text-table"
:
{
"text-table"
:
{
"version"
:
"0.2.0"
,
"version"
:
"0.2.0"
,
"resolved"
:
"https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz"
,
...
...
c_client/package.json
View file @
328eef6b
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
"react"
:
"^17.0.0"
,
"react"
:
"^17.0.0"
,
"react-dom"
:
"^17.0.0"
,
"react-dom"
:
"^17.0.0"
,
"taro-ui"
:
"^3.0.0-alpha.3"
,
"taro-ui"
:
"^3.0.0-alpha.3"
,
"tbcc-sdk-ts"
:
"^1.0.1
3
"
"tbcc-sdk-ts"
:
"^1.0.1
5
"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"@babel/core"
:
"^7.8.0"
,
"@babel/core"
:
"^7.8.0"
,
...
...
c_client/src/app.config.js
View file @
328eef6b
...
@@ -23,12 +23,6 @@ export default {
...
@@ -23,12 +23,6 @@ export default {
"pages"
:
[
"pages"
:
[
'game/game'
'game/game'
]
]
},
{
"root"
:
"pages/packageComs"
,
"pages"
:
[
'comsTest/comsTest'
]
}
}
],
],
window
:
{
window
:
{
...
@@ -42,9 +36,9 @@ export default {
...
@@ -42,9 +36,9 @@ export default {
version
:
'*'
,
version
:
'*'
,
provider
:
'3000000026642582'
provider
:
'3000000026642582'
},
},
memberBenefit
:
{
//
memberBenefit: {
version
:
'*'
,
//
version: '*',
provider
:
'3000000043103783'
//
provider: '3000000043103783'
}
//
}
}
}
}
}
\ No newline at end of file
c_client/src/app.js
View file @
328eef6b
...
@@ -13,15 +13,15 @@ const { env, tornadoAPI, defaultActivityId, requestType } = config
...
@@ -13,15 +13,15 @@ const { env, tornadoAPI, defaultActivityId, requestType } = config
cloud
.
init
({
env
})
cloud
.
init
({
env
})
Taro
.
onError
(
msg
=>
{
Taro
?.
onError
&&
Taro
?
.
onError
(
msg
=>
{
cloundAlarm
(
msg
,
env
,
requestType
)
cloundAlarm
(
msg
,
env
,
requestType
)
})
})
class
App
extends
Component
{
class
App
extends
Component
{
onLaunch
(
options
)
{
onLaunch
(
options
)
{
console
.
log
(
'options :>> '
,
options
)
console
.
log
(
'options :>> '
,
options
)
const
{
activityId
}
=
options
.
query
||
{}
const
{
activityId
}
=
options
?
.
query
||
{}
const
app
=
getApp
()
const
app
=
Taro
?.
getApp
()
||
{}
app
.
cloud
=
cloud
app
.
cloud
=
cloud
app
.
tornadoAPI
=
tornadoAPI
app
.
tornadoAPI
=
tornadoAPI
app
.
activityId
=
activityId
||
defaultActivityId
app
.
activityId
=
activityId
||
defaultActivityId
...
...
c_client/src/config/config.js
View file @
328eef6b
export
default
{
export
default
{
env
:
'test'
,
// 云函数环境 test 测试环境 online 线上环境
env
:
'test'
,
// 云函数环境 test 测试环境 online 线上环境
requestType
:
'
cloud
'
,
// cloud: 云函数, yapi: yapi 接口, ams: ams接口,tornadoAPI: 风驰台接口
requestType
:
'
yapi
'
,
// cloud: 云函数, yapi: yapi 接口, ams: ams接口,tornadoAPI: 风驰台接口
cloudName
:
'HipPopGame'
,
// 主云函数项目名 CommonToC
cloudName
:
'HipPopGame'
,
// 主云函数项目名 CommonToC
sellerId
:
'4004811045'
,
sellerId
:
'4004811045'
,
tornadoAPI
:
'https://tornado.duibadev.com.cn/tbServer/api?db=db3000000038851072&proxyIp=172.16.130.158'
,
// 新增:当requestType: 'tornadoAPI'时,找服务端提供地址
tornadoAPI
:
'https://tornado.duibadev.com.cn/tbServer/api?db=db3000000038851072&proxyIp=172.16.130.158'
,
// 新增:当requestType: 'tornadoAPI'时,找服务端提供地址
...
...
c_client/src/hooks/useAuth.js
View file @
328eef6b
...
@@ -13,18 +13,21 @@ export function useAuth(authSuccess = () => {}) {
...
@@ -13,18 +13,21 @@ export function useAuth(authSuccess = () => {}) {
const
onHandleSetting
=
useThrottle
(
async
()
=>
{
const
onHandleSetting
=
useThrottle
(
async
()
=>
{
const
res
=
await
getSetting
()
const
res
=
await
getSetting
()
if
(
!
res
.
authSetting
?.
userInfo
)
{
if
(
!
res
.
authSetting
?.
userInfo
)
{
const
authResult
=
await
authorize
().
catch
(
err
=>
{
await
getAuthorize
()
setVisible
(
true
)
showToast
({
title
:
'请先授权,授权成功后才可参与活动'
})
completeHandle
.
current
=
true
})
if
(
authResult
)
{
authUserInfo
()
}
}
else
{
}
else
{
authUserInfo
()
authUserInfo
()
}
}
})
})
const
getAuthorize
=
async
()
=>
{
const
authResult
=
await
authorize
().
catch
(
err
=>
{
setVisible
(
true
)
showToast
({
title
:
'请先授权,授权成功后才可参与活动'
})
completeHandle
.
current
=
true
})
if
(
authResult
)
{
authUserInfo
()
}
}
// 打开授权设置
// 打开授权设置
const
onOpenSetting
=
useThrottle
(
async
()
=>
{
const
onOpenSetting
=
useThrottle
(
async
()
=>
{
if
(
!
completeHandle
.
current
)
return
;
if
(
!
completeHandle
.
current
)
return
;
...
@@ -34,7 +37,7 @@ export function useAuth(authSuccess = () => {}) {
...
@@ -34,7 +37,7 @@ export function useAuth(authSuccess = () => {}) {
// 获取用户授权信息
// 获取用户授权信息
const
authUserInfo
=
async
()
=>
{
const
authUserInfo
=
async
()
=>
{
completeHandle
.
current
=
true
completeHandle
.
current
=
true
const
info
=
await
getAuthUserInfo
()
const
info
=
await
getAuthUserInfo
()
.
catch
(
err
=>
getAuthorize
())
if
(
info
)
{
if
(
info
)
{
authSuccess
(
info
)
authSuccess
(
info
)
setVisible
&&
setVisible
(
false
)
setVisible
&&
setVisible
(
false
)
...
...
c_client/src/pages/packageComs/comsTest/comsTest.config.js
0 → 100644
View file @
328eef6b
export
default
{
navigationBarTitleText
:
'游戏页面'
,
enableSkia
:
'true'
,
allowsBounceVertical
:
'NO'
,
enableShareAppMessage
:
true
,
usingComponents
:
{}
}
\ No newline at end of file
c_client/src/utils/mdProxy.js
View file @
328eef6b
...
@@ -10,7 +10,8 @@ const { addStat } = require('../api')
...
@@ -10,7 +10,8 @@ const { addStat } = require('../api')
})(
this
,
function
()
{
})(
this
,
function
()
{
'use strict'
'use strict'
console
.
log
(
'...proxyMd'
)
console
.
log
(
'...proxyMd'
)
const
oldPage
=
Page
return
true
const
oldPage
=
Page
||
{}
const
oldComponent
=
Component
const
oldComponent
=
Component
return
(
return
(
(
Page
=
function
(
t
)
{
(
Page
=
function
(
t
)
{
...
...
c_client/yarn.lock
View file @
328eef6b
...
@@ -13894,10 +13894,10 @@ taro-ui@^3.0.0-alpha.3:
...
@@ -13894,10 +13894,10 @@ taro-ui@^3.0.0-alpha.3:
lodash "^4.17.10"
lodash "^4.17.10"
prop-types "^15.7.2"
prop-types "^15.7.2"
tbcc-sdk-ts@^1.0.1
3
:
tbcc-sdk-ts@^1.0.1
5
:
version "1.0.1
3
"
version "1.0.1
5
"
resolved "https://registry.yarnpkg.com/tbcc-sdk-ts/-/tbcc-sdk-ts-1.0.1
3.tgz#179c6c7f8529a4b146c73a651f529aa56345b6fa
"
resolved "https://registry.yarnpkg.com/tbcc-sdk-ts/-/tbcc-sdk-ts-1.0.1
5.tgz#08ef923b2376f35f99f2df7aab65c76d9cd0c6fd
"
integrity sha512-d
upA8ug1zz1/tfVw2ifOoNBlI6te9EXbtSHlsxycNDQxrykCSMP8objFujLeWUajrqNXbUoJlmV2JqbwU626m
Q==
integrity sha512-d
4wz5cOTBbtWmYVl/3dvVjqFEsnnDK+Sp3RPqWEJPA86Kp8ra2Krox8VAIG78amPo8z9KG2ZioGXhxlufUpT8
Q==
optionalDependencies:
optionalDependencies:
"@types/lodash" "^4.14.160"
"@types/lodash" "^4.14.160"
"@types/node" "^14.6.0"
"@types/node" "^14.6.0"
...
...
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