Commit 2c206e90 authored by 石盼盼's avatar 石盼盼

修改,接口对接,删除无用页面

parent 37dd3e3e
......@@ -42,13 +42,13 @@ App({
const accountInfo = wx.getAccountInfoSync();
console.log(accountInfo)
if (accountInfo.miniProgram.envVersion == 'develop') { // 开发板
this.globalData.globalUrl = 'https://tianzehr.xueyoubangedu.com'
this.globalData.globalUrl = 'https://tianzehr.xueyoubangedu.com'
} else if (accountInfo.miniProgram.envVersion == 'trial') { // 体验版
this.globalData.globalUrl = 'https://tianzehr.xueyoubangedu.com'
this.globalData.globalUrl = 'https://tianzehr.xueyoubangedu.com'
} else if (accountInfo.miniProgram.envVersion == 'release') { // 正式版
this.globalData.globalUrl = 'https://www.tianzerencai.com'
this.globalData.globalUrl = 'https://www.tianzerencai.com'
} else {
this.globalData.globalUrl = 'https://tianzehr.xueyoubangedu.com'
this.globalData.globalUrl = 'https://tianzehr.xueyoubangedu.com'
}
console.log(this.globalData.globalUrl)
},
......@@ -71,6 +71,7 @@ App({
// 调用登录接口
wx.login({
success: function (res) {
console.log('wx.login微信登录',res)
that.codeChangeToken(res.code, cb, cb1)
}
})
......@@ -81,10 +82,10 @@ App({
wx.checkSession({
success() {
wx.request({
url: that.globalData.globalUrl + '/api/v1.0/saveInfo',
url: that.globalData.globalUrl + '/api/xcx/saveInfo',
method: 'GET',
header: {
Authorization: that.globalData.first_token,
token: that.globalData.first_token,
// token: 'sys',
},
data: {
......@@ -93,6 +94,7 @@ App({
token: that.globalData.token
},
success: function (res) {
console.log('saveInfo',res)
if (res.data.meta.code === 200) {
wx.setStorageSync('userInfo', JSON.parse(info.rawData))
that.globalData.userInfo = JSON.parse(info.rawData)
......@@ -135,7 +137,7 @@ App({
that.globalData.token = res.data.data.token
// login
wx.request({
url: that.globalData.globalUrl + '/api/v1.0/xcxLogin',
url: that.globalData.globalUrl + '/api/xcx/login',
data: {
token: res.data.data.token
},
......@@ -168,7 +170,7 @@ App({
globalUrl: '', // 全局Url
app_id: 'wxafaf02db6f71f4a3',
backurl: '', // 全局跳转页面路径
tjgs_fresh:false,
tjgs_fresh: false,
hasTel: false, // 是否手机号登录过
}
})
{
"pages":[
"pages/translate/translate",
"pages/quickPay/login/login",
"pages/quickPay/confirmPay/confirmPay",
"pages/my/my",
"pages/phoneLogin/phoneLogin",
"pages/payResult/payResult"
"pages/login/index/index"
],
"window":{
"backgroundTextStyle":"light",
......@@ -17,5 +12,11 @@
},
"style": "v2",
"sitemapLocation": "sitemap.json"
"sitemapLocation": "sitemap.json",
"plugins": {
"live-player-plugin": {
"version": "1.3.0",
"provider": "wx2b03c6e691cd7370"
}
}
}
const app = getApp()
import { Base } from '../../utils/base';
import apiList from '../../utils/apiList';
const base = new Base()
Page({
data: {
telphone: ''
},
onLoad: function (options) {
},
// getPhoneNumber: function(e){
// if(e.detail.errMsg == 'getPhoneNumber:ok'){
// wx.request({
// url: 'https://new.open.xueyoubangedu.com/openxcx/auth',
// data: {
// code: code,
// app_type: 'repair',
// authorizer_appid: "wx4c343d3425b433cc"
// },
// success: function (res) {
// if (res.data.code === 200) {
// wx.setStorageSync('token', res.data.data.token)
// that.globalData.token = res.data.data.token
// // login
// wx.request({
// url: that.globalData.globalUrl + '/api/v1.0/login',
// data: {
// token: res.data.data.token
// },
// method: 'GET',
// success: function (res) {
// if (res.data.meta.code === 200) {
// wx.setStorageSync('token', res.data.data.token)
// that.globalData.first_token = res.data.data.token
// typeof cb == "function" && cb()
// } else {
// wx.showToast({
// title: res.data.meta.message,
// icon: 'none'
// })
// }
// }
// })
// } else {
// console.log(res)
// }
// }
// }),
// }else{
// base.toast('授权失败,无法查看')
// }
// },
getPhoneNumber: function (e) {
console.log('绑定手机号的', e)
if (e.detail.errMsg == 'getPhoneNumber:ok') {
wx.request({
url: 'https://new.open.xueyoubangedu.com/openxcx/switchPhone',
data: {
authorizer_appid: 'wx4c343d3425b433cc',
encryptedData: e.detail.encryptedData,
iv: e.detail.iv,
token: app.globalData.token
},
method: 'POST',
success: function (res) {
console.log(res, 11111111)
if (res.data.meta.code === 200) {
let params = {
url: apiList.firstSave_phone,
data: {
user_phone: res.data.data.phoneNumber
},
type: 'POST',
callback: (data) => {
app.globalData.userTel = res.data.data.phoneNumber
try {
wx.setStorageSync('userTel', res.data.data.phoneNumber)
} catch (e) { }
if (app.globalData.backurl) {
if (app.globalData.backurl.indexOf('/pages/tabbar/index/index') != -1 || app.globalData.backurl.indexOf('/pages/tabbar/my/my') != -1) {
wx.switchTab({
url: app.globalData.backurl,
})
} else {
wx.redirectTo({
url: app.globalData.backurl
})
}
} else {
wx.switchTab({
url: '/pages/my/my',
})
}
}
}
base.newRequest(params)
}
}
})
} else {
base.toast('授权失败,无法查看')
}
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<view class="loginBox">
<view class="logo-view">
<image src="/images/logo.png"></image>
</view>
<view class="title">E速报修</view>
<view class="desc">为保护您的账号资产,我们需要您的手机号授权, 以同步支付的商品信息。</view>
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">同意授权</button>
</view>
\ No newline at end of file
.loginBox {
padding-top: 174rpx;
}
.logo-view {
margin: 0 auto 40rpx auto;
}
.logo-view image {
display: block;
margin: 0 auto;
width: 216rpx;
height: 216rpx;
}
.loginBox .title {
font-weight: bold;
text-align: center;
font-size: 38rpx;
font-weight: bold;
color: #000000;
}
.desc {
width: 540rpx;
margin: 30rpx auto 85rpx auto;
font-size: 24rpx;
color: #999;
text-align: center;
line-height: 2;
}
.loginBox button {
align-items: center;
justify-content: center;
width: 620rpx !important;
height: 82rpx !important;
background: linear-gradient(270deg, #0054FF, #1965FF);
color: #fff;
border-radius: 41rpx;
margin: 0 auto;
padding: 0 !important;
font-size: 30rpx;
border: none;
outline: none;
line-height: 82rpx;
}
......@@ -20,18 +20,15 @@ Page({
canIUseGetUserProfile: false
})
}
console.log(this.data.canIUseGetUserProfile, '11111111111111')
},
// 授权获取用户信息
getUserProfile() {
wx.getUserProfile({
desc: '用于完善会员资料',
success: (res) => {
// console.log("res------用于完善会员资料", res)
if(res.errMsg == "getUserProfile:ok") {
if (res.errMsg == "getUserProfile:ok") {
app.saveUserInfo(res, this.showUserInfo)
} else {
// console.log("res.errMsg------用于完善会员资料", res.errMsg)
base.toast(res.errMsg)
}
},
......@@ -42,7 +39,6 @@ Page({
},
// 旧版本 授权获得用户信息
userInfoHandler: function (e) {
let that = this
if (e.detail.errMsg == 'getUserInfo:ok') {
app.saveUserInfo(e.detail, this.showUserInfo)
} else {
......@@ -50,31 +46,13 @@ Page({
}
},
showUserInfo: function () {
console.log(app.globalData.hasTel)
if (app.globalData.hasTel) {
base.toast('登录成功')
setTimeout(() => {
if (app.globalData.backurl) {
if (app.globalData.backurl.indexOf('/pages/tabbar/my/my') != -1 || app.globalData.backurl.indexOf('/pages/tabbar/index/index') != -1 || app.globalData.backurl.indexOf('/pages/tabbar/index/index') != -1) {
wx.switchTab({
url: app.globalData.backurl,
})
} else {
wx.redirectTo({
url: app.globalData.backurl
})
}
} else {
wx.switchTab({
url: '/pages/personal/personal',
})
}
}, 800)
} else {
wx.navigateTo({
url: '/pages/bindTel/bindTel',
})
}
},
base.toast('登录成功')
setTimeout(() => {
if (app.globalData.backurl) {
wx.redirectTo({
url: app.globalData.backurl
})
}
}, 800)
},
})
\ No newline at end of file
<view class="loginbox">
<image class="title_img" src="/images/logo.png"></image>
<view class="title_tip"> E速报修</view>
<view class="title_tip"> 天择人才</view>
<button class="title_btn flex-h flex-vc flex-hc" wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile">
<text class="iconfont icon-weixin1"></text> 微信一键注册/登录
......
const app = getApp()
import { Base } from '../../utils/base.js';
import apiList from '../../utils/apiList';
const base = new Base();
Page({
/**
* 页面的初始数据
*/
data: {
canIUseGetUserProfile: false,
showUserInfo: false,
endLoading: false,
list: [],
next_page: 1, // 下一页
has_more: true, // 是否还有更多
locked: false,
limit: 10,
count: '',//工单总数
showOption: false,
index: 0,
optionsList: [
{
id: 1,
name: '本周'
}, {
id: 2,
name: '今日'
}, {
id: 3,
name: '本月'
}, {
id: 4,
name: '全部'
}
],
time_type: 1,//时间段
imgBox: [],
loginFirst: true
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this
if (wx.canIUse('getUserProfile') && wx.getUserProfile) {
that.setData({
canIUseGetUserProfile: true
})
} else {
that.setData({
canIUseGetUserProfile: false
})
}
app.globalData.tjgs_fresh = false
},
onShow: function () {
this.setData({
isrefresh: this.data.isrefresh ? this.data.isrefresh : false
})
if (this.data.isrefresh || app.globalData.tjgs_fresh) {
this.setData({
isrefresh: false,
endLoading: false,
list: [],
next_page: 1, // 下一页
has_more: true, // 是否还有更多
locked: false,
})
app.globalData.tjgs_fresh = false
setTimeout(() => {
this.getList()
}, 0)
}
},
// 授权获取用户信息
getUserProfile() {
wx.getUserProfile({
desc: '用于完善会员资料',
success: (res) => {
// console.log("res------用于完善会员资料", res)
if (res.errMsg == "getUserProfile:ok") {
app.saveUserInfo(res, this.showUserInfo)
} else {
// console.log("res.errMsg------用于完善会员资料", res.errMsg)
base.toast(res.errMsg)
}
},
fail: (err) => {
base.toast('请先授权,才能验证身份')
}
})
},
// 旧版本 授权获得用户信息
userInfoHandler: function (e) {
let that = this
if (e.detail.errMsg == 'getUserInfo:ok') {
app.saveUserInfo(e.detail, this.showUserInfo)
} else {
base.toast('请先授权,才能验证身份')
}
},
showUserInfo() { // 登录完成之后,执行的事件
console.log(app.globalData.hasTel)
if( !app.globalData.hasTel){
app.globalData.backurl = '/pages/tabbar/my/my'
wx.navigateTo({
url: '/pages/bindTel/bindTel',
})
}
this.setData({
showUserInfo: true
})
this.getList()
},
callPhone(e) {
let tel = e.currentTarget.dataset.tel
wx.makePhoneCall({
phoneNumber: tel
})
},
previewImg: function (e) {
let bigindex = e.currentTarget.dataset.bigindex//外层index
let smallindex = e.currentTarget.dataset.small//内层index
var arr = []
var imgarr = []
var imgArr = []
arr.push(this.data.list[bigindex].image)
for (var i = 0; i < arr.length; i++) {
imgarr.push(arr[i])
for (var j = 0; j < arr[i].length; j++) {
imgArr.push(arr[i][j].url)
}
}
var imgs = imgArr
wx.previewImage({
current: imgs[smallindex],
urls: imgs
})
},
ceshi(){
this.setData({
showOption: false
})
},
showOp() {
this.setData({
showOption: !this.data.showOption
})
},
optionTap(e) {
let Index = e.currentTarget.dataset.index
let id = e.currentTarget.dataset.id
this.setData({
index: Index,
showOption: !this.data.showOption,
time_type: id,
list: [],
next_page: 1
})
this.getList()
},
//保修单列表
getList() {
let params = {
url: apiList.repair_list,
type: "GET",
data: {
page: this.data.next_page,
limit: this.data.limit,
time_type: this.data.time_type
},
callback: (data) => {
var imgArr = []
for (var i = 0; i < data.list.length; i++) {
imgArr.push(data.list[i].image)
}
// console.log(imgArr)
this.setData({
endLoading: true,
list: this.data.next_page == 1 ? data.list : this.data.list.concat(data.list),
has_more: data.more,
next_page: data.page,
locked: false,
count: data.count,
// imgBox: data.list.image
})
},
}
wx.showLoading({
title: '努力加载中...',
})
base.newRequest(params)
},
//学生撤回报修单
withDraw(e) {
let repair_order_id = e.currentTarget.dataset.id
let params = {
url: apiList.repair_withdrawn,
type: "POST",
data: {
repair_order_id: repair_order_id.toString()
},
callback: (data) => {
base.toast('已撤回')
this.setData({
next_page: 1
})
this.getList()
},
}
wx.showLoading({
title: '努力加载中...',
})
base.newRequest(params)
},
//投诉
complaint(e) {
let repair_order_id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/order/complaint/complaint?id=' + repair_order_id,
})
},
//去评价
goPj(e) {
let repair_order_id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/order/evaluate/evaluate?id=' + repair_order_id,
})
},
//收费明细接口
getFree() {
let params = {
url: apiList.material_list,
type: "GET",
data: {},
callback: (data) => {
console.log(data)
},
}
wx.showLoading({
title: '努力加载中...',
})
base.newRequest(params)
},
pay(e) {
var that = this
let repair_order_id = e.currentTarget.dataset.id
let params = {
url: apiList.material_signPay,
type: "GET",
data: {
repair_order_id: repair_order_id
},
callback: (data) => {
console.log(data)
wx.requestPayment({
'timeStamp': data.timeStamp,
'nonceStr': data.nonceStr,
'package': data.package,
'signType': data.signType,
'paySign': data.paySign,
'success': function (res) {
console.log(res);
// that.setData({
// isrefresh: true
// })
setTimeout(() => {
wx.navigateTo({
url: '/pages/payResult/payResult?status=1&repair_order_id=' + repair_order_id,
})
}, 1000)
},
'fail': function (res) {
console.log(res);
setTimeout(() => {
wx.navigateTo({
url: '/pages/payResult/payResult?status=0&repair_order_id=' + repair_order_id
})
}, 1000)
}
})
},
}
wx.showLoading({
title: '努力加载中...',
})
base.newRequest(params)
},
initData: function () {
this.setData({
endLoading: false,
list: [],
has_more: true,
next_page: 1,
locked: false
})
},
onPullDownRefresh: function () {
this.initData()
if (!this.data.locked) {
this.setData({
locked: true
})
this.getList()
}
wx.stopPullDownRefresh()
},
onReachBottom: function () {
if (!this.data.locked && this.data.has_more) {
this.setData({
locked: true
})
this.getList()
}
}
})
\ No newline at end of file
{
"usingComponents": {},
"enablePullDownRefresh": true,
"navigationBarTitleText": "工单"
}
\ No newline at end of file
<!-- <view wx:if="{{showUserInfo}}" catchtap="ceshi"> -->
<view wx:if="{{endLoading}}">
<view class="top flex-h flex-hb flex-vc">
<view class="total">共{{count}}个工单</view>
<view class="screen" catchtap="showOp">
{{optionsList[index].name}}
<view wx:if="{{showOption}}" class="option">
<view class="option-item" catchtap="optionTap" wx:for="{{optionsList}}" wx:key="index"
data-index="{{index}}" data-id="{{item.id}}">{{item.name}}</view>
</view>
</view>
</view>
<view wx:if="{{list.length>0}}">
<view class="repair-order" wx:for="{{list}}" wx:key="index" data-index="{{index}}">
<view class="order-top flex-h flex-hb">
<view class="order-title">工单详情</view>
<view
class="{{item.order_status_display=='已撤回'||item.order_status_display=='已完成'||item.order_status_display=='已退回'? 'status1' : 'status'}}">
{{item.order_status_display}}</view>
</view>
<view class="detail">
<view class="desc">问题描述:</view>
<view class="desc-cont">{{item.repair_type.type_name}}-{{item.description}}</view>
<view class="desc">
<text class="desc-title">客户姓名:</text>
<text class="desc-cont">{{item.realname}}</text>
</view>
<view class="desc">
<text class="desc-title">联系电话:</text>
<text class="desc-cont">{{item.telephone}}</text>
</view>
<view class="desc">
<text class="desc-title">服务地址:</text>
<text
class="desc-cont">{{item.region.region_name}}-{{item.room.room_name}}-{{item.address}}</text>
</view>
<view class="desc flex-h">
<text class="desc-title">预约时间:</text>
<text class="desc-cont" style="margin-right:10rpx">{{item.appointment_date}}</text>
<text class="desc-cont">{{item.appointment_time.start_time}}-</text>
<text class="desc-cont">{{item.appointment_time.end_time}}</text>
</view>
<view class="desc flex-h">
<text class="desc-title">图片详情:</text>
<view class="img" wx:for="{{item.image}}" wx:for-item="item" wx:key="idx"
wx:for-index="childindex">
<image class="img" src="{{item.url}}" data-bigindex="{{index}}" data-small="{{childindex}}"
bindtap="previewImg"></image>
</view>
</view>
<view class="line"></view>
<view wx:if="{{item.can_show_worker_info==1}}">
<view class="desc">
<text class="desc-title">派工对象:</text>
<text class="desc-cont">{{item.work_name ? item.work_name : '无'}}</text>
</view>
<!-- <view class="desc">
<text class="desc-title">联系电话:</text>
<text data-tel="{{item.worker.phone}}" bindtap="callPhone"
class="desc-cont phone">{{item.worker.phone}}</text>
</view> -->
</view>
<view wx:if="{{item.order_status_display=='已转单'}}" class="zd">{{item.orderlog_transfer.remark}}
</view>
<view wx:if="{{item.free_material_order}}" class="pay">
<view class="pay-title">备注耗材</view>
<view class="pay-item flex-h flex-hb" wx:for="{{item.free_material_order.goods}}" wx:for-item="child" wx:key="index">
<view class="type goods_name">{{child.good_detail ? child.good_detail : '类型'}}</view>
<view class="type flex-h">
<view class="goods_name text-line-one">{{child.goods_name}}</view>
<view>*{{child.number}}</view>
</view>
<view class="type">¥{{child.price}}</view>
</view>
</view>
<!-- 待支付耗材 -->
<view wx:if="{{item.no_pay_order.goods.length}}" class="pay">
<view class="pay-title">待支付耗材</view>
<view wx:for="{{item.no_pay_order.goods}}" wx:key="index" wx:for-item="parent">
<view class="pay-item flex-h flex-hb" wx:key="index"
>
<view class="type goods_name text-line-one">{{parent.parent_detail.goods_name}}</view>
<view class="type flex-h">
<view class="goods_name text-line-one">
{{parent.good_detail.goods_name}}
</view>
<view>*{{parent.number}}</view>
</view>
<view class="type">¥{{parent.price}}</view>
</view>
</view>
</view>
<view wx:if="{{item.pay_order.length}}" class="pay">
<view class="pay-title">已支付耗材</view>
<view wx:for="{{item.pay_order}}" wx:key="index" wx:for-item="parent">
<view class="pay-item flex-h flex-hb" wx:for="{{parent.goods}}" wx:key="index"
wx:for-item="child">
<view class="type goods_name text-line-one">{{child.parent_detail.goods_name}}</view>
<view class="type flex-h">
<view class="goods_name text-line-one">
{{child.good_detail.goods_name}}
</view>
<view>*{{child.number}}</view>
</view>
<view class="type">¥{{child.price}}</view>
</view>
</view>
</view>
<view wx:if="{{item.order_status_display=='已退回'}}" class="back">
<view class="back-title">审核员退回</view>
<view class="back-cont">{{item.orderlog_one.remark}}</view>
</view>
<view class="flex-h flex-hb flex-vc">
<view class="time">提交时间: {{item.created_at}}</view>
<view wx:if="{{item.can_withdrawn_btn==1}}" catchtap="withDraw" class="ch-btn"
data-id="{{item.id}}">撤回
</view>
<view data-id="{{item.id}}" wx:if="{{item.can_complaint_btn==1}}" class="ts-btn"
catchtap="complaint">投诉</view>
<view data-id="{{item.id}}" wx:if="{{item.can_appraisal_btn==1}}" class="pj-btn"
catchtap="goPj">评价</view>
<view data-id="{{item.id}}" catchtap="pay" wx:if="{{item.can_pay_btn==1}}" class="pay-btn">付款
</view>
<view wx:if="{{item.complaint}}" class="yts-btn">已投诉</view>
<view wx:if="{{item.is_appraisal==1}}" class="yts-btn">已评价</view>
</view>
</view>
</view>
<view class="blank"></view>
</view>
<view wx:else class="noneBox column">
<image src="/images/none.png"></image>
<view>暂无任何工单哦~</view>
</view>
</view>
<!-- </view> -->
\ No newline at end of file
page {
width: 100%;
padding-top: 38rpx;
padding-left: 30rpx;
padding-right: 30rpx;
box-sizing: border-box
}
.top {
width: 690rpx;
height: 58rpx;
}
.top .total {
color: #727272;
font-size: 28rpx;
}
.top .screen {
width: 176rpx;
height: 58rpx;
background: #FFFFFF;
border: 2rpx solid #0054FF;
border-radius: 12rpx;
color: #0054FF;
font-size: 28rpx;
text-align: center;
line-height: 58rpx;
position: relative;
}
.top .screen .option{
width: 176rpx;
/* height: 200rpx; */
background: #fff;
border: 2rpx solid #0054FF;
position: absolute;
top: 57rpx;
left: -1px;
border-radius: 0 0 12rpx 12rpx;
padding-top: 10rpx;
padding-bottom: 10rpx;
}
.top .screen .option .option-item{
width: 100%;
height: 48rpx;
color: #0054FF;
}
.repair-order {
width: 690rpx;
background: #FFFFFF;
box-shadow: 0px 0px 12px 1px rgba(214, 214, 214, 0.78);
border-radius: 12rpx;
margin-top: 40rpx;
padding: 40rpx 30rpx;
}
.repair-order .order-top {
margin-bottom: 60rpx;
}
.repair-order .order-top .order-title {
color: #727272;
font-size: 32rpx;
}
.repair-order .order-top .status {
color: #0054FF;
font-size: 32rpx;
font-weight: bold;
}
.repair-order .order-top .status1 {
color: #000000;
font-size: 32rpx;
font-weight: bold;
}
.repair-order .detail .desc {
color: #000000;
font-size: 30rpx;
margin-bottom: 20rpx;
}
.repair-order .detail .desc .desc-title {
margin-right: 10rpx;
}
.repair-order .detail .desc-cont {
color: #727272;
font-size: 30rpx;
margin-bottom: 20rpx;
}
.repair-order .detail .phone {
color: #0054FF;
}
.repair-order .detail .desc .img {
width: 120rpx;
height: 120rpx;
margin-right: 20rpx;
border-radius: 8rpx;
}
.repair-order .detail .zd {
color: #727272;
font-size: 30rpx;
margin-bottom: 40rpx;
}
.repair-order .detail .line {
width: 628rpx;
height: 1px;
background: #F1F1F1;
margin-top: 40rpx;
margin-bottom: 40rpx;
}
.repair-order .detail .time {
color: #727272;
font-size: 24rpx;
}
.repair-order .detail .ch-btn {
width: 145rpx;
height: 54rpx;
background: #0054FF;
border-radius: 27rpx;
color: #FFFFFF;
font-size: 24rpx;
text-align: center;
line-height: 54rpx;
}
.repair-order .detail .ts-btn {
width: 112rpx;
height: 54rpx;
background: #FFFFFF;
border: 1px solid #0054FF;
border-radius: 27rpx;
color: #0054FF;
text-align: center;
line-height: 54rpx;
font-size: 24rpx;
}
.repair-order .detail .pj-btn {
width: 112rpx;
height: 54rpx;
background: #0054FF;
border-radius: 27rpx;
color: #FFFFFF;
text-align: center;
line-height: 54rpx;
font-size: 24rpx;
}
.repair-order .detail .pay-btn {
width: 145rpx;
height: 54rpx;
background: #0054FF;
border-radius: 27rpx;
color: #FFFFFF;
text-align: center;
line-height: 54rpx;
font-size: 24rpx;
}
.repair-order .detail .yts-btn {
width: 126rpx;
height: 54rpx;
background: #FFFFFF;
border: 1px solid #727272;
border-radius: 27rpx;
color: #727272;
text-align: center;
line-height: 54rpx;
font-size: 24rpx;
}
.repair-order .detail .pay .pay-title {
color: #000000;
font-size: 30rpx;
margin-bottom: 30rpx;
}
.repair-order .detail .pay .pay-item {
margin-bottom: 30rpx;
}
.repair-order .detail .back {
color: #000000;
font-size: 30rpx;
}
.repair-order .detail .back .back-cont {
color: #727272;
margin-top: 26rpx;
margin-bottom: 20rpx;
}
.repair-order .detail .pay .pay-item .type {
color: #727272;
font-size: 30rpx;
}
.goods_name{
width: 148rpx;
}
.blank {
width: 100%;
height: 150rpx;
}
/* 空白页 */
.noneBox {
padding: 140rpx 0 0;
align-items: center;
font-size: 28rpx;
color: #999;
}
.noneBox image {
width: 215rpx;
height: 337rpx;
margin-bottom: 30rpx;
}
.loginbox {
text-align: center;
padding-top: 271rpx;
}
.title_img {
width: 207rpx;
height: 207rpx;
margin-bottom: 25rpx;
}
.title_tip {
font-size: 36rpx;
font-weight: bold;
margin-bottom: 192rpx;
}
.title_btn {
width: 620rpx !important;
height: 82rpx;
background: linear-gradient(270deg, #0054FF, #1965FF);
border-radius: 41rpx;
font-size: 32rpx;
color: #FFFFFF;
}
.title_btn text {
color: #fff;
font-size: 40rpx;
margin-right: 5rpx;
}
.small_tip {
width: 100%;
text-align: center;
font-size: 26rpx;
color: #989794;
margin-top: 40rpx;
}
\ No newline at end of file
const app = getApp()
import { Base } from '../../utils/base';
import apiList from '../../utils/apiList';
const base = new Base();
Page({
data: {
status: '1', //支付状态
repair_order_id: '',
failData: '',
},
onLoad: function (options) {
this.setData({
status: options.status,
repair_order_id: options.repair_order_id
})
console.log('支付状态-----' + options.status)
console.log('支付状态-----' + options.repair_order_id)
},
back(){
app.globalData.tjgs_fresh = true
wx.switchTab({
url: '/pages/tabbar/my/my',
})
},
payAgain(){
let that = this;
let params = {
url: apiList.material_signPay,
type: "GET",
data: {
repair_order_id: this.data.repair_order_id
},
callback: (data) => {
console.log(data)
wx.requestPayment({
'timeStamp': data.timeStamp,
'nonceStr': data.nonceStr,
'package': data.package,
'signType': data.signType,
'paySign': data.paySign,
'success': function (res) {
console.log(res);
that.setData({
status: 1
})
},
'fail': function (res) {
that.setData({
status: 0
})
}
})
},
}
wx.showLoading({
title: '努力加载中...',
})
base.newRequest(params)
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "支付结果"
}
\ No newline at end of file
<!-- 成功页面 -->
<view wx:if='{{status == 1}}'>
<view class="paySuccess">
<image class="success_img" src="https://wdty.xueyoubangedu.com/wandou/pic_01.png"></image>
<view class="text">支付成功</view>
<view class="btn" catchtap="back">查看工单</view>
</view>
</view>
<!-- 失败页面 -->
<view class="payStatus" wx:else>
<image class="payPic" src="https://wdty.xueyoubangedu.com/wandou/pay_fail.png">
</image>
<view class="statusWords">支付失败</view>
<view class="statusDesc">抱歉,支付出现问题,请尝试重新支付~</view>
<view class="btn" catchtap="payAgain">重新支付</view>
</view>
\ No newline at end of file
/* 支付失败页面 */
.payStatus {
padding-top: 230rpx;
}
.payPic {
display: block;
width: 158rpx;
height: 158rpx;
margin: 0 auto 49rpx;
}
.statusWords {
text-align: center;
font-weight: bold;
font-size: 38rpx;
color: #1A1A1A;
margin-bottom: 30rpx;
}
.statusDesc {
font-size: 28rpx;
color: #4D4D4D;
text-align: center;
}
.payBtns {
width: 100%;
margin-top: 60rpx;
justify-content: space-around;
margin: 60rpx auto 0;
}
.payBtns view {
width: 260rpx;
height: 76rpx;
line-height: 76rpx;
text-align: center;
border: 1rpx solid #CCCCCC;
font-size: 30rpx;
color: #808080;
border-radius: 38rpx;
}
.payBtns view:nth-child(2) {
color: #9FAA4B;
border-color: #9FAA4B;
}
/* 支付成功页面 */
.paySuccess {
padding: 150rpx 0;
}
.success_img {
display: block;
width: 201rpx;
height: 190rpx;
margin: 0 auto 30rpx;
}
.text {
text-align: center;
color: #1A1A1A;
font-size: 30rpx;
font-weight: bold;
}
.cont {
width: 690rpx;
height: 487rpx;
margin: 64rpx auto 40rpx;
background: #fff;
border-radius: 10rpx;
box-shadow: 0px 3rpx 12rpx 0px rgba(0, 0, 0, 0.05);
padding-top: 48rpx;
/* background-image: url('https://wdty.xueyoubangedu.com/wandou/pic_03.png'); */
/* background-size: 100% 100%; */
}
.cont .title {
color: #1A1A1A;
font-size: 24rpx;
text-align: center;
}
.cont .code {
display: block;
width: 211rpx;
height: 211rpx;
margin: 32rpx auto 18rpx;
}
.cont .code image {
width: 100%;
height: 100%;
}
.cont .save {
color: #808080;
font-size: 24rpx;
text-align: center;
}
.cont .wx {
color: #1A1A1A;
font-size: 24rpx;
text-align: center;
margin-top: 20rpx;
}
.cont .wx .copy {
color: #FF6E00;
font-size: 24rpx;
margin-left: 18rpx;
text-decoration: underline;
}
/* 返回按钮样式 */
.btn {
width: 620rpx;
height: 80rpx;
background: linear-gradient(270deg, #0054FF, #1965FF);
border-radius: 40px;
color: #fff;
font-size: 30rpx;
line-height: 80rpx;
text-align: center;
margin: 150rpx auto;
}
\ No newline at end of file
const app = getApp()
const util = require('../../../utils/util');
import apiList from '../../../utils/apiList';
import {
Base
} from '../../../utils/base.js';
const base = new Base()
Page({
/**
* 页面的初始数据
*/
data: {
button: true,
isHide: false,//另一个立即支付按钮(隐藏)
phone: '',
note: '',
tel: '',
templateList: [], //订阅模板消息通知
},
onLoad: function (options) {
// console.log(wx.getStorageSync('userTel'))
// this.getTemplate()
},
onShow: function () {
if (wx.getStorageSync('userTel')) {
this.setData({
tel: wx.getStorageSync('userTel'),
phone: wx.getStorageSync('userTel'),
})
}
},
keyPhone: function (e) {
this.setData({
phone: e.detail.value
})
},
keyNote: function (e) {
this.setData({
note: e.detail.value
})
},
getPhoneNumber: function (e) {
console.log(e)
if (e.detail.errMsg == 'getPhoneNumber:ok') {
let params = {
url: 'user/switchPhone',
data: {
encryptedData: e.detail.encryptedData,
iv: e.detail.iv
},
type: "POST",
callback: (data) => {
base.toast('授权成功')
app.globalData.userTel = data.phoneNumber
wx.setStorageSync('userTel', data.phoneNumber)
this.setData({
tel: wx.getStorageSync('userTel'),
phone: wx.getStorageSync('userTel')
})
}
}
base.newRequest(params)
} else {
base.toast('授权失败,无法查看')
}
},
getTemplate: function () {
var that = this
let params = {
url: 'subscribe/list',
data: {
type: 3
},
callback: (data) => {
that.setData({
templateList: data.template_id
})
}
}
base.newRequest(params)
},
pay(e) {
var that = this
// let repair_order_id = e.currentTarget.dataset.id
let params = {
url: apiList.material_signPay,
type: "GET",
data: {
order_id: 160
},
callback: (data) => {
console.log(data)
wx.requestPayment({
'timeStamp': data.timeStamp,
'nonceStr': data.nonceStr,
'package': data.package,
'signType': data.signType,
'paySign': data.paySign,
'success': function (res) {
console.log(res);
setTimeout(() => {
wx.navigateTo({
url: '/pages/payResult/payResult?status=1&repair_order_id=' + repair_order_id,
})
}, 1000)
},
'fail': function (res) {
console.log(res);
setTimeout(() => {
wx.navigateTo({
url: '/pages/payResult/payResult?status=0&repair_order_id=' + repair_order_id
})
}, 1000)
}
})
},
}
wx.showLoading({
title: '努力加载中...',
})
base.newRequest(params)
},
// pay() {
// let that = this
// that.setData({
// isHide: true,
// button: false
// })
// if(!this.data.phone) {
// base.toast('请输入手机号')
// that.setData({
// isHide: false,
// button: true
// })
// return
// }
// if(!this.data.note) {
// base.toast('请填写备注')
// that.setData({
// isHide: false,
// button: true
// })
// return
// }
// let params = {
// url: '/api/order/quick_pay',
// type: 'post',
// data: {
// price: 240,
// tel: this.data.phone,
// remark: this.data.note,
// // stadium_id: app.globalData.stadium_id
// stadium_id: 21,
// },
// callback: (data) => {
// console.log(data)
// wx.requestPayment({
// 'timeStamp': data.pay.timeStamp,
// 'nonceStr': data.pay.nonceStr,
// 'package': data.pay.package,
// 'signType': data.pay.signType,
// 'paySign': data.pay.paySign,
// 'success': function (res) {
// that.setData({
// isHide: false,
// button: true
// })
// setTimeout(()=>{
// wx.redirectTo({
// url: '/pages/quickPay/payMent/payMent',
// })
// }, 1000)
// },
// 'fail': function (res) {
// that.setData({
// isHide: false,
// button: true
// })
// wx.showToast({
// title: '支付失败请重试',
// icon: 'none',
// duration: 3000
// })
// console.log(res)
// }
// })
// },
// confirmback: () => {
// that.setData({
// isHide: false,
// button: true
// })
// }
// }
// base.newRequest(params)
// }
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "订单支付"
}
\ No newline at end of file
<view>
<view class="logo-view">
<image src="/images/login.png"></image>
</view>
<view class="top">
<view>豌豆体育正式课</view>
<view>¥240</view>
</view>
<!-- <view class="item">
<view class="dataRow flex-h flex-vc flex-hb">
<view class="phone">联系电话</view>
<input type="number" placeholder="请输入手机号" placeholder-class="placeholder" bindinput="keyPhone" value="{{phone}}" />
</view>
<view class="line"></view>
<view class="dataRow flex-h flex-vc flex-hb">
<view class="phone">备注</view>
<input type="text" placeholder="请输入备注" placeholder-style='text-align:right' bindinput="keyNote"
value="{{note}}" />
</view>
</view> -->
<view class="share-btn">
<button class="pay" wx:if="{{button}}" catchtap="pay">立即支付</button>
<button class="pay" wx:if="{{isHide}}">立即支付</button>
</view>
</view>
\ No newline at end of file
page {
background: #F7F8FA;
}
.logo-view image {
display: block;
margin: 96rpx auto 96rpx auto;
width: 216rpx;
height: 216rpx;
}
.top {
width: 690rpx;
height: 192rpx;
background: #FFFFFF;
border-radius: 15rpx;
margin: 0 auto;
text-align: center;
padding-top: 40rpx;
color: #1A1A1A;
}
.top view:nth-child(1) {
margin-bottom: 20rpx;
font-size: 32rpx;
font-weight: bold;
}
.top view:nth-child(2) {
font-size: 52rpx;
font-weight: bold;
}
.item {
width: 690rpx;
height: 192rpx;
background: #FFFFFF;
border-radius: 15rpx;
margin: 20rpx auto;
padding: 38rpx 30rpx 40rpx;
}
/* .dataRow .placeholder {
width: 186rpx;
height: 42rpx;
background: #9FAA4A;
border-radius: 6rpx;
color: #FFFFFF;
font-size: 28rpx;
text-align: center;
line-height: 42rpx;
} */
.item .phone {
color: #4D4D4D;
font-size: 28rpx;
}
.item .phone_btn {
width: 186rpx;
height: 42rpx;
background: #9FAA4A;
border-radius: 6rpx;
color: #FFFFFF;
font-size: 28rpx;
text-align: center;
line-height: 6rpx;
padding-left: 0 !important;
padding-right: 0 !important;
}
input{
text-align: right;
}
.item .line {
width: 620rpx;
height: 1rpx;
background: #EBEBEB;
margin: 24rpx auto;
}
.item .note {
color: #999999;
font-size: 28rpx;
}
.share-btn {
position: fixed;
left: 0;
bottom: 0;
width: 750rpx;
height: 140rpx;
background: #F7F8FA;
}
.share-btn .pay {
width: 620rpx;
height: 80rpx;
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%);
border-radius: 40px;
margin: 30rpx auto;
color: #000000;
font-size: 30rpx;
line-height: 55rpx;
text-align: center;
}
\ No newline at end of file
const app = getApp()
import {
Base
} from '../../../utils/base.js';
const base = new Base()
Page({
data: {
die: false,
// isBindTel: false,
canIUseGetUserProfile: false,
},
onLoad: function (options) {
if (wx.getUserProfile && wx.canIUse('getUserProfile')) {
this.setData({
canIUseGetUserProfile: true
})
} else {
this.setData({
canIUseGetUserProfile: false
})
}
},
onShow() {
this.setData({
// isBindTel: app.globalData.hasTel
})
},
userInfoHandler: function (e) {
if (e.detail.errMsg == 'getUserInfo:ok') {
app.saveUserInfo(e.detail, this.tc)
} else {
base.toast('请先授权,才能验证身份')
}
},
getUserProfile(e) {
wx.getUserProfile({
desc: '获取中',
success: (res) => {
console.log(res)
if (res.errMsg == 'getUserProfile:ok') {
app.saveUserInfo(res, this.tc)
} else {
base.toast('请先授权,才能验证身份')
}
},
fail: function (res) {
console.log(res)
base.toast('授权失败,无法登陆')
}
})
},
tc() {
setTimeout(() => {
wx.redirectTo({
url: '../confirmPay/confirmPay',
})
}, 800)
},
checkVisions: function () {
if (wx.canIUse !== undefined && wx.canIUse('button.open-type.getUserInfo')) {
this.setData({
die: false
})
} else {
this.setData({
die: true
})
wx.showModal({
title: '提示',
content: '当前微信版本过低,无法更好体验该功能,请先升级微信到最新版',
showCancel: true
})
}
},
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "登录"
}
\ No newline at end of file
<view class="loginBox">
<view class="logo-view">
<image src="/images/login.png"></image>
</view>
<view class="title">豌豆队长</view>
<button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"> 微信一键注册/登录 </button>
<button wx:else class="flex-h flex-vc flex-hc" open-type="getUserInfo" bindgetuserinfo="userInfoHandler"
catchtap="checkVisions">
<!-- <image src="/images/my/wx.png"></image> -->
微信一键注册/登录
</button>
<view class="desc">请登录查看更多内容</view>
</view>
<!-- <view>
<import src='../../../components/login/login' />
<template is="login"></template>
</view> -->
\ No newline at end of file
/* @import '/components/login/login.wxss'; */
.loginBox {
padding-top: 174rpx;
}
.logo-view image {
display: block;
margin: 0 auto 41rpx auto;
width: 216rpx;
height: 216rpx;
}
.loginBox .title {
color: #333;
font-weight: bold;
text-align: center;
font-size: 36rpx;
font-weight: bold;
color: #000000;
}
.loginBox button {
width: 620rpx !important;
height: 82rpx !important;
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%);
color: #000000;
border-radius: 41rpx;
margin: 184rpx auto 30rpx auto;
font-size: 30rpx;
border: none;
outline: none;
line-height: 57rpx;
}
.loginBox button image {
width: 45rpx;
height: 36rpx;
margin-right: 14rpx;
}
.desc {
font-size: 24rpx;
color: #999999;
text-align: center;
}
\ No newline at end of file
......@@ -9,41 +9,39 @@ Page({
*/
data: {
endLoading: false,
list: [
{
bigUrl: '/images/1.png',
littleUrl: '/images/1.png',
name: '金地物业秋季线上校园宣讲会',
time: '10-12 09:00'
},
{
bigUrl: '/images/2.png',
littleUrl: '/images/2.png',
name: '泡泡玛特秋季线上校园宣讲会',
time: '10-13 09:00'
},
{
bigUrl: '/images/3.png',
littleUrl: '/images/3.png',
name: '蔚来汽车秋季线上校园宣讲会',
time: '10-14 09:00'
},
],
// list: [
// {
// bigUrl: '/images/1.png',
// littleUrl: '/images/1.png',
// name: '金地物业秋季线上校园宣讲会',
// time: '10-12 09:00'
// },
// {
// bigUrl: '/images/2.png',
// littleUrl: '/images/2.png',
// name: '泡泡玛特秋季线上校园宣讲会',
// time: '10-13 09:00'
// },
// {
// bigUrl: '/images/3.png',
// littleUrl: '/images/3.png',
// name: '蔚来汽车秋季线上校园宣讲会',
// time: '10-14 09:00'
// },
// ],
list: [],
next_page: 1, // 下一页
has_more: true, // 是否还有更多
locked: false,
limit: 10,
roomId: '',//房间号
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
this.getList()
},
/**
......@@ -52,39 +50,122 @@ Page({
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
getList() {
let params = {
url: apiList.live_list,
type: "GET",
data: {
page: this.data.next_page,
limit: this.data.limit
},
callback: (data) => {
console.log('list', data)
this.setData({
endLoading: true,
list: this.data.next_page == 1 ? data.list : this.data.list.concat(data.list),
has_more: data.more,
next_page: data.page,
locked: false,
})
},
}
wx.showLoading({
title: '努力加载中...',
})
base.newRequest(params)
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
goLive(e) {
console.log(e.currentTarget.dataset.roomid)
let roomId = e.currentTarget.dataset.roomid // 房间号
try {
var userInfo = wx.getStorageSync('userInfo')
if (userInfo) {
let customParams = {
isCode: true
}
wx.navigateTo({
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${roomId}&custom_params=${encodeURIComponent(JSON.stringify(customParams))}`
})
} else {
app.globalData.backurl = '/pages/translate/translate'
wx.navigateTo({
url: '/pages/login/index/index',
})
}
} catch (e) { }
},
// 开启订阅通知
impower(e) {
this.setData({
roomId: e.currentTarget.dataset.roomid
})
let that = this
try {
var userInfo = wx.getStorageSync('userInfo')
if (userInfo) {
wx.requestSubscribeMessage({
tmplIds: ["FPC0l1-MagGKXvER1IArYg_n8AoVVCLiCn4guPKctGM"],
success: function (res) {
console.log(res)
if (res["FPC0l1-MagGKXvER1IArYg_n8AoVVCLiCn4guPKctGM"] === 'accept') {
that.meetLive()
}
},
fail: function (res) {
console.log(res)
}
})
} else {
app.globalData.backurl = '/pages/translate/translate'
wx.navigateTo({
url: '/pages/login/index/index',
})
}
} catch (e) { }
},
// 开播提醒预约
meetLive: function () {
let params = {
url: apiList.live_reverse,
type: "POST",
data: {
meeting_live_id: this.data.roomId
},
callback: (data) => {
base.toast("订阅成功")
},
}
wx.showLoading({
title: '努力加载中...',
})
base.newRequest(params)
},
initData: function () {
this.setData({
endLoading: false,
list: [],
has_more: true,
next_page: 1,
locked: false
})
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.initData()
if (!this.data.locked) {
this.setData({
locked: true
})
this.getList()
}
wx.stopPullDownRefresh()
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
if (!this.data.locked && this.data.has_more) {
this.setData({
locked: true
})
this.getList()
}
}
})
\ No newline at end of file
<view>
<view wx:if="{{endLoading}}">
<view wx:if="{{list.length>0}}">
<view class="item" wx:for="{{list}}" wx:key="index" data-index="{{index}}">
<view class="item" wx:for="{{list}}" wx:key="index" data-index="{{index}}" data-roomId="{{item.live.room_id}}"
catchtap="goLive">
<view class="fm">
<view class="time">{{item.time}}</view>
<image class="fm-img" src="{{item.bigUrl}}"></image>
<view class="time">{{item.starttime}}</view>
<image class="fm-img" src="{{item.feedImg}}"></image>
</view>
<view class="company flex-h flex-vc">
<view class="img">
<image src="{{item.littleUrl}}"></image>
<view class="company flex-h flex-vc flex-hb">
<view class="flex-h flex-vc">
<view class="img">
<image src="{{item.one.logo}}"></image>
</view>
<view class="company_name text-line-one">{{item.title}}</view>
</view>
<view class="company_name">{{item.name}}</view>
<view wx:if="{{item.live.islive==101 ||item.live.islive==105}}" class="ing-btn flex-h flex-vc flex-hc">
<text>直播中</text>
<image src="/images/living.gif"></image>
</view>
<view wx:if="{{item.live.islive==102}}" class="yy-btn" catchtap="impower"
data-roomId="{{item.live.room_id}}">预约直播</view>
<view
wx:if="{{item.live.islive==103||item.live.islive==104 || item.live.islive==106 ||item.live.islive==107}}"
class="over-btn">
已结束</view>
</view>
</view>
</view>
<view wx:else class="noneBox column">
<image src="/images/none.png"></image>
<view>暂无任何工单哦~</view>
<view>暂无任何直播哦~</view>
</view>
</view>
\ No newline at end of file
page{
box-sizing: border-box !important;
padding: 30rpx;
page {
width: 100%;
padding-top: 38rpx;
box-sizing: border-box;
background: #F2F4F7;
}
.item{
width: 690rpx;
.item {
width: 686rpx;
border-radius: 16rpx;
background: #FFFFFF;
margin-bottom: 25rpx;
margin: 0 auto 25rpx;
}
.item .fm{
.item .fm {
width: 100%;
height: 310rpx;
border-radius: 16px 16px 0px 0px;
border-radius: 16rpx 16rpx 0px 0px;
position: relative;
}
.item .fm .time{
.item .fm .time {
position: absolute;
top: 30rpx;
left: 30rpx;
width: 160rpx;
height: 42rpx;
background: rgba(0, 0, 0, 0.3);
color:#FFFFFF;
color: #FFFFFF;
font-size: 24rpx;
line-height: 42rpx;
text-align: center;
}
.item .fm .fm-img{
.item .fm .fm-img {
width: 100%;
height: 310rpx;
border-radius: 16px 16px 0px 0px;
border-radius: 16rpx 16rpx 0px 0px;
}
.item .company{
.item .company {
width: 100%;
height: 102rpx;
padding: 38rpx 30rpx;
}
.item .company .img{
.item .company .img {
width: 37rpx;
height: 37rpx;
margin-right: 22rpx;
}
.item .company .img image{
.item .company .img image {
width: 37rpx;
height: 37rpx;
}
.item .company .company_name{
.item .company .company_name {
width: 400rpx;
color: #1A1A1A;
font-size: 30rpx;
font-weight: bold;
......@@ -57,10 +67,57 @@ page{
align-items: center;
font-size: 28rpx;
color: #999;
}
.noneBox image {
}
.noneBox image {
width: 215rpx;
height: 337rpx;
margin-bottom: 30rpx;
}
\ No newline at end of file
}
.sq-btn {
/* width: 100rpx; */
height: 50rpx;
color: #333;
font-size: 24rpx;
text-align: center;
line-height: 50rpx;
color: #fff;
background: cornflowerblue;
border-radius: 18rpx;
}
.yy-btn{
width: 150rpx;
height: 52rpx;
background: linear-gradient(110deg, #2676FF 0%, #1966FF 100%);
border-radius: 26rpx;
color:#FFFFFF;
font-size: 24rpx;
text-align: center;
line-height: 52rpx;
}
.ing-btn{
width: 150rpx;
height: 52rpx;
background: #FFFFFF;
border: 1rpx solid #1966FF;
border-radius: 26rpx;
color: #1966FF;
font-size: 24rpx;
text-align: center;
line-height: 52rpx;
}
.over-btn{
width: 150rpx;
height: 52rpx;
background: #C7CAD1;
border-radius: 26rpx;
color:#FFFFFF;
font-size: 24rpx;
text-align: center;
line-height: 52rpx;
}
.ing-btn image{
width: 28rpx;
height: 28rpx;
}
\ No newline at end of file
module.exports = {
test: '/api/test', // 测试
repair_order: '/api/v1.0/repair/order', // 提交报修单
repair_index: '/api/v1.0/repair/index',//首页参数:维修类型;区域;预约时间
repair_list: '/api/v1.0/repair/list', // 报修单列表
repair_withdrawn: '/api/v1.0/repair/withdrawn', // 学生撤回报修单接口
repair_complaint: '/api/v1.0/repair/complaint', // 投诉接口
repair_appraisal: '/api/v1.0/repair/appraisal', // 评价接口
material_list: '/api/v1.0/material/list', // 收费明细接口
material_signPay: '/api/v1.0/pay', // 收费明细接口
firstSave_phone: '/api/v1.0/firstSavePhone', // 首次保存手机号接口
live_reverse: '/api/xcx/live/reverse',//开播提醒预约
live_list :'/api/xcx/live/list',//获取直播列表
}
\ No newline at end of file
......@@ -30,7 +30,7 @@ class Base {
data: params.data,
method: params.type,
header: {
Authorization: app.globalData.first_token
token: app.globalData.first_token
// 'token': 'sys',
},
success: function (res) {
......@@ -38,17 +38,18 @@ class Base {
if (wx.showLoading()) {
wx.hideLoading() //隐藏加载动画
}
console.log(res)
if (res.statusCode == 200) {
let rstcode = res.data.meta.code, msg = res.data.meta.message
// todo: 状态码判断
if (rstcode == 200) {
params.callback && params.callback(res.data.data) // 请求成功
} else if (rstcode == '-400') { // 400 token过期
} else if (rstcode == '400') { // 400 token过期
if (!flag) {
that.changeToken(params)
// app.getSessionKey(function () {
// that.newRequest(params, true,tips=true)
// })
// that.changeToken(params)
app.getSessionKey(function () {
that.newRequest(params, true, true)
})
}
} else if (rstcode == '404') {
wx.showModal({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment