37 lines
846 B
JavaScript
37 lines
846 B
JavaScript
// pages/treaty/service/service.js
|
|
import CommonService from "../../../net/api/commonApi"
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
content: "",
|
|
title: ''
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad(options) {
|
|
this.getDeal()
|
|
},
|
|
//获取协议内容
|
|
getDeal() {
|
|
var _self = this
|
|
CommonService.doGetPrivacy("service")
|
|
.then(res => {
|
|
if (res.content) {
|
|
_self.setData({
|
|
content: res.content,
|
|
title: res.title
|
|
})
|
|
wx.setNavigationBarTitle({
|
|
title: res.title,
|
|
})
|
|
}
|
|
}, err => {
|
|
console.log(err)
|
|
})
|
|
}
|
|
}) |