大理市民卡小程序1.0提交
diff --git a/pages/cardlost/cardlost.js b/pages/cardlost/cardlost.js
new file mode 100644
index 0000000..06bbff4
--- /dev/null
+++ b/pages/cardlost/cardlost.js
@@ -0,0 +1,127 @@
+// pages/cardlost/cardlost.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ pwd: ''
+ },
+
+ setPwd: function(e) {
+ this.setData({
+ pwd: e.detail.value
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {
+
+ },
+
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function() {
+
+ },
+ doNext: function() {
+ var pwd = this.data.pwd;
+ if (wx.$isEmpty(pwd)) {
+ return;
+ }
+ wx.showModal({
+ title: '提示',
+ content: '确定要挂失吗',
+ success(res) {
+ if (res.confirm) {
+ var param = {
+ "paypwd": pwd
+ }
+ wx.$doPost('/v1/cardlost', param, function(ok, ret) {
+ if (ok) {
+ // wx.hideLoading();
+ console.log(ret)
+ if (ret.data.status == 200) {
+ wx.showModal({
+ title: '提示',
+ content: '注销成功',
+ showCancel:false,
+ success(res) {
+ if (res.confirm) {
+ wx.navigateTo({
+ url: '../index/index',
+ })
+ }
+ }
+ })
+
+ } else {
+ wx.showModal({
+ title: '错误',
+ content: ret.data.message,
+ duration: 2000
+ })
+
+ }
+ } else {
+ wx.showModal({
+ title: '错误',
+ content: ret.data.msg,
+ duration: 2000
+ })
+
+ }
+ })
+
+ }
+ }
+ })
+
+ }
+})
\ No newline at end of file
diff --git a/pages/cardlost/cardlost.json b/pages/cardlost/cardlost.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/cardlost/cardlost.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/cardlost/cardlost.wxml b/pages/cardlost/cardlost.wxml
new file mode 100644
index 0000000..6c7258d
--- /dev/null
+++ b/pages/cardlost/cardlost.wxml
@@ -0,0 +1,17 @@
+<view class="container">
+
+ <view class="global-background">
+
+ <view class="inline-item center" style="margin-top:50rpx">
+ <view class="input-desc">
+ 支付密码
+ </view>
+ <input placeholder="请输入支付密码 " maxlength="6" password="true" type="number" style="width:60%" bindinput="setPwd"></input>
+
+ </view>
+
+
+ <button bindtap="doNext" class="long-btn" style="width: 90%;">挂失</button>
+
+ </view>
+</view>
\ No newline at end of file
diff --git a/pages/cardlost/cardlost.wxss b/pages/cardlost/cardlost.wxss
new file mode 100644
index 0000000..14027ec
--- /dev/null
+++ b/pages/cardlost/cardlost.wxss
@@ -0,0 +1 @@
+/* pages/cardlost/cardlost.wxss */
\ No newline at end of file