From c008dda9baaf703829a493daddfeed2c0ffc4d83 Mon Sep 17 00:00:00 2001
From: XiaoXinPro 14 IAH5R <568170040@qq.com>
Date: Mon, 22 May 2023 18:01:53 +0800
Subject: [PATCH] upload
---
ext.json | 115 ++++++++++++++++++-
index/user.js | 59 ++++------
index/user.wxml | 2 +-
pages/activityCalendar/activityCalendar.js | 88 ++++++++------
pages/activityCalendar/activityCalendar.wxml | 9 +-
pages/exchangeCard/exchangeCard.js | 60 ++++++----
pages/getphoneInfo/index.js | 12 ++
pages/index/searchbar/detail/index.js | 2 +-
pages/integralmall/index.js | 104 ++++++++++++-----
pages/integralmall/index.wxml | 24 ++--
pages/questionnaire/questionnaire.js | 63 ++++++----
pages/questionnaire/questionnaire.wxml | 20 ++--
pages/questionnaire/questionnaire.wxss | 34 ++++--
13 files changed, 415 insertions(+), 177 deletions(-)
diff --git a/ext.json b/ext.json
index baaffd8..8d94694 100644
--- a/ext.json
+++ b/ext.json
@@ -1 +1,114 @@
-{"ext": {"attr": {"car": {"tjd": {"payPath": "", "tjdAppId": "wx6945d1bda68d7993"}, "etcp": {"payPath": "pages/pay/order-pay-open/main", "etcpAppId": "wxc07f9d67923d676d", "etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback"}, "bolink": {"payPath": "pages/park/park", "bolinkAppId": "wxbd08b4baa10fcc1d"}, "version": "release"}, "mchId": "1630349477", "imgProxy": [{"newUrl": "https://c.malls.iformall.com/img", "orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com"}, {"newUrl": "https://c.malls.iformall.com/img1", "orgUrl": "https://formall.oss-accelerate.aliyuncs.com"}, {"newUrl": "https://c.malls.iformall.com/img2", "orgUrl": "https://wx.qlogo.cn"}], "mchIdOld": "1604439800", "configUrl": "https://c.malls.iformall.com/C/api", "ifStoreApp": "0", "businessSwitch": "1", "businessVersion": "1", "ifHaveWebSocket": "0", "ifHaveCarModular": "0"}, "name": "琅琊金鹏玖玖广场", "weappId": "wx6af487474e8b7fb3", "appVersion": "C.5.1.1"}, "debug": false, "tabBar": {"list": [{"text": "首页", "iconPath": "assets/images/home.png", "pagePath": "index/index", "selectedIconPath": "assets/images/home-a.png"}, {"text": "首页", "iconPath": "assets/images/home.png", "pagePath": "pages/theme/index1/index", "selectedIconPath": "assets/images/home-a.png"}, {"text": "门店", "iconPath": "assets/images/mendian.png", "pagePath": "index/searchbar", "selectedIconPath": "assets/images/mendian-a.png"}, {"text": "停车", "iconPath": "assets/images/park.png", "pagePath": "index/passCar", "selectedIconPath": "assets/images/park-a.png"}, {"text": "我的", "iconPath": "assets/images/user.png", "pagePath": "index/user", "selectedIconPath": "assets/images/user-a.png"}], "custom": true}, "window": {"backgroundTextStyle": "dark", "navigationBarTextStyle": "black", "navigationBarTitleText": "", "navigationBarBackgroundColor": "#FFFFFF"}, "plugins": {"auto-points-plugin": {"version": "2.4.0", "provider": "wxfab2bf944bfc4da6"}, "live-player-plugin": {"version": "1.2.5", "provider": "wx2b03c6e691cd7370"}}, "extAppid": "wx6af487474e8b7fb3", "extEnable": true, "permission": {"scope.userLocation": {"desc": "你的位置信息将用于小程序位置接口的效果展示"}}, "directCommit": false, "networkTimeout": {"request": 30000, "downloadFile": 10000}, "requiredPrivateInfos": ["chooseLocation"]}
\ No newline at end of file
+{
+ "ext": {
+ "attr": {
+ "car": {
+ "tjd": {
+ "payPath": "",
+ "tjdAppId": "wx6945d1bda68d7993"
+ },
+ "etcp": {
+ "payPath": "pages/pay/order-pay-open/main",
+ "etcpAppId": "wxc07f9d67923d676d",
+ "etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback"
+ },
+ "bolink": {
+ "payPath": "pages/park/park",
+ "bolinkAppId": "wxbd08b4baa10fcc1d"
+ },
+ "version": "release"
+ },
+ "mchId": "1630349477",
+ "imgProxy": [
+ {
+ "newUrl": "https://c.malls.iformall.com/img",
+ "orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com"
+ },
+ {
+ "newUrl": "https://c.malls.iformall.com/img1",
+ "orgUrl": "https://formall.oss-accelerate.aliyuncs.com"
+ },
+ {
+ "newUrl": "https://c.malls.iformall.com/img2",
+ "orgUrl": "https://wx.qlogo.cn"
+ }
+ ],
+ "mchIdOld": "1604439800",
+ "configUrl": "https://c.malls.iformall.com/C/api",
+ "ifStoreApp": "0",
+ "businessSwitch": "1",
+ "businessVersion": "1",
+ "ifHaveWebSocket": "0",
+ "ifHaveCarModular": "0"
+ },
+ "name": "琅琊金鹏玖玖广场",
+ "weappId": "wx6af487474e8b7fb3",
+ "appVersion": "C.5.1.1"
+ },
+ "debug": false,
+ "tabBar": {
+ "list": [
+ {
+ "text": "首页",
+ "iconPath": "assets/images/home.png",
+ "pagePath": "index/index",
+ "selectedIconPath": "assets/images/home-a.png"
+ },
+ {
+ "text": "首页",
+ "iconPath": "assets/images/home.png",
+ "pagePath": "pages/theme/index1/index",
+ "selectedIconPath": "assets/images/home-a.png"
+ },
+ {
+ "text": "门店",
+ "iconPath": "assets/images/mendian.png",
+ "pagePath": "index/searchbar",
+ "selectedIconPath": "assets/images/mendian-a.png"
+ },
+ {
+ "text": "停车",
+ "iconPath": "assets/images/park.png",
+ "pagePath": "index/passCar",
+ "selectedIconPath": "assets/images/park-a.png"
+ },
+ {
+ "text": "我的",
+ "iconPath": "assets/images/user.png",
+ "pagePath": "index/user",
+ "selectedIconPath": "assets/images/user-a.png"
+ }
+ ],
+ "custom": true
+ },
+ "window": {
+ "backgroundTextStyle": "dark",
+ "navigationBarTextStyle": "black",
+ "navigationBarTitleText": "",
+ "navigationBarBackgroundColor": "#FFFFFF"
+ },
+ "plugins": {
+ "auto-points-plugin": {
+ "version": "2.4.0",
+ "provider": "wxfab2bf944bfc4da6"
+ },
+ "live-player-plugin": {
+ "version": "1.2.5",
+ "provider": "wx2b03c6e691cd7370"
+ }
+ },
+ "extAppid": "wx6af487474e8b7fb3",
+ "extEnable": true,
+ "permission": {
+ "scope.userLocation": {
+ "desc": "你的位置信息将用于小程序位置接口的效果展示"
+ }
+ },
+ "directCommit": false,
+ "networkTimeout": {
+ "request": 30000,
+ "downloadFile": 10000
+ },
+ "requiredPrivateInfos": [
+ "chooseLocation"
+ ]
+}
\ No newline at end of file
diff --git a/index/user.js b/index/user.js
index 85dfd96..0a67fa5 100644
--- a/index/user.js
+++ b/index/user.js
@@ -188,17 +188,6 @@ Page({
}
},
- gotointegralmall: function () {
- if (this.data.ifSetUserInfo) {
- wx.navigateTo({
- url: '/pages/integralmall/integraHistory/index',
- })
- } else {
- wx.navigateTo({
- url: `/pages/getphoneInfo/index?mineFlag=mine`,
- })
- }
- },
goToOrder() {
if (this.data.ifSetUserInfo) {
@@ -243,8 +232,11 @@ Page({
})
} else {
wx.navigateTo({
- url: `/pages/getphoneInfo/index?mineFlag=mine`,
+ url: '/pages/integralmall/index',
})
+ // wx.navigateTo({
+ // url: `/pages/getphoneInfo/index?mineFlag=mine`,
+ // })
}
},
@@ -309,15 +301,18 @@ Page({
},
goToExchangeCard() {
- if (this.data.ifSetUserInfo) {
- wx.navigateTo({
- url: '/pages/exchangeCard/exchangeCard',
- })
- } else {
- wx.navigateTo({
- url: `/pages/getphoneInfo/index?mineFlag=mine`,
- })
- }
+ wx.navigateTo({
+ url: '/pages/exchangeCard/exchangeCard',
+ })
+ // if (this.data.ifSetUserInfo) {
+ // wx.navigateTo({
+ // url: '/pages/exchangeCard/exchangeCard',
+ // })
+ // } else {
+ // wx.navigateTo({
+ // url: `/pages/getphoneInfo/index?mineFlag=mine`,
+ // })
+ // }
},
goToQuestionnaire() {
@@ -327,8 +322,11 @@ Page({
})
} else {
wx.navigateTo({
- url: `/pages/getphoneInfo/index?mineFlag=mine`,
+ url: '/pages/questionnaire/questionnaireLsit/questionnaireLsit',
})
+ // wx.navigateTo({
+ // url: `/pages/getphoneInfo/index?mineFlag=mine`,
+ // })
}
},
@@ -339,20 +337,11 @@ Page({
})
} else {
wx.navigateTo({
- url: `/pages/getphoneInfo/index?mineFlag=mine`,
- })
- }
- },
-
- goToQuestionnaire() {
- if (this.data.ifSetUserInfo) {
- wx.navigateTo({
- url: '/pages/questionnaire/questionnaireLsit/questionnaireLsit',
- })
- } else {
- wx.navigateTo({
- url: `/pages/getphoneInfo/index?mineFlag=mine`,
+ url: '/pages/complaint/complaint',
})
+ // wx.navigateTo({
+ // url: `/pages/getphoneInfo/index?mineFlag=mine`,
+ // })
}
},
diff --git a/index/user.wxml b/index/user.wxml
index 992110a..8e34114 100644
--- a/index/user.wxml
+++ b/index/user.wxml
@@ -178,7 +178,7 @@
- 问券调查
+ 问卷调查
>
diff --git a/pages/activityCalendar/activityCalendar.js b/pages/activityCalendar/activityCalendar.js
index 94833d2..43dafb5 100644
--- a/pages/activityCalendar/activityCalendar.js
+++ b/pages/activityCalendar/activityCalendar.js
@@ -16,6 +16,7 @@ Page({
signInDay: 1, //0能签到 1是不能签到
rules: [], //积分规则
rewardPoints: "", //记录签到后的奖励积分
+ isPhone: false
},
getSignRule() { //查询签到规则
Http.get({
@@ -52,16 +53,17 @@ Page({
rules: tempArr
})
}
- }).catch(err => {
- wx.showToast({
- title: err.errMsg,
- icon: 'none',
- duration: 2000,
- mask: false
- });
- })
+ }).catch(err => {
+ wx.showToast({
+ title: err.errMsg,
+ icon: 'none',
+ duration: 2000,
+ mask: false
+ });
+ })
},
setContinuousDye() { //获取连续签到天数
+ const that = this
Http.get({
url: config.api.continuousDye
}).then(res => {
@@ -77,11 +79,16 @@ Page({
}
}).catch(err => {
if (err.code == 1989) {
- app.globalData.type = "qd"
- wx.navigateTo({
- url: '/pages/getuserinfo/index',
+ that.setData({
+ continueSign: 0,
+ signInDay: 2,
+ isPhone: false
})
- }else{
+ // app.globalData.type = "qd"
+ // wx.navigateTo({
+ // url: '/pages/getuserinfo/index',
+ // })
+ } else {
wx.showToast({
title: err.errMsg,
icon: 'none',
@@ -90,20 +97,28 @@ Page({
});
}
})
- // .catch(err => {
- // wx.showToast({
- // title: err.errMsg,
- // icon: 'none',
- // duration: 2000,
- // mask: false
- // });
- // })
+ // .catch(err => {
+ // wx.showToast({
+ // title: err.errMsg,
+ // icon: 'none',
+ // duration: 2000,
+ // mask: false
+ // });
+ // })
},
+
setHide() { //设置遮罩成
this.setData({
hideFlag: !this.data.hideFlag
})
},
+
+ goSetPhone() {
+ wx.navigateTo({
+ url: `/pages/getphoneInfo/index?path=activityCalendar`,
+ })
+ },
+
setSign() { //点击签到
Http.post({
url: config.api.userSign,
@@ -122,21 +137,21 @@ Page({
this.getSignRule()
this.setHide()
}
- }).catch(err => {
- wx.showToast({
- title: err.errMsg,
- icon: 'none',
- duration: 2000,
- mask: false
- });
- })
+ }).catch(err => {
+ wx.showToast({
+ title: err.errMsg,
+ icon: 'none',
+ duration: 2000,
+ mask: false
+ });
+ })
},
/**
* 生命周期函数--监听页面加载
*/
- onLoad: function(options) {
+ onLoad: function (options) {
this.setContinuousDye()
this.getSignRule()
},
@@ -144,42 +159,43 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
- onReady: function() {
+ onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
- onShow: function() {
-
+ onShow: function () {
+ this.setContinuousDye()
+ this.getSignRule()
},
/**
* 生命周期函数--监听页面隐藏
*/
- onHide: function() {
+ onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
- onUnload: function() {
+ onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
- onPullDownRefresh: function() {
+ onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
- onReachBottom: function() {
+ onReachBottom: function () {
},
diff --git a/pages/activityCalendar/activityCalendar.wxml b/pages/activityCalendar/activityCalendar.wxml
index ebd1f33..7a287c4 100644
--- a/pages/activityCalendar/activityCalendar.wxml
+++ b/pages/activityCalendar/activityCalendar.wxml
@@ -3,20 +3,21 @@
您已连续签到:{{continueSign}}天
-
+
签到领取积分
签到领取积分
-
+成为会员签到领取积分
+
{{item.desc}}
{{item.score+''}} 积分
已领取
-
+
签到成功
恭喜您已领取{{rewardPoints}}积分
开心收下
-
+
\ No newline at end of file
diff --git a/pages/exchangeCard/exchangeCard.js b/pages/exchangeCard/exchangeCard.js
index 08b58c6..1e613c5 100644
--- a/pages/exchangeCard/exchangeCard.js
+++ b/pages/exchangeCard/exchangeCard.js
@@ -21,11 +21,18 @@ Page({
phone: "",
tempPhone: "",
password: "",
- supportTransfer: ""
+ supportTransfer: "",
+ isPhone: ""
},
// 查询
searchCard(e) {
+ if (!this.data.isPhone) {
+ wx.navigateTo({
+ url: '/pages/getphoneInfo/index?path=exchangeCard',
+ })
+ return
+ }
let code = e.detail.value.code;
this.setData({
code: code
@@ -220,6 +227,12 @@ Page({
},
submit() {
+ if (!this.data.isPhone) {
+ wx.navigateTo({
+ url: '/pages/getphoneInfo/index?path=exchangeCard',
+ })
+ return
+ }
if (this.data.pdwSwitch) {
const password = this.data.password
const numReg = /^\d+$/
@@ -248,31 +261,31 @@ Page({
},
goGive() {
+ if (!this.data.isPhone) {
+ wx.navigateTo({
+ url: '/pages/getphoneInfo/index?path=exchangeCard',
+ })
+ return
+ }
this.getCardDetailOrGoGive(this.data.code, true)
},
// 检查用户登录状态
- checkPhoneStatus() {
- let that = this;
+ checkUserPhone() {
+ const that = this
Http.get({
- url: config.api.checkPhoneStatus,
- })
- .then(res => {
+ url: config.api.checkPhoneStatus
+ }).then(res => {
+ that.setData({
+ isPhone: true
})
- .catch(err => {
- if (err.code == 11005) {
- // 手机号没有授权,将值传到用户手机号授权的页面
- wx.redirectTo({
- url: "/pages/getphoneInfo/index?path=exchangeCard",
- })
- } else {
- wx.showToast({
- title: err.message,
- icon: 'none',
- duration: 2500
- })
- }
+ console.log(this.data.isPhone, 'isPhone');
+ }).catch(err => {
+ that.setData({
+ isPhone: false
})
+ console.log(this.data.isPhone, 'isPhone');
+ })
},
Toast(message, icon) {
@@ -281,9 +294,12 @@ Page({
icon: icon
})
},
+
onLoad() {
- setTimeout(() => {
- this.checkPhoneStatus()
- }, 500);
+ this.checkUserPhone()
+ },
+
+ onShow() {
+ this.checkUserPhone()
}
})
diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js
index 5d2f972..75d3a62 100755
--- a/pages/getphoneInfo/index.js
+++ b/pages/getphoneInfo/index.js
@@ -263,6 +263,18 @@ Page({
wx.navigateTo({
url: `/pages/index/searchbar/detail/index?id=${that.data.id}`
})
+ } else if (that.data.path == 'activityCalendar') {
+ wx.navigateTo({
+ url: `/pages/activityCalendar/activityCalendar`
+ })
+ } else if (that.data.path == 'integralmall') {
+ wx.navigateTo({
+ url: `/pages/integralmall/index`
+ })
+ }else if (that.data.path == 'questionnaire') {
+ wx.navigateTo({
+ url: `/pages/questionnaire/questionnaire`
+ })
} else {
wx.showToast({
title: res.data.msg,
diff --git a/pages/index/searchbar/detail/index.js b/pages/index/searchbar/detail/index.js
index 6ce6581..2ab2fb3 100644
--- a/pages/index/searchbar/detail/index.js
+++ b/pages/index/searchbar/detail/index.js
@@ -61,7 +61,7 @@ Page({
});
that.getList(options.id);
that.getCouponList(options.id);
- that.checkPhoneStatus()
+ // that.checkPhoneStatus()
that.setData({
currentTab: 0
})
diff --git a/pages/integralmall/index.js b/pages/integralmall/index.js
index 87e9cc2..defd352 100644
--- a/pages/integralmall/index.js
+++ b/pages/integralmall/index.js
@@ -19,7 +19,7 @@ Page({
barcode: imgurl.barcode.url,
list: [],
lists: [],
- arrays:[],
+ arrays: [],
myLists: [],
page: 1, // 设置加载的第几次,默认是第一次
pageSize: 10, //返回数据的个数
@@ -32,22 +32,42 @@ Page({
reloadIf: false,
creditAmount: '',
score: '0',
- sort:'',
- hidden:false,
- userCredit:'',
- sortColumn:'',
- sortOrder:'',
- goHomeUrl:"",
- userAvatarUrl:'',//
- userName:'',
+ sort: '',
+ hidden: false,
+ userCredit: '',
+ sortColumn: '',
+ sortOrder: '',
+ goHomeUrl: "",
+ userAvatarUrl: '',//
+ userName: '',
+ isPhone: false
},
- qrcodeH: function () {
+
+ gotograde() {
+ if (this.data.isPhone) {
+ wx.navigateTo({
+ url: '/pages3/setUserInfo/index',
+ })
+ } else {
+ wx.navigateTo({
+ url: `/pages/getphoneInfo/index?path=integralmall`,
+ })
+ }
+ },
+
+ qrcodeH() {
var that = this;
let memberId = that.data.memberId;
if (memberId) {
- wx.navigateTo({
- url: '/pages/specialcourtesy/specialcourtesy'
- })
+ if (this.data.isPhone) {
+ wx.navigateTo({
+ url: '/pages/specialcourtesy/specialcourtesy'
+ })
+ } else {
+ wx.navigateTo({
+ url: `/pages/getphoneInfo/index?path=integralmall`,
+ })
+ }
}
},
goback: function () {
@@ -57,7 +77,7 @@ Page({
})
},
onLoad: function (options) {
- console.log(app.globalData.userName, app.globalData.userAvatarUrl,9999)
+ console.log(app.globalData.userName, app.globalData.userAvatarUrl, 9999)
let that = this;
that.setData({
goHomeUrl: app.globalData.goHomeUrl,
@@ -121,6 +141,9 @@ Page({
showCancel: false
})
})
+
+ this.checkUserPhone()
+
},
//适配不同屏幕大小的canvas
setCanvasSize: function () {
@@ -170,7 +193,7 @@ Page({
}, 1000)
},
// 获得积分,渲染页面
- getPoints(){
+ getPoints() {
let that = this;
Http.get({
url: config.api.integralList,
@@ -194,23 +217,30 @@ Page({
});
})
},
- gotojifen(){
- wx.navigateTo({
- url: '/pages/integralmall/integraHistory/index',
- })
+
+ gotojifen() {
+ if (this.data.isPhone) {
+ wx.navigateTo({
+ url: '/pages/integralmall/integraHistory/index',
+ })
+ } else {
+ wx.navigateTo({
+ url: `/pages/getphoneInfo/index?path=integralmall`,
+ })
+ }
},
//我可换购
- canSort(){
+ canSort() {
let that = this;
- if (that.data.creditAmount !== 0){
+ if (that.data.creditAmount !== 0) {
that.setData({
- allow_load:true,
+ allow_load: true,
userCredit: that.data.creditAmount,
- page:1
+ page: 1
})
that.getList(1)
}
- if (that.data.creditAmount == 0){
+ if (that.data.creditAmount == 0) {
wx.showToast({
title: '快去补充积分吧!',
icon: 'none',
@@ -226,8 +256,8 @@ Page({
if (hid == true) {
hid = false;
that.setData({
- allow_load:true,
- sort :imgurl.up.url,
+ allow_load: true,
+ sort: imgurl.up.url,
sortOrder: 'desc',
sortColumn: 'creditPrice',
page: 1
@@ -241,7 +271,7 @@ Page({
sortOrder: 'asc',
sortColumn: 'creditPrice',
allow_load: true,
- page:1
+ page: 1
})
that.getList(1)
}
@@ -328,6 +358,24 @@ Page({
}, 1400)
}
},
+
+ checkUserPhone() {
+ const that = this
+ Http.get({
+ url: config.api.checkPhoneStatus
+ }).then(res => {
+ that.setData({
+ isPhone: true
+ })
+ console.log(this.data.isPhone, 'isPhone');
+ }).catch(err => {
+ that.setData({
+ isPhone: false
+ })
+ console.log(this.data.isPhone, 'isPhone');
+ })
+ },
+
/**
*
* @param goto拼团券详情
@@ -360,7 +408,7 @@ Page({
sortColumn: '',
sortOrder: '',
userCredit: '',
- page:1,
+ page: 1,
allow_load: true,
})
that.getList(1);
diff --git a/pages/integralmall/index.wxml b/pages/integralmall/index.wxml
index 7e6a86b..02488ab 100644
--- a/pages/integralmall/index.wxml
+++ b/pages/integralmall/index.wxml
@@ -1,10 +1,10 @@
-
+
-
-
+
+
@@ -16,17 +16,17 @@
{{userName}}
- {{levelName}}
+ {{isPhone ? levelName : "成为会员,享受更多权益"}}
-
-
+
+
还需{{upgradeScore}}成长值升级
-
+
{{creditAmount}}
积分详情
@@ -34,7 +34,7 @@
-
+
@@ -43,14 +43,14 @@
我可换购
所需积分
-
+
暂无数据
-
+
@@ -70,9 +70,9 @@
- 立即购买
+ 立即购买
立即换购
- 立即换购
+ 查看
diff --git a/pages/questionnaire/questionnaire.js b/pages/questionnaire/questionnaire.js
index 32acbd5..f011786 100644
--- a/pages/questionnaire/questionnaire.js
+++ b/pages/questionnaire/questionnaire.js
@@ -3,7 +3,7 @@ const Http = require("../../utils/HttpBasics");
var config = require("../../config/config.js");
const util = require("../../utils/util.js");
var app = getApp();
-const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px'
+const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px'
Page({
/**
@@ -16,8 +16,9 @@ Page({
userDetails: "",
thenDate: "",
mouldType: 0,
- mouldConfig:{},
- goHomeUrl:"",
+ mouldConfig: {},
+ goHomeUrl: "",
+ isPhone: false
},
//设置选中项
setLsit(e) {
@@ -98,7 +99,7 @@ Page({
icon: 'none',
duration: 2000,
success: () => {
- setTimeout(() => {
+ setTimeout(() => {
wx.switchTab({
url: this_.data.goHomeUrl
})
@@ -116,6 +117,13 @@ Page({
});
})
},
+
+ goToLogin() {
+ wx.navigateTo({
+ url: `/pages/getphoneInfo/index?path=questionnaire`,
+ })
+ },
+
//是否授权手机号
ifPhoneInfo() {
let that = this;
@@ -133,17 +141,24 @@ Page({
/* 判断是否授权*/
userAuthorization() {
+ const that = this
Http.get({
- url: config.api.checkUserStatus,
+ url: config.api.checkPhoneStatus,
data: {
token: app.globalData.token
}
}).then(res => {
- this.ifPhoneInfo()
+ that.setData({
+ isPhone: true
+ })
+ // this.ifPhoneInfo()
}).catch(err => {
- wx.navigateTo({
- url: `/pages/getuserinfo/index?fromflag=wj&wjId=${this.data.id}`,
+ that.setData({
+ isPhone: false
})
+ // wx.navigateTo({
+ // url: `/pages/getuserinfo/index?fromflag=wj&wjId=${this.data.id}`,
+ // })
})
},
@@ -156,15 +171,15 @@ Page({
url: config.api.questionnaireDetail,
data: param
}).then(res => {
-
-
+
+
res.data.question.startDate_Sing = util.formatTime(res.data.question.startDate, "yyyy-MM-dd hh:mm")
res.data.question.endDate_Sing = util.formatTime(res.data.question.endDate, "yyyy-MM-dd hh:mm")
console.log(res.data.question)
if (res.data.userDetails) {
let temp = res.data.question.topicList
temp.map((item, index) => {
-
+
// res.data.userDetails
item.answers.map(item2 => {
let tempArr = JSON.parse(res.data.userDetails.logList[index].answer)
@@ -193,8 +208,7 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
- onLoad: function(options) {
-
+ onLoad: function (options) {
this.setData({
goHomeUrl: app.globalData.goHomeUrl,
id: options.id,
@@ -207,15 +221,22 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
- onReady: function() {
+ onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
- onShow: function() {
+ onShow: function () {
this.userAuthorization()
+ this.setData({
+ goHomeUrl: app.globalData.goHomeUrl,
+ id: options.id,
+ mouldType: app.globalData.mouldType,
+ mouldConfig: app.globalData.mouldConfig,
+ })
+ this.getDetail()
this.setData({
thenDate: new Date().getTime()
})
@@ -224,35 +245,35 @@ Page({
/**
* 生命周期函数--监听页面隐藏
*/
- onHide: function() {
+ onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
- onUnload: function() {
+ onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
- onPullDownRefresh: function() {
+ onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
- onReachBottom: function() {
+ onReachBottom: function () {
},
/**
* 用户点击右上角分享
- */
- onShareAppMessage: function() {
+ */
+ onShareAppMessage: function () {
var that = this;
var shareObj = {
title: "问卷详情",
diff --git a/pages/questionnaire/questionnaire.wxml b/pages/questionnaire/questionnaire.wxml
index 0f08578..85beb43 100644
--- a/pages/questionnaire/questionnaire.wxml
+++ b/pages/questionnaire/questionnaire.wxml
@@ -1,25 +1,29 @@
-
+
{{question.title}}
- {{'答题时间:'+question.startDate_Sing+'至'+question.endDate_Sing}}
+ {{'答题时间:'+question.startDate_Sing+'至'+question.endDate_Sing}}
{{question.topDesc}}
-
{{ item.type==2? index+1 +'、'+item.title+'(可多选)':index+1 +'、'+item.title}}
{{item_2.name}}
- 未开始
- 已过期
+ 未开始
+ 已过期
提交
- 已参与
- 已下线
- 已上线
+ 已参与
+ 已下线
+ 已上线
+
+
+
+ 暂无可用问卷,请登录以查看问卷!
+
\ No newline at end of file
diff --git a/pages/questionnaire/questionnaire.wxss b/pages/questionnaire/questionnaire.wxss
index 30c4790..c13201e 100644
--- a/pages/questionnaire/questionnaire.wxss
+++ b/pages/questionnaire/questionnaire.wxss
@@ -9,6 +9,18 @@ page {
overflow: hidden;
}
+.notice {
+ font-size: 35rpx;
+ font-weight: 600;
+ text-align: center;
+ margin-top: 50rpx;
+}
+
+.login {
+ width: 80%;
+ margin-top: 50rpx;
+}
+
.imgBox {
width: 96%;
height: 300rpx;
@@ -40,7 +52,8 @@ page {
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; */
}
-.hidBox{
+
+.hidBox {
width: 100%;
height: 100%;
position: fixed;
@@ -48,17 +61,20 @@ page {
left: 0;
background-color: rgba(0, 0, 0, 0.2)
}
-.contcBox{
+
+.contcBox {
width: 80%;
height: 300rpx;
background-color: #fff;
-
+
}
-.time{
+
+.time {
font-size: 32rpx;
padding: 10rpx 0;
color: #999;
}
+
.oneBox {
width: 96%;
margin: 20rpx auto;
@@ -95,23 +111,25 @@ page {
background-color: rgba(243, 151, 56, 1);
margin-top: 10rpx;
}
-.submit{
+
+.submit {
width: 600rpx;
height: 80rpx;
background-color: rgba(0, 153, 255, 1);
color: #fff;
text-align: center;
line-height: 80rpx;
- border-radius: 6rpx;
+ border-radius: 6rpx;
margin: 20rpx auto;
}
-.invalid{
+
+.invalid {
width: 600rpx;
height: 80rpx;
background-color: rgba(0, 0, 0, 0.2);
color: #fff;
text-align: center;
line-height: 80rpx;
- border-radius: 6rpx;
+ border-radius: 6rpx;
margin: 20rpx auto;
}
\ No newline at end of file