@@ -9,6 +9,15 @@ Page({
headImg: '',
nickname: ''
},
+ handleToast () {
+ wx.showToast({
+ title: '测试Toast',
+ icon: 'success'
+ }).then(res => {
+ console.log('success t', res);
+ })
+ },
+
submit () {
console.log(this.data.headImg, this.data.nickname);
@@ -6,5 +6,6 @@
<image src="{{headImg}}"></image>
<input type="nickname" model:value="{{nickname}}" class="weui-input" placeholder="请输入昵称"/>
<button bindtap="submit">提交</button>
+ <button bindtap="handleToast">Toast Promise</button>
</view>