Просмотр исходного кода

Merge branch 'master' into 装备资源库

xiaohaizhao 1 год назад
Родитель
Сommit
89768c17d9

+ 10 - 0
App.vue

@@ -2,6 +2,16 @@
 export default {
 	onLaunch: function () {
 		require("./utils/tool").mount();
+
+		/* uni.addInterceptor('navigateTo', {//监听跳转
+			success(e) {
+				console.log("监听页面跳转", e)
+			}
+		}) */
+
+		/* 	wx.onAppRoute((res) => {
+				console.log("onAppRoute", res)
+			}) */
 	},
 	onShow: function () {
 	},

+ 1 - 1
components/My_listbox.vue

@@ -2,7 +2,7 @@
     <view class="container" :style="{ background: boxBackground }">
         <view id="mylisttop" />
         <scroll-view class="scroll-view" scroll-y :refresher-enabled='pullDown' :refresher-triggered='inRefresh'
-            :style="{ height: (height || defaultHeight) + 'px' }" :triggered='true' @refresherrefresh='pullToRefresh'
+            :style="{ height: (defaultHeight - 0 || height - 0) + 'px' }" :triggered='true' @refresherrefresh='pullToRefresh'
             :scroll-into-view="scrollIntoView" :lower-threshold='300' :scroll-with-animation="true"
             @scrolltolower='loadThePage'>
             <view id="header">

+ 160 - 0
packageA/advertising/modules/bottom1.vue

@@ -0,0 +1,160 @@
+<template>
+    <view class="box">
+        <image style="width: 100%;"
+            src="https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404111712812810046B1fbafed9.png" mode="widthFix"
+            lazy-load="true" />
+        <view class="function">
+            <view class="cn-title">预约免费设计</view>
+            <view class="en-title">Appointment Free Design</view>
+
+            <view class="form">
+                <view class="text">
+                    <view class="bg" />
+                    <view class="iconfont icon-renyuan-hui" />
+                    <input class="input" type="text" v-model="name" placeholder="请输入您的姓名">
+                </view>
+
+                <view class="text">
+                    <view class="bg" />
+                    <view class="iconfont icon-dianhua-hui" />
+                    <input class="input" type="number" v-model="phoneNumber" placeholder="请输入您的电话号码">
+                </view>
+
+                <view class="text textarea-box">
+                    <view class="bg" />
+                    <view class="iconfont icon-dizhi-hui1" />
+                    <textarea class="textarea" v-model="address" placeholder="请输入您的具体地址(省、市、区/县)" />
+                </view>
+
+                <view class="but" hover-class="navigator-hover" @click="submit">
+                    立即免费预约 >
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+export default {
+    name: "bottom1",
+    data() {
+        return {
+            name: "",
+            phoneNumber: "",
+            address: ""
+        }
+    },
+    methods: {
+        submit(){
+            console.log(this.name)
+            console.log(this.phoneNumber)
+            console.log(this.address)
+        }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.box {
+    position: relative;
+    width: 100vw;
+
+    .function {
+        position: absolute;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100%;
+        z-index: 1;
+
+        .cn-title {
+            width: 100%;
+            text-align: center;
+            line-height: 22px;
+            font-family: PingFang SC, PingFang SC;
+            font-weight: 500;
+            font-size: 16px;
+            color: #FFFFFF;
+            margin-top: 30px;
+        }
+
+        .en-title {
+            width: 100%;
+            text-align: center;
+            font-family: PingFang SC, PingFang SC;
+            font-size: 10px;
+            color: #FFFFFF;
+        }
+
+        .form {
+            width: 260px;
+            margin: 0 auto;
+            margin-top: 20px;
+
+            .text {
+                position: relative;
+                display: flex;
+                align-items: center;
+                width: 260px;
+                height: 45px;
+                border: 1px solid rgba(255, 255, 255, 0.4);
+                border-radius: 2px;
+                overflow: hidden;
+                padding: 0 10px;
+                box-sizing: border-box;
+                margin-bottom: 10px;
+
+                .input {
+                    color: #fff;
+                    flex: 1;
+                }
+
+                .textarea {
+                    color: #fff;
+                    flex: 1;
+                    height: 62px;
+                }
+
+                .iconfont {
+                    color: #fff;
+                    font-size: 20px;
+                    margin-right: 10px;
+                }
+
+            }
+
+            .textarea-box {
+                padding-top: 13px;
+                height: 90px;
+                align-items: flex-start;
+            }
+
+            .text::after {
+                content: "";
+                position: absolute;
+                top: 0;
+                left: 0;
+                width: 100%;
+                height: 100%;
+                background: #fff;
+                opacity: .2;
+            }
+
+            .but {
+                display: flex;
+                align-items: center;
+                justify-content: center;
+                width: 260px;
+                height: 45px;
+                background: #C30D23;
+                border-radius: 2px;
+
+                font-family: PingFang SC, PingFang SC;
+                font-weight: 500;
+                font-size: 14px;
+                color: #FFFFFF;
+            }
+        }
+    }
+}
+</style>

+ 68 - 0
packageA/advertising/modules/page.vue

@@ -0,0 +1,68 @@
+<template>
+    <view>
+        <image v-for="(item, index) in detail.attinfos_pic" :key="item.attachmentid" class="image"
+            :src="item.attinfos[0].url" mode="widthFix" hover-class="navigator-hover" lazy-load="true"
+            @click="onClick(item, index)" />
+   
+        <bottom1 />
+    </view>
+</template>
+
+<script>
+import { viewImage } from "../../../utils/settleFiles";
+import bottom1 from "./bottom1.vue";
+export default {
+    name: "advertisingPage",
+    components: { bottom1 },
+    data() {
+        return {
+            detail: {},
+        }
+    },
+    methods: {
+        getDetail(id) {
+            return new Promise((resolve, reject) => {
+                this.$Http.basic({
+                    "id": "20240408131902",
+                    "content": {
+                        "sat_sharematerialid": id
+                    }
+                }).then(res => {
+                    console.log('获取长图文详情', res)
+                    if (this.cutoff(res.msg)) return;
+                    this.detail = res.data;
+                    resolve(res.data)
+                    uni.setNavigationBarTitle({
+                        title: res.data.title,
+                    })
+                })
+            })
+
+        },
+        onClick(item, index) {
+            console.log(item, index)
+            if (item.jumpurl) {
+                uni.navigateTo({
+                    url: item.jumpurl,
+                    fail: (fail) => {
+                        viewImage(item.attinfos[0].url)
+                    },
+                })
+            } else {
+                viewImage(item.attinfos[0].url)
+            }
+        }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.image {
+    width: 100vw;
+    margin-top: 10px;
+}
+
+.image:first-child {
+    margin-top: 0;
+}
+</style>

+ 48 - 0
packageA/advertising/shareable.vue

@@ -0,0 +1,48 @@
+<template>
+    <view>
+        <page ref="list" />
+        <view style="height: 30px;" />
+    </view>
+</template>
+
+<script>
+import page from "./modules/page.vue";
+export default {
+    components: { page },
+    data() {
+        return {
+            id: "",
+            detail: {}
+        }
+    },
+    onLoad(options) {
+        if (options.id) {
+            this.id = options.id;
+            setTimeout(() => {
+                this.$refs.list.getDetail(options.id).then(detail => {
+                    this.detail = detail;
+                })
+            }, 100)
+        }
+    },
+
+    methods: {
+        getSheraDate() {
+            let detail = this.detail
+            return {
+                title: detail.title, // 标题
+                path: "/packageA/advertising/shareable?id=" + detail.sat_sharematerialid, // 分享路径
+                imageUrl: this.detail.attinfos.find(v => v.usetype == "avatar").url || ""// 分享图
+            };
+        }
+    },
+    onShareAppMessage(res) {
+        return this.getSheraDate()
+    },
+    onShareTimeline() {
+        return this.getSheraDate()
+    }
+}
+</script>
+
+<style></style>

+ 30 - 0
packageA/advertising/unshareable.vue

@@ -0,0 +1,30 @@
+<template>
+    <view>
+        <page ref="list" />
+        <view style="height: 30px;" />
+    </view>
+</template>
+
+<script>
+import page from "./modules/page.vue";
+export default {
+    components: { page },
+    data() {
+        return {
+
+        }
+    },
+    onLoad(options) {
+        if (options.id) {
+            this.id = options.id;
+            setTimeout(() => {
+                this.$refs.list.getDetail(options.id).then(detail => {
+                    this.detail = detail;
+                })
+            }, 100)
+        }
+    }
+}
+</script>
+
+<style></style>

+ 1 - 1
packageA/dailyYttendance/index.vue

@@ -136,7 +136,7 @@ export default {
         //0:阅读记录 1:下载记录:2:发送邮件
         record(type = 0, sat_sharematerialid = 0) {
             try {
-                if (sat_sharematerialid == 0) this.dates[this.viewDate].sat_sharematerialid;
+                if (sat_sharematerialid == 0) sat_sharematerialid = this.dates[this.viewDate].sat_sharematerialid;
                 this.$Http.basic({
                     "id": 20240319142702,
                     "content": {

+ 5 - 5
packageA/exam/detail.vue

@@ -22,7 +22,7 @@
                             lazy-load="true" />
                         <view class="content">
                             <view class="title">{{ item.question }}</view>
-                            <view class="option" v-for="option in item.options" :key="option.sequence"
+                            <view class="option" v-for="option in item.options" :key="option.option"
                                 @click="selectOption(item.rowindex, option.option)"
                                 :class="item.answer.includes(option.option) ? 'active' : ''">
                                 <image class="image" v-if="option.url.length" :src="option.url[0].url" mode="aspectFill"
@@ -50,7 +50,7 @@
 
             <view :style="{ height: tovw(80) }" />
         </My_listbox>
-        <view class="bottom">
+        <view class="bottom" v-if="!(detail.status == '已完成' && detail.testquestions.length <= 1)">
             <view v-if="currentItemId != 1" class="but up" hover-class="navigator-hover" @click="changeQuestions('-')">
                 上一题
             </view>
@@ -59,7 +59,7 @@
                 下一题
             </view>
             <view v-if="detail.testquestions.length == currentItemId && detail.status != '已完成'" class="but submit"
-                @click="loading ? '' : submit" hover-class="navigator-hover">
+                @click="loading ? '' : submit()" hover-class="navigator-hover">
                 <u-loading-icon v-if="loading" />
                 <text v-else>
                     提交
@@ -141,7 +141,7 @@
                         lazy-load="true" />
                     <view class="content">
                         <view class="title">{{ item.question }}</view>
-                        <view class="option" v-for=" option  in  item.options " :key="option.sequence"
+                        <view class="option" v-for=" option  in  item.options " :key="option.option"
                             @click="selectOption(item.rowindex, option.option)"
                             :class="item.answer.includes(option.option) ? 'active' : ''">
                             <image class="image" v-if="option.url.length" :src="option.url[0].url" mode="aspectFill"
@@ -246,7 +246,7 @@ export default {
             setTimeout(() => {
                 query.select(element).boundingClientRect();
                 query.exec(res => {
-                    if (res && res[0]) that.swiperHeight = res[0].height - 10;
+                    if (res && res[0]) that.swiperHeight = res[0].height - 0 + 50;
                 });
             }, 100)
         },

+ 4 - 0
pages.json

@@ -29,6 +29,10 @@
 			"path": "dailyYttendance/index"
 		}, {
 			"path": "dailyYttendance/makePoster"
+		}, {
+			"path": "advertising/shareable"
+		}, {
+			"path": "advertising/unshareable"
 		}]
 	}],
 	"globalStyle": {

+ 117 - 74
static/iconfont/iconfont.css

@@ -1,75 +1,118 @@
 @font-face {
-    font-family: "iconfont"; /* Project id 4131149 */
-    src: url('//at.alicdn.com/t/c/font_4131149_8ru3hljvpmp.woff2?t=1712018915386') format('woff2'),
-         url('//at.alicdn.com/t/c/font_4131149_8ru3hljvpmp.woff?t=1712018915386') format('woff'),
-         url('//at.alicdn.com/t/c/font_4131149_8ru3hljvpmp.ttf?t=1712018915386') format('truetype');
-  }
-  
-  .iconfont {
-    font-family: "iconfont" !important;
-    font-size: 16px;
-    font-style: normal;
-    -webkit-font-smoothing: antialiased;
-    -moz-osx-font-smoothing: grayscale;
-  }
-  
-  .icon-kehuxingming:before {
-    content: "\e6b9";
-  }
-  
-  .icon-dizhi-bai:before {
-    content: "\e6ba";
-  }
-  
-  .icon-a-dianhuashoujihao:before {
-    content: "\e6bb";
-  }
-  
-  .icon-shaixuan:before {
-    content: "\e6b6";
-  }
-  
-  .icon-tika:before {
-    content: "\e6b7";
-  }
-  
-  .icon-shijian:before {
-    content: "\e6b8";
-  }
-  
-  .icon-a-yuncxuanzhong:before {
-    content: "\e6b4";
-  }
-  
-  .icon-a-yuncweixuanzhong:before {
-    content: "\e6b5";
-  }
-  
-  .icon-zanwushuju:before {
-    content: "\e6b1";
-  }
-  
-  .icon-tonggao:before {
-    content: "\e6b2";
-  }
-  
-  .icon-sousuo:before {
-    content: "\e6b3";
-  }
-  
-  .icon-dianhua:before {
-    content: "\e6b0";
-  }
-  
-  .icon-kefu:before {
-    content: "\e6ac";
-  }
-  
-  .icon-dizhi-hei:before {
-    content: "\e6ae";
-  }
-  
-  .icon-dizhi-hui:before {
-    content: "\e6af";
-  }
-  
+  font-family: "iconfont"; /* Project id 4131149 */
+  src: url('//at.alicdn.com/t/c/font_4131149_cbwqjfj5ug.woff2?t=1712816912483') format('woff2'),
+       url('//at.alicdn.com/t/c/font_4131149_cbwqjfj5ug.woff?t=1712816912483') format('woff'),
+       url('//at.alicdn.com/t/c/font_4131149_cbwqjfj5ug.ttf?t=1712816912483') format('truetype');
+}
+
+.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-jiaose:before {
+  content: "\e6c1";
+}
+
+.icon-mendian:before {
+  content: "\e6c2";
+}
+
+.icon-qiye-hui:before {
+  content: "\e6c3";
+}
+
+.icon-dianhua-hui:before {
+  content: "\e6c4";
+}
+
+.icon-renyuan-hui:before {
+  content: "\e6c5";
+}
+
+.icon-dizhi-hui1:before {
+  content: "\e6c6";
+}
+
+.icon-touxiangnv-44:before {
+  content: "\e6c0";
+}
+
+.icon-touxiangnan-44:before {
+  content: "\e6bd";
+}
+
+.icon-shanchu:before {
+  content: "\e6be";
+}
+
+.icon-morenmendian:before {
+  content: "\e6bf";
+}
+
+.icon-youjiantou-bai:before {
+  content: "\e6bc";
+}
+
+.icon-kehuxingming:before {
+  content: "\e6b9";
+}
+
+.icon-dizhi-bai:before {
+  content: "\e6ba";
+}
+
+.icon-a-dianhuashoujihao:before {
+  content: "\e6bb";
+}
+
+.icon-shaixuan:before {
+  content: "\e6b6";
+}
+
+.icon-tika:before {
+  content: "\e6b7";
+}
+
+.icon-shijian:before {
+  content: "\e6b8";
+}
+
+.icon-a-yuncxuanzhong:before {
+  content: "\e6b4";
+}
+
+.icon-a-yuncweixuanzhong:before {
+  content: "\e6b5";
+}
+
+.icon-zanwushuju:before {
+  content: "\e6b1";
+}
+
+.icon-tonggao:before {
+  content: "\e6b2";
+}
+
+.icon-sousuo:before {
+  content: "\e6b3";
+}
+
+.icon-dianhua:before {
+  content: "\e6b0";
+}
+
+.icon-kefu:before {
+  content: "\e6ac";
+}
+
+.icon-dizhi-hei:before {
+  content: "\e6ae";
+}
+
+.icon-dizhi-hui:before {
+  content: "\e6af";
+}