123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- // pages/interaction/interaction.js
- const app = getApp(),
- {
- globalData: {
- util: {
- regeneratorRuntime,
- api: {
- caseDetail
- },
- request: {
- get
- }
- }
- }
- } = app;
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- },
- assess:function(e){
- wx.navigateTo({
- url: e.currentTarget.dataset.url,
- success: function(res) {},
- fail: function(res) {},
- complete: function(res) {},
- })
- },
- wuliu: function () {
- wx.navigateTo({
- url: 'webView/webView?takePostno=' + this.data.detailData.preExpress.takePostno + '&postUnitname=' + this.data.detailData.preExpress.postUnitno,
- success: function (res) { },
- fail: function (res) { },
- complete: function (res) { },
- })
- },
- tousu:function(e){
- wx.setStorageSync('unid', this.data.detailData.preService.unid)
- wx.setStorageSync('tousu', 'tousu')
- wx.switchTab({
- url: e.currentTarget.dataset.url,
- })
- },
- /**
- * 生命周期函数--监听页面加载
- */
- async onLoad() {
- let that = this;
- let options = this.options.projid;
- let detailData = await get(caseDetail, {
- projId: options
- });
- that.data.detailData=detailData
- let fileArr = detailData.preApasinfo.preAttrList, imgArr = [], imgs = [];
- fileArr.forEach(function (item, index) {
- let img = item.fileUrl;
- imgs = String(img).split(",");
- if (imgs.length > 0 && imgs[0] != 'null') {
- imgArr.push({'url':imgs,'ind':index});
- detailData.preApasinfo.preAttrList[index].fileUrl = imgArr[index]
- }
- })
- that.setData({
- detailData: detailData,
- imgArr
- })
- },
- preview:function(e){
- wx.previewImage({
- current: e.currentTarget.dataset.url[e.currentTarget.dataset.index],
- urls: e.currentTarget.dataset.url,
- })
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- async onShow() {
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
- }
- })
|