uni-app小程序商城 (1)

初始配置

  • uni-app

    vue create -p dcloudio/uni-preset-vue gouwushanchen
    //选默认模板
    npm  i sass
    npm i sass-loader@10
    
    npm run dev:mp-weixin
    

    微信开发工具导入: \dist\dev\mp-weixin

    manifest.json

    "appid": "xxx",
    
  • uView

    npm install uview-ui
    

    main.js

    import uView from "uview-ui";
    Vue.use(uView);
    

    uni.scss

    @import ‘uview-ui/theme.scss‘;
    

    App.vue

    <style lang="scss">
        @import "uview-ui/index.scss";
    </style>
    

    pages.json

    "easycom": {
        "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
    },
    

    manifest.json

    "mp-weixin": { /* 微信小程序特有相关 */
        "appid": "xxx",
        "setting": {
            "urlCheck": false,
            "enhance": true
        },
        "usingComponents": true
    },
    

uni-app小程序商城 (1)

上一篇:微信公众平台开发 - 基础篇


下一篇:微信公众平台图文转化率300%实操