Skip to content

Commit c449c9c

Browse files
committed
project list page
1 parent 5c757dc commit c449c9c

File tree

5 files changed

+33
-4
lines changed

5 files changed

+33
-4
lines changed

config/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
},
2424
dev: {
2525
env: require('./dev.env'),
26-
port: 8080,
26+
port: 8123,
2727
// 在小程序开发者工具中不需要自动打开浏览器
2828
autoOpenBrowser: false,
2929
// assetsSubDirectory: 'static',

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"dependencies": {
1313
"mpvue": "^1.0.1",
1414
"vuex": "^2.3.1",
15-
"moment": "2.21.0"
15+
"moment": "2.21.0",
16+
"mptoast":"1.1.3"
1617
},
1718
"devDependencies": {
1819
"autoprefixer": "^7.1.2",

src/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import Vue from 'vue'
22
import App from './App'
33
import store from '@/stores/index'
44
import asyncRequestMethod from './utils/asyncRequestMethod'
5+
import mptoastReg from 'mptoast/registry'
56
Vue.config.productionTip = false
67
App.mpType = 'app'
7-
8+
mptoastReg(Vue)
89
// 挂载全局的store
910
Vue.prototype.store = store
1011
// 挂载一个全局的图片路径,方便后期修改图片地址的时候,做统一修改
@@ -14,6 +15,7 @@ Vue.prototype.$server = 'http://abc.defghijk.lmn/opqrst/'
1415
// 把 异步请求的方法挂载到this.$post上
1516
Vue.prototype.$post = asyncRequestMethod.post
1617

18+
1719
const app = new Vue(App)
1820
app.$mount()
1921

src/pages/userCenter/index.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
<view v-if="showModal" @tap.stop="showModal=false" class="modal_container">
1515
<switchIdentity v-model="showModal"/>
1616
</view>
17+
<mptoast></mptoast>
18+
<view @tap="showTestToast">测试按钮</view>
1719
</scroll-view>
1820
</template>
1921

@@ -23,9 +25,10 @@
2325
import counter from './components/counter'
2426
import functionList from './components/functionList'
2527
import switchIdentity from './components/switchIdentity'
28+
import mptoast from 'mptoast'
2629
2730
export default {
28-
components: {topInfo, counter, functionList, switchIdentity},
31+
components: {topInfo, counter, functionList, switchIdentity,mptoast},
2932
data () {
3033
return {
3134
showModal: false, // 显示遮罩层
@@ -44,6 +47,9 @@
4447
switchIdentitys () {
4548
this.showModal = true
4649
},
50+
showTestToast() {
51+
this.$mptoast(`请输入正确网址,如xxxx.com`, 'none',1500)
52+
}
4753
},
4854
onShow () {}
4955
}

yarn.lock

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3286,6 +3286,22 @@ move-concurrently@^1.0.1:
32863286
rimraf "^2.5.4"
32873287
run-queue "^1.0.3"
32883288

3289+
mptoast@*:
3290+
version "1.1.1"
3291+
resolved "https://registry.npmjs.org/mptoast/-/mptoast-1.1.1.tgz#6097bba1acfa542bab6eb3da42de20f156ceb8b5"
3292+
dependencies:
3293+
mptoast "*"
3294+
mpvue "^1.0.6"
3295+
vuex "^2.3.1"
3296+
3297+
3298+
version "1.1.3"
3299+
resolved "https://registry.npmjs.org/mptoast/-/mptoast-1.1.3.tgz#946e62ac1182edc18ab9957eaedc26c921cf9e21"
3300+
dependencies:
3301+
mptoast "*"
3302+
mpvue "^1.0.6"
3303+
vuex "^2.3.1"
3304+
32893305
mpvue-loader@^1.0.2:
32903306
version "1.0.2"
32913307
resolved "http://registry.npm.taobao.org/mpvue-loader/download/mpvue-loader-1.0.2.tgz#bd74f78f3950ace60bd3507ee9deb0cbddb1625c"
@@ -3323,6 +3339,10 @@ mpvue@^1.0.1:
33233339
version "1.0.1"
33243340
resolved "http://registry.npm.taobao.org/mpvue/download/mpvue-1.0.1.tgz#e1cff387117f163012bb85b4f1534091c0b73a06"
33253341

3342+
mpvue@^1.0.6:
3343+
version "1.0.12"
3344+
resolved "https://registry.npmjs.org/mpvue/-/mpvue-1.0.12.tgz#03610de052050861edf36b873df91b30623ad233"
3345+
33263346
33273347
version "2.0.0"
33283348
resolved "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"

0 commit comments

Comments
 (0)