Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
singleStore
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Max
singleStore
Commits
6b802fae
Commit
6b802fae
authored
Feb 24, 2022
by
June_Q
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs:更新文档
parent
a36ad92b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
123 additions
and
62 deletions
+123
-62
readme.md
readme.md
+45
-2
utils/types.js
utils/types.js
+63
-60
交接.md
交接.md
+15
-0
No files found.
readme.md
View file @
6b802fae
...
@@ -25,18 +25,61 @@
...
@@ -25,18 +25,61 @@
+
小程序和vue页面生命周期顺序
+
小程序和vue页面生命周期顺序
-
created => onLoad => onShow => mounted => onReady => onUnload => destroyed
-
created => onLoad => onShow => mounted => onReady => onUnload => destroyed
+
关于zIndex层级
<font
color=
"red"
>
为防止层级规范
</font>
+
关于zIndex层级
<font
color=
"red"
>
为防止层级规范
</font>
(问题不大)
-
一般层级(普通层级,如展示一些普通信息) zIndex范围 1-98
-
一般层级(普通层级,如展示一些普通信息) zIndex范围 1-98
-
当前页面最高层级,如遮罩 zIndex 99
-
当前页面最高层级,如遮罩 zIndex 99
-
仅次于小程序原生弹窗 zIndex 100
-
仅次于小程序原生弹窗 zIndex 100
+
小程序线上版本库2.16.0 (后端在授权开通服务的时候会设置)
+
小程序线上版本库2.16.0 (后端在授权开通服务的时候会设置)
+
APPID
+
APPID
-
wx537e892e36fbf79d // 这个线上的 貌似是省冷的
-
wx537e892e36fbf79d // 这个线上的 貌似是省冷的
-
wxd170058f4ad8fecd // 开发用的
-
wxd170058f4ad8fecd // 开发用的
+
接口的返回,所有的数据必须在data里面(pc端是随意的)
+
接口的返回,所有的数据必须在data里面,这里已经封装好,代码在/lib/service/index.js(pc端是随意的)
+
关于请求域名更改(一般情况下你无需手动修改,但有时候你想调试线上的问题时,你可以手动修改一下)
```
javascript
// 文件在config/index.js
const
env
=
{
release
:
'
https://www.gelifood.com
'
,
// 正式版
trial
:
'
https://www.gelifood.com
'
,
// 体验版
develop
:
'
https://d.gelifood.com
'
// 开发版
}
// 不考虑其他端小程序直接这样配置
// export const baseUrl = env[__wxConfig.envVersion]
// 因为这个是模板,用上面的方法配置域名意义不大
// 开发的时候默认是https://d.gelifood.com 线上打包域名默认是https://www.gelifood.com
export
const
baseUrl
=
process
.
env
.
NODE_ENV
===
'
development
'
?
env
.
develop
:
env
.
release
// 当你想在本地查看线上的问题可以这样操作
// ext.json
{
"
extEnable
"
:
true
,
"
extAppid
"
:
"
对应商户的appid
"
,
"
ext
"
:
{
"
appid
"
:
"
对应商户的appid
"
}
}
// 把上面变量的eve.delelop 改为 https://www.gelifood.com
```
+
挂在vue prototype上的方法在utils/vue_extend.js
+
testA 是独立分包(目前是没有使用的)
#### 上线
+
1.检查是否修改过config/index.js的域名配置
+
2.如果没有修改过,hbuilderX点击发行,选小程序微信 打包完在微信开发者工具提交草稿 然后去开放平台提交草稿即可
#### warning
#### warning
+
2021/6/29,本日起的代码可能会引起不适,but all can run(效率和质量不会成正比关系)
+
2021/6/29,本日起的代码可能会引起不适,but all can run(效率和质量不会成正比关系)
+
开发的时候直接再ext.json修改appid可以改变商户
#### unFinish, but not important
#### unFinish, but not important
+
详情有个深拷贝的问题。暂时通过JSON.stringify()处理
+
详情有个深拷贝的问题。暂时通过JSON.stringify()处理
...
...
utils/types.js
View file @
6b802fae
const
toString
=
Object
.
prototype
.
toString
/**
function
typeOf
(
obj
)
{
* 判断类型
const
maps
=
{
*/
'
[object Boolean]
'
:
'
boolean
'
,
const
toString
=
Object
.
prototype
.
toString
'
[object Number]
'
:
'
number
'
,
function
typeOf
(
obj
)
{
'
[object String]
'
:
'
string
'
,
const
maps
=
{
'
[object Function]
'
:
'
function
'
,
'
[object Boolean]
'
:
'
boolean
'
,
'
[object Array]
'
:
'
array
'
,
'
[object Number]
'
:
'
number
'
,
'
[object Date]
'
:
'
date
'
,
'
[object String]
'
:
'
string
'
,
'
[object RegExp]
'
:
'
regExp
'
,
'
[object Function]
'
:
'
function
'
,
'
[object Undefined]
'
:
'
undefined
'
,
'
[object Array]
'
:
'
array
'
,
'
[object Null]
'
:
'
null
'
,
'
[object Date]
'
:
'
date
'
,
'
[object Object]
'
:
'
object
'
'
[object RegExp]
'
:
'
regExp
'
,
}
'
[object Undefined]
'
:
'
undefined
'
,
return
maps
[
toString
.
call
(
obj
)]
'
[object Null]
'
:
'
null
'
,
}
'
[object Object]
'
:
'
object
'
}
/**
return
maps
[
toString
.
call
(
obj
)]
* @desc 检查对象
}
* @param obj
* @returns { Boolean }
/**
*/
* @desc 检查对象
export
function
isObeject
(
obj
)
{
* @param obj
return
typeOf
(
obj
)
===
'
object
'
* @returns { Boolean }
}
*/
export
function
isObeject
(
obj
)
{
/**
return
typeOf
(
obj
)
===
'
object
'
* @desc 检查函数
}
* @param obj
* @returns { Boolean }
/**
*/
* @desc 检查函数
export
function
isFunction
(
obj
)
{
* @param obj
return
typeOf
(
obj
)
===
'
function
'
* @returns { Boolean }
}
*/
export
function
isFunction
(
obj
)
{
/**
return
typeOf
(
obj
)
===
'
function
'
* @desc 检查数组
}
* @param obj
* @returns { Boolean }
/**
*/
* @desc 检查数组
export
function
isArray
(
obj
)
{
* @param obj
return
typeOf
(
obj
)
===
'
array
'
* @returns { Boolean }
}
*/
export
function
isArray
(
obj
)
{
/**
return
typeOf
(
obj
)
===
'
array
'
* @desc 检查数字
}
* @param obj
* @returns { Boolean }
/**
*/
* @desc 检查数字
export
function
isNumber
(
obj
)
{
* @param obj
return
typeOf
(
obj
)
===
'
number
'
* @returns { Boolean }
}
*/
export
function
isNumber
(
obj
)
{
/**
return
typeOf
(
obj
)
===
'
number
'
* @desc 检查字符串
}
* @param obj
* @returns { Boolean }
/**
*/
* @desc 检查字符串
export
function
isString
(
obj
)
{
* @param obj
return
typeOf
(
obj
)
===
'
string
'
* @returns { Boolean }
*/
export
function
isString
(
obj
)
{
return
typeOf
(
obj
)
===
'
string
'
}
}
\ No newline at end of file
交接.md
View file @
6b802fae
...
@@ -121,6 +121,16 @@ function lazyload() {
...
@@ -121,6 +121,16 @@ function lazyload() {
<
/html
>
<
/html
>
```
```
#### 关于iconfont(已经转让给啸山)
> 新加icon,添加后把iconfont.css丢到对应的文件覆盖(主要@font-face src我的引用,小程序我用的是base64, pc用的是ttf)
+
geli_zs 专属小程序的iconfont
+
geli_pc__old 格利pc用到的iconfont
+
geli 重构pc端用到的iconfont
#### 关于渲染时vue的{{}}的问题
+
通过延时解决,这个可能会出问题,但基本不会出现,做优惠券时也是复制之前的代码看到的
+
把vue实例化的dom的css设置
`display:none`
, 然后再mounted生命周期钩子把dom设置了可见
`$('dom').show()`
或者
`this.$refs[dom].style.disply = 'block'`
#### 注意
#### 注意
+
不要使用第三方cdn(你不能保证别人的cdn会不会挂)
+
不要使用第三方cdn(你不能保证别人的cdn会不会挂)
+
尽量少用es6+的新语法,比如async。 因为没经过babel转换,不同浏览器会有兼容问题
+
尽量少用es6+的新语法,比如async。 因为没经过babel转换,不同浏览器会有兼容问题
...
@@ -128,3 +138,7 @@ function lazyload() {
...
@@ -128,3 +138,7 @@ function lazyload() {
+
编译和压缩,引用全部用对应目录下的min/
+
编译和压缩,引用全部用对应目录下的min/
-
压缩js js/js下的文件全部压缩到js/min下面
-
压缩js js/js下的文件全部压缩到js/min下面
-
压缩css css/less下的文件全部压缩到css/min下面
-
压缩css css/less下的文件全部压缩到css/min下面
## [关于pc重构说明(目前已暂停)](http://git.gelifood.com/June/gelifood_pc/-/blob/master/README.md)
## [专属小程序](./readme.md)
\ No newline at end of file
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