123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- // pages/myloanprojuctDetail/index.js
- const app = getApp()
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- nvabarData: {
- showCapsule: 0, //是否显示左上角图标,消息中心 1表示显示 0表示不显示
- showBack: 1, //返回
- title: '我的申请', //导航栏 中间的标题
- // 此页面 页面内容距最顶部的距离
- height: app.globalData.height * 2 + 20,
- },
- jgproid:'',//产品ID
- //jgproidname:'',
- jgproidAll:{},
- ecode:'',
- ecodename:'',
- cneedidcneedid:'',
- clamneedDetail: {},
- compname: '',
- compcode: '',
- cpjlname:'',
- cpjlpho:'',
- sxhowlong:'',
- sxcpname:'',
- sxcplilue:'',
- credit_money:'',
- remarks:'',
- },
- call(e) {
- console.log(e.currentTarget.dataset.phone, "dayin")
- wx.makePhoneCall({
- phoneNumber: e.currentTarget.dataset.phone,
- })
- },
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- this.setData({ // 设置页面列表的内容
- cneedid: options.cneedid,
- cpjlname: options.cpjlname,
- cpjlpho: options.cpjlpho
- })
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
- this.getclamneed(),
- this.getcompnews(),
- this.shouxindata()
- },
- getclamneed() {//需求信息
- wx.request({
- method: "GET",
- url: app.globalData.publicUrl + 'api/financial/claimneed/' + this.data.cneedid,
- success: (res) => {
- //console.log("需求信息+=============================="+JSON.stringify(res))
- console.log(res.data.data,"sssssss");
- if (res.data.errcode == 0) {
- this.setData({
- clamneedDetail: res.data.data,
- ecode:res.data.data.ensure_id,
- jgproid: res.data.data.jg_pro_id
- })
- wx.request({
- method: "get",
- url: app.globalData.publicUrl + 'api/financial/dictionary',
- data: {
- "code": this.data.ecode
- },
- success: (res) => {
- if (res.data.errcode == 0) {
- this.setData({
- ecodename: res.data.data[0].name
- })
- }
- wx.request({
- method: "get",
- url: app.globalData.publicUrl + 'api/financial/financeclaims/' + this.data.jgproid,
- success: (res) => {
- console.log(res.data.data,"99999999999999999");
-
- if (res.data.errcode == 0) {
- this.setData({
- //jgproidname: res.data.data.name,
- jgproidAll : res.data.data
- })
- }
- }
- })
- }
- })
- }
- }
- })
- },
- getcompnews() {//企业信息
- let fiduid = wx.getStorageSync('user')._id;
- wx.request({
- method: "get",
- url: app.globalData.publicUrl + 'api/financial/companyidentify',
- data: {
- uid: fiduid
- },
- success: (res) => {
- //console.log("企业信息================================================"+JSON.stringify(res))
- if (res.data.errcode == 0) {
- this.setData({
- compname: res.data.data[0].company_name,
- compcode: res.data.data[0].reg_num
- })
- }
- }
- })
- },
- shouxindata: function () {
- wx.request({
- method: "post",
- url: app.globalData.publicUrl + 'api/financial/claimneed/one',
- data: { id: this.data.cneedid},
- success: (e) => {
- console.log(JSON.stringify(e)+"888888888888888")
- if (e.data.errcode == 0) {
- if (e.data.data[0].sxcplilue){
- this.setData({
- sxcplilue: e.data.data[0].sxcplilue,
- })
- }
- if (e.data.data[0].sxcpname) {
- this.setData({
- sxcpname: e.data.data[0].sxcpname,
- })
- }
- if (e.data.data[0].sxhowlong) {
- this.setData({
- sxhowlong: e.data.data[0].sxhowlong,
- })
- }
- if (e.data.data[0].credit_money) {
- this.setData({
- credit_money: e.data.data[0].credit_money,
- })
- }
-
- }
- }
- })
- },
-
- })
|