DaMowang 2 лет назад
Родитель
Сommit
e22fdddb12

+ 0 - 11
src/App.vue

@@ -6,17 +6,6 @@ export default {
       shop_name: "茶付宝",
       desc: "茶付宝",
     },
-    openId: "",
-    authorizeWindow: true, //是否可以打开用户信息授权页面,避免重复打开
-    bindPhoneWindow: true, //是否可以打开绑定手机号码页面,避免重复打开
-    hasUpdate: false, // 小程序是否有更新版本 默认为没有
-    newVersionInfo: {
-      num: "1.0.0",
-      desc: "茶付宝上线啦!",
-      updateInfo: [], // 数组形式描述一下具体更新了什么内容
-    }, // 当前小程序最新版本信息
-    msgTmp: null, //订阅消息模板id信息
-    systemUserInfo: "",
   },
   errTips(msg, duration, open) {
     uni.showToast({

+ 0 - 4
src/pages/my-credites/index.vue

@@ -41,11 +41,7 @@
 
 <script>
 let app = getApp();
-// var reqApi = new ReqApi();
 var appEv = app.$vm.$options;
-// var https = app.globalData.ShopUrl;
-// var util = require("@/utils/util.js");
-// import { ReqApi } from "@/utils/reqTools.js";
 export default {
   data() {
     return {

+ 19 - 21
src/pages/my/userinfo.vue

@@ -8,7 +8,7 @@
             <view class="list_title flex_r flex_ac flex_jb"><text>昵</text><text>称:</text></view>
             <input type="text" class="flex_grow" v-model="formDa.nickname" placeholder="请输入昵称" />
         </view>
-        <view class="confimBtn flex_r flex_ac flex_jc" @tap="upda">提交</view>
+        <view class="confimBtn" @tap="upda">提交</view>
     </view>
 </template>
 <script>
@@ -24,10 +24,10 @@ export default {
             },
         };
     },
-    onShow() {
+    onShow() {},
+    onLoad() {
         this.loadData();
     },
-    onLoad() {},
     methods: {
         loadData() {
             let da = uni.getStorageSync("userinfo");
@@ -35,15 +35,16 @@ export default {
             this.formDa.head_pic = da.head_pic;
         },
         upheadimg() {
+            post("v1/user/setup", this.formDa);
             let that = this;
             uni.chooseImage({
                 count: 1, // 最多可以选择的图片张数,默认9
                 sizeType: ["compressed"], // original 原图,compressed 压缩图,默认二者都有
                 sourceType: ["album", "camera"], // album 从相册选图,camera 使用相机,默认二者都有
-                success: function(res) {
-                    var arr = res.tempFiles;
-                    uni.setStorageSync("headImgPath",arr[0].path);
-                    that.goto("/pagesB/image-cropper/index")
+                success(res) {
+                    var url = res.tempFiles[0].path;
+                    uni.setStorageSync("headImgPath",url);
+                    that.goto("/pagesB/image-cropper/index");
                 },
             });
         },
@@ -58,21 +59,15 @@ export default {
         },
         async getuserInfo() {
             await uni.userfun();
-            this.loadData();
         },
     },
 };
 </script>
-<style lang="scss">
-// 页面配置
-.container {
-    width: 100%;
-    overflow: hidden;
-    border-top: 20rpx solid #f5f5f5;
+<style lang="scss" scoped>
+.container{
+    height: 100vh;
+    background-color: #fff;
 }
-
-// 页面配置-end
-
 // 表单
 .list input {
     font-size: 30rpx;
@@ -88,12 +83,15 @@ export default {
 }
 
 .confimBtn {
-    width: 329rpx;
-    height: 73rpx;
-    margin: 74rpx auto 0;
+    width: 500rpx;
+    height: 68rpx;
+    line-height: 68rpx;
+    text-align: center;
+    margin: 68rpx auto 0;
     background: #18bb88;
-    font-size: 40rpx;
+    font-size: 36rpx;
     color: #fff;
+    border-radius: 35rpx;
 }
 
 .option {

+ 16 - 62
src/pages/sign/index.vue

@@ -10,7 +10,6 @@
                         <view class="level">{{ userinfo.level_name }}</view>
                     </view>
                 </view>
-                <!-- <view class="record flex_r flex_ac flex_jc" @tap="NavToSignList">积分记录</view> -->
             </view>
             <!-- 用户信息-end -->
             <!-- 签到信息 -->
@@ -26,7 +25,8 @@
                     </view>
                     <view class="info_con">
                         <image class="info_img" :src="nextSign > 0 ? '/static/sgin/p_back2.png' : '/static/sgin/p_back.png'" mode="" />
-                        <view class="info_texts flex_r flex_ac flex_jc" v-if="nextSign > 0">{{ timer }}</view>
+                        <!-- <view class="info_texts flex_r flex_ac flex_jc" v-if="nextSign > 0">{{ timer }}</view> -->
+                        <uni-countdown class="info_texts flex_r flex_ac flex_jc" v-if="nextSign > 0" :second="nextSign" :showDay="false"/>
                         <view class="info_texts flex_r flex_ac flex_jc" @tap="setSignIn" v-else>立即签到</view>
                     </view>
                 </view>
@@ -70,7 +70,6 @@
     </div>
 </template>
 <script>
-var tim;
 let page = 1;
 let app = getApp();
 var appEv = app.$vm.$options;
@@ -81,7 +80,6 @@ export default {
         return {
             integerInfo: {}, // 积分详情
             userInof: {}, // 用户详情
-            timer: "00:00:00", // 倒计时
             goods: [], // 精品推荐
             haveGoods: false, // 是否有商品
             way_list: [], //兑换方式
@@ -98,15 +96,13 @@ export default {
             canClick: true,
         };
     },
-    onShow() {
-        // this.timer = '00:00:00'
+    onShow() {},
+    onLoad(da) {
         this.userinfo = uni.getStorageSync("userinfo");
         this.loadData();
         this.goodsDay();
     },
-    onHide() {
-        clearInterval(tim);
-    },
+    onHide() {},
     methods: {
         loadData() {
             let data = {
@@ -116,70 +112,28 @@ export default {
                 if (res.code == 0) {
                     this.todaySign = res.data.today_sign;
                     this.totalSign = res.data.total_sign;
-                    this.nextSign = res.data.next_sign;
-                    this.setTime();
+                    this.$set(this, "nextSign", res.data.next_sign)
                 }
             });
         },
-        // 距可以签到倒计时
-        setTime() {
-            let timer = this.nextSign;
-            this.setTimeF(timer);
-            tim = setInterval(() => {
-                if (timer >= 1) {
-                    timer--;
-                } else {
-                    clearInterval(tim);
-                    this.nextSign = 0;
-                }
-                this.setTimeF(timer);
-            }, 999);
-        },
-        setTimeF(timer){
-            let hour =
-                parseInt(timer / 3600) > 9 ?
-                parseInt(timer / 3600) :
-                "0" + parseInt(timer / 3600);
-            let min =
-                parseInt((timer / 60) % 60) > 9 ?
-                parseInt((timer / 60) % 60) :
-                "0" + parseInt((timer / 60) % 60);
-            let sec =
-                parseInt(timer % 60) > 9 ?
-                parseInt(timer % 60) :
-                "0" + parseInt(timer % 60);
-
-            this.timer = hour + ":" + min + ":" + sec;
-        },
         // 签到
         setSignIn() {
-            if (this.canClick) {
-                this.canClick = false;
-                let data = {
-                    time: (new Date().getTime() / 1000).toFixed(0)
-                }
-                post("v1/user/doSign", data).then((res) => {
-                    if (res.code === 0) {
-                        // this.nextSign = res.data.next_sign
-                        this.$set(this, "nextSign", res.data.next_sign)
-                        this.loadData();
-                    } else {
-                        appEv.errTips(res.msg);
-                    }
-                });
-                setTimeout(() => {
-                    this.canClick = true
-                }, 2000);
+            let data = {
+                time: (new Date().getTime() / 1000).toFixed(0)
             }
+            post("v1/user/doSign", data).then((res) => {
+                if (res.code === 0) {
+                    this.loadData();
+                } else {
+                    appEv.errTips(res.msg);
+                }
+            });
         },
 
         // 获取甄选好物
         goodsDay() {
             let that = this;
-            let data = {
-                page: page,
-                type: 4,
-            };
+            let data = { page, type: 4 };
             post("v1/goods/goodsList", data).then((res) => {
                 if (res.code === 0) {
                     let obj = res.data.data;

+ 1 - 1
src/pagesB/scenicSpotTicket/index.vue

@@ -2,7 +2,7 @@
     <div class="scenicSpotTicket">
         <scroll-view @scrolltolower="scrolltolower" class="scroll-view" :scroll-y="true" :scroll-top="scrollTop" @scroll="scroll" :lower-threshold="100">
             <div class="head_box">
-                <uni-easyinput prefixIcon="search" suffixIcon="搜索" v-model="qda.keyWord" placeholder="景点、目的地址、景点主题..." @confirm="onsearch" @change="onsearch" />
+                <uni-easyinput prefixIcon="search" suffixIcon="搜索" v-model="qda.keyWord" placeholder="景点、目的地址、景点主题..." @confirm="onsearch" @change="onsearch" confirmType="search"/>
                 <div class="filter_box flex_r">
                     <div class="filter_item" @click="showAddress = true">
                         <span class="item_name">{{qda.cityName}}</span>