aa

 

<view class='view_img' >
<image class='img' bindtap="previewImage1" src='../../images/jing.jpg' style="width:100px; height: 100px; " ></image>
<image class='img' bindtap="previewImage2" src='../../images/baba.jpg' style="width:100px; height: 100px; " ></image>
</view>
 
 
var app = getApp();
var initData = 'this is first line\nthis is second line'
var extraLine = [];
Page({
data: {
text: initData
},
add: function (e) {
wx.request({
url: "https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=0&rsv_idx=1&tn=baidu&wd=%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F&rsv_pq=ceab22a200015344&rsv_t=7e41sRyz9ti3dSE8FbYMEFRC1pqlUFsjkyO8apXML4ZFvXc3TnxdGQ%2FpNzI&rqlang=cn&rsv_enter=1&rsv_sug3=17&rsv_sug1=16&rsv_sug7=100", //仅为示例,并非真实的接口地址

success: function (res) {
console.log(res.data)
}
})


},
call: function () {
console.log("call");
wx.makePhoneCall({
phoneNumber: '15366404483' //仅为示例,并非真实的电话号码
})
},
remove: function (e) {
if (extraLine.length > 0) {
extraLine.pop()
this.setData({
text: initData + '\n' + extraLine.join('\n')
})
}
},
formSubmit: function (e) {
// detail
var detail = e.detail.value.detail;
// realname
var realname = e.detail.value.realname;
// mobile
var mobile = e.detail.value.mobile;
console.log(detail + realname + mobile)
},
onLoad: function (options) {
var that = this
var scene_img = '../../images/jing.jpg' //这里添加图片的地址
that.setData({
scene: scene_img
})
},
previewImage1: function (e) {
wx.previewImage({
urls: ['https://images2017.cnblogs.com/blog/1095936/201802/1095936-20180208154934951-1539934916.jpg']
})
},
previewImage2: function (e) {
wx.previewImage({
urls: ['https://images2017.cnblogs.com/blog/1095936/201802/1095936-20180208161108841-155504341.jpg']
})
}
})
 
posted @ 2018-02-08 15:50  贪吃的柳柳  阅读(344)  评论(0编辑  收藏  举报