├── .editorconfig
├── .eslintrc
├── .gitignore
├── .npmrc
├── README.md
├── babel.config.js
├── config
├── dev.js
├── index.js
└── prod.js
├── global.d.ts
├── package.json
├── project.config.json
├── src
├── app.config.ts
├── app.less
├── app.ts
├── index.html
├── pages
│ ├── index
│ │ ├── index.config.ts
│ │ ├── index.less
│ │ └── index.vue
│ └── show
│ │ ├── show.config.ts
│ │ ├── show.less
│ │ └── show.vue
└── utils
│ ├── config.js
│ └── request.js
└── tsconfig.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | charset = utf-8
8 | trim_trailing_whitespace = true
9 | insert_final_newline = true
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | // ESLint 检查 .vue 文件需要单独配置编辑器:
2 | // https://eslint.vuejs.org/user-guide/#editor-integrations
3 | {
4 | 'extends': ['taro/vue']
5 | }
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | dist/
2 | deploy_versions/
3 | .temp/
4 | .rn_temp/
5 | node_modules/
6 | .DS_Store
7 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | registry=https://registry.npm.taobao.org
2 | disturl=https://npm.taobao.org/dist
3 | sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
4 | phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/
5 | electron_mirror=https://npm.taobao.org/mirrors/electron/
6 | chromedriver_cdnurl=https://npm.taobao.org/mirrors/chromedriver
7 | operadriver_cdnurl=https://npm.taobao.org/mirrors/operadriver
8 | selenium_cdnurl=https://npm.taobao.org/mirrors/selenium
9 | node_inspector_cdnurl=https://npm.taobao.org/mirrors/node-inspector
10 | fsevents_binary_host_mirror=http://npm.taobao.org/mirrors/fsevents/
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # wx-sta
2 |
3 | 分享好玩的微信8.0状态背景
4 |
5 | ## How to use
6 |
7 | ```bash
8 | # install dependencies
9 | cnpm install
10 |
11 | # serve with hot reload at localhost:10086
12 | npm run dev:weapp
13 |
14 | # build for production with minification
15 | npm run build:weapp
16 |
17 | ```
18 |
19 | ## Tech stack
20 |
21 | - Taro.js
22 | - Vue.js
23 | - Less
24 |
25 |
26 | 小程序预览
27 |
28 |
29 |
30 |
31 | 如果你觉得这个项目帮助到了你,你可以帮作者买杯咖啡表示鼓励 ❤️
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | // babel-preset-taro 更多选项和默认值:
2 | // https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
3 | module.exports = {
4 | presets: [
5 | ['taro', {
6 | framework: 'vue',
7 | ts: true
8 | }]
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/config/dev.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | env: {
3 | NODE_ENV: '"development"'
4 | },
5 | defineConstants: {
6 | },
7 | mini: {},
8 | h5: {}
9 | }
10 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | const config = {
2 | projectName: 'wx-sta',
3 | date: '2021-1-29',
4 | designWidth: 750,
5 | deviceRatio: {
6 | 640: 2.34 / 2,
7 | 750: 1,
8 | 828: 1.81 / 2
9 | },
10 | sourceRoot: 'src',
11 | outputRoot: 'dist',
12 | plugins: [],
13 | defineConstants: {
14 | },
15 | copy: {
16 | patterns: [
17 | ],
18 | options: {
19 | }
20 | },
21 | framework: 'vue',
22 | mini: {
23 | postcss: {
24 | pxtransform: {
25 | enable: true,
26 | config: {
27 |
28 | }
29 | },
30 | url: {
31 | enable: true,
32 | config: {
33 | limit: 1024 // 设定转换尺寸上限
34 | }
35 | },
36 | cssModules: {
37 | enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
38 | config: {
39 | namingPattern: 'module', // 转换模式,取值为 global/module
40 | generateScopedName: '[name]__[local]___[hash:base64:5]'
41 | }
42 | }
43 | }
44 | },
45 | h5: {
46 | publicPath: '/',
47 | staticDirectory: 'static',
48 | postcss: {
49 | autoprefixer: {
50 | enable: true,
51 | config: {
52 | }
53 | },
54 | cssModules: {
55 | enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
56 | config: {
57 | namingPattern: 'module', // 转换模式,取值为 global/module
58 | generateScopedName: '[name]__[local]___[hash:base64:5]'
59 | }
60 | }
61 | }
62 | }
63 | }
64 |
65 | module.exports = function (merge) {
66 | if (process.env.NODE_ENV === 'development') {
67 | return merge({}, config, require('./dev'))
68 | }
69 | return merge({}, config, require('./prod'))
70 | }
71 |
--------------------------------------------------------------------------------
/config/prod.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | env: {
3 | NODE_ENV: '"production"'
4 | },
5 | defineConstants: {
6 | },
7 | mini: {},
8 | h5: {
9 | /**
10 | * 如果h5端编译后体积过大,可以使用webpack-bundle-analyzer插件对打包体积进行分析。
11 | * 参考代码如下:
12 | * webpackChain (chain) {
13 | * chain.plugin('analyzer')
14 | * .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
15 | * }
16 | */
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/global.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.png';
2 | declare module '*.gif';
3 | declare module '*.jpg';
4 | declare module '*.jpeg';
5 | declare module '*.svg';
6 | declare module '*.css';
7 | declare module '*.less';
8 | declare module '*.scss';
9 | declare module '*.sass';
10 | declare module '*.styl';
11 |
12 | // @ts-ignore
13 | declare const process: {
14 | env: {
15 | TARO_ENV: 'weapp' | 'swan' | 'alipay' | 'h5' | 'rn' | 'tt' | 'quickapp' | 'qq';
16 | [key: string]: any;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "wx-sta",
3 | "version": "1.0.0",
4 | "private": true,
5 | "description": "微信状态图库",
6 | "templateInfo": {
7 | "name": "default-youshu",
8 | "typescript": true,
9 | "css": "less"
10 | },
11 | "scripts": {
12 | "build:weapp": "taro build --type weapp",
13 | "build:swan": "taro build --type swan",
14 | "build:alipay": "taro build --type alipay",
15 | "build:tt": "taro build --type tt",
16 | "build:qq": "taro build --type qq",
17 | "dev:weapp": "npm run build:weapp -- --watch",
18 | "dev:swan": "npm run build:swan -- --watch",
19 | "dev:alipay": "npm run build:alipay -- --watch",
20 | "dev:tt": "npm run build:tt -- --watch",
21 | "dev:qq": "npm run build:qq -- --watch"
22 | },
23 | "browserslist": [
24 | "last 3 versions",
25 | "Android >= 4.1",
26 | "ios >= 8"
27 | ],
28 | "author": "",
29 | "dependencies": {
30 | "@babel/runtime": "^7.7.7",
31 | "@tarojs/components": "3.0.25",
32 | "@tarojs/runtime": "3.0.25",
33 | "@tarojs/taro": "3.0.25",
34 | "vue-template-compiler": "^2.5.0",
35 | "vue": "^2.5.0",
36 | "sr-sdk-wxapp": "^1.3.6"
37 | },
38 | "devDependencies": {
39 | "@types/webpack-env": "^1.13.6",
40 | "@tarojs/mini-runner": "3.0.25",
41 | "@babel/core": "^7.8.0",
42 | "@tarojs/webpack-runner": "3.0.25",
43 | "babel-preset-taro": "3.0.25",
44 | "vue-loader": "^15.9.2",
45 | "eslint-plugin-vue": "^6.x",
46 | "eslint-config-taro": "3.0.25",
47 | "eslint": "^6.8.0",
48 | "stylelint": "9.3.0",
49 | "@typescript-eslint/parser": "^2.x",
50 | "@typescript-eslint/eslint-plugin": "^2.x",
51 | "typescript": "^3.7.0"
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "miniprogramRoot": "dist/",
3 | "projectname": "wx-sta",
4 | "description": "微信状态图库",
5 | "appid": "wx4feb8e53536131a2",
6 | "setting": {
7 | "urlCheck": true,
8 | "es6": false,
9 | "enhance": false,
10 | "postcss": false,
11 | "preloadBackgroundData": false,
12 | "minified": false,
13 | "newFeature": false,
14 | "coverView": true,
15 | "nodeModules": false,
16 | "autoAudits": false,
17 | "showShadowRootInWxmlPanel": true,
18 | "scopeDataCheck": false,
19 | "uglifyFileName": false,
20 | "checkInvalidKey": true,
21 | "checkSiteMap": true,
22 | "uploadWithSourceMap": true,
23 | "compileHotReLoad": false,
24 | "useMultiFrameRuntime": true,
25 | "useApiHook": true,
26 | "useApiHostProcess": true,
27 | "babelSetting": {
28 | "ignore": [],
29 | "disablePlugins": [],
30 | "outputPath": ""
31 | },
32 | "enableEngineNative": false,
33 | "bundle": false,
34 | "useIsolateContext": true,
35 | "useCompilerModule": true,
36 | "userConfirmedUseCompilerModuleSwitch": false,
37 | "userConfirmedBundleSwitch": false,
38 | "packNpmManually": false,
39 | "packNpmRelationList": [],
40 | "minifyWXSS": true
41 | },
42 | "compileType": "miniprogram",
43 | "condition": {
44 | "plugin": {
45 | "list": []
46 | },
47 | "game": {
48 | "list": []
49 | },
50 | "gamePlugin": {
51 | "list": []
52 | },
53 | "miniprogram": {
54 | "list": [
55 | {
56 | "name": "pages/show/show",
57 | "pathName": "pages/show/show",
58 | "query": "id=23&__key_=16122590679331",
59 | "scene": null
60 | }
61 | ]
62 | }
63 | }
64 | }
--------------------------------------------------------------------------------
/src/app.config.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | pages: [
3 | 'pages/index/index',
4 | 'pages/show/show'
5 | ],
6 | window: {
7 | backgroundTextStyle: 'light',
8 | navigationBarBackgroundColor: '#fff',
9 | navigationBarTitleText: 'WeChat',
10 | navigationBarTextStyle: 'black'
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/app.less:
--------------------------------------------------------------------------------
1 | .el {
2 | white-space: nowrap;
3 | text-overflow: ellipsis;
4 | overflow: hidden;
5 | }
6 |
7 | .transition {
8 | -webkit-transition: all 0.5s;
9 | -ms-transition: all 0.5s;
10 | -o-transition: all 0.5s;
11 | -moz-transition: all 0.5s;
12 | transition: all 0.5s;
13 | }
14 |
15 | .el2 {
16 | display: -webkit-box;
17 | -webkit-box-orient: vertical;
18 | -webkit-line-clamp: 2;
19 | overflow: hidden;
20 | }
21 |
22 | .el3 {
23 | display: -webkit-box;
24 | -webkit-box-orient: vertical;
25 | -webkit-line-clamp: 3;
26 | overflow: hidden;
27 | }
28 |
--------------------------------------------------------------------------------
/src/app.ts:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import sr from 'sr-sdk-wxapp'
3 |
4 | import './app.less'
5 |
6 | /**
7 | * 有数埋点SDK 默认配置
8 | * 使用方法请参考文档 https://mp.zhls.qq.com/youshu-docs/develop/sdk/Taro.html
9 | * 如对有数SDK埋点接入有任何疑问,请联系微信:sr_data_service
10 | */
11 | sr.init({
12 | /**
13 | * 有数 - ka‘接入测试用’ 分配的 app_id,对应的业务接口人负责
14 | */
15 | token: 'bi6cdbda95ae2640ec',
16 |
17 | /**
18 | * 微信小程序appID,以wx开头
19 | */
20 | appid: 'touristappid',
21 |
22 | /**
23 | * 如果使用了小程序插件,需要设置为 true
24 | */
25 | usePlugin: false,
26 |
27 | /**
28 | * 开启打印调试信息, 默认 false
29 | */
30 | debug: true,
31 |
32 | /**
33 | * 建议开启-开启自动代理 Page, 默认 false
34 | * sdk 负责上报页面的 browse 、leave、share 等事件
35 | * 可以使用 sr.page 代替 Page(sr.page(options))
36 | * 元素事件跟踪,需要配合 autoTrack: true
37 | */
38 | proxyPage: true,
39 | /**
40 | * 建议开启-开启组件自动代理, 默认 false
41 | * sdk 负责上报页面的 browse 、leave、share 等事件
42 | */
43 | proxyComponent: true,
44 | // 建议开启-是否开启页面分享链路自动跟踪
45 | openSdkShareDepth: true,
46 | // 建议开启-元素事件跟踪,自动上报元素事件,入tap、change、longpress、confirm
47 | autoTrack: true,
48 | installFrom: 'Taro@v3'
49 | })
50 |
51 | const App = new Vue({
52 | onShow (options) {
53 | },
54 | render(h) {
55 | // this.$slots.default 是将要会渲染的页面
56 | return h('block', this.$slots.default)
57 | }
58 | })
59 |
60 | export default App
61 |
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |